aliens

Author Topic: Are race mods compatible with each other?  (Read 6413 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Are race mods compatible with each other?
« on: May 13, 2014, 12:11:37 am »
So, I decided to make a new alien race - more as an experiment than anything else, though if it goes well, I'll release it. Since I'm lazy, I took Robin's cover_alien mod as a starter and went with modifying it.

Now, my question is about this part:

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
          STR_SECTOID: 70
          STR_SNAKEMAN: 10
          STR_FLOATER: 20
      1:
          STR_SECTOID: 60
          STR_SNAKEMAN: 10
          STR_FLOATER: 30
      3:
          STR_SECTOID: 30
          STR_SNAKEMAN: 10
          STR_MUTON: 30
          STR_FLOATER: 30
      5:
          STR_SECTOID: 20
          STR_SNAKEMAN: 10
          STR_MUTON: 30
          STR_FLOATER: 30
          STR_WASPITE: 10
      7:
          STR_SECTOID: 30
          STR_SNAKEMAN: 10
          STR_MUTON: 10
          STR_FLOATER: 20
          STR_WASPITE: 20


(etc.)

So, if I substitute WASPITE with my new race, will my mod be compatible with the Waspite mod, so that both races do show up?

My guess is neither mod needs to mention other races, since they would be loaded from the basic ruleset anyway (unless the mod wants to change their values). However, I would like if someone confirmed that I'm right.

(I assume the numbers do not need to add up to 100, even though they do in the basic ruleset. Which would be nice to have confirmed as well.)

Similar issues are raised with research.
« Last Edit: May 13, 2014, 12:14:38 am by Solarius Scorch »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Are race mods compatible with each other?
« Reply #1 on: May 13, 2014, 12:35:21 am »
1. The weights don't need to add up to 100 (they'll be compared to the weight total).

2. If multiple rulesets define the same mission raceWeights, then they'll be merged, not replaced (so if you're making a new race mod, you only need to specify their weights). Weights for new races will be added to the list, while weights for existing races will replace old ones. The only way to "remove" old races is to explicitly set them to 0. For example, this:
Code: [Select]
    raceWeights:
      0:
          STR_SECTOID: 70    #1
          STR_SNAKEMAN: 10   #1
          STR_FLOATER: 20    #1
+
Code: [Select]
    raceWeights:
      0:
          STR_SNAKEMAN: 30   #2
          STR_LIZARD: 50     #2
          STR_FLOATER: 0     #2
=
Code: [Select]
    raceWeights:
      0:
          STR_SECTOID: 70    #1
          STR_SNAKEMAN: 30   #2
          STR_LIZARD: 50     #2

Note that this is the exception, not the norm, for ruleset stuff. :P (normally if two rulesets specify the exact same property, one will overwrite the other)
« Last Edit: May 13, 2014, 12:38:28 am by SupSuper »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Are race mods compatible with each other?
« Reply #2 on: May 13, 2014, 12:41:53 am »
Ah, so it's like I thought. Thanks a lot!

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Are race mods compatible with each other?
« Reply #3 on: May 13, 2014, 08:16:03 am »
i tried this and got 4 medium scouts with sectoids in the first month
just bad luck?
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
          STR_ETHEREAL: 100
  - type: STR_ALIEN_HARVEST
    raceWeights:
      0:
          STR_ETHEREAL: 100
  - type: STR_ALIEN_ABDUCTION
    raceWeights:
      0:
          STR_ETHEREAL: 100
  - type: STR_ALIEN_INFILTRATION
    raceWeights:
      0:
          STR_ETHEREAL: 100
  - type: STR_ALIEN_BASE
    raceWeights:
      0:
          STR_ETHEREAL: 100
  - type: STR_ALIEN_TERROR
    raceWeights:
      0:
          STR_ETHEREAL: 100

Offline Raidau

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Are race mods compatible with each other?
« Reply #4 on: May 13, 2014, 08:26:55 am »
Note that this is the exception, not the norm, for ruleset stuff. :P (normally if two rulesets specify the exact same property, one will overwrite the other)

Could you please make the same for alienDeployments? :)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Are race mods compatible with each other?
« Reply #5 on: May 13, 2014, 04:11:01 pm »
Could you please make the same for alienDeployments? :)

Oh yeah, it'd make a lot of sense.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Are race mods compatible with each other?
« Reply #6 on: May 13, 2014, 05:11:23 pm »
i tried this and got 4 medium scouts with sectoids in the first month
just bad luck?
The first mission is always a Sectoid Alien Research, unless you explicitly remove them.

Could you please make the same for alienDeployments? :)
Like what exactly?

Offline Raidau

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Are race mods compatible with each other?
« Reply #7 on: May 14, 2014, 10:25:51 am »
Like what exactly?

Like this:
Quote
2. If multiple rulesets define the same mission raceWeights, then they'll be merged, not replaced (so if you're making a new race mod, you only need to specify their weights). Weights for new races will be added to the list, while weights for existing races will replace old ones. The only way to "remove" old races is to explicitly set them to 0. For example, this:

Now the whole "data:" section is replaced by another ruleset, while this section has 2 subdivision levels. Now if I want to replace only commander's equipment in a battleship I must copy all item sets for every alien rank. That is very bad for mod compatibility.