Author Topic: [DONE][Suggestion] Ability to mod craft's default display altitude  (Read 2124 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
[DONE][Suggestion] Ability to mod craft's default display altitude
« on: September 18, 2020, 11:58:18 am »
When an X-Com craft is in flight there is no way to set the preferred altitude for that craft. (As far as I know.)

I believe that as long as the maxAltitude: is in its default -1 setting that altitude is mostly cosmetic for X-Com craft.
(Unless I'm mistaken this variable defines the height a craft can engage UFOs at, not its default altitude while flying.)

If possible I would like to be able to specify the default altitude an X-Com craft is flying at after launching.

This could be useful for example if a mod has X-Com craft that act as satellites and wants them to always display "Very High".

Alternatively the real altitude of the X-Com craft itself doesn't have to change and the craft's current altitude could be replaced by the contents of a STR attached to that craft's code in the .rul file.

For example a X-Com craft that had a line of code referencing STR_CRAFT_ALTITUDE_SPACE: "Space" would display "Altitude>Space" when ever the player looked at the X-Com craft's status screen on the geoscape, even if the craft was in reality actually at the altitude of "Very Low".

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: [DONE][Suggestion] Ability to mod craft's default display altitude
« Reply #1 on: December 29, 2023, 05:24:11 pm »
Alternatively the real altitude of the X-Com craft itself doesn't have to change and the craft's current altitude could be replaced by the contents of a STR attached to that craft's code in the .rul file.

For example a X-Com craft that had a line of code referencing STR_CRAFT_ALTITUDE_SPACE: "Space" would display "Altitude>Space" when ever the player looked at the X-Com craft's status screen on the geoscape, even if the craft was in reality actually at the altitude of "Very Low".

Done.

Sample ruleset:

Code: [Select]
crafts:
  - type: STR_SKYRANGER
    defaultAltitude: STR_SPACE

https://github.com/MeridianOXC/OpenXcom/commit/8c429209234920cbb74ee513d7478f4d18c7a139