Author Topic: [DONE][Suggestion] Show ufo preview/info at base defense  (Read 836 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: [Suggestion] Show ufo info at base defense
« Reply #15 on: March 29, 2025, 04:02:08 pm »
.

Offline Delian

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: [Suggestion] Show ufo info at base defense
« Reply #16 on: March 29, 2025, 04:23:11 pm »
Both palettes actually look good lol

Hmm. I think it would be better if the image was on top and the ufo info below. Assuming that it's possible to fit the ufo info on the right half of the screen. If not, then nm.

Also, it would be nice if the image experienced some sort of gfx effect when the ufo is hit (if the player decides to fire).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: [DONE][Suggestion] Show ufo preview/info at base defense
« Reply #17 on: March 29, 2025, 05:23:01 pm »
Done.

https://github.com/MeridianOXC/OpenXcom/commit/f741a9abca8b52f4a8b8e1609164fe802a3d03ea
https://github.com/MeridianOXC/OpenXcom/commit/b04d49bbf42097bc4232b8be250f5ab5dd7a50ce

Activate via global on/off switch `showUfoPreviewInBaseDefense`:

Code: [Select]
showUfoPreviewInBaseDefense: true

You can play with colors and palettes of the screen using interface ruleset `baseDefense_geo`, UFO defaults are:

Code: [Select]
  - type: baseDefense_geo
    backgroundImage: BACK04.SCR
    elements:
      - id: palette
        color: 2     # red/orange
      - id: window
        color: 133   # minty green
      - id: text
        color: 239   # bright green
        color2: 138  # yellow
      - id: button
        color: 133   # minty green

UFO preview is displayed always. Even if there are no radars.

Hyperwave info is displayed only if hyper-detected already. Presence of hyperwave decoder in the base is NOT enough (unless enabled per ufo by `instaHyper`, see below).
« Last Edit: March 30, 2025, 10:25:01 am by Meridian »

Offline Delian

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: [DONE][Suggestion] Show ufo preview/info at base defense
« Reply #18 on: March 30, 2025, 04:17:51 am »
Thanks, altho... that's quite a departure from the original suggestion. Can you elaborate on your choice of different implementation (to have instant retaliations never show hyperwave info)? If Dioxine requested it, then fair enough. But then, what if some other modder wants the player to see the hyperwave info?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: [DONE][Suggestion] Show ufo preview/info at base defense
« Reply #19 on: March 30, 2025, 07:51:35 am »
Thanks, altho... that's quite a departure from the original suggestion. Can you elaborate on your choice of different implementation (to have instant retaliations never show hyperwave info)? If Dioxine requested it, then fair enough. But then, what if some other modder wants the player to see the hyperwave info?

It was my decision, I don't have discussions with modders outside of the forum.

The choice was driven by the nature of instant retaliations.
If these retaliations are so stealthy and/or otherwise undetectable by radar (e.g. ground attack) then it makes sense (to me) that base defense also lacks this info.

If modders would want this info, it can be added... configurable on a ufo by ufo basis:

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    instaHyper: true   # Show extra info during base defense even if the UFO was not yet hyper-detected classically?
« Last Edit: March 30, 2025, 10:20:00 am by Meridian »