mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Address code review, fix few more issues with formatting
This commit is contained in:
@@ -12,9 +12,7 @@ Check the files in *config/heroes/* for additional usage examples.
|
||||
|
||||
- Type: Complex
|
||||
- Parameters: valPer20, stepSize=1
|
||||
- Effect: Updates val to
|
||||
|
||||
`ceil(valPer20 * floor(heroLevel / stepSize) / 20)`
|
||||
- Effect: Updates val to `ceil(valPer20 * floor(heroLevel / stepSize) / 20)`
|
||||
|
||||
Example: The following updater will cause a bonus to grow by 6 for every
|
||||
40 levels. At first level, rounding will cause the bonus to be 0.
|
||||
@@ -46,13 +44,9 @@ Remarks:
|
||||
## TIMES_HERO_LEVEL
|
||||
|
||||
- Type: Simple
|
||||
- Effect: Updates val to
|
||||
- Effect: Updates val to `val * heroLevel`
|
||||
|
||||
`val * heroLevel`
|
||||
|
||||
Usage:
|
||||
|
||||
`"updater" : "TIMES_HERO_LEVEL"`
|
||||
Usage: `"updater" : "TIMES_HERO_LEVEL"`
|
||||
|
||||
Remark: This updater is redundant, in the sense that GROWS_WITH_LEVEL
|
||||
can also express the desired scaling by setting valPer20 to 20\*val. It
|
||||
@@ -61,9 +55,7 @@ has been added for convenience.
|
||||
## TIMES_STACK_LEVEL
|
||||
|
||||
- Type: Simple
|
||||
- Effect: Updates val to
|
||||
|
||||
`val * stackLevel`
|
||||
- Effect: Updates val to `val * stackLevel`
|
||||
|
||||
Usage:
|
||||
|
||||
@@ -74,13 +66,9 @@ Remark: The stack level for war machines is 0.
|
||||
## ARMY_MOVEMENT
|
||||
|
||||
- Type: Complex
|
||||
- Parameters: basePerSpeed, dividePerSpeed, additionalMultiplier,
|
||||
maxValue
|
||||
- Effect: Updates val to val+= max((floor(basePerSpeed /
|
||||
dividePerSpeed)\* additionalMultiplier), maxValue)
|
||||
- Remark: this updater is designed for MOVEMENT bonus to match H3 army
|
||||
movement rules (in the example - actual movement updater, which
|
||||
produces values same as in default movement.txt).
|
||||
- Parameters: basePerSpeed, dividePerSpeed, additionalMultiplier, maxValue
|
||||
- Effect: Updates val to `val+= max((floor(basePerSpeed / dividePerSpeed) * additionalMultiplier), maxValue)`
|
||||
- Remark: this updater is designed for MOVEMENT bonus to match H3 army movement rules (in the example - actual movement updater, which produces values same as in default movement.txt).
|
||||
- Example:
|
||||
|
||||
``` jsonc
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
Total value of Bonus is calculated using the following:
|
||||
|
||||
- For each bonus source type we calculate new source value (for all bonus value types except PERCENT_TO_SOURCE and PERCENT_TO_TARGET_TYPE) using the following:
|
||||
`newVal = (val * (100 + PERCENT_TO_SOURCE) / 100))`
|
||||
|
||||
```
|
||||
newVal = (val * (100 + PERCENT_TO_SOURCE) / 100))
|
||||
```
|
||||
|
||||
- PERCENT_TO_TARGET_TYPE applies as PERCENT_TO_SOURCE to targetSourceType of bonus.
|
||||
|
||||
- All bonus value types summarized and then used as subject of the following formula:
|
||||
|
||||
`clamp(((BASE_NUMBER * (100 + PERCENT_TO_BASE) / 100) + ADDITIVE_VALUE) * (100 + PERCENT_TO_ALL) / 100), INDEPENDENT_MAX, INDEPENDENT_MIN)`
|
||||
```
|
||||
clamp(((BASE_NUMBER * (100 + PERCENT_TO_BASE) / 100) + ADDITIVE_VALUE) * (100 + PERCENT_TO_ALL) / 100), INDEPENDENT_MAX, INDEPENDENT_MIN)
|
||||
```
|
||||
|
||||
Semantics of INDEPENDENT_MAX and INDEPENDENT_MIN are wrapped, and first means than bonus total value will be at least INDEPENDENT_MAX, and second means than bonus value will be at most INDEPENDENT_MIN.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Introduction
|
||||
|
||||
Starting from version 1.3, VCMI supports its own campaign format.
|
||||
Campaigns have `*.vcmp file` format and it consists from campaign json and set of scenarios (can be both `*.vmap` and `*.h3m`)
|
||||
Campaigns have `*.vcmp` file format and it consists from campaign json and set of scenarios (can be both `*.vmap` and `*.h3m`)
|
||||
|
||||
To start making campaign, create file named `header.json`. See also [Packing campaign](#packing-campaign)
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ You can modify general properties of the map
|
||||
|
||||
## Player settings
|
||||
|
||||
Open **Map** menu on the top and select **Player settings"
|
||||
Open **Map** menu on the top and select **Player settings**
|
||||
|
||||
<img width="141" src="https://user-images.githubusercontent.com/9308612/188781357-4a6091cf-f175-4649-a000-620f306d2c46.png">
|
||||
|
||||
|
||||
@@ -208,8 +208,10 @@ Link to our mod will looks like that: <https://github.com/vcmi-mods/adventure-ai
|
||||
|
||||
For sanity reasons mod identifier must only contain lower-case English characters, numbers and hyphens.
|
||||
|
||||
`my-mod-name`
|
||||
`2000-new-maps`
|
||||
```
|
||||
my-mod-name
|
||||
2000-new-maps
|
||||
```
|
||||
|
||||
Sub-mods can be named as you like, but we strongly encourage everyone to use proper identifiers for them as well.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user