OpenXcom Forum

Modding => OpenXcom Extended => OXCE Support => Topic started by: krautbernd on May 25, 2020, 01:49:42 am

Title: [Solved] Starting conditions - adding additional soldier types using !add
Post by: krautbernd on May 25, 2020, 01:49:42 am
This in regards to a recent addition to OXCE
Quote
- Option to modify ruleset lists without completely redefining them (!add and !remove YAML tags) : https://openxcom.org/forum/index.php/topic,6586.msg127524.html#msg127524

I'm trying to additional soldier types to starting conditions (as a submod for XCF):

Code: [Select]
startingConditions:
  - type: STR_LABOR_GEAR
    defaultArmor:  !add
      STR_VETERAN_SOLDIER:
        STR_WORKSUIT_UC: 100

But this overwrites the definition instead. Are !add and !remove not supported for those type of lists?
Title: Re: Starting conditions - adding additional soldier types
Post by: Yankes on May 25, 2020, 02:02:41 am
This right now work only for list and list look like:
Code: [Select]
somthing:
  - AAAA
  - BBBBB
  - CCC

You have map:

Code: [Select]
foo:
  AAAAAA: bbbb
  CCCC: ddd

I need look at this case if is easy to add this new functionality here too
Title: Re: Starting conditions - adding additional soldier types
Post by: krautbernd on May 25, 2020, 02:24:11 am
Thanks for clearing that up. It would be great to see that functionality expanded since it would make (sub)mods a lot simpler to implement. Or is there another way to do this without having to copy&modify the complete definition?
Title: Re: Starting conditions - adding additional soldier types
Post by: Yankes on May 25, 2020, 02:41:57 am
Right now you need copy and paste it.
Title: Re: Starting conditions - adding additional soldier types
Post by: Yankes on June 13, 2020, 01:05:27 am
I now testing new version that will allow for this node to add new values without overwriting old ones.
Title: Re: [Solved] Starting conditions - adding additional soldier types using !add
Post by: Meridian on February 12, 2023, 09:52:24 am
But this overwrites the definition instead. Are !add and !remove not supported for those type of lists?

For the record, this is available since OXCE 6.6
Closing as solved.