OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Solarius Scorch on January 25, 2025, 11:52:21 am
-
Continued from: https://openxcom.org/forum/index.php?topic=11828.0
I would like to request adding random soldier recruitment bonuses on normal hire, when the soldier is bought from the purchases menu.
To mirror the data structure from manufacturing:
soldiers:
- type: STR_SOLDIER
costBuy: 40000
costSalary: 20000
spawnedSoldier:
transformationBonusesCount: 3 # default is 1
randomTransformationBonuses: # this is a weighted list of soldier bonuses, each item can be chosen only once
STR_STARTING_BONUS_X1: 500 # 50%
STR_STARTING_BONUS_X2: 200 # 20%
STR_STARTING_BONUS_X3: 100 # 10%
STR_STARTING_BONUS_X4: 100 # 10%
STR_STARTING_BONUS_X5: 100 # 10%
armor: STR_NONE_UC
standHeight: 22
kneelHeight: 14
...
This will allow a modder to introduce some thematic diversity among the soldiers, if they wish to do so.
-
Done.
https://github.com/MeridianOXC/OpenXcom/commit/596ece11d1fba15f788a5cb23206edaffbf26ee3
Syntax: see post above
-
Fantastic, and so fast! :)
Thanks!
EDIT: Did some initial testing. The feature seems to work splendidly so far.
A note: the random bonuses don't apply to the initial soldiers set. I don't know if it's intended or not, I don't mind either way, just wanted to confirm it's supposed to be like this.
And one extra minor request: would it be feasible to hide the relevant Ufopaedia article until you actually get a soldier with the particular bonus? Similar to how commendations can be hidden until you get them. It's not critical, but I think it could improve the fun factor.
-
A note: the random bonuses don't apply to the initial soldiers set. I don't know if it's intended or not, I don't mind either way, just wanted to confirm it's supposed to be like this.
It applies to soldiers who are purchased/recruited via the Purchase/Recruit GUI.
For initial soldiers (which are not purchased/recruited), you can define it in the startingBase ruleset.
And one extra minor request: would it be feasible to hide the relevant Ufopaedia article until you actually get a soldier with the particular bonus? Similar to how commendations can be hidden until you get them. It's not critical, but I think it could improve the fun factor.
It's a lot of ugly code, but can probably be done.
-
It applies to soldiers who are purchased/recruited via the Purchase/Recruit GUI.
For initial soldiers (which are not purchased/recruited), you can define it in the startingBase ruleset.
Yes, that works for me.
...as long as you tell me the syntax, since my attempts failed. :)
It's a lot of ugly code, but can probably be done.
I see. Well, like I said, it's not that critical for my mod, but I can imagine doing fun stuff with this. So please at least consider it.
-
Yes, that works for me.
...as long as you tell me the syntax, since my attempts failed. :)
Might be missing then.
I'll check over the weekend.
-
I decided I don't want this on the initial crew in my mod anyway, since they get the Original Member commendation, which is an equivalent.
I can't say if other modders would need it.