OpenXcom Forum

Modding => OpenXcom Extended => 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!