Author Topic: [DONE][Suggestion] Night/Day Indicator  (Read 3075 times)

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
[DONE][Suggestion] Night/Day Indicator
« on: November 06, 2019, 08:35:59 am »
Sometimes when I equip my team just before the mission starts I don't know if it's day or night. Knowing it could be nice (particularly true for the XFiles mod but can be useful for any game)
« Last Edit: February 01, 2023, 03:30:22 pm by Meridian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [Suggestion] Night/Day Indicator
« Reply #1 on: November 06, 2019, 10:10:16 am »
I think it is a good idea.

The three places I can think of it being displayed are potentially...



During the landing prompt:


The mission briefing:


The initial equipment phase:




Personally I think it would be best on the Mission Briefing screen. There is enough space at the bottom of the text and a text message potentially would be easier for modding than a displayed image.

If the message assigned to the current light level displayed on the Mission Briefing screen is a modifiable text STR then, if
OpenXcom is not running one of the base campaigns, regardless of the mods style each light level could have a different message to suit it.

Judging by the UFOpaedia: Ruleset Reference Nightly's Alien Deployments section there are 16 settings for "shade" with 0 being full daytime and 15 being full nighttime. So there would need to be 16 text strings, example:
Code: [Select]
shadeMessage0: "Light Level 0"
shadeMessage1: "Light Level 1"
shadeMessage2: "Light Level 2"
shadeMessage3: "Light Level 3"
shadeMessage4: "Light Level 4"
shadeMessage5: "Light Level 5"
shadeMessage6: "Light Level 6"
shadeMessage7: "Light Level 7"
shadeMessage8: "Light Level 8"
shadeMessage9: "Light Level 9"
shadeMessage10: "Light Level 10"
shadeMessage11: "Light Level 11"
shadeMessage12: "Light Level 12"
shadeMessage13: "Light Level 13"
shadeMessage14: "Light Level 14"
shadeMessage15: "Light Level 15"

Depending on the flavor of the mod the text could be set to instead read something like:
shadeMessage15: "It is pitch black."


shadeMessage0-15: is kind of messy and static, perhaps instead of individual variables an indexed array could hold all of them like this?

(I'm not sure what the YAML code for this is, so I'll just give an example in pseudocode.)

Code: [Select]
shadeMessage: [ 0,STR_SHADE_MESSAGE_0 ]
shadeMessage: [ 1,STR_SHADE_MESSAGE_1 ]
shadeMessage: [ 2,STR_SHADE_MESSAGE_2 ]
shadeMessage: [ 3,STR_SHADE_MESSAGE_3 ]
shadeMessage: [ 4,STR_SHADE_MESSAGE_4 ]
shadeMessage: [ 5,STR_SHADE_MESSAGE_5 ]
shadeMessage: [ 6,STR_SHADE_MESSAGE_6 ]
shadeMessage: [ 7,STR_SHADE_MESSAGE_7 ]
shadeMessage: [ 8,STR_SHADE_MESSAGE_8 ]
shadeMessage: [ 9,STR_SHADE_MESSAGE_9 ]
shadeMessage: [ 10,STR_SHADE_MESSAGE_10 ]
shadeMessage: [ 11,STR_SHADE_MESSAGE_11 ]
shadeMessage: [ 12,STR_SHADE_MESSAGE_12 ]
shadeMessage: [ 13,STR_SHADE_MESSAGE_13 ]
shadeMessage: [ 14,STR_SHADE_MESSAGE_14 ]
shadeMessage: [ 15,STR_SHADE_MESSAGE_15 ]

That could potentially give more flexibility for future dynamic altering of each light levels assigned STR mid game via scripting. As the currently assigned STR to each value of shadeMessage: could be swapped out at some point during the game based on events/research/equipment/etc.

(As I'm not really sure how the code is currently written this is all just speculation.)


Here is an example of what I mean.

It is night, X-Com has not deployed flares/etc pre-mission:

shadeMessage: [ 15,STR_SHADE_MESSAGE_15_No_Light ]

It is night, X-Com has deployed flares/etc pre-mission changing the light level in the mission in some way:

shadeMessage: [ 15,STR_SHADE_MESSAGE_15_Light ]


STR_SHADE_MESSAGE_15_No_Light: "It is pitch black"
STR_SHADE_MESSAGE_15_Light: "It is dark but our floodlights are providing limited illumination of the area."




EDIT:
My guess is that another important use for this would be if an alien deployment was overriding the geoscape's light level using minShade: & maxShade: variables the player could be informed of the potentially unexpected situation.

« Last Edit: November 06, 2019, 10:28:30 am by The Martian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Suggestion] Night/Day Indicator
« Reply #2 on: November 06, 2019, 01:54:26 pm »
Sometimes when I equip my team just before the mission starts I don't know if it's day or night. Knowing it could be nice (particularly true for the XFiles mod but can be useful for any game)

Already available: https://openxcom.org/forum/index.php/topic,2408.msg61729.html#msg61729

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Suggestion] Night/Day Indicator
« Reply #3 on: November 06, 2019, 03:03:40 pm »
Thanks, how can I enable this ?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Night/Day Indicator
« Reply #4 on: November 08, 2019, 10:42:32 am »
Thanks, how can I enable this ?

You need a small mod which enables the feature and contains the graphics (indicator).

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Suggestion] Night/Day Indicator
« Reply #5 on: November 09, 2019, 11:42:42 am »
is the mod available somewhere ? apparently not in the discussion thread or on the mod portal

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Night/Day Indicator
« Reply #6 on: November 09, 2019, 01:30:38 pm »
is the mod available somewhere ? apparently not in the discussion thread or on the mod portal

No, hence "a" small mod, not "the" small mod.