aliens

Author Topic: [Solved] Starting conditions - adding additional soldier types using !add  (Read 3229 times)

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
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?
« Last Edit: February 12, 2023, 09:49:01 am by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Starting conditions - adding additional soldier types
« Reply #1 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

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: Starting conditions - adding additional soldier types
« Reply #2 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?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Starting conditions - adding additional soldier types
« Reply #3 on: May 25, 2020, 02:41:57 am »
Right now you need copy and paste it.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Starting conditions - adding additional soldier types
« Reply #4 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: [Solved] Starting conditions - adding additional soldier types using !add
« Reply #5 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.