(→Stats) |
(→Combat related: there doesn't seem to be a rangedAttacks stat) |
||
Line 294: | Line 294: | ||
;damage, rangedDamage, meleeDamage |
;damage, rangedDamage, meleeDamage |
||
:Total, ranged and melee {{damage}}. |
:Total, ranged and melee {{damage}}. |
||
− | ;attacks |
+ | ;attacks, meleeAttacks |
− | :Total, |
+ | :Total, and melee {{attacks}}. |
;armorPenetration, rangedArmorPenetration, meleeArmorPenetration |
;armorPenetration, rangedArmorPenetration, meleeArmorPenetration |
||
:Total, ranged and melee {{armor penetration}}. |
:Total, ranged and melee {{armor penetration}}. |
Revision as of 01:11, 29 November 2018
Modifiers are a powerful tool to be used in modding. Here is an example for their basic structure (AssaultDoctrine.xml):
<modifiers> <modifier> <conditions> <unit> <type name="SpaceMarines/AssaultSpaceMarine"/> </unit> </conditions> <effects> <accuracy add="2"/> </effects> </modifier> </modifiers>
<modifiers>
Contains any number of modifiers.
There are a couple alternatives to the standard <modifiers> tag which trigger during different times and apply to different targets, more information below.
Code | Explanation |
---|---|
<modifiers> </modifiers> |
Modifiers that are applied when the unit receives the trait. |
<onCombatOpponentModifiers> </onCombatOpponentModifiers> |
Modifiers that apply to the target of an attack. Used to apply a trait to an enemy in Concussive.xml. |
<opponentModifiers> </opponentModifiers> |
Similar to onCombatOpponentModifiers, but only seems to last for the duration of the attack. Used in Lance.xml to limit the enemy's armor value to 8 for the duration of the attack. |
<onTraitRemovedModifiers> </onTraitRemovedModifiers> |
Modifiers that apply when the trait is removed. |
<onTileEnteredModifiers> </onTileEnteredModifiers> |
Modifiers that apply to units that entered this tile. Found in ClusterMines.xml |
<perTurnModifiers> </perTurnModifiers> |
Modifiers that apply at the start of each turn? |
<onUnitDisappearedModifiers> </onUnitDisappearedModifiers> |
Modifiers that apply when the unit that carries this trait is destroyed. Found in PsychneueinInfestation.xml |
<modifier>
Contains effects and optionally also triggering conditions.
The <modifier> tag can have the following attributes:
<modifier visible="0">
Causes the modifier effects not to be visible in the tooltip.
<modifier requiredUpgrade="Necrons/CityDefenseBonus">
Causes the modifier effects to require a research upgrade to be unlocked.
<conditions>
Contains conditions which all have to be true for the effects to be applied.
Code | Explanation |
---|---|
<unit> </unit> <building> </building> <weapon> </weapon> <tile> </tile> <player> </player> |
Used when the conditions check for a unit, building, weapon, tile or player. |
<encounter> <opponent> </opponent> </encounter> |
Used when the conditions check for the target enemy unit of an attack. |
The tags above are needed for the following checks (see example at the top of the page):
Code | Explanation |
---|---|
<enemy/> |
Checks if the object is an enemy. |
<allied/> |
Checks if the object is allied. |
<type name="SpaceMarines/AssaultSpaceMarine"/> |
Checks if the object is a specific kind of object. |
<[Stat] greater="X"/> |
Checks if a stat of the object is bigger than X. |
<[Stat] less="X"/> |
Checks if a stat of the object is smaller than X. |
<trait name="Flyer"/> |
Checks if the object has a certain trait. Use '<noTrait ...' for objects that don't have the trait. |
<overwatch/> |
Checks if it is during a unit's overwatch attack. |
<unitsInRange type="SpaceMarines/ThunderfireCannon" range="1" count="1" allied="1"/> |
The 'type' attribute is optional. Checks if an amount of units are within a certain range and if they are allied or not. |
<feature name="Forest"/> |
Checks about a tile's terrain features. |
<enemyMajorityInRange range="1"/> |
Not sure. Found in rampage.xml. |
<faction name="Neutral"/> |
Checks a player's faction. Use '<noFaction ...' for players that don't have the faction. |
There is also this attribute:
Code | Explanation |
---|---|
<unit match="Any"> <opponent match="Any"> |
No idea what this is used for. |
This one seems to work slightly differently because it's found outside of modifiers:
Code | Explanation |
---|---|
<targetConditions> <unit> <trait name="Flyer"/> </unit> </targetConditions> |
No idea what this is used for. Found in bomb.xml and GroundAttack.xml. |
<effects>
Can do a number of different things like change values or spawn and remove units or apply traits to units. For a list of things that can be inserted for [Stat], see Stats
Code | Explanation |
---|---|
<[Stat] set="X"/> |
Sets the base value to X. The value can still be increased or decreased by other modifiers. |
<[Stat] add="X"/> |
Adds or subtracts (if negative) X from the value. |
<[Stat] mul="0.5"/> |
Adds or subtracts (if negative) a percentage of the value to the value. |
<[Stat] min="6" max="6"/> |
Sets the minimum and maximum value. This can also just be only one of the two. |
<[Stat] addMax="6" addMin="2"/> |
Used for effects with multiple ranks like hero abilities. |
<[Stat] mulMax="0.25" mulMin="0.05"/> |
Used for effects with multiple ranks like hero abilities. |
<[Stat] minMax="0.5" minMin="0.5"/> |
Used for effects with multiple ranks like hero abilities. |
<weaponDamage weapon="Blighted"/> |
Deals the damage of a specific weapon. |
<addTrait duration="1" name="Concussion"/> |
Adds a trait for a specific duration. |
<removeUnit/> |
Removes the unit. |
<removeFeature name="ClusterMines"/> |
Removes the terrain feature. |
<addUnit name="Neutral/Psychneuein"/> |
Spawns a unit. |
Stats
Stats are values that can be changed by effects or checked by conditions.
Basic unit stats
- armor
- Armour
- hitpoints, hitpointsMax, hitpointsFraction
- Current and maximum Hitpoints. Fraction is a fraction of the max hitpoints, but applied to the current hitpoints.
- healthPercentage
- Might be the remaining health as a percentage. Used for conditions.
- morale, moraleMax
- Current and maximum Morale.
- movement, movementMax
- Current and maximum Movement.
- movementCost
- The movement cost of a tile. A forest increases movement cost by 1. A city sets the maximum to 1 for allied units. <movementCost min="100"/> force the move to end.
- healingRate
- Healing Rate
- cargoSlots
- Cargo Slots
- production
- .
- productionCost
- requisitions, energy, food, ore, influence
- Produces resources per turn when positive, costs upkeep per turn when negative. When applied as mul to a tile then it will be the tile's resource yield.
- requisitionsCost, energyCost, foodCost, oreCost, influenceCost
- One time production cost.
- research
- production or upkeep? Can this be production cost as well?
- loyalty
- bonus or penalty.
- growth
- Population Growth for cities.
- populationLimit
- Population housing for cities.
Other stats
- actionPointsMax
- Action Points When set to 0, the unit won't be able to shoot. Found in stunned.xml. Can't be used for conditions?
- stealth
- Maybe makes units invisible, maybe makes them ignore overwatch? <stealth add="1"/> found in forest.xml.
- cargoSlotsRequired
- How many Cargo Slots a unit takes up? -1 means untransportable.
- influencePerExperience
- Sets an amount of influenced gained with experience. Used by the Space Marine Captain ability.
- moraleLossFactor
- Increases or slows down Morale loss. Used by vox caster and mobrule.
- hitpointsPerMoraleLoss
- How much Hitpoints are lost (maybe gained) by morale loss?
- accuracy, rangedAccuracy, meleeAccuracy
- Total, ranged and melee Accuracy.
- damage, rangedDamage, meleeDamage
- Total, ranged and melee Damage.
- attacks, meleeAttacks
- Total, and melee Attacks.
- armorPenetration, rangedArmorPenetration, meleeArmorPenetration
- Total, ranged and melee Armour Penetration.
- attacksTaken
- Increases amount of attacks when attacked? Found in swarms.xml.
- additionalMembersHit
- Applies the weapon damage to multiple members of a squad. Used by blast and template weapons. See damage calculation.
- circumstanceMeleeDamage
- Melee damage modifier. Used by Fear.xml and Zealot.xml.
- minDamageFromHitpointsFraction
- Used by Gauss: Scales the minimum damage with the hitpoints of the target unit.
weapons. - damageFromHitpoints
- Used by Gauss: Scales the minimum damage with the hitpoints of the target unit.
weapons. - rangedDamageReduction, invulnerableDamageReduction, feelNoPainDamageReduction, witchfireDamageReduction, cityDamageReduction, heroDamageReduction
- Types of Damage Reduction. See damage calculation.
- rangedDamageReductionBypass
- Makes attacks ignore ranged Damage Reduction. <rangedDamageReductionBypass add="1.0"/> will bypass 100%.
- damageTaken
- Changes how much damage is taken? Found in misfortune.xml.
Other information
For traits, the category="buff" or category="debuff" attribute controls the colour of the icon. Buff is green and debuff red.