Author Topic: Can someone explain why this ruleset isn't working for me? [RESOLVED]  (Read 3217 times)

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
I'm altering the default deployment in the avenger. I made a separate ruleset and put it in the mod folder. The below code works fine:

Code: [Select]
crafts:
  - type: STR_AVENGER
    battlescapeTerrainData:
      name: AVENGER
      mapDataSets:
        - BLANKS
        - AVENGER
      mapBlocks:
        - name: AVENGER
          width: 10
          length: 20
    deployment:
      - [4, 9, 1, 0]
      - [5, 9, 1, 0]
      - [4, 10, 1, 0]
      - [5, 10, 1, 0]
      - [3, 10, 1, 0]
      - [6, 10, 1, 0]
      - [4, 11, 1, 0]
      - [5, 11, 1, 0]
      - [3, 11, 1, 0]
      - [6, 11, 1, 0]
      - [4, 12, 1, 0]
      - [5, 12, 1, 0]
      - [3, 12, 1, 0]
      - [6, 12, 1, 0]
      - [4, 13, 1, 0]
      - [5, 13, 1, 0]
      - [3, 13, 1, 0]
      - [6, 13, 1, 0]
      - [4, 14, 1, 0]
      - [5, 14, 1, 0]
      - [3, 14, 1, 0]
      - [6, 14, 1, 0]
      - [4, 15, 1, 0]
      - [5, 15, 1, 0]
      - [4, 16, 1, 0]
      - [5, 16, 1, 0]

Now this code below doesn't work. Why do you need the "battlescapeTerrainData" part in there if it's already defined in the standard crafts.rul ruleset? Deployment isn't a sub-set of battlescapeTerrainData and deployment is the only thing I've altered from the default ruleset. Like when I change one attribute of an item (let's say the TU cost of a weapon) I don't have to put all the weapon values in my mod; just the ones I'm changing. So why is this one giving me grief and requiring repeated info?

Code: [Select]
crafts:
  - type: STR_AVENGER
    deployment:
      - [4, 9, 1, 0]
      - [5, 9, 1, 0]
      - [4, 10, 1, 0]
      - [5, 10, 1, 0]
      - [3, 10, 1, 0]
      - [6, 10, 1, 0]
      - [4, 11, 1, 0]
      - [5, 11, 1, 0]
      - [3, 11, 1, 0]
      - [6, 11, 1, 0]
      - [4, 12, 1, 0]
      - [5, 12, 1, 0]
      - [3, 12, 1, 0]
      - [6, 12, 1, 0]
      - [4, 13, 1, 0]
      - [5, 13, 1, 0]
      - [3, 13, 1, 0]
      - [6, 13, 1, 0]
      - [4, 14, 1, 0]
      - [5, 14, 1, 0]
      - [3, 14, 1, 0]
      - [6, 14, 1, 0]
      - [4, 15, 1, 0]
      - [5, 15, 1, 0]
      - [4, 16, 1, 0]
      - [5, 16, 1, 0]
« Last Edit: April 04, 2016, 07:35:26 pm by Countdown3 »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Can someone explain why this ruleset isn't working for me?
« Reply #1 on: March 09, 2016, 02:02:24 am »
Now this code below doesn't work. Why do you need the "battlescapeTerrainData" part in there if it's already defined in the standard crafts.rul ruleset? Deployment isn't a sub-set of battlescapeTerrainData and deployment is the only thing I've altered from the default ruleset. Like when I change one attribute of an item (let's say the TU cost of a weapon) I don't have to put all the weapon values in my mod; just the ones I'm changing. So why is this one giving me grief and requiring repeated info?

There's a technical name for this that I can't remember but basically modded ruleset can either supplement (add to) or completely replace the vanilla ruleset, and this is dependent on the section (crafts, alienMissions, etc.). If they supplement, then you can do as you say and not include the battlescapeTerrainData on your ruleset. But if the new entry completely replaces the existing one, then you need to include all required elements. 

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Can someone explain why this ruleset isn't working for me?
« Reply #2 on: March 09, 2016, 02:25:54 am »
Fixed. The deployment was being loaded as part of the battlescapeTerrainData for whatever reason.

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: Can someone explain why this ruleset isn't working for me?
« Reply #3 on: March 09, 2016, 03:23:38 am »
Oh wow thanks. Glad to know it wasn't just me being completely clueless.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 673
    • View Profile
Re: Can someone explain why this ruleset isn't working for me?
« Reply #4 on: March 09, 2016, 02:42:44 pm »
I think when I did a mod to ammend some of the xcom1 settings, I got the same result but I'm not sure. In the end my mod was crashing the game so I had to go back to tweaking xcom1. It was to save me mid game if I had to update my nightly having to manually edit all applicable rulesets within xcom1 of the new nightly. Am I right that all I need to do is add the full details for the interceptor and firestorm to the .rul file rather than just have the values I'm changing? Since I just started a new game of TFTD I assume if I did a mod like this for TFTD I need to include all parts of  xcom2 for crafts, facilities etc rather than just what values I'm changing? Also is there anywhere that I can read up on to let me know when you have to include all information or only the values that you are changing?
« Last Edit: March 09, 2016, 02:45:54 pm by SIMON »