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 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-08-13, 09:05 PM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Can't you instead update the logic steps counter: i.e. when an unit detects a contact, you set a new random variable that must be equal or lesser than the current logic step and equal or lesser than a preset value (for making sure that delay isn't too long), the you load the new variable as current logic step
What I can do is this:
take current logic steps counter value and multiply by random number (0.0-1.0 range). Compare that result to a minimum and maximum value. Adjust accordingly. What should I set the minimum and maximum values to This will be used when ANY unit detects a contact (to force the game to check for airstrikes quicker). One exception is aircraft. I do not let them set the ignore logic steps bit because when they are spawned they will more than likely detect a contact and this would cause the game to check for airstrikes again resulting in more aircraft being spawned etc. etc. This is why aircraft are not allowed to set the ignore logic steps bit.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 09:16 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
What I can do is this:
take current logic steps counter value and multiply by random number (0.0-1.0 range). Compare that result to a minimum and maximum value. Adjust accordingly. What should I set the minimum and maximum values to This will be used when ANY unit detects a contact (to force the game to check for airstrikes quicker).
You said that a logic step lasts 91 seconds. I would say that a good interval would be between 1 and 4 logic steps, i.e. 1.5 - 6 minutes. A delay longer than this wouldn't make much sense imo

Quote:
Originally Posted by TheDarkWraith View Post
One exception is aircraft. I do not let them set the ignore logic steps bit because when they are spawned they will more than likely detect a contact and this would cause the game to check for airstrikes again resulting in more aircraft being spawned etc. etc. This is why aircraft are not allowed to set the ignore logic steps bit.
In other words, aircraft must wait for the whole logic steps cycle before calling for reinforcements? That sounds rasonable
gap is offline   Reply With Quote
Old 07-08-13, 09:19 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
You said that a logic step lasts 91 seconds. I would say that a good interval would be between 1 and 4 logic steps, i.e. 1.5 - 6 minutes. A delay longer than this wouldn't make much sense imo



In other words, aircraft must wait for the whole logic steps cycle before calling for reinforcements? That sounds rasonable
1 and 4 it is

A caveat to the aircraft is say an aircraft is spawned. A few seconds later a unit in the game detects a contact. Because this unit detected a contact the ignore logic steps bit is set and thus when the current 91.0 second interval is up game will check for airstrikes again. There was no real easy way to code this
TheDarkWraith is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 01:07 AM.


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