aliens

Author Topic: [SOLVED] Question about raceWeights and refNodes  (Read 64 times)

Offline Aldorn

  • Commander
  • *****
  • Posts: 790
    • View Profile
[SOLVED] Question about raceWeights and refNodes
« on: April 12, 2025, 02:28:51 pm »
This is mainly a question for @Robin if he's not away, but anyone who has the answer is welcome  :D

Looking at raceWeights, i can see here: https://openxcom.org/forum/index.php?topic=12022.msg164161#msg164161
that you are using
Code: [Select]
raceWeights: *raceWeightsAlienDrop
and here: https://openxcom.org/forum/index.php?topic=4363.msg59814#msg59814
that you are using
Code: [Select]
raceWeights: &raceWeightsAlienDrop
Apparently you found a way to define raceWeights templates to avoid repeating unnecessarily lines and lines of definition

I'm really interested because I always use the same definition for any alienMission

Unfortunately, I could not find any mod or even any zipped ruleset were you really use these * and & for raceWeights


« Last Edit: April 12, 2025, 11:55:03 pm by Aldorn »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11923
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Question] About raceWeights and refNodes
« Reply #1 on: April 12, 2025, 04:07:13 pm »
It's not OXC/E related, this is standard YAML notation.
Yes, you can avoid preparing the same blocks of data with this. Many mods use it. I have attached an example from X-Com Files (please check STR_ALIEN_RETALIATION).

Offline Yankes

  • Commander
  • Global Moderator
  • Commander
  • *****
  • Posts: 3469
  • Posts: 421
    • View Profile
Re: [Question] About raceWeights and refNodes
« Reply #2 on: April 12, 2025, 04:15:30 pm »
It's not OXC/E related, this is standard YAML notation.
Yes, you can avoid preparing the same blocks of data with this. Many mods use it. I have attached an example from X-Com Files (please check STR_ALIEN_RETALIATION).
but there is `refNode:` that is custom OXCE behavior, but of corse it rely on that yaml functionality.

Offline Aldorn

  • Commander
  • *****
  • Posts: 790
    • View Profile
Re: [Question] About raceWeights and refNodes
« Reply #3 on: April 12, 2025, 11:53:30 pm »
Ok, we can declare a template in any alienMission then call it in any other, very useful, another wonderful hidden feature

I checked some overhaul mods as FMP and XPiratez, but did not think about XComFiles

Thanks Solarius!
« Last Edit: Today at 12:50:26 am by Aldorn »