OpenXcom Forum

OpenXcom Forks => OXCE Support => OpenXcom Extended (OXCE) => OXCE Support Y-scripts => Topic started by: Kozinsky on January 31, 2024, 12:23:56 pm

Title: [question] GeoscapeSoldier.getCommendation and GeoscapeSoldier.getTransformation
Post by: Kozinsky on January 31, 2024, 12:23:56 pm
Is there any way to understand with scripts if a player's soldier has a certain commendation of a certain level?
Similarly for transformations: how can a script understand if a soldier has a certain transformation?
Title: Re: [question] GeoscapeSoldier.getCommendation and GeoscapeSoldier.getTransformation
Post by: Yankes on January 31, 2024, 12:34:45 pm
ok, for now this not available but I think should be added. I put in on my TODO.

[ps]

For now you could probably workaraund it by solders bonuses as some are exposed to scripts.
Title: Re: [question] GeoscapeSoldier.getCommendation and GeoscapeSoldier.getTransformation
Post by: Kozinsky on January 31, 2024, 12:47:49 pm
For now you could probably workaraund it by solders bonuses as some are exposed to scripts.

I don't really understand, could you give me a simple example of what you meant?
Title: Re: [question] GeoscapeSoldier.getCommendation and GeoscapeSoldier.getTransformation
Post by: Yankes on January 31, 2024, 01:17:07 pm
commendation and transformations can grant "solders bonuses" that affect battleunits, and this bonuses are exposed to scripts.
You can add hook `applySoldierBonuses` on specific bonus to propagate info about commendation or transformation.
Title: Re: [question] GeoscapeSoldier.getCommendation and GeoscapeSoldier.getTransformation
Post by: Kozinsky on January 31, 2024, 02:03:39 pm
commendation and transformations can grant "solders bonuses" that affect battleunits, and this bonuses are exposed to scripts.
You can add hook `applySoldierBonuses` on specific bonus to propagate info about commendation or transformation.

This sounds like just what I need! Thank you so much! :)