aliens

Author Topic: Commenting parts of original rulesets in new ones  (Read 1751 times)

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Commenting parts of original rulesets in new ones
« on: August 11, 2019, 06:10:20 pm »
Can I kind of comment out some parts of original rulesets (the ones that come with the engine) without editing them? I mean, can I add a section to a ruleset of my mode that would tell the engine to disregard some part of the original ruleset?

For example, I need to edit all alien engineers so that all items in getOneFree would be in getOneFreeProtected. Example:

Code: [Select]
# Engineers
  - &STR_ALIEN_ENGINEER
    name: STR_ALIEN_ENGINEER
    cost: 192
    points: 50
    needItem: true
    destroyItem: true
    unlocks:
      - STR_ALIEN_ORIGINS_DEP
      - STR_ALIEN_INTERROGATION
    lookup: STR_SECTOID
    sequentialGetOneFree: true
    getOneFreeProtected:
      STR_ALIEN_INTERROGATION:
        - STR_ALIEN_WEAPONS_DEP
        - STR_SMALL_SCOUT
        - STR_MEDIUM_SCOUT
        - STR_LARGE_SCOUT
        - STR_HARVESTER
        - STR_ABDUCTOR
        - STR_TERROR_SHIP
        - STR_BATTLESHIP
        - STR_SUPPLY_SHIP

  - name: STR_SECTOID_ENGINEER
    refNode: *STR_ALIEN_ENGINEER
  - name: STR_FLOATER_ENGINEER
    refNode: *STR_ALIEN_ENGINEER
  - name: STR_SNAKEMAN_ENGINEER
    refNode: *STR_ALIEN_ENGINEER
  - name: STR_MUTON_ENGINEER
    refNode: *STR_ALIEN_ENGINEER
  - name: STR_ETHEREAL_ENGINEER
    refNode: *STR_ALIEN_ENGINEER

As far as I understand, if I create the rul above, it would just add getOneFreeProtected section to all engineers, but they would also still have their old getOneFree section. Besides, they would still unlock STR_ALIEN_ORIGINS in addition to STR_ALIEN_ORIGINS_DEP specified in the new rul.

So, can I give in the rul file the directive to disregard all original engineers descriptions? I seem to remember seeing a thing like that in some mod, but can't find it again.
« Last Edit: August 11, 2019, 06:21:30 pm by Kzer-Za »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Commenting parts of original rulesets in new ones
« Reply #1 on: August 11, 2019, 06:21:15 pm »
Code: [Select]
    getOneFree: []

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Commenting parts of original rulesets in new ones
« Reply #2 on: August 11, 2019, 06:23:29 pm »
And "unlock" section?  They wouldn't still unlock STR_ALIEN_ORIGINS in addition to STR_ALIEN_ORIGINS_DEP?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Commenting parts of original rulesets in new ones
« Reply #3 on: August 11, 2019, 06:27:26 pm »
no, as a general rule when you change a list of items... the old items are forgotten and replaced by new ones

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Commenting parts of original rulesets in new ones
« Reply #4 on: August 11, 2019, 06:31:06 pm »
Thanks!