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-02-13, 02:49 PM   #2176
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Installed the latest patcher .
Installed the carrier single mission test .
The carrier got close enough to blast my sub out of the water with its guns . Never seen any planes . Strangly the carrier is see thru , almost invisible with light fog looking thru binos or uzo . Will do some more testing .
THE_MASK is offline   Reply With Quote
Old 07-02-13, 03:40 PM   #2177
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
Installed the latest patcher .
Installed the carrier single mission test .
The carrier got close enough to blast my sub out of the water with its guns . Never seen any planes . Strangly the carrier is see thru , almost invisible with light fog looking thru binos or uzo . Will do some more testing .
Sometimes there is some lag between when I ask for game to create new unit and when it actually creates it. I've been tracking this down today to figure out why and finally figured it out.

In the main game loop one of the functions it calls is Update_Everything_In_Mission (that's what I call it) passing the frame render time. This Update_Everything_In_Mission function calls other functions one of which is a mission engine function dealing with updating/creating new units (again passing frame render time). This function takes it's current timer value and adds the frame render time to it. Then it checks to see if current timer value >= 91.0. If not return. If so then update/process/add units. That explains the lag. Now I'm seeing if it's possible to either change this timer value from 91.0 to a smaller value (half) or force the update/process/add units even though it isn't time to do so.
TheDarkWraith is offline   Reply With Quote
Old 07-02-13, 03:43 PM   #2178
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,095
Downloads: 466
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Things in the pipeline:
- ships that were able to fire torpedoes getting that ability - going to be a tough one no doubt but I think I can pull it off. I'm not talking about making them into a submarine type but leaving them as a ship type and adding a new controller to the game to allow ships to fire torpedoes.
- saving all map marks to a file at game end and restoring them at game start
- defining different sets of engine ratios for diesel and for electric (gaps idea) - these would be in the .cfg file of the unit

Any other ideas
Sounds of course very cool

As Sartoris pointed out, could be nice addition if our crew officers could die
Resulting of the losse of all related/involved icons...
Fifi is offline   Reply With Quote
Old 07-02-13, 03:57 PM   #2179
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Russian manual updated for the v1.0.119 - http://rghost.ru/47175508

__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 07-02-13, 04:00 PM   #2180
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by Fifi View Post
...if our crew officers could die
maybe Captain would be better?
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 07-02-13, 04:56 PM   #2181
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,095
Downloads: 466
Uploads: 0


Default

Quote:
Originally Posted by volodya61 View Post
maybe Captain would be better?
Well, soon or later
Seriously, captain can die ingame: game's over...
But crew officers can only be wounded (is it correct? )
Fifi is offline   Reply With Quote
Old 07-02-13, 05:05 PM   #2182
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Fifi View Post
Well, soon or later
Seriously, captain can die ingame: game's over...
But crew officers can only be wounded (is it correct? )
Nope. Seen nothing in the code about captain dying. Crew and officers can only be seriously wounded (they can never die)
TheDarkWraith is offline   Reply With Quote
Old 07-02-13, 05:08 PM   #2183
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by Fifi View Post
Well, soon or later
Seriously, captain can die ingame: game's over...
But crew officers can only be wounded (is it correct? )
Well, what could be the cause of death on-board the sub? your opinion?
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 07-02-13, 07:41 PM   #2184
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,095
Downloads: 466
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Nope. Seen nothing in the code about captain dying.
Was meaning captain can die only when sub is dead, hull zero, but that's right crew also

Quote:
Originally Posted by Volodya61
Well, what could be the cause of death on-board the sub? your opinion?
Crew can be wounded (and badly wounded) when plane or DD is firing us...why not die?
When badly wounded, why not have a random factor opening death door? lol
Fifi is offline   Reply With Quote
Old 07-02-13, 08:58 PM   #2185
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Someone posted an animation once of the crew lying on the floor . I guess its a stock animation but needs to be scripted in by someone .
THE_MASK is offline   Reply With Quote
Old 07-03-13, 03:21 AM   #2186
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Fixed the delay in the spawning of new units (at least the ones I ask to be spawned)

The devs appeared to make a little blunder in the code. They check to see if any new units need to be created in a function and some time later in that same function they check to see if any airstrikes need to be done. Airstrikes tell the game hey, I need some units created. Not until the previous function is called again (the one that actually creates the new units - 91.0 seconds later!) will they be created

I'm a master at making things do what their not supposed to so I injected a little code to ensure my units are spawned instantly

You may be asking what happens in that 91.0 seconds until they are actually created? Good question! The MissionEngine DLL handles this. There is a function so eloquently named Evolve that 'evolves' the unit (updating it's position and depth and other things) until it's actually created and displayed in the game. This is bad. Why? Let's say the aircraft is asked to be created travelling at 120 knots. How far will it move in 91.0 seconds? Pretty far. When the game actually creates and displays the unit (91.0) seconds later it's not where it was asked to be spawned - it's located at the 'evolved' position and depth. Sort of like cloaking Unacceptable for my needs. Thus I had to code in a creative way of getting my units to spawn instantly.

Have a couple more things to finish up on and I'll be releasing a new version of the patcher (with revised carrier aircraft spawning patch). The revised patch reduces the time it takes for a carrier to launch aircraft when it detects a contact. Before it could take 91.0 seconds + (0xF X 91.0 seconds) before it would react - an EXTREMELY long time! I have it reduced to a maximum of 91.0 seconds (which is about right - contact is detected then aircraft are loaded onto the flight deck and scrambled after the contact).

I'm thoroughly enjoying this patch (both in creating it and testing/playing it). It's so much fun and so cool to see a carrier WAY out on the horizon that has detected you scramble aircraft
TheDarkWraith is offline   Reply With Quote
Old 07-03-13, 05:13 AM   #2187
Sartoris
Captain
 
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
Default

Glad to hear there's a new version coming!
Sartoris is offline   Reply With Quote
Old 07-03-13, 01:04 PM   #2188
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Thank you TheDarkWraith
tonschk is offline   Reply With Quote
Old 07-03-13, 01:39 PM   #2189
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Got everything coded in What I changed was if the carrier has a contact and it's scrambling aircraft to that contact:
- the scrambled aircraft's speed is set to the aircraft's max speed
- all waypoints of the aircraft are set to the aircraft's max speed
- the aircraft is spawned at a height of 10m in a 250m radius around the carrier (thus making it look like it took off from the carrier deck) - thus multiple aircraft will spawn in different places around the carrier but all of them will spawn at the same height (10m)
- depending on how the AI routines are handling the aircraft (IRAI) the unit will either climb to the altitude specified in it's first waypoint (some random value of 40m - can be +- 15m) or go to the altitude specified by the AI routines (IRAI)

The spawned aircraft are given two waypoints:
- waypoint 1 is the contact's current position when the aircraft was spawned
- waypoint 2 is the carrier's current position when the aircraft was spawned (altitude set to 150m so you'll never see it being removed from game). Thus it tries to return home (somewhat - as realistic as I wanted it to be without excessive amount of code)

This value in \data\Cfg\Airstrikes.cfg Logic Steps Between Air Sessions=15 determines when the game checks for airstrikes. What this value means is:
- after 91.0 seconds X Logic Steps Between Air Sessions check to see if airstrikes need to happen. I changed this slightly in the fact that if ANY unit detects a contact (or it changes the contact it was following to a different one) then the game is forced to check for airstrikes immediately (for some upcoming patches and for this carrier airstrike patch - I have some very cool ideas!).

If the aircraft have loadouts specified in their .cfg file then they will be applied (bombs or torpedoes)

Here I was setting up for a shot on the carrier and it detected me at ~10.4kms out It scrambled one fighter after me:


this guy means business!! Time to dive!



Sometime later carrier launches another aircraft at me and he means business also! Crew hasn't detected this one yet...


Intense! This is freakin awesome

Currently just under 1Kb of new assembly code just for this patch!

New version of patcher uploading shortly...having fun in my test mission currently

Last edited by TheDarkWraith; 07-03-13 at 02:10 PM.
TheDarkWraith is offline   Reply With Quote
Old 07-03-13, 02:24 PM   #2190
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Everything works flawlessly

v1.0.121.0 released. See post #1
TheDarkWraith 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 09:23 PM.


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.