OpenXcom Forum
Modding => Help => Topic started by: Daev on February 08, 2023, 10:32:42 pm
-
So i have crated unique sprites for TFTD aliens, i am trying to implement them in the cleanest way possible. It seems on OXCE there is no real way to override the "Armor" of an alien based on its rank, so it seems i will need to modify the "RACES" rule and "ALIENS" rule to create new aliens for each rank, assign them each the armor corresponding to their rank and then assign each unique alien as a rank in the races rul?
I know i can use RefNodes to clean up the list, but i want to make sure im not missing something here.
Any help would be appreciated, thanks.
-
Welcome to the OpenXcom forums Daev!
To my knowledge you can't currently change an alien unit's armor based on its rank, but I could be mistaken. Perhaps it 'may' be possible with scripts (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Scripts) if you feel like trying to code it.
The way you described it is how I've been handling it. Create the entry for the each alien rank in the armors: & units: sections then add the units to an entry in the alienRaces: section.
Just remember if you are working with Terror From The Deep that when you create a new entry in alienRaces: it also needs a paired underwater version or it won't load. (Just give it the same name with _UNDERWATER at the end and it will work automatically.)
Example:
alienRaces:
- id: STR_AQUATOID
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- STR_AQUATOID_SOLDIER
- STR_CALCINITE_TERRORIST
- STR_CALCINITE_TERRORIST
- id: STR_AQUATOID_UNDERWATER # <=====
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- STR_AQUATOID_SOLDIER
- STR_HALLUCINOID_TERRORIST
- STR_HALLUCINOID_TERRORIST
I know i can use RefNodes to clean up the list, but i want to make sure im not missing something here.
Those RefNodes can be a real time saver. (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
-
It seems on OXCE there is no real way to override the "Armor" of an alien based on its rank
Maybe I don't understand the question, but to me overriding armor per rank seems possible and trivial:
units:
- type: STR_AQUATOID_SOLDIER
armor: MY_CUSTOM_ARMOR_1
- type: STR_AQUATOID_SQUAD_LEADER
armor: MY_CUSTOM_ARMOR_2
- type: STR_AQUATOID_TECHNICIAN
armor: MY_CUSTOM_ARMOR_3
- type: STR_AQUATOID_MEDIC
armor: MY_CUSTOM_ARMOR_4
- type: STR_AQUATOID_NAVIGATOR
armor: MY_CUSTOM_ARMOR_5
- type: STR_AQUATOID_COMMANDER
armor: MY_CUSTOM_ARMOR_6
-
Thanks for the code! My ignorance is showing unfortunately, and I appreciate the example. I was confused by the spriterankgroup and spriterankgroup in the ruleset reference, and thought that was the only way. I also did not know the alien ranks were already separated. Thanks again, much appreciated.