Author Topic: Unique Sprites Sheets per Rank  (Read 1822 times)

Offline Daev

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Unique Sprites Sheets per Rank
« 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.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Unique Sprites Sheets per Rank
« Reply #1 on: February 09, 2023, 12:58:42 am »
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 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:
Code: [Select]
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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Unique Sprites Sheets per Rank
« Reply #2 on: February 09, 2023, 08:29:15 am »
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:

Code: [Select]
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

Offline Daev

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Unique Sprites Sheets per Rank
« Reply #3 on: February 10, 2023, 03:10:47 am »
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.