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 04-06-14, 03:16 PM   #1
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

How do you work out the direction of the flag in relation to the speed of the vessel ?
THE_MASK is offline   Reply With Quote
Old 04-06-14, 03:58 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
How do you work out the direction of the flag in relation to the speed of the vessel ?
Still have problems

For your question see here: http://www.subsim.com/radioroom/show...postcount=3117

I'm missing something big time and I just can't figure out what it is


Basically what I'm trying to solve is:
flag has yaw value that puts it in line with course of ship (it's always parallel with length of unit)
I'm trying to get wind speed/direction to alter this yaw value
TheDarkWraith is offline   Reply With Quote
Old 04-06-14, 04:27 PM   #3
Tonci87
Samurai Navy
 
Join Date: Jun 2012
Posts: 590
Downloads: 119
Uploads: 0


Default

Would this also work for flags attached to the submarine by mods? What exactly is the problem?
Tonci87 is offline   Reply With Quote
Old 04-08-14, 06:01 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Tonci87 View Post
Would this also work for flags attached to the submarine by mods? What exactly is the problem?
Yes this will work with anything that has _FLG in it's name (towards the end of it's name) AND has a GlobalWind controller attached to it. Why the GlobalWind controller? The patch is looking for any object with _FLG towards the end of it's name. If it finds any object with _FLG towards the end of it's name then it checks to see if it has a GlobalWind controller attached to it. If it finds a GlobalWind controller then the patch knows that this object has to take the unit's course and wind direction into consideration for determining it's rotation values. The GlobalWind controller actually does nothing in this case - it's just an 'empty' controller attached to the object that I can quickly scan for

Finishing up the patch currently. What a freakin pain in the you-know-what this patch was. There were so many things that I had to discover/figure out first and through trial and error. Those discoveries though are needed for some future patches - I had to do it now or later. These new discoveries will help me in trying to develop a signal light for the player's unit. My idea is to attach a searchlight to the player's unit but have it hidden so it's not rendered. Then when you ask to use the signal light (via a new game command) it shows and you can rotate it and turn it on/off. So it would actually be able to be used as signal light to signal to other players (communicate to other players via light messages) or as a search light at night time

How this new flags affected by wind patch works:
- I use a vector to model ship's heading and speed
- I use a vector to model wind's direction and speed
Then using vector math I add the two vectors together. Convert the resultant vector into polar coordinates. This gives me a magnitude and an angle. The angle is the angle the flag will reside at on the unit. The magnitude is not being used but could be later (scaling of flag - i.e. if magnitude is very small then render flag small thus simulating flag not extended due to wind)

By doing the above the physics of the flag is modeled. This means unit's speed and heading and wind's speed and heading determine the resultant angle of the flag. Let's say unit is heading 270 @ 5 knots. Wind direction is 45 degrees @ 5 knots. The flag will be facing ~112 degrees:

No wind:
<-------unit @ 5 knots ------ flag @ 5 knots------->


With wind at 45 degrees @ 5 knots:

<-------unit @ 5 knots \
--------------------------------\
---------------------------------------\ flag

As in real life the game also uses how wind is defined. If you say wind is 45 degrees @ 5 knots that means it's blowing from 45 degrees to 225 degrees (SW) at 5 knots.

In the example above if the unit slows down then the flag's angle will increase (>112 degrees) or become more out of line with unit. If the unit speeds up the flag's angle will decrease (<112 degrees) or become more in line with the unit.

Because of how this patch works none of the flags defined in the stock flags.dat have GlobalWind controllers attached to them. Those will need to be added in order to see this patch work
TheDarkWraith is offline   Reply With Quote
Old 04-08-14, 09:16 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Time to add a completely new idea/feature to the Silent Hunter franchise that's never been available before in any of it's titles

v1.0.162.0 released. See post #1

Starting with v1.0.162.0 added a new game file to the patcher: kernel.dll. Add a new patch to kernel: Objects follow wind direction. This new patch will have any objects that have _FLG in their name (flags for one) AND a GlobalWind controller attached to them take wind direction and speed into consideration. See the Files= and Notes= of the patch for more info.
TheDarkWraith is offline   Reply With Quote
Old 04-09-14, 12:42 AM   #6
Sjizzle
Count Dracula
 
Sjizzle's Avatar
 
Join Date: Aug 2012
Location: 46°13′N, 24°47′E
Posts: 1,807
Downloads: 405
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Time to add a completely new idea/feature to the Silent Hunter franchise that's never been available before in any of it's titles

v1.0.162.0 released. See post #1

Starting with v1.0.162.0 added a new game file to the patcher: kernel.dll. Add a new patch to kernel: Objects follow wind direction. This new patch will have any objects that have _FLG in their name (flags for one) AND a GlobalWind controller attached to them take wind direction and speed into consideration. See the Files= and Notes= of the patch for more info.

awesome work tdw thx
Sjizzle is offline   Reply With Quote
Old 04-09-14, 03:25 AM   #7
Nufsed
Sparky
 
Join Date: Aug 2005
Posts: 151
Downloads: 500
Uploads: 0
WOW!......Just WOW!!
__________________
Mike Collins
Nullius in Verba

Nufsed is offline   Reply With Quote
Old 04-10-14, 12:12 PM   #8
Silent Steel
Sea Lord
 
Join Date: Jun 2008
Location: Noch dabei
Posts: 1,732
Downloads: 618
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Time to add a completely new idea/feature to the Silent Hunter franchise that's never been available before in any of it's titles
Highly revered warlock, please accept my humble thanks for your work, I'm speechless.
Silent Steel is offline   Reply With Quote
Old 04-12-14, 03:09 PM   #9
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,292
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.0.162.0 released. See post #1
Hi TDW

Incredible work.. really..

That's Ru manual for this (latest) version - http://rghost.ru/54049368
__________________
.
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 04-12-14, 03:38 PM   #10
Defiance
Grey Wolf
 
Join Date: Apr 2005
Location: UK
Posts: 906
Downloads: 673
Uploads: 0
Default

Hiya's,

Amazing work by all involved

Installed sh5 after a few yrs ashore lol

The progress seems amazing to say the least

I took the plunge and have got my head around most of your utils TDW

But one well two things i can't quite figure out

Maybe someone can ......

I have just got this error through the debugger .......... which is a first and happened in the last 30mins (only time since messing with patcher/viewer/mods)

[5100] SH_ServerOrbitProtocol.cpp (111): Failed to read packet from client.
[5088] ..\..\..\..\..\..\Jenkins_p4ws\UPLAY-PC-STREAMS\client\release_iron_maiden_patch2-live\shared\libs\services\src\services\UplayCoreFa cadeGetActionsJob.cpp(123) : Expired token was refreshed, but subsequent call also failed, due to to access violation.
[5088] ..\..\..\..\..\..\Jenkins_p4ws\UPLAY-PC-STREAMS\client\release_iron_maiden_patch2-live\shared\libs\services\src\services\UplayCoreFa cadeGetRewardsJob.cpp(128) : Expired token was refreshed, but subsequent call also failed, due to to access violation.

I have for several days been happily trying the amazing ai now and of course the special-singles

In the generic patcher, i adjust etc (even got to page 147 lastnight/today reading for help/hints) snapshot-remove all mods-add new snapshot etc etc, only to find after a enable-disable-all 3 for the damn orbit i get error on entry to game (about can't connect etc)

I have tried this so many times (To use:
Disable ALL Orbit listener patches in the sh5.exe using the OLD version of the app first!
Install new version of app
Enable Disable UPlay browser patch enabling all 3 changes

If you do not enable change 3 then you will NOT be able to load/save/create career games)

Been trying to remove orbit, sods law as i can't i get a damn error lmao

Would it help if i drop all jsgme mods etc / then default patches back to vanilla (1.2) in games dir (with my saved items from game directory 1.2)

Then, now i know what i'm doing option-wise in the patcher try again with this latest version (which i'm using now anyways)

Sorry to waffle can get my head around a lot of stuff but this orbit got me peeved now hehe

I know it's what i've done or doing, but can't quite grasp the fix lol

Cheers to All

Def

ps : i use the patcher as a standalone from folder on desktop, my optionviewer i have through jsgme (for sticking the snorkel options, but i aint got that far to use snorkel but i live in hope )

Def
__________________
Have Fun

Bye

Def

Last edited by Defiance; 04-12-14 at 03:43 PM. Reason: added text
Defiance 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 11:43 PM.


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.