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

Offline Alex_D

  • Colonel
  • ****
  • Posts: 379
    • 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 »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6771
  • OXCE developer
    • View Profile
    • My Wiki
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: 379
    • View Profile
Re: [DONE][SUGGESTION] SpawnedPerson additional stats
« Reply #2 on: October 07, 2020, 02:38:50 pm »
Thank you!