aliens

Author Topic: What are [units:] race: & rank variables used for?  (Read 1269 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
What are [units:] race: & rank variables used for?
« on: October 09, 2021, 11:46:32 am »
(Question)
How do you use these variables?

[In the units: section]
race:
rank:


[In the alienDeployments: section]
alienRank:




So far I've been creating aliens in the units: section then assigning those units to a race in the alienRaces: section and fighting them via "New Battle" from the main menu screen.

To correctly integrate them into a real campaign I would like to know what to do with race: and rank: in the units: section.

I've just been giving these two variables temporary values like:
Code: [Select]
    race: STR_ALIENNAME
    rank: STR_LIVE_TERRORIST


The UFOpaedia Ruleset Reference Nightly lists what the variable is, but unfortunately it doesn't elaborate on how to use them:
Code: [Select]
race String ID of the unit race (for alien units).
rank String ID of the unit rank (for alien units).


The alienRaces: section of code appears to already assign each rank of alien to a deployment slot and the id: section controls the race, I think.

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 can tell there is more going on as alienDeployments: also appears to use the alienRank: variable to select units for deployment in some way.

UFOpaedia Ruleset Reference Nightly:
Code: [Select]
alienRank Rank associated with this deployment data, as defined by the order of the race in question

I've noticed that in the units: section the rank: names have _LIVE_ instead of the alien race's name from the alienRaces: members: list.
Code: [Select]
    rank: STR_LIVE_SOLDIER
    rank: STR_LIVE_SQUAD_LEADER
    rank: STR_LIVE_TECHNICIAN
    rank: STR_LIVE_TERRORIST

Is this related to the live alien item when a unit is captured?

I can see that in OXCE the liveAlien: variable on the unit controls the recovered live alien and from what I've read in the UFOpaedia OpenXcom's default method for determining the live alien is to use an item with the same name as the alien unit.

So I'm guessing that this is unrelated with a recovered item and instead performs a different action?



« Last Edit: October 10, 2021, 04:00:12 am by The Martian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: What are [units:] race: & rank variables used for?
« Reply #1 on: October 12, 2021, 09:23:12 am »
The UFOpaedia Ruleset Reference Nightly mentions this in its units: section:
Quote
"Defines an alien (enemy) or civilian (neutral) unit, listed in "units:". Every different alien rank is a different unit, since they have completely different stats. Unit stats are represented as follows:"

Does this mean the stats are increased / decrease automatically based on what the rank: variable is assigned?

If so where can I see the values that the stats are boosted by?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: What are [units:] race: & rank variables used for?
« Reply #2 on: October 24, 2021, 09:08:19 pm »
I've been digging around and from what I can tell the use for the [units:]race: variable appears to be displaying the units name on the screen that can be accessed in the battlescape by clicking on the unit with the middle mouse button.

Spoiler:
« Last Edit: October 24, 2021, 09:10:30 pm by The Martian »