1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Added markdownlint to Github CI

- Markdown will now be validated as part of Github CI
- Applied auto-fix to most common issues (mostly whitespace related)
- Fixed manually some of more complex cases

Some valid markdownlint rules are currently disabled, to avoid failing
CI, can be enabled in future
This commit is contained in:
Ivan Savenko
2024-11-30 20:20:15 +00:00
parent d4b2ec5b0b
commit 74a4a10f48
78 changed files with 2192 additions and 1360 deletions

View File

@@ -1,6 +1,6 @@
# Boat
``` javascript
``` jsonc
{
// Layer on which this boat moves. Possible values:
// "land" - same rules as movement of hero on land
@@ -27,4 +27,4 @@
// List of bonuses that will be granted to hero located in the boat
"bonuses" : { BONUS_FORMAT }
}
```
```

View File

@@ -6,8 +6,10 @@ Format of rewards is same as in [Rewardable Objects](Rewardable.md)
Deprecated in 1.6. Please use [Rewardable Objects](Rewardable.md) instead. See Conversion from 1.5 format section below for help with migration
### Example
This example defines a rewardable object with functionality similar of H3 creature bank.
See [Rewardable Objects](Rewardable.md) for detailed documentation of these properties.
```jsonc
{
"name" : "Cyclops Stockpile",
@@ -93,6 +95,7 @@ See [Rewardable Objects](Rewardable.md) for detailed documentation of these prop
```
### Conversion from 1.5 format
This is a list of changes that needs to be done to bank config to migrate it to 1.6 system. See [Rewardable Objects](Rewardable.md) documentation for description of new fields
- If your object type has defined `handler`, change its value from `bank` to `configurable`

View File

@@ -1,6 +1,6 @@
# Dwelling
``` javascript
``` jsonc
{
/// List of creatures in this bank. Each list represents one "level" of bank
/// Creatures on the same level will have shared growth and available number (similar to towns)
@@ -19,4 +19,4 @@
{ "amount" : 12, "type" : "earthElemental" }
]
}
```
```

View File

@@ -3,6 +3,7 @@
Flaggable object are those that can be captured by a visiting hero. H3 examples are mines, dwellings, or lighthouse.
Currently, it is possible to make flaggable objects that provide player with:
- Any [Bonus](Bonus_Format.md) supported by bonus system
- Daily resources income (wood, ore, gold, etc)

View File

@@ -34,6 +34,7 @@ Here is schema describing such object
Mode parameter defines a way to exchange different entities. Multiple modes can be specified to support several types of exchange.
Following options are supported:
* `"resource-resource"` - regular resource exchange, like trading post
* `"resource-player"` - allows to send resources to another player
* `"creature-resource"` - acts like freelance guild
@@ -49,6 +50,7 @@ Following options are supported:
### Trading post
Trading post allows to exchange resources and send resources to another player, so it shall be configured this way:
```json
"modes" : ["resource-resource", "resource-player"]
```
@@ -98,4 +100,4 @@ See [Secondary skills](Rewardable.md#secondary-skills) description for more deta
{ "noneOf" : ["necromancy"] },
{ "noneOf" : ["necromancy"] }
]
```
```

View File

@@ -1,7 +1,9 @@
# Rewardable
## Base object definition
Rewardable object is defined similarly to other objects, with key difference being `handler`. This field must be set to `"handler" : "configurable"` in order for vcmi to use this mode.
```jsonc
{
"baseObjectName" : {
@@ -34,6 +36,7 @@ Rewardable object is defined similarly to other objects, with key difference bei
```
## Configurable object definition
```jsonc
// List of potential rewards
"rewards" : [
@@ -173,6 +176,7 @@ This property allows defining "variables" that are shared between all rewards an
Variables are randomized only once, so you can use them multiple times for example, to give skill only if hero does not have this skill (e.g. Witch Hut).
Example of creation of a variable named "gainedSkill" of type "secondarySkill":
```json
"variables" : {
"secondarySkill" : {
@@ -187,6 +191,7 @@ Example of creation of a variable named "gainedSkill" of type "secondarySkill":
```
Possible variable types:
- number: can be used in any place that expects a number
- artifact
- spell
@@ -194,6 +199,7 @@ Possible variable types:
- secondarySkill
To reference variable in limiter prepend variable name with '@' symbol:
```json
"secondary" : {
"@gainedSkill" : 1
@@ -201,7 +207,9 @@ To reference variable in limiter prepend variable name with '@' symbol:
```
## Reset Parameters definition
This property describes how object state should be reset. Objects without this field will never reset its state.
- Period describes interval between object resets in day. Periods are counted from game start and not from hero visit, so reset duration of 7 will always reset object on new week & duration of 28 will always reset on new month.
- If `visitors` is set to true, game will reset list of visitors (heroes and players) on start of new period, allowing revisits of objects with `visitMode` set to `once`, `hero`, or `player`. Objects with visit mode set to `bonus` are not affected. In order to allow revisit such objects use appropriate bonus duration (e.g. `ONE_DAY` or `ONE_WEEK`) instead.
- If `rewards` is set to true, object will re-randomize its provided rewards, similar to such H3 objects as "Fountain of Fortune" or "Windmill"
@@ -215,9 +223,11 @@ This property describes how object state should be reset. Objects without this f
```
## Appear Chance definition
This property describes chance for reward to be selected.
When object is initialized on map load, game will roll a "dice" - random number in range 0-99, and pick all awards that have appear chance within selected number.
Note that object that uses appearChance MUST have continuous range for every value in 0-99 range. For example, object with 3 different rewards may want to define them as
- `"min" : 0, "max" : 33`
- `"min" : 33, "max" : 66`
- `"min" : 66, "max" : 100`
@@ -240,16 +250,19 @@ In other words, min chance of second reward must be equal to max chance of previ
```
## Configurable Properties
Unless stated othervice, all numbers in this section can be replaced with random values, e.g.
```jsonc
"minLevel" : { "min" : 5, "max" : 10 } // select random number between 5-10, including both 5 & 10
"minLevel" : [ 2, 4, 6, 8, 10] // (VCMI 1.2) select random number out of provided list, with equal chance for each
```
In this case, actual value for minLevel will be picked randomly.
In this case, actual value for minLevel will be picked randomly.
Keep in mind, that all randomization is performed on map load and on object reset (if `rewards` field in `resetParameter` was set).
### Current Day
- Can only be used as limiter. To pass, current day of week should be equal to this value. 1 = first day of the week, 7 = last day
```jsonc
@@ -263,6 +276,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Resource
- Can be used as limiter. To pass, player needs to have specified resources. Note that limiter will NOT take resources.
- Can be used as reward to grant resources to player
- If negative value is used as reward, it will be used as cost and take resources from player
@@ -273,6 +287,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
"gold" : -1000,
},
```
- Alternative format that allows random selection of a resource type
```jsonc
@@ -289,6 +304,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Experience
- Can be used as limiter
- Can be used as reward to grant experience to hero
@@ -297,6 +313,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Hero Level
- Can be used as limiter. Hero requires to have at least specified level
- Can be used as reward, will grant hero experience amount equal to the difference between the hero's next level and current level (Tree of Knowledge)
@@ -305,6 +322,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Mana Points
- Can be used as limiter. Hero must have at least specific mana amount
- Can be used as reward, to give mana points to hero. Mana points may go above mana pool limit.
- If negative value is used as reward, it will be used as cost and take mana from player
@@ -320,6 +338,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Mana Percentage
- Can be used as limiter. Hero must have at least specific mana percentage
- Can be used to set hero mana level to specified percentage value, not restricted to mana pool limit (Magic Well, Mana Spring)
@@ -328,14 +347,16 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Movement Points
- Can NOT be used as limiter
- Can be used as reward, to give movement points to hero. Movement points may go above mana pool limit.
```jsonc
"movePoints": 200,
```
### Movement Percentage
- Can NOT be used as limiter
- Can be used to set hero movement points level to specified percentage value. Value of 0 will take away any remaining movement points
@@ -344,6 +365,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Primary Skills
- Can be used as limiter, hero must have primary skill at least at specified level
- Can be used as reward, to increase hero primary skills by selected value
- If reward value is negative, value will be used as cost, decreasing primary skill
@@ -376,12 +398,14 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Secondary Skills
- Can be used as limiter, hero must have secondary skill at least at specified level
- Can be used as reward, to grant secondary skills to hero
- If hero already has specified skill, the skills will be leveled up specified number of times
- If hero does not have selected skill and have free skill slots, he will receive skill at specified level
- Possible values: 1 (basic), 2 (advanced), 3 (expert)
- Each secondary skill can be explicitly specified or randomly selected
```jsonc
"secondary": [
{
@@ -416,6 +440,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Bonus System
- Can be used as reward, to grant bonus to player
- if present, MORALE and LUCK bonus will add corresponding image component to UI.
- Note that unlike most values, parameter of bonuses can NOT be randomized
@@ -433,6 +458,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Artifacts
- Can be used as limiter, hero must have artifact either equipped or in backpack
- Can be used as reward, to give new artifact to a hero
- Artifacts added as reward will be used for text substitution. First `%s` in text string will be replaced with name of an artifact
@@ -458,6 +484,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Spells
- Can be used as limiter
- Can be used as reward, to give new spell to a hero
- Spells added as reward will be used for text substitution. First `%s` in text string will be replaced with spell name
@@ -485,7 +512,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
- Can be used as limiter. Hero must be able to learn spell to pass the limiter
- Hero is considered to not able to learn the spell if:
- - he already has specified spell
- - he does not have a spellbook
- - he does not have a spellbook
- - he does not have sufficient Wisdom level for this spell
```json
@@ -495,10 +522,12 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Creatures
- Can be used as limiter
- Can be used as reward, to give new creatures to a hero
- If hero does not have enough free slots, game will show selection dialog to pick troops to keep
- It is possible to specify probability to receive upgraded creature
```jsonc
"creatures" : [
{
@@ -510,12 +539,14 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Guards
- When used in a reward, these creatures will be added to guards of the objects
- Hero must defeat all guards before being able to receive rewards
- Guards are only reset when object rewards are reset
- Requires `guardsLayout` property to be set in main part of object configuration
- It is possible to add up to 7 slots of creatures
- Guards of the same creature type will never merge or rearrange their stacks
```jsonc
"guards" : [
{ "type" : "archer", "amount" : 20 },
@@ -525,6 +556,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Creatures Change
- Can NOT be used as limiter
- Can be used as reward, to replace creatures in hero army. It is possible to use this parameter both for upgrades of creatures as well as for changing them into completely unrelated creature, e.g. similar to Skeleton Transformer
- This parameter will not change creatures given by `creatures` parameter on the same visit
@@ -536,6 +568,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Spell cast
- Can NOT be used as limiter
- As reward, instantly casts adventure map spell for visiting hero. All checks for spell book, wisdom or presence of mana will be ignored. It's possible to specify school level at which spell will be casted. If it's necessary to reduce player's mana or do some checks, they shall be introduced as limiters and other rewards
- School level possible values: 1 (basic), 2 (advanced), 3 (expert)
@@ -567,6 +600,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Player color
- Can be used as limiter
- Can NOT be used as reward
- Only players with specific color can pass the limiter
@@ -576,6 +610,7 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Hero types
- Can be used as limiter
- Can NOT be used as reward
- Only specific heroes can pass the limiter
@@ -585,10 +620,11 @@ Keep in mind, that all randomization is performed on map load and on object rese
```
### Hero classes
- Can be used as limiter
- Can NOT be used as reward
- Only heroes belonging to specific classes can pass the limiter
```jsonc
"heroClasses" : [ "battlemage" ]
```
```