aliens

Author Topic: [Solved] Scripting tags in split .rul files?  (Read 1707 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
[Solved] Scripting tags in split .rul files?
« on: October 07, 2021, 01:18:26 pm »
(Question #1)
Is there a limit to the number of tag variables I can use in a mod?


(Question #2)
I'm using separate .rul files for each of the code sections:
. items: in item.rul
. armors: in armor.rul
. units: in unit.rul

When adding scripting tags to the extended: section of each of these files do I need to duplicate all three RuleItem: RuleArmor: BattleUnit: tags in each .rul file?

Or only in the file with the corresponding section?


(Examples)

This code in each file:
Code: [Select]
extended:
  tags:
    RuleItem:
      STATUSEFFECT_HP_STRENGTH_ITEM: int
      STATUSEFFECT_HP_DURATION_ITEM: int
      STATUSEFFECT_ENERGY_STRENGTH_ITEM: int
      STATUSEFFECT_ENERGY_DURATION_ITEM: int
      STATUSEFFECT_TU_STRENGTH_ITEM: int
      STATUSEFFECT_TU_DURATION_ITEM: int
      STATUSEFFECT_MORALE_STRENGTH_ITEM: int
      STATUSEFFECT_MORALE_DURATION_ITEM: int
      STATUSEFFECT_STUN_STRENGTH_ITEM: int
      STATUSEFFECT_STUN_DURATION_ITEM: int
      STATUSEFFECT_WOUND_STRENGTH_ITEM: int
      STATUSEFFECT_WOUND_DURATION_ITEM: int
      STATUSEFFECT_MANA_STRENGTH_ITEM: int
      STATUSEFFECT_MANA_DURATION_ITEM: int


    RuleArmor:
      STATUSEFFECT_HP_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_ENERGY_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_TU_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_MORALE_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_STUN_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_WOUND_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_MANA_SUSCEPTIBILITY_ARMOR: int


    BattleUnit:
      STATUSEFFECT_HP_STRENGTH_UNIT: int
      STATUSEFFECT_HP_DURATION_UNIT: int
      STATUSEFFECT_ENERGY_STRENGTH_UNIT: int
      STATUSEFFECT_ENERGY_DURATION_UNIT: int
      STATUSEFFECT_TU_STRENGTH_UNIT: int
      STATUSEFFECT_TU_DURATION_UNIT: int
      STATUSEFFECT_MORALE_STRENGTH_UNIT: int
      STATUSEFFECT_MORALE_DURATION_UNIT: int
      STATUSEFFECT_STUN_STRENGTH_UNIT: int
      STATUSEFFECT_STUN_DURATION_UNIT: int
      STATUSEFFECT_MANA_STRENGTH_UNIT: int
      STATUSEFFECT_MANA_DURATION_UNIT: int
      STATUSEFFECT_DISPLAY_COUNTER: int



Or each file only has only its own related tags declared:

item.rul
Code: [Select]
extended:
  tags:
    RuleItem:
      STATUSEFFECT_HP_STRENGTH_ITEM: int
      STATUSEFFECT_HP_DURATION_ITEM: int
      STATUSEFFECT_ENERGY_STRENGTH_ITEM: int
      STATUSEFFECT_ENERGY_DURATION_ITEM: int
      STATUSEFFECT_TU_STRENGTH_ITEM: int
      STATUSEFFECT_TU_DURATION_ITEM: int
      STATUSEFFECT_MORALE_STRENGTH_ITEM: int
      STATUSEFFECT_MORALE_DURATION_ITEM: int
      STATUSEFFECT_STUN_STRENGTH_ITEM: int
      STATUSEFFECT_STUN_DURATION_ITEM: int
      STATUSEFFECT_WOUND_STRENGTH_ITEM: int
      STATUSEFFECT_WOUND_DURATION_ITEM: int
      STATUSEFFECT_MANA_STRENGTH_ITEM: int
      STATUSEFFECT_MANA_DURATION_ITEM: int

items:

armor.rul
Code: [Select]
extended:
  tags:
    RuleArmor:
      STATUSEFFECT_HP_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_ENERGY_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_TU_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_MORALE_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_STUN_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_WOUND_SUSCEPTIBILITY_ARMOR: int
      STATUSEFFECT_MANA_SUSCEPTIBILITY_ARMOR: int

armors:

unit.rul
Code: [Select]
extended:
  tags:
    BattleUnit:
      STATUSEFFECT_HP_STRENGTH_UNIT: int
      STATUSEFFECT_HP_DURATION_UNIT: int
      STATUSEFFECT_ENERGY_STRENGTH_UNIT: int
      STATUSEFFECT_ENERGY_DURATION_UNIT: int
      STATUSEFFECT_TU_STRENGTH_UNIT: int
      STATUSEFFECT_TU_DURATION_UNIT: int
      STATUSEFFECT_MORALE_STRENGTH_UNIT: int
      STATUSEFFECT_MORALE_DURATION_UNIT: int
      STATUSEFFECT_STUN_STRENGTH_UNIT: int
      STATUSEFFECT_STUN_DURATION_UNIT: int
      STATUSEFFECT_MANA_STRENGTH_UNIT: int
      STATUSEFFECT_MANA_DURATION_UNIT: int
      STATUSEFFECT_DISPLAY_COUNTER: int

units:
« Last Edit: February 12, 2023, 03:06:24 pm by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Scripting tags in split .rul files?
« Reply #1 on: October 07, 2021, 03:17:08 pm »
Yes there is limit, 256 unique tags for all mods per group (like `RuleItem`)

You need define only used tags in given file.
If given tag is used in multiple files, you should add it in each files,
there is bug in OXCE that allow you skip this rule but it break mods in some cases.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Scripting tags in split .rul files?
« Reply #2 on: October 08, 2021, 06:05:25 am »
Thank you for the information Yankes.