SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop > SH4 Mission Designers' Forum
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-23-22, 07:44 PM   #1
KaleunMarco
Silent Hunter
 
KaleunMarco's Avatar
 
Join Date: Sep 2007
Location: Gone to Texas. No More Kleptocratic Government for me!
Posts: 4,251
Downloads: 460
Uploads: 29


Default Mission Editor, Triggers, and Time

i remember not too long ago someone posted a description of how the Time variable works within a Trigger using the ME.

i am playing a mission where the designed has plugged in a date to a trigger, say December 7, 1941 at 0900.
however, that date/time comes and goes and no trigger, event, nada.

so, clearly, the trigger/event does not work intuitively.

then, how does it work? anyone? anyone? anyone?
__________________
there are only two things in the world: submarines and targets.
Fortis et stabilis et fidelis, semper


------------------------------------------------------------
Silent Hunter 4 1.5 Gold Edition on CDROM
LAA enabled
Dell XPS with 32 GB Ram running Win10
KaleunMarco is offline   Reply With Quote
Old 07-23-22, 09:48 PM   #2
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,098
Downloads: 451
Uploads: 2


Default

The "Timer" Trigger is just that - a timer. Think of a wind-up egg timer from the 1970s. It starts at 0:00 and counts down in minutes, seconds, hours, etc. Put a timer trigger into a mission, and then go look at it in a text editor. Instead of giving you a "date" per se, it might say something like -971 instead for its countdown (hours?? I cannot remember...). Anyway, the Timer's "zero" is the date of the mis file that it is in, NOT the game's date. By default, you might have a 19380101 date, maybe a 19400101 Parameter date, and that is what the timer counts from, in spite of what the "date" shows in the ME's display. In fact, do that. Build a new mission, open the parameters menu, and change the date of the mission to something like December 3, 1943, and you'll notice that the time/date in the Timer trigger has now changed. The really strange thing comes into play when you "date" a mis file, and then the player gets assigned that mission either before or after that set date, and the timer is off still. It works fine for Single Missions or Patrols usually, but still, mis-date something and the Timer will fail. Silent Hunter 'logic'... It can be an exercise in frustration in a career file.
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 07-24-22, 09:14 AM   #3
KaleunMarco
Silent Hunter
 
KaleunMarco's Avatar
 
Join Date: Sep 2007
Location: Gone to Texas. No More Kleptocratic Government for me!
Posts: 4,251
Downloads: 460
Uploads: 29


Default

Quote:
Originally Posted by propbeanie View Post
The "Timer" Trigger is just that - a timer. Think of a wind-up egg timer from the 1970s. It starts at 0:00 and counts down in minutes, seconds, hours, etc. Put a timer trigger into a mission, and then go look at it in a text editor. Instead of giving you a "date" per se, it might say something like -971 instead for its countdown (hours?? I cannot remember...). Anyway, the Timer's "zero" is the date of the mis file that it is in, NOT the game's date. By default, you might have a 19380101 date, maybe a 19400101 Parameter date, and that is what the timer counts from, in spite of what the "date" shows in the ME's display. In fact, do that. Build a new mission, open the parameters menu, and change the date of the mission to something like December 3, 1943, and you'll notice that the time/date in the Timer trigger has now changed. The really strange thing comes into play when you "date" a mis file, and then the player gets assigned that mission either before or after that set date, and the timer is off still. It works fine for Single Missions or Patrols usually, but still, mis-date something and the Timer will fail. Silent Hunter 'logic'... It can be an exercise in frustration in a career file.
yes, i did notice that the "date" was converted to a number of minutes from the start of the Mission Date to the time of the trigger.

yes, now, i understand that the trigger-date-time starts from the onset of the career-mission and NOT the start of the mission-date in the MIS file, which is somewhat counter-intuitive but this IS Ubi.....

so, how does one use the Mission Date to execute a trigger (or a programmer ) during a career-mission on any one particular date and time?

my first SWAG is that we would have to recompute/reenter the Mission Start Date (mis-file) to match the Patrol Start Date (UPC-file) prior to shoving off on the mission.


As i suspected, my SWAG was correct.
but this is not a technique that every player can use.
__________________
there are only two things in the world: submarines and targets.
Fortis et stabilis et fidelis, semper


------------------------------------------------------------
Silent Hunter 4 1.5 Gold Edition on CDROM
LAA enabled
Dell XPS with 32 GB Ram running Win10

Last edited by KaleunMarco; 07-24-22 at 09:56 AM.
KaleunMarco is offline   Reply With Quote
Old 07-24-22, 11:19 AM   #4
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,098
Downloads: 451
Uploads: 2


Default

Exactly... lol - 'tis better to avoid the use of the "Timer" altogether. If it functioned as it SEEMS like it should, it ~would be~ quite useful... but an IF-THEN-ELSE 'logic' of some form would be more-so... sigh
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 02-04-25, 10:09 AM   #5
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,098
Downloads: 451
Uploads: 2


Default

KaleunMarco and I have been bouncing ideas around, wondering WHY the triggers are so squirrely...

It looks like your mission is all set-up, ready to go, so you go to test it, and NOTHING HAPPENS from your triggers. I do remember reading about this issue somewhere before, and "time" is at the root of all evil in the Silent Hunter games. Not only does it count from "zero" instead of an actual date, but it counts in seconds / minutes / hours depending upon which aspect of the game you are modding.

With this little kernel of memory irritating me, I decided to experiment with the Mission date, as listed in the mis file header, the CfgDate= line of the involved "target" of spawning from a trigger (a ship, plane or sub), the GameEntryDate= and GameEntryTime= lines versus the AvailStartDate= and AvailStartTime= lines.

So, CfgDate HAS to be after Mission Date, and it has to be the first of a month. Mission date can be any valid date. For example,
[Mission]
...
Year=1944
Month=1
Day=1
Hour=0
Minute=0

means that your CfgDate can be no earlier than 19440101. Likewise though, the GameAvailabilityDate and Time cannot be before the same date and time as the mission.

Then the "revelation" (of old info from someone else), your actual GameEntryDate and Time, which are dated later than the mission for the purpose of being "spawned" by a "Trigger", can be NO LATER than 120 days later. Not 120 days and one second, but no more than 120 days, which is 2880 hours, or 172,800 minutes. NOT 172800.016666 minutes... your "target" will not spawn after 172,800 minutes, or 120 days... You can "go around the corner" from December 1943 into February 1944 no problem, but say you use "19431216" as your Available, your actual GameEntry should be no later than "19440414", else the trigger fails to cause the spawn...
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 02-04-25, 07:11 PM   #6
KaleunMarco
Silent Hunter
 
KaleunMarco's Avatar
 
Join Date: Sep 2007
Location: Gone to Texas. No More Kleptocratic Government for me!
Posts: 4,251
Downloads: 460
Uploads: 29


Default

Quote:
Originally Posted by propbeanie View Post
KaleunMarco and I have been bouncing ideas around, wondering WHY the triggers are so squirrely...

It looks like your mission is all set-up, ready to go, so you go to test it, and NOTHING HAPPENS from your triggers. I do remember reading about this issue somewhere before, and "time" is at the root of all evil in the Silent Hunter games. Not only does it count from "zero" instead of an actual date, but it counts in seconds / minutes / hours depending upon which aspect of the game you are modding.

With this little kernel of memory irritating me, I decided to experiment with the Mission date, as listed in the mis file header, the CfgDate= line of the involved "target" of spawning from a trigger (a ship, plane or sub), the GameEntryDate= and GameEntryTime= lines versus the AvailStartDate= and AvailStartTime= lines.

So, CfgDate HAS to be after Mission Date, and it has to be the first of a month. Mission date can be any valid date. For example,
[Mission]
...
Year=1944
Month=1
Day=1
Hour=0
Minute=0

means that your CfgDate can be no earlier than 19440101. Likewise though, the GameAvailabilityDate and Time cannot be before the same date and time as the mission.

Then the "revelation" (of old info from someone else), your actual GameEntryDate and Time, which are dated later than the mission for the purpose of being "spawned" by a "Trigger", can be NO LATER than 120 days later. Not 120 days and one second, but no more than 120 days, which is 2880 hours, or 172,800 minutes. NOT 172800.016666 minutes... your "target" will not spawn after 172,800 minutes, or 120 days... You can "go around the corner" from December 1943 into February 1944 no problem, but say you use "19431216" as your Available, your actual GameEntry should be no later than "19440414", else the trigger fails to cause the spawn...
great work testing , PB, however it is after 6 pm here and my eyes started counter-rotating in the middle of your second paragraph.

i am going to try reading through this again in the morning when my brain is fresher.
__________________
there are only two things in the world: submarines and targets.
Fortis et stabilis et fidelis, semper


------------------------------------------------------------
Silent Hunter 4 1.5 Gold Edition on CDROM
LAA enabled
Dell XPS with 32 GB Ram running Win10
KaleunMarco is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.