aliens

Author Topic: [DONE][SUGGESTION] SpawnedPerson additional stats  (Read 3326 times)

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
[DONE][SUGGESTION] SpawnedPerson additional stats
« on: October 01, 2020, 05:09:56 pm »
I'd like to request this feature in OXCE.

Currently the code allows for spawnedPersonType and spawnedPersonName to manufacture recruits with specific types and names.
What if the code is expanded to allow for recruiting of a specific type with certain stats as well. Example:

Code: [Select]
# Any item not specified will be taken as usual.
spawnedPerson:
 - type: STR_SOLDIER
 - name: "John Doe"
 - initialStats
   - psiStrength: 80
 - nationality: 1
 - rank: 3
 - gender: 0
 - look: 0
 - lookVariant: 1

I believe this will allow modders to recruit specific characters, with certain initial stats, looks, nationality, etc, without the need to create additional unit types.
« Last Edit: October 07, 2020, 11:56:06 am by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9100
    • View Profile
Re: [DONE][SUGGESTION] SpawnedPerson additional stats
« Reply #1 on: October 07, 2020, 11:59:56 am »
Added attribute "spawnedSoldier", where you can specify overrides for the randomly generated soldier.

Code: [Select]
manufacture:
  - name: TEST
...
    spawnedPersonType: STR_SOLDIER
    spawnedSoldier:
      nationality: 0
      rank: 3  # captain
      currentStats:
        tu: 100
        stamina: 100
        health: 100
        strength: 100

The syntax is the same as in the saved games, you can override anything that can be saved (except for ID).

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
Re: [DONE][SUGGESTION] SpawnedPerson additional stats
« Reply #2 on: October 07, 2020, 02:38:50 pm »
Thank you!

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9100
    • View Profile
Re: [DONE][SUGGESTION] SpawnedPerson additional stats
« Reply #3 on: August 05, 2022, 02:31:23 pm »
The syntax is the same as in the saved games, you can override anything that can be saved (except for ID).

Since OXCE 7.6.4 you won't be able to override the name this way, because of this request: https://openxcom.org/forum/index.php/topic,10704.0.html

You can still override it using the `spawnedPersonName` attribute.