2023-09-01 12:09:01 +02:00
|
|
|
< [Documentation](../Readme.md) / [Modding](Readme.md) / Bonus Format
|
2023-08-12 11:39:44 +02:00
|
|
|
|
2023-09-01 11:11:35 +02:00
|
|
|
## Full format
|
2023-08-12 11:39:44 +02:00
|
|
|
|
|
|
|
All parameters but type are optional.
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
{
|
2023-09-23 18:24:20 +02:00
|
|
|
// Type of the bonus. See Bonus Types for full list
|
2023-09-01 00:30:26 +02:00
|
|
|
"type": "BONUS_TYPE",
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// Subtype of the bonus. Function depends on bonus type.
|
2023-09-01 00:30:26 +02:00
|
|
|
"subtype": 0,
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// Value of the bonus. Function depends on bonus type.
|
2023-09-01 00:30:26 +02:00
|
|
|
"val" : 0,
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// Describes how this bonus is accumulated with other bonuses of the same type
|
2023-09-01 00:30:26 +02:00
|
|
|
"valueType": "VALUE_TYPE",
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// Additional info that bonus might need. Function depends on bonus type.
|
2023-09-01 00:30:26 +02:00
|
|
|
"addInfo" : 0, // or [1, 2, ...]
|
2023-08-12 11:39:44 +02:00
|
|
|
|
2023-09-23 18:24:20 +02:00
|
|
|
// How long this bonus should be active until removal.
|
|
|
|
// May use multiple triggers, in which case first event will remove this bonus
|
2023-09-01 00:30:26 +02:00
|
|
|
"duration" : "BONUS_DURATION", //or ["BONUS_DURATION1", "BONUS_DURATION2", ...]"
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// How long this bonus should remain, in days or battle turns (depending on bonus duration)
|
2023-09-01 00:30:26 +02:00
|
|
|
"turns" : 0,
|
2023-08-12 11:39:44 +02:00
|
|
|
|
2023-09-23 18:24:20 +02:00
|
|
|
// TODO
|
2023-09-12 18:58:15 +02:00
|
|
|
"targetSourceType" : "SOURCE_TYPE",
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-09-01 00:30:26 +02:00
|
|
|
"sourceType" : "SOURCE_TYPE",
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-09-01 00:30:26 +02:00
|
|
|
"sourceID" : 0,
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-08-12 11:39:44 +02:00
|
|
|
"effectRange" : "EFFECT_RANGE",
|
2023-09-01 00:30:26 +02:00
|
|
|
|
2023-09-23 18:24:20 +02:00
|
|
|
// TODO
|
2023-09-01 00:30:26 +02:00
|
|
|
"limiters" : [
|
|
|
|
"PREDEFINED_LIMITER", optional_parameters (...), //whhich one is preferred?
|
|
|
|
{"type" : LIMITER_TYPE, "parameters" : [1,2,3]}
|
|
|
|
],
|
|
|
|
|
2023-09-23 18:24:20 +02:00
|
|
|
// TODO
|
2023-08-12 11:39:44 +02:00
|
|
|
"propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)],
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-09-01 00:30:26 +02:00
|
|
|
"updater" : {Bonus Updater},
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-08-12 11:39:44 +02:00
|
|
|
"propagationUpdater" : {Bonus Updater, but works during propagation},
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-08-12 11:39:44 +02:00
|
|
|
"description" : "",
|
2023-09-23 18:24:20 +02:00
|
|
|
|
|
|
|
// TODO
|
2023-08-12 11:39:44 +02:00
|
|
|
"stacking" : ""
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-09-01 11:11:35 +02:00
|
|
|
## Supported bonus types
|
|
|
|
|
|
|
|
- [Bonus Duration Types](Bonus/Bonus_Duration_Types.md)
|
|
|
|
- [Bonus Sources](Bonus/Bonus_Sources.md)
|
|
|
|
- [Bonus Limiters](Bonus/Bonus_Limiters.md)
|
|
|
|
- [Bonus Types](Bonus/Bonus_Types.md)
|
|
|
|
- [Bonus Propagators](Bonus/Bonus_Propagators.md)
|
|
|
|
- [Bonus Updaters](Bonus/Bonus_Updaters.md)
|
|
|
|
- [Bonus Range Types](Bonus/Bonus_Range_Types.md)
|
|
|
|
- [Bonus Value Types](Bonus/Bonus_Value_Types.md)
|
|
|
|
|
2023-08-12 11:39:44 +02:00
|
|
|
## Subtype resolution
|
|
|
|
|
2023-09-12 18:58:15 +02:00
|
|
|
All string identifiers of items can be used in "subtype" field. This allows cross-referencing between the mods and make config file more readable.
|
2023-09-23 18:24:20 +02:00
|
|
|
See [Game Identifiers](Game_Identifiers.md) for full list of available identifiers
|
|
|
|
|
2023-08-12 11:39:44 +02:00
|
|
|
### Example
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"bonus" :
|
|
|
|
{
|
|
|
|
"type" : "HATE",
|
|
|
|
"subtype" : "creature.enchanter",
|
|
|
|
"val" : 50
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
This bonus makes creature do 50% more damage to Enchanters.
|