Ruleset Reference OXCE+ (OpenXcom)

From UFOpaedia
Jump to: navigation, search

A reference of all the customizable values of everything in a ruleset, according to OXCE+. This page should be updated as new versions become available in order to explain the additions to the Ruleset Reference.

Some guidelines:

  • If a value is omitted from the ruleset, the default is used. You cannot omit required values.
  • Text strings (eg. names) are represented by string IDs from the language files
  • Numerical IDs (used for sprites, sounds, etc.) start at 0, not 1.
  • Boolean (yes/no) values are represented by true/false.
  • World coordinates are represented in degrees (see WORLD.DAT).
  • Money amounts (prices, costs, etc.) are represented in dollars.
  • All file paths are case insensitive, but IDs (such as string IDs, music names, or cutscene names) are case sensitive. In general, though, if it works on one operating system, it will work on all operating systems.

Items are ordered as they come in the ruleset. To override this, you can specify a listOrder. You can find the default listOrders in Ruleset List Order.

Crafts

Defines one of the X-COM crafts that go on interception missions, listed in "crafts:".

Value Description Default
sightRange  ???
allowAlienBaseDetection Determines whether this craft can detect alien bases on Geoscape true
weapons Determines the number of craft weapons that this craft can carry (up to 4) 2
weaponsType Definition of allowed weapon types in craft. Max 4 different types per slot:
  • - 0 #slot 1 accepts weapons with type 0. This is default.
  • - 0 #slot 2 accepts weapons with type 0.
  • - [0, 4, 13] #slot 3 accepts weapons with type 0, 4 and 13.
  • - 1 #slot 4 accepts weapons with type 1.
weaponStrings #string ID used by Geoscape craft status:
  • - STR_WEAPON_ONE
  • - STR_WEAPON_TWO
  • - STR_WEAPON_THREE
  • - STR_WEAPON_FOURTH
hitBonus Bonus percentage given by this craft to all weapons hit chance. Range [0, 100]. 0
avoidBonus Bonus percentage to craft dodge chance. Range [0, 100]. 0
powerBonus Bonus percentage to all weapons damage. Range [0, 100]. 0
armor Amount of blocked damage per hit. 0

Craft Weapons

Defines one of the weapons equipped by X-COM craft for shooting down UFOs, listed in "craftWeapons:".

Value Description Default
weaponType  ??? 0
stats Adds the following values to the craft's stats:
  • fuelMax: 0 #additive bonus to craft stats.
  • damageMax: 0 #additive bonus to craft stats.
  • speedMax: 0 #additive bonus to craft stats.
  • accel: 0 #additive bonus to craft stats.
  • radarRange: 0 #additive bonus to craft stats.
  • radarChance: 0 #additive bonus to craft stats.
  • sightRange: 0 #additive bonus to craft stats.
  • hitBonus: 0 #bonus percentage to all weapons hit chance. Range [0, 100].
  • avoidBonus: 0 #bonus percentage to craft dodge chance. Range [0, 100].
  • powerBonus: 0 #bonus percentage to all weapons damage. Range [0, 100].
  • armor: 0 #amount of blocked damage per hit.


UFOs

Defines one of the UFOs that invade Earth, listed in "ufos:".

Value Description Default
hunterKillerPercentage 100 = always created as HK (hunts XCom craft) 0
huntMode 0 (default) = prefer interceptors, 1 = prefer transports, 2 = random (generated at spawn) 0
huntSpeed 0 = maintain current speed, 100 = max speed, 100+ = also possible -
huntBehavior Only applies to HKs, not to normal UFOs (see notes at end for more details) 2
hitBonus Bonus percentage to all weapons hit chance. 0
avoidBonus Bonus percentage to UFO dodge chance. 0
powerBonus Bonus percentage to all weapons damage. 0
armor Amount of blocked damage per hit. 0
craftCustomDeploy Override craft default weapon deploy. Example: STR_BATTLESHIP_1
missionCustomDeploy Override mission default weapon deploy. Example: STR_TERROR_MISSION_2
raceBonus Bonus stats per race:
  • STR_SECTOID: #name of race that bonus apply
    • damageMax: 0 #additive bonus to craft stats
    • speedMax: 0 #additive bonus to craft stats
    • accel: 0 #additive bonus to craft stats
    • sightRange: 0 #additive bonus to craft stats
    • hitBonus: 0 #bonus percentage to all weapon hit chance. Range [0, 100]
    • avoidBonus: 0 #bonus percentage to craft avoid chance. Range [0, 100]
    • powerBonus: 0 #bonus percentage to all weapon damage. Range [0, 100]
    • armor: 0 #amount of blocked damage per hit
    • craftCustomDeploy: STR_BATTLESHIP_3 #override craft default weapon deploy
    • missionCustomDeploy: STR_TERROR_MISSION_2 #override mission default weapon deploy

huntMode

When hunting interceptors:

  • allowLanding: false is preferred
  • craft without soldiers is preferred
  • the less pilots onboard, the more attractive
  • the less damaged craft, the more attractive (just to allow damaged craft to escape easier when fighting more HKs)

When hunting transports:

  • allowLanding: true is preferred
  • the more soldiers onboard, the more attractive

huntBehavior

  • 0 = flee if losing (i.e. if ufo damage is more than 33% (=effective 66%) and craft damage is less than 50%)
  • 1 = never flee, when damage reaches 50% (=effective 100%), self-destruct instead of crashing
  • 2 = (default) randomly choose 0 or 1 at spawn

If huntBehaviour is used instead on alienMissions, ufo waves section:

  • -1 = (default) use UFO's setting
  • 0,1,2 = override UFOs setting with this new setting

Dump of example rule set from OXCE

Example of usage:

In metadata.yml:

reservedSpace: 4 #how many BIGOBS.PCK/FLOOROB.PCK/BATTLE.CAT etc. reserve for that mod, this is multiply of default reserved size.


In *.rul:

itemCategories:             #from OXCE+
startingConditions:         #from OXCE+
tooMuchSmokeThreshold:      #from OXCE+
customTrainingFactor: 100   #change whow fast solders train.
chanceToStopRetaliation: 0  #chance to stop retaliation.
kneelBonusGlobal: 120       #default kneel weapon accuracy bonus in prercent.
oneHandedPenaltyGlobal: 80  #default two hand weapon accuracy penalty in percent.
missionRatings:             #from OXCE+
monthlyRatings:             #from OXCE+
difficultyBasedRetaliationDelay: #from OXCE+


items:
  - type: STR_ITEM_TYPE #default config ...
    nameAsInem: ~           #string id used for displaying postfix ammo text in loaded weapon.
    categories: ~           #from OXCE+
    kneelBonus: -1          #kneel weapon accuracy bonus in prercent.
    oneHandedPenalty: -1    #two hand weapon accuracy penalty in percent.
    dropoff: 1     #used by Psi-Amp too. Default for Psi-Amp is 1.
    aimRange: 0    #used by Pis-Amp too. Default for Psi-Amp is 0.
    tuLoad: 15     #cost of loading weapon.
    tuUnload: 8    #cost of unloading weapon.
    specialChance: 90       #chance in % of triggering effect like zombify or corpse, granade and proxy explosion.
    fuseType: -2            #set how prime granade works.
    # -3 -> no priming, flare always work.
    # -2 -> can prime, unlimited time. Granade explode instantly after throw. Flare work only after prime.
    # -1 -> can prime, can set time. Granade explode after set time. Flare and Proxy disappere after set time.
    #  0 -> can prime, set fixed time of 0 turns.
    #  1 -> can prime, set fixed time of 1 turns.
    #  2 -> can prime, set fixed time of 2 turns.
    # ...
    # 22 -> can prime, set fixed time of 22 turns.
    # 23 -> can prime, set fixed time of 23 turns.
    fuseTriggerEvents:
      defaultBehavior: true   #used to enable default fuse behavior. Defualt `true`.
      throwTrigger: false     #timer start on throw.
      throwExplode: false     #item explode (grenade) or is removed on thorw. Defualt `false`. `specialChance` affect this.
      proximityTrigger: false #timer start when unit move in it proximity. Defulat `false`.
      proximityExplode: false #item explode (grenade, proxi) or is removed when unit move in it porximity. Default `false`. `specialChance` affect this.
    accuracyUse: 0          #bonus to accuracy of Psi-Amp special attack.
    accuracyMindControl: 0  #bonus to accuracy of Psi-Amp Mind Control attack.
    accuracyPanic: 0        #bonus to accuracy of Psi-Amp Panic attack.
    accuracyThrow: 0        #accuracy of throw.
    costAimed:
      #cost of Aimed attack.
      time: 2         #time units cost, can be in %. Alias of `tuAimed`.
      energy: 0       #energy unit cost.
      morale: 10      #morale points cost.
      health: 1       #health points cost.
      stun: 2         #stun damage applied by atack use.
    costAuto:
      #cost of Auto attack, if -1 it use `costAimed` value.
      #same propertes like `costAimed`.
    costSnap:
      #cost of Snap attack, if -1 it use `costAimed` value.
      #same propertes like `costAimed`.
    costMelee:
      #cost of Melee attack.
      #same propertes like `costAimed`.
    costUse:
      #cost of item Use and Psi-Amp special attack.
      #same propertes like `costAimed`.
    costMindControl:
      #cost of Psi-Amp Mind Control attack, if -1 it use `costUse` value.
      #same propertes like `costAimed`.
    costPanic:
      #cost of Psi-Amp Panic attack, if -1 it use `costUse` value.
      #same propertes like `costAimed`.
    costThrow:
      #cost of Throw.
      #same propertes like `costAimed`.
    costPrime:
      #cost of Prime granade.
      #same propertes like `costAimed`.
    costUnprime:
      #cost of Unprime granade.
      #same propertes like `costAimed`.
    flatUse:
      #change how cost of all attacks and use work (flat or percent values).
      time: true      #time units cost is flat or %. Alias of `flatRate`.
      energy: true    #energy unit cost is flat or %. Default `true`.
      morale: true    #morale cost is flat or reduced by bravery. Default `true`.
      health: true    #health points cost is flat or %. Default `true`.
      stun: false     #stun damage applied by atack is flat or % of max health. Default `true`.
    flatAimed:
      #changes how `costAimed` behaves (flat or percent values), if -1 it use `flatUse` value.
      #same propertes like `flatUse`.
    flatAuto:
      #changes how `costAuto` behaves (flat or percent values), if -1 it use `flatAimed` value.
      #same propertes like `flatUse`.
    flatSnap:
      #changes how `costSnap` behaves (flat or percent values), if -1 it use `flatAimed` value.
      #same propertes like `flatUse`.
    flatMelee:
      #optional for `costMelee` in range weapons.
      #same propertes like `flatUse`.
      #use of null (aka `~`) or -1 in property will cause fall back to `flatUse` values.
    flatThrow:
      #changes how `costThrow` behaves (flat or percent values).
      #same propertes like `flatUse`.
    flatPrime:
      #changes how `costPrime` behaves (flat or percent values).
      #same propertes like `flatUse`.
    flatUnprime:
      #changes how `costUnprime` behaves (flat or percent values).
      #same propertes like `flatUse`.
    confAimed:
      shots: 1              #number of shots. Defulat `1`.
      name: STR_AIMED_SHOT  #name of attack in action menu.
      ammoSlot: 0           #with ammo slot is used by this attack. Defulat `0`.
    confAuto:
      shots: 3              #number of shots, its alias with `autoShots`.
      #...
      #same properties as `confAimed`
      #...
    confSnap:
      #...
      #same properties as `confAimed`
      #...
    confMelee:
      name: ~               #if no name is set name then it will be set based on damage type (stun or normal melee).
      ammoSlot: -1          #override when `battleType` is change, `0` for melee weapons, `-1` for rest.
      #...
      #same properties as `confAimed`
      #...
    ammo:   #list of avaiable ammo slots in weapon.
      0:
        tuLoad: 10                          #alias to `tuLoad` in parent node.
        toUnload: 20                        #alias to `tuUnload` in parent node.
        compatibleAmmo: [ AMMO_A, AMMO_B ]  #alias to `compatibleAmmo` in parent node.
      1:
        #...
        #analoge properties as `0` but without aliasing to parent.
        #...
      2:
        #...
        #analoge properties as `0` but without aliasing to parent.
        #...
      3:
        #...
        #analoge properties as `0` but without aliasing to parent.
        #...
    damageBonus: #used by ammo.
      #each bonus can be writen as: `s: x`, `s: [x]`, `s: [x, y]` or `s: [x, y, z]`.
      #where each value represents coefficient of polynomial `x * s + y * s^2 + z * s^3`.
      #
      #set `strength` to 1.0 if `strengthApplied: true`.
      flatHundred: 0.0 #const bonus equal 100.
      flatOne: 0.0 #const bonus equal 1.
      strength: 0.1
      psi: 0.0 #bonus equal `psiSkill*psiStrength`.
      psiSkill: 0.5
      psiStrength: 0.0
      throwing: 0.0
      bravery: 0.0
      firing: [0.0, 0.0, 0.0]
      health: [0.3]
      tu: 0.0
      reactions: [1, -0.002]
      stamina: 0.0
      melee: 0.0
      strengthMelee: 0.0      #bonus equal `strength*melee`.
      strengthThrowing: 0.0   #bonus equal `strength*throwing`.
      firingReactions: 0.0    #bonus equal `firing*reaction`.
      healthCurrent: 0.0      #curret value of hp.
      tuCurrent: 0.0          #curret value of tu.
      energyCurrent: 0.0      #curret value of energy.
      moraleCurrent: 0.0      #curret value of morale.
      stunCurrent: 0.0        #curret value of stun level.
      healthNormalized: 0.0   #curret hp normalized to 1 (max hp give 1.0).
      tuNormalized: 0.0       #curret tu normalized to 1 (max tu give 1.0).
      energyNormalized: 0.0   #curret energy normalized to 1 (max energy give 1.0).
      moraleNormalized: 0.0   #curret morale normalized to 1 (max morale give 1.0).
      stunNormalized: 0.0     #curret stun level normalized to 1 (max stun compared to current health give 1.0).
    meleeBonus: #used by range weapons melee hit.
      #...
      #same stats like `damageBonus`.
      #...
    accuracyMultiplier: #used by wapons and psi-amp.
      #set `psi` to 0.02 if weapon is psi-amp
      #...
      #same stats like `damageBonus`.
      #...
    meleeMultiplier: #used by melee wapons.
      #set `melee` to 1.00 if `skillApplied: true`
      #...
      #same stats like `damageBonus`.
      #...
    throwMultiplier: #used by throw.
      #set `throwing` to 1.00 for default
      #...
      #same stats like `damageBonus`.
      #...
    powerRangeReduction: 0.0 #how much power a bullet loses per tile, used by Psi-Amp damage too.
    powerRangeThreshold: 0.0 #how far in tiles bullet need fly to start appling `powerRangeReduction`.
    damageAlter: #all values have default values based on `damageType`, used by ammo and corpses.
      FixRadius: 60 #aka `BlastRadius`.
      RandomType: 1 #how roll damage range.
      # 0-> default behavior based on damage type
      # 1-> UFO [0% - 200%]
      # 2-> TFTD [50% - 150%]
      # 3-> Flat  [100% - 100%]
      # 4-> Rng(5,10)
      # 5-> 0
      # 6-> Two dices [0% - 100%] + [0% - 100%]
      ResistType: 1             #what resistance is used by an affected unit, same values like `damageType`.
      FireBlastCalc: false      #fire had special way of calculating blast.
      IgnoreDirection: true     #damage ignores direction of hit, used by smoke and fire.
      IgnoreSelfDestruct: true  #killing using this damage prevents self-destruct by this unit. Used by stun and explosive damage type.
      IgnorePainImmunity: true  #some units don't get stun level from damage.
      IgnoreNormalMoraleLose: false #some units ignore normal morale loss from damage.
      IgnoreOverKill: false     #disables overkill damage. Defualt `true`.
      ArmorEffectiveness: 0.5   #how effective armor is against this damage. Default `0.0` for smoke and stun, `1.0` rest.
      RadiusEffectiveness: 0.3  #how power translates to splash radius. Defualt `0.05` for smoke, stun, explosive, `0.03` for fire, `0.0` rest.
      RadiusReduction: 10.0     #how much explosion power is reduce per tile. Default `10.0`.
      FireThreshold: 0          #how much damage is required to spawn fire on unit (after armor and ToHealth) or tile. Default `0` for fire, `1000.0` for rest.
      SmokeThreshold: 100       #how much damage is required to spawn smoke on tile. Default `0.0` for smoke, `1000.0` for rest.
      ToHealth: 1.0     #how much damage is done to health, can be negative. Default `0.0` for stun, smoke, none, `1.0` for rest.
      ToArmor: 0.25     #how much damage is done to armor. Default `0.0` for stun, smoke, fire, none, `0.25` for rest.
      ToArmorPre: 0.0   #how much damage is done to armor before applying armor protection. Default `0.0`.
      ToWound: 0.1      #determine probability of wounds. Defualt `0.0` for stun, smoke, fire, none, `1.0` for rest (`RandomWound` by defulat change it io 1-3 points by defualt!).
      ToItem: 0.0       #how much power is applied to items. Default `1.0` for explosive, `0.0` for rest.
      ToTile: 0.0       #how much power is applied to the ground. Default `0.0` for stun, smoke, fire, none, `0.5` for rest.
      ToStun: 0.25      #how much damage increases stun level. Default `1.0` for stun, smoke, `0.0` for fire, none, `2.5` for rest.
      ToEnergy: 0.0     #how much power is applied to energy loss. Default `0.0`.
      ToTime: 0.0       #how much power is applied to time units loss. Default `0.0`.
      ToMorale: 0.0     #how much power is applied to morale loss. Affeced by target bravery. Default `0.0` (`IgnoreNormalMoraleLose` control normal morale change).
      RandomHealth: false     #do calucaltion of final health change use random value.
      RandomArmor: false      #do calculation of final armor change use random value.
      RandomArmorPre: false   #do calculation of final armor change use random value.
      RandomWound: false      #for `true` use original radom system giving `1` to `3` wounds, `false` will give linear value based on `ToWound`.
      RandomItem: false       #do calculation of value that compare with item armor use random value.
      RandomTile: false       #do calculation of value that compare with tile armor use random value.
      RandomStun: false       #do calculation of final stun level change use random value.
      RandomEnergy: false     #do calculation of final energy change use random value.
      RandomTime: false       #do calculation of final time units change use random value.
      RandomMorale: false     #do calculation of final moral change use random value.
    meleeType: 2        #work like `damageType` but for range weapon melee hit.
    meleeAlter:         #work like `damageAlter` but for range weapon melee hit.
      #set defaut values based on `meleeType`.
      #...
      #same stats like `damageAlter`.
      #...
    requiresBuy: #what tech is required for the item to be visible in the Hire/Purchase screen.
      - SOME_TECH
      - SOME_TECH_MK2
    psiAttackName: STR_HIT_MELEE                      #string id of psi-amp attack name in the pop-up menu. Required to enable special attack.
    primeActionName: STR_PRIME_GRENADE                #string id of grenade prime action name in the pop-up menu. Required to enable prime action. Defulat value `STR_PRIME_GRENADE`;
    primeActionMessage: STR_GRENADE_IS_ACTIVATED      #string id of grenade prime action message.
    unprimeActionName: ~                              #string id of grenade unprime action name in the pop-up menu. Required to enable unprime action.
    unprimeActionMessage: STR_GRENADE_IS_DEACTIVATED  #string id of grenade unprime action message.
    psiRequired: false    #default based on weapon type, if `true` you need Psi Skill to use the weapon.
    moraleRecovery: 10    #amount of recovered morale by medkit. Defailt `0`.
    painKillerRecovery: 0 #how much missing health convert to morale. Default `1.0`.
    allowSelfHeal: true   #can medikit target user.
    medikitType: 0        #change how medikit wroks, `0` default with UI, `1` fast heal, `2` fast stimulant, `3` fast pain killer.
    isConsumable: false   #check if medikit is consumable or primed granade not recoverable.
    isExplodingInHands: false #item if primed will explode in hand, default is `fase`.
    defaultInventorySlot: ~   #where place fixed weapon.
    blockBothHands: false #do item require both hands to use?
    fixedWeaponShow: true #if it's true then it will show fixed weapon on unit.
    hitMissSound: 0       #override `hitSound` when any psi attack was unsuccessful.
    meleeMissSound: 12    #override `meleeSound` when melee attack was unsuccessful.
    psiSound: 0           #override `hitSound` when used for MC or Panic attack.
    psiMissSound: 0       #override `hitMissSound` when used for MC or Panic attack.
    hitMissAnimation: 0   #override `hitAnimation` when special psi attack was unsuccessful. Use `SMOKE.PCK`.
    meleeMissAnimation: 0 #override `meleeMissAnimation` when melee, MC or Panic attack was unsuccessful. Use `HIT.PCK`.
    psiAnimation: 0       #override `meleeAnimation` when used for MC or Panic attack. Use `HIT.PCK`.
    psiMissAnimation: 0   #override `meleeMissAnimation` when MC or Panic attack was unsuccessful. Use `HIT.PCK`.
    explosionHitSound: 2  #override default big explosion sound.
    tags:
      SOME_CUSTOM_TAG: 4  #user defined values used by script.
    scripts:
      recolorItemSprite: ~      #script that handle recoloring of each pixel in item sprite.
      selectItemSprite: ~       #script that handle selecting graphic for item.
      reactionWeaponAction: ~   #script that handle reacion to shoot, throw or melee from that weapon.
      createItem: ~             #script call on creation of new item in battlespace.
      newTurnItem: ~            #script call on each turn for all items in battlescape.
      awardExperience: ~        #script that handle experiance grain from hiting unit.
    ai:
      useDelay: 3       #determine on what turn item can be used by aliens.
      meleeHitCount: 25 #number of hits that AI try to do.


armors:
  - type: STR_ARMOR_TYPE #default config ...
    fearImmune: false    #default true for big units.
    bleedImmune: false   #default true for big units.
    painImmune: false    #default true for big units.
    zombiImmune: false   #ignored by big units.
    overKill: 0.8        #when damage drops HPs to negative value greater than `overKill * maxHP` then the corpse is destroyed, default value is 0.50.
    visibilityAtDay: 20  #default 20 for all.
    visibilityAtDark: 9  #default 20 for aliens, 9 for humans.
    personalLight: 15    #solder light radius.
    specialWeapon: ALIEN_PSI_WEAPON #alien psi or melee attack.
    builtInWeapons: #same as for units.
      - STR_SOME_WEAPON
    psiDefence: #used when attacked by psi-amp.
      #default is `psiStrength` set to `1.0` and `psiSkill` set to `0.2`.
      #...
      #same stats like `damageBonus` in `items`.
      #...
    meleeDodge: #used when attacked by melee hit.
      #default is `0.0`.
      #...
      #same stats like `damageBonus` in `items`.
      #...
    meleeDodgeBackPenalty: 0.2 #how much dodge unit lost when hit from behind. Default `0.0`.
    recovery:
      time: #amount of TU recovered each turn.
        #default is `tu` set to `1.0`
        #...
        #same stats like `damageBonus` in `items`.
        #...
      energy: #amount of Energy recovered each turn.
        #default is `energyRegen` set to `1.0`
        #...
        #same stats like `damageBonus` in `items`.
        #...
        energyRegen: 1.0 #special stat returning vanilia energy regen.
      morale: #amount of Morale recovered each turn.
        #default is `0.0`.
        #...
        #same stats like `damageBonus` in `items`.
        #...
      health: #amount of Health recovered each turn.
        #default is `0.0`.
        #...
        #same stats like `damageBonus` in `items`.
        #...
      stun: #amount of Stun recovered each turn.
        #default is `flatOne` set to `1.0`.
        #...
        #same stats like `damageBonus` in `items`.
        #...
    tags:
      IS_THIS_NINJA: 1        #user defined values used by script.
    scripts:
      recolorUnitSprite: ~    #recolor script call for each pixel in unit sprite, used for corpse sprite too.
      selectUnitSprite: ~     #sprite select script call for each body part.
      reactionUnitAction: ~   #script used for handling reaction for unit performing action.
      reactionUnitReaction: ~ #script used for handling reaction for unit reacting.
      visibilityUnit: ~       #script that handle visibility test of other units, return value need be greater than zero to test be succesful. Second return value is used for distinguish between custom visibility modes, `null` is normal visibility.
      hitUnit: ~              #script call when unit get hit by something, called before armor handling.
      damageUnit: ~           #script call after armor handling, it handle damage to unit.
      createUnit: ~           #script call on creation of new unit in battlescape.
      newTurnUnit: ~          #script call on every turn for every unit in battlescape.


crafts:
  - type: STR_CRAFT_TYPE #default config ...
    radarChance: 100    #how effective craft radar is, default 100.
    weapons: 4          #weapon number increased to 4.
    weaponTypes:        #definition of allowed weapon types in craft. Max 4 different types per slot.
      - 0               #slot 1 accepts weapons with type 0. This is default.
      - 0               #slot 2 accepts weapons with type 0.
      - [0, 4, 13]      #slot 3 accepts weapons with type 0, 4 and 13.
      - 1               #slot 4 accepts weapons with type 1.
    weaponStrings:      #string ID used by geoscape craft status.
      - STR_WEAPON_ONE
      - STR_WEAPON_TWO
      - STR_WEAPON_THREE
      - STR_WEAPON_FOURTH
    hitBonus: 0         #bonus percentage to all weapons hit chance. Range [0, 100].
    avoidBonus: 0       #bonus percentage to craft dodge chance. Range [0, 100].
    powerBonus: 0       #bonus percentage to all weapons damage. Range [0, 100].
    armor: 0            #amount of blocked damage per hit.


craftWeapons:
  - type: STR_CRAFTWEAPON_TYPE #default config ...
    weaponType: 1 #default value 0.
    stats: #added to craft's stats.
      fuelMax: 0     #additive bonus to craft stats.
      damageMax: 0   #additive bonus to craft stats.
      speedMax: 0    #additive bonus to craft stats.
      accel: 0       #additive bonus to craft stats.
      radarRange: 0  #additive bonus to craft stats.
      radarChance: 0 #additive bonus to craft stats.
      sightRange: 0  #additive bonus to craft stats.
      hitBonus: 0    #bonus percentage to all weapons hit chance. Range [0, 100].
      avoidBonus: 0  #bonus percentage to craft dodge chance. Range [0, 100].
      powerBonus: 0  #bonus percentage to all weapons damage. Range [0, 100].
      armor: 0       #amount of blocked damage per hit.


ufos:
  - type: STR_UFO_TYPE #default config ...
    hitBonus: 0   #bonus percentage to all weapons hit chance. Range [0, 100].
    avoidBonus: 0 #bonus percentage to UFO dodge chance. Range [0, 100].
    powerBonus: 0 #bonus percentage to all weapons damage. Range [0, 100].
    armor: 0      #amount of blocked damage per hit.
    craftCustomDeploy: STR_BATTLESHIP_1 #override craft default weapon deploy.
    missionCustomDeploy: STR_TERROR_MISSION_2 #override mission defulat weapon deploy.
    raceBonus: #bonus stats per race.
      STR_SECTOID: #name of race that bonus apply.
        damageMax: 0  #additive bonus to craft stats.
        speedMax: 0   #additive bonus to craft stats.
        accel: 0      #additive bonus to craft stats.
        sightRange: 0 #additive bonus to craft stats.
        hitBonus: 0   #bonus percentage to all weapon hit chance. Range [0, 100].
        avoidBonus: 0 #bonus percentage to craft avoid chance. Range [0, 100].
        powerBonus: 0 #bonus percentage to all weapon damage. Range [0, 100].
        armor: 0      #amount of blocked damage per hit.
        craftCustomDeploy: STR_BATTLESHIP_3 #override craft default weapon deploy.
        missionCustomDeploy: STR_TERROR_MISSION_2 #override mission defulat weapon deploy.


alienRaces:
  - id: STR_SECTOID
    retaliationMission: STR_ALIEN_RETALIATION   #default mission spawn after destroing ufo.
    retaliationAggression: 0                    #chance modiffer to spawn retaliation mission.
    baseCustomDeploy: STR_ALIEN_BASE_ASSAULT_2  #override alien base default weapon depoly.
    baseCustomMission: STR_MIB_BASE             #override alien base construction.


alienDeployments:
  - id: STR_SOMETHING
    startingCondition:      #from OXCE+


itemCategories:             #from OXCE+
  - type:
    replaceBy:
    hidden:
    listOrder:


startingConditions:         #from OXCE+
  - type:
    armorTransformations:
    defaultArmor:
    defaultItems:
    allowedArmors:
    allowedVehicles:
    allowedItems:
    allowedItemCategories:
    allowedCraft:


facilities:
  - type: STR_SOME_FACILITY
    buildCostItems:
      STR_ITEM:
        build: 10           #how many items of type `STR_ITEM` are require to build.
        refund: 6           #how many items are returned when facility is dismantled.
    provideBaseFunc: [ A ]  #List of custom IDs that this bulding provide for base.
    requiresBaseFunc: [ ]   #List of custom IDs that are require to build this building in base.
    forbidenBaseFunc: [ B ] #List of custom IDs that are forbiden by this building.
    trainingRooms: 0        #Number of solder that can be train in that building, require langue strings.
    refundValue: 0          #how much mony is returned when facility is dismantled.


manufacture:
  - type: STR_SOME_MANUFACTURE
    requiresBaseFunc: [ A, C ] #List of custom IDs that are require to start production in base.


research:
  - type: STR_SOME_RESEARCH
    requiresBaseFunc: [ W, K ] #List of custom IDs that are required to start this research in the base.


terrains:
  - name: CULTA
    mapBlocks:
      - name: SOMETHING
        fuseTimers:
          STR_GRANADE: [6, 16]  #all items of that type will have set fuseTimer to random value in range [6, 16].


lighting:
  enhanced: 7     #flags for lighting system, final value = (`1` if enabled for tiles and fire) + (`2` if enabled for items) + (`4` if enabled for units). Default value `7`.
  maxStatic: 20   #max range of fire and tile light radius. Affect overall game performace! Default `16`.
  maxDynamic: 30  #max range of unit and item light radius. Affect overall game performace! Defulat `24`.


mapScripts:
  - type: CULTA
    commands:
    - type: addBlock
      blocks: [1, 2, 3] 
      terrain: FOREST #Add map 1, 2, or 3 from terrain FOREST
    - type: addLine
      direction: vertical
      rects:
        - [1, 1, 4, 1]
      terrain: URBAN #Add a road from terrain URBAN
    - type: addUFO
      terrain: MOUNT #UFO's LZ block will be from terrain MOUNT
    - type: addCraft
      terrain: JUNGLE #Player craft's LZ block will be from terrain JUNGLE
    - type: fillArea
      terrain: DESERT #Fill the rest of the map with map blocks from terrain DESERT
  - type: URBAN
    commands:
    - type: addBlock
      size: [2, 2, 4] # When using verticalLevels, definition of height is necessary
      verticalLevels: # This block will be a series of maps stacked on top of each other, chosen randomly as with normal addBlock command
      - type: ground # "ground" type maps are always placed first
        groups: 6 # Pick the first block from group 6
        size: [2, 2, 1] # Size in x and y must match the size of the block, vertical size definition is necessary for command to run properly
      - type: middle # "middle" types are filler between "ground" and "ceiling," a list of all middle types is created to loop over to fill the vertical distance
        groups: 7 # Pick a middle floor for this block from group 7
        terrain: SOME_ALTERNATE_URBAN # It's possible to make each section a different terrain
        size: [2, 2, 1]
      - type: middle # This one is placed after the previous one, the command alternates back and forth between this and the previous to fill the size in z
        blocks: [13, 14, 15]
        size: [2, 2, 1]
      - type: ceiling # Placed on top of all the other blocks
        groups: 9
        size: [2, 2, 1]


globe:
  textures:
    - id: 0
      baseTerrain: CULTA #If baseDefenseMapFromLocation is equal to one, this terrain can be used in conjunction with addBlockFromTerrain and fillAreaFrom terrain to populate empty squares on base defense maps


baseDefenseMapFromLocation: 1 #If equal to one, the RNG will be seeded by the base's location when generating the map and returned to it's original value after


ai:
  useDelayBlaster: 3
  useDelayFirearm: 0
  useDelayGrenade: 3
  useDelayMelee: 0
  useDelayPsionic: 0


extended:
  tags:                     #definitions of user defined values used by script.
    RuleItem:               #used by `items` nodes.
      SOME_CUSTOM_TAG: int
      #avaiable types:
      #`int` - natural number
      #`RuleList` - name of other mod that is loaded. Accessed as id number in script. Have value -1 if mod with that name do not exists.
    RuleArmor:              #used by `armors` nodes.
      IS_THIS_NINJA: int
  scripts:
    reactionUnitAction:     #name of script that have enabled global events.
      - offset: 1.2         #order in witch each global event is run.
        code: |             #script that will be called by event.
          #some code
          return 100;


extraStrings:
  - type: en-US
    strings:
      STR_NOT_ENOUGH_ITEMS: "Lack of {0} {1} items"   #required when using `buildCostItems` in `facilities`. `{0}` is name of item, `{1}` is number of item we don't have.
      STR_PHYSICAL_TRAINING: "Physical Training"      #required when using `trainingRooms` in `facilities`.
      STR_TRAINING: "Training"                        #required when using `trainingRooms` in `facilities`.
      STR_REMAINING_TRAINING_FACILITY_CAPACITY: "REMAINING TRAINING CAPACITY> {ALT}{0}" #required when using `trainingRooms` in `facilities`.
      STR_NOT_ENOUGH_MORALE: "You lack discipline!"   #required when using item morale use cost.
      STR_NOT_ENOUGH_HEALTH: "Not enough blood!"      #required when using item health use cost.
      STR_NOT_ENOUGH_STUN: "Too much pain!"           #required when using item stun use cost.
      STR_NO_USES_LEFT: "You can't use medi-kit"      #required when using `medikitType`.
      STR_NOT_ENOUGH_CRAFT_SPACE: "You can't fit it!" #required when you try change armor with 2x2 size and craft don't have space.


Examples of script usage:


#special statements
someScriptCode: |
  var int temp;     #define variable of type `int` with name `temp`.
  var int zero 42;  #new variable with begining value of 42.
  
  if OPERATION A B; #`OPERATION` can be: `lt` - less, `le` - less equal, `gt` - greater, `ge` - greater equal, `eq` - equal, `neq` - not equal
    #some code 1
  else OPERATION A B; #`else` can have same condition as first `if`.
    #some code 2
  else OPERATION A B; #you can repeat `else` with test multiple times.
    #some code 3
  else;
    #final case, can be skipped.
  end;
  
  if or lt A B eq C D;
    #you can write multiple operation with `or`.
    #result will be true if any of this operation would return true.
  end;
  if and gt A B neq C D le E F;
    #same for `and` but in this case all operation need be true.
  end;
  
  return B; #exit script with value of `B`.


extended:
  tags:
    RuleArmor:
      CORPSE_SWITCH_ENABLED: int
      CORPSE_SWITCH_RESOURCES_MOD: RuleList
      CORPSE_SWITCH_SPRITE_FLOOR_STUN: int
      CORPSE_SWITCH_SPRITE_FLOOR_WOUND: int
      CORPSE_SWITCH_SPRITE_FLOOR_DEAD: int
      CORPSE_SWITCH_SPRITE_BIG_STUN: int
      CORPSE_SWITCH_SPRITE_BIG_WOUND: int
      CORPSE_SWITCH_SPRITE_BIG_DEAD: int
  scripts:
    selectItemSprite:
      - offset: 1
        code: |
          #custom corpse graphic based on state of unit.
          var int curr_hp;
          var int curr_wounds;
          var int temp;
          var ptr BattleUnit unit;
          var ptr RuleArmor armor;
          
          item.getBattleUnit unit;
          unit.getRuleArmor armor;
          if neq armor null;
            unit.getHealth curr_hp;
            unit.getFatalwoundsTotal curr_wounds;
            armor.getTag temp Tag.CORPSE_SWITCH_ENABLED;
            if eq temp 1;
              armor.getTag temp Tag.CORPSE_SWITCH_RESOURCES_MOD;
              if eq blit_part blit_item_floor;
                if le curr_hp 0;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_FLOOR_DEAD;
                else gt curr_wounds 0;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_FLOOR_WOUND;
                else;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_FLOOR_STUN;
                end;
                rules.getSpriteOffsetFloorob sprite_index temp;
                return sprite_index;
              else eq blit_part blit_item_big;
                if le curr_hp 0;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_BIG_DEAD;
                else gt curr_wounds 0;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_BIG_WOUND;
                else;
                  armor.getTag sprite_index Tag.CORPSE_SWITCH_SPRITE_BIG_STUN;
                end;
                rules.getSpriteOffsetBigobs sprite_index temp;
                return sprite_index;
              end;
            end;
          end;
          return sprite_index;
#enabling this functionality for unit
armors:
  - type: STR_NONE_UC
    tags:
      CORPSE_SWITCH_ENABLED: 1 #1 enable this functionality for this unit, 0 disable
      CORPSE_SWITCH_RESOURCES_MOD: current #to what mod sprites belongs to, `current` mean this mod.
      CORPSE_SWITCH_SPRITE_FLOOR_STUN: 32
      CORPSE_SWITCH_SPRITE_FLOOR_WOUND: 33
      CORPSE_SWITCH_SPRITE_FLOOR_DEAD: 34
      CORPSE_SWITCH_SPRITE_BIG_STUN: 42
      CORPSE_SWITCH_SPRITE_BIG_WOUND: 43
      CORPSE_SWITCH_SPRITE_BIG_DEAD: 44


armors:
  - type: PARROT_ARMOR
    drawingRoutine: 4
    scripts:
      selectUnitSprite: |
        #this script will always run move animation of unit.
        var int temp;
        var int walking;
        unit.isWalking walking;
        if eq walking 0;
          unit.getId temp;
          offsetmod temp 11 0 8; #desync animation of different units
          add temp anim_frame;
          wavegen_saw temp 8 8 7;
          mul sprite_offset 8;
          add sprite_offset 8;
          add sprite_offset temp;
          set sprite_index sprite_offset;
        else;
          add sprite_index sprite_offset;
        end;
        return sprite_index;