1
OXCE Suggestions DONE / Re: [DONE][Suggestion] A way to display statCaps on the soldier info screen
« on: November 03, 2023, 01:13:23 am »
This new feature is really a good idea

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
F:/OXCE/OXCE V7.8 HellMod/user/mods/HellMod/Ruleset/050_Facilities_TagSoldierTransformation.rul: Error for 'STR_TRAINING_SURVIVAL1': wrong node type, expected a map at line 28
(Line 28 is always the line before the one containing requiredItems; in this case, the line 28 is soldierBonusType: STR_SB_TRAINING_SURVIVAL1; if I put requiredItems just after name: STR_TRAINING_SURVIVAL1, the involved line will be the one containing name)If you want to limit the number of transformations, you can generate "gym tickets" via geoscape events every month and then use them as resources required for the transformation.
facilities:
- type: STR_TRAINING_ROOM
spriteShape: 1
spriteFacility: 111
buildCost: 800000
buildTime: 20
monthlyCost: 8000
mapName: XBRO_01
provideBaseFunc: [BASEFUNC_TRAINING]
refundValue: 400000
rightClickActionType: 6
maxAllowedPerBase: 1
soldierTransformation:
- name: STR_TRAINING_SURVIVAL1
listOrder: 100
requires: []
requiresBaseFunc: [BASEFUNC_TRAINING]
keepSoldierArmor: true
allowsLiveSoldiers: true
allowedSoldierTypes: [STR_SOLDIER,STR_VETERAN_SNIPER,STR_VETERAN_GRENADIER,STR_VETERAN_WARRIOR]
requiredPreviousTransformations: []
forbiddenPreviousTransformations: [STR_TRAINING_SURVIVAL1,STR_TRAINING_ENDURANCE1]
cost: 15000
transferTime: 360
includeBonusesForMinStats: true
soldierBonusType: STR_SB_TRAINING_SURVIVAL1
- name: STR_TRAINING_SURVIVAL2
listOrder: 101
requires: []
minRank: 2
requiresBaseFunc: [BASEFUNC_TRAINING]
keepSoldierArmor: true
allowsLiveSoldiers: true
allowedSoldierTypes: [STR_VETERAN_SNIPER,STR_VETERAN_GRENADIER,STR_VETERAN_WARRIOR]
requiredPreviousTransformations: [STR_TRAINING_SURVIVAL1]
forbiddenPreviousTransformations: [STR_TRAINING_SURVIVAL2]
requiredMinStats:
health: 120
reaction: 80
cost: 30000
transferTime: 720
includeBonusesForMinStats: true
soldierBonusType: STR_SB_TRAINING_SURVIVAL2
soldierBonuses:
- name: STR_SB_TRAINING_FIRING1
stats:
firing: 5
- name: STR_SB_TRAINING_FIRING2
stats:
firing: 5
- name: STR_SB_TRAINING_THROWING1
stats:
throwing: 5
- name: STR_SB_TRAINING_THROWING2
stats:
throwing: 5
- name: STR_SB_TRAINING_MELEE1
stats:
throwing: 5
- name: STR_SB_TRAINING_MELEE2
stats:
throwing: 5
- name: STR_SB_TRAINING_SURVIVAL1
stats:
health: 10
reactions: 5
- name: STR_SB_TRAINING_SURVIVAL2
stats:
health: 10
reactions: 5
This is part of oxce already.
commendations:
- type: STR_COMMENDATION_ALIENS_KILLED #Total number of kills across a soldier's career that meet the specified criteria
description: STR_COMMENDATION_ALIENS_KILLED_DESCRIPTION
sprite: 1
criteria:
killsWithCriteriaCareer: [10, 20, 30, 40, 50, 75, 100, 200, 300, 500]
soldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED4]
killCriteria:
-
- [1, ["STATUS_DEAD", "FACTION_HOSTILE"]]
soldierBonuses:
- name: STR_SB_COMMENDATION_ALIENS_KILLED1
stats:
tu: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED2
stats:
health: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED3
stats:
tu: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED4
stats:
health: 5
soldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED4]
or may I perhaps make it shortersoldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, , , , STR_SB_COMMENDATION_ALIENS_KILLED2, , , STR_SB_COMMENDATION_ALIENS_KILLED3, , STR_SB_COMMENDATION_ALIENS_KILLED4]
or even another solution ?soldierBonuses:
- name: STR_SB_COMMENDATION_ALIENS_KILLED1
stats:
tu: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED2
stats:
tu: 5
health: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED3
stats:
tu: 10
health: 5
- name: STR_SB_COMMENDATION_ALIENS_KILLED4
stats:
tu: 10
health: 10
Here's the ruleset documentation for the modders out there, it's also contained as a text file in the mod attached to the post above:Code: [Select]soldierTransformation:
- name: STR_PROJECT_NAME # (REQUIRED) The name of this project listed in the Soldier Transformations screen
listOrder: 100 # The list order of this project, defaults to increasing by 100 for each project in the mod when not defined
requires: # A list of research projects required before this project appears in the list of available transformations, the default empty list means this project is available from the beginning of the game
#- STR_SOME_RESEARCH
requiresBaseFunc: # A list of base functions required at a base in order to do this project, the default empty list means no special facilities are required
#- SOME_BASE_FUNC
producedSoldierType: STR_SOLDIER # The type of soldier produced by this project - any soldier undergoing this transformation will be switched to this type. If left empty, the soldier type does not change.
producedSoldierArmor: STR_NONE_UC # The armor the soldier produced will have when the project finishes, only used when keepSoldierArmor is false. Leaving it empty will give the soldier the armor defined by the type in the soldiers: ruleset.
keepSoldierArmor: false # Default false, this parameter determines whether or not the soldier will keep the armor they're wearing through this transformation
createsClone: false # Default false, this parameter determines whether the selected soldier has the transformation done to them or a new soldier is created that is a copy of the original and the transformation is done to the new soldier.
needsCorpseRecovered: true # Default true, if your project allows dead soldiers, this determines whether or not you needed to have a corpse item available at the end of the battle in which the soldier died. This does not mean you need the corpse item in your stores, just that it would have been recovered if recover: true was set on the item
allowsDeadSoldiers: false # Default false - can dead soldiers undergo this transformation? If so, they are brought back to life at the base you started this project in
allowsLiveSoldiers: false # Default false - can live, non-wounded soldiers undergo this transformation?
allowsWoundedSoldiers: false # Default false - can wounded soldiers undergo this transformation?
allowedSoldierTypes: # (REQUIRED) This list determines which soldier types can undergo this transformation, the default empty list means nobody can have this project done to them.
#- STR_SOLDIER
requiredPreviousTransformations: # A list of transformation projects that must be done to a soldier before they're eligible for this project, the default empty list means no previous projects are required.
#- STR_SOME_TRANSFORMATION
forbiddenPreviousTransformations: # A list of transformation projects that a soldier cannot have undergone in order to be eligible for this project, the default empty list means no previous projects are forbidden
#- STR_SOME_OTHER_TRANSFORMATION
requiredMinStats: # The minimum stats a soldier must have in order to be eligible for this project, defaults to all 0 so any soldier is eligible
tu: 0
stamina: 0
health: 0
bravery: 0
reactions: 0
firing: 0
throwing: 0
strength: 0
psiStrength: 0
psiSkill: 0
melee: 0
requiredItems: # A list of items that must be consumed from the base's stores in which you start this project, the default empty list means no items are used
#STR_SOME_ITEM: 1
cost: 50000 # The cost of the project in dollars
transferTime: 0 # Soldiers can be put in a transfer back to the base where they started if this parameter is greater than the default of 0 hours. New clones or resurrected soldiers are automatically given a transfer to the base with a default of 24 hours.
recoveryTime: 0 # The amount of wound recovery time a soldier is given after this project completes and the transfer, if any, is completed. The default value is 0 days.
flatOverallStatChange: # A direct change to the soldier's overall stats when undergoing this project, can be positive or negative - tu: 5 means the soldier will gain 5 max time units, while tu: -5 means the soldier will lose 5 max time units. The default of 0 means no change.
tu: 0
stamina: 0
health: 0
bravery: 0
reactions: 0
firing: 0
throwing: 0
strength: 0
psiStrength: 0
psiSkill: 0
melee: 0
percentOverallStatChange: # A percent change to the soldier's overall stats when undergoing this project, can be positive or negative - tu: 5 means the soldier will gain an extra 5% of their max time units, while tu: -5 means the soldier will lose 5% of their max time units. The default of 0 means no change.
tu: 0
stamina: 0
health: 0
bravery: 0
reactions: 0
firing: 0
throwing: 0
strength: 0
psiStrength: 0
psiSkill: 0
melee: 0
percentGainedStatChange: # A percent change to the soldier's stats, but instead of taking a portion of the overall stats, this only applies to the stats they've trained up from their initial values, can be positive or negative - firing: -100 means the soldier will lose all of the firing accuracy they trained since joining, while firing: 10 means they gain 10% of the amount they trained over their initial values. The default of 0 means no change.
tu: 0
stamina: 0
health: 0
bravery: 0
reactions: 0
firing: 0
throwing: 0
strength: 0
psiStrength: 0
psiSkill: 0
melee: 0
useRandomStats: false # Default false, when true, this parameter overrides the stat changes above and has the produced soldier roll random stats according to their new soldier type from this transformation project.
lowerBoundAtMinStats: true # Default true, this parameter determines whether or not any changes in stats from this project should go below the minStats defined on the new soldier type.
upperBoundAtMaxStats: false # Default false, this parameter determines whether or not any changes in stats from this project should go above the maxStats defined on the new soldier type.
upperBoundAtStatCaps: false # Default false, this parameter determines whether or not any changes in stats from this project should go above the statCaps defined on the new soldier type.
The associated strings are:Code: [Select]extraStrings:
- type: en-US
strings:
#SoldierTransformationAssignState.cpp
STR_TRANSFER_TIME: "Transfer Time>{ALT}{0}"
STR_RECOVERY_TIME: "Recovery Time>{ALT}{0}"
STR_CURRENT_STATS: "Current stats"
STR_CHANGES: "Changes"