OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: Aldorn on April 12, 2025, 02:28:51 pm

Title: [SOLVED] Question about raceWeights and refNodes
Post by: Aldorn 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 (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 (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


Title: Re: [Question] About raceWeights and refNodes
Post by: Solarius Scorch 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).
Title: Re: [Question] About raceWeights and refNodes
Post by: Yankes 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.
Title: Re: [Question] About raceWeights and refNodes
Post by: Aldorn 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!