OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Alex_D on October 01, 2020, 05:09:56 pm

Title: [DONE][SUGGESTION] SpawnedPerson additional stats
Post by: Alex_D 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.
Title: Re: [DONE][SUGGESTION] SpawnedPerson additional stats
Post by: Meridian 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).
Title: Re: [DONE][SUGGESTION] SpawnedPerson additional stats
Post by: Alex_D on October 07, 2020, 02:38:50 pm
Thank you!
Title: Re: [DONE][SUGGESTION] SpawnedPerson additional stats
Post by: Meridian 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.