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

Reply
 
Thread Tools Display Modes
Old 05-22-07, 06:11 PM   #1
MaxT.dk
Rough night at Langtrees brothel
 
Join Date: Mar 2007
Posts: 480
Downloads: 0
Uploads: 0
[TEC] Torpedo tweaks for SH4 v1.2

Hey guys

I took like 1 hour today for looking at the torpedo tweaks made by nvdrifter. As many of you know, they do not work for SH4 v1.2 as they were made for SH4 v1.1.

Basically the structure of Torpedoes_US.sim is very simple (opened it in Hex WorkShop), but since I suck at math and programming, I couldn't complete the task entirely... But to proove you that it's easy here's 2 files.

Code:
//Mark 10 Torpedo .sim Tweak File.txt
// for SH4 v1.2 by MaxT.dk
// Game version for these changes.
Version=1.5
// Path to the file we are changing.
Path=data\Library\Torpedoes_US.sim
[1]
DropDownName=Mark 10 Main
search,depth,1,single,>2,Depth
search,max_dive_angle,1,single,>2,Max Dive Angle


[2]
DropDownName=Speeds
search,speed,1,single,>2,Speed
search,range,1,single,>2,Range
search,max_turn_angle,1,single,>2,Max Turn Angle


[3]
DropDownName=Detonating
search,impulse,1,single,>2,Impulse
and
Code:
//Mark 14 Torpedo .sim Tweak File.txt
// for SH4 v1.2 by MaxT.dk
// Game version for these changes.
Version=1.5
// Path to the file we are changing.
Path=data\Library\Torpedoes_US.sim
[1]
DropDownName=Mark 14 Main
search,depth,2,single,>2,Depth
search,max_dive_angle,2,single,>2,Max Dive Angle


[2]
DropDownName=Speeds
search,speed,3,single,>2,Speed
search,range,3,single,>2,Range
search,max_turn_angle,2,single,>2,Max Turn Angle


[3]
DropDownName=Detonating
search,impulse,2,single,>2,Impulse
Now we're not talking how to use those files (this is a tech.discussion for those with some knowledge), but load these 2 files in minitweaker and see the magic.

As you can see it works. But only a small part of all of the variables is available for editing. Why is that?

That's because I suck at programming as I've said earlier... Let me explain...

As I've learned from other tweak files, you can use something like this:
search,bla,2,single,>2,BLA
search,bla,2,integer,>2,BLA
absolute,single,4C2,BLA
absolute,long,4C2,BLA
absolute,byte,4C2,BLA


Again, I'm not explaining what is what (there's help to get in the minitweaker guide and there's lots of help in the tweak files itself at the top (open for example NSS_Balao_zon.txt tweak file)).

So that's where I'm stuck as I don't get all these long, byte, integer etc (and I really don't want to learn it, I'm a webdesigner by nature and profession). If any of you understand that stuff, don't explain it to me, but edit one of these files where you can read the next 2 variables for splash and dud_effect and repost the code. I will then look into it and I'm sure that I'll figure the rest myself and than I'll be able to do the tweak files for all the torpedoes for the whole SH4 modding community

Share the knowledge
__________________

http://maxt.dk/archives/2007/03/22/s...nter-4-cheats/
Get KillerSub MOD and bring the Hell back to Earth! The FUN way to play SH4! Now with Rail Guns!

Last edited by MaxT.dk; 05-22-07 at 06:24 PM.
MaxT.dk is offline   Reply With Quote
Old 05-22-07, 08:27 PM   #2
Lagger123987
Grey Wolf
 
Join Date: May 2007
Location: Little Saigon, San Jose, California
Posts: 944
Downloads: 323
Uploads: 4
Default

Are you a Casual Gamer? Not a realism guy like most of us in the forums?
Lagger123987 is offline   Reply With Quote
Old 05-23-07, 04:26 AM   #3
MaxT.dk
Rough night at Langtrees brothel
 
Join Date: Mar 2007
Posts: 480
Downloads: 0
Uploads: 0
Quote:
Originally Posted by Lagger123987
Are you a Casual Gamer? Not a realism guy like most of us in the forums?
What does that have to do with this [TEC] (technical) discussion?
Those tweaks for v1.1 were used by many and they can be also used for the 100% realism mods and guys "like most of you"... I'm sorry I'm not one of "you"... I thought this was the forum for modders and the tag [TEC] was made specially for the tech.discussions...

And since you don't get really get it, no, I'm not one of you... Just to make sure you got the point... And I'm about to release a new mod targeted at people NOT like "all of you"...
__________________

http://maxt.dk/archives/2007/03/22/s...nter-4-cheats/
Get KillerSub MOD and bring the Hell back to Earth! The FUN way to play SH4! Now with Rail Guns!

Last edited by MaxT.dk; 05-23-07 at 04:49 AM.
MaxT.dk is offline   Reply With Quote
Old 05-23-07, 08:02 AM   #4
U-Bones
Grey Wolf
 
Join Date: Mar 2005
Location: Treading Water
Posts: 847
Downloads: 56
Uploads: 0
Default

This is what I do when I want to look at a new variable and am unsure what it contains. Make a seperate dropdown, focus on the data, repeat it for every type. then you can look at the data and see what looks sane. Also, when adding new variables, there is precendent for storing multiple values at offsets other than 2, adding more fog. See below.

This snippet is from my cameras.dat.txt tweak file. The SH3 tweak file had two identically named vars (SubFolow) under FreeCam that according to the sh3 tweak file, contained multiple values each. This section looked at the first SubFolow with each data type, first with the standard offset of 2 bytes and then with the historic sh3 offsets of 14 and 18 for the two values.

// to figure out how these were used
// in sh3 they supposedly each held two longs at 14 and 18 byte offsets
// possible wrong values or offsets ?

[57]
Dropdownname=TEST FreeCam 1stSubFolow Unknown
absolute,single,63f,SubFolow1 Std Offset Single
absolute,double,63f,SubFolow1 Std Offset Double
absolute,long,63f,SubFolow1 Std Offset Long
absolute,integer,63f,SubFolow1 Std Offset Integer
absolute,byte,63f,SubFolow1 Std Offset Byte
absolute,single,64b,SubFolow1a Offset 14 Single
absolute,double,64b,SubFolow1a Offset 14 Double
absolute,long,64b,SubFolow1a Offset 14 Long
absolute,integer,64b,SubFolow1a Offset 14 Integer
absolute,byte,64b,SubFolow1a Offset 14 Byte
absolute,single,64f,SubFolow1b Offset 18 Single
absolute,double,64f,SubFolow1b Offset 18 Double
absolute,long,64f,SubFolow1b Offset 18 Long
absolute,integer,64f,SubFolow1b Offset 18 Integer
absolute,byte,64f,SubFolow1b Offset 18 Byte

For the record I still don't know how SubFolow should be used.
This tweakfile method of looking at a piece of data should help you play around a bit and see if things fall into place.

Last edited by U-Bones; 05-23-07 at 10:40 AM.
U-Bones is offline   Reply With Quote
Old 05-23-07, 08:14 AM   #5
kakemann
Samurai Navy
 
Join Date: Feb 2007
Location: Pretty close to the big german cruiser Blücher in Norway
Posts: 568
Downloads: 29
Uploads: 0
Default

Quote:
Originally Posted by MaxT.dk
And since you don't get really get it, no, I'm not one of you... Just to make sure you got the point... And I'm about to release a new mod targeted at people NOT like "all of you"...
Great that you share your knowledge with others here.
You will definately get some nice answers back helping you with your issue.
And I guess this post was not about releasing a new mod - therefore the [TEC] sign.
Different MODS suit different persons here at the forum.

Some people would prefer better enemy sensors for instance, while some would prefer that the sensors are weaker which I have heard might be more historical correct.

The good part is that there are different modders representing different preferences.
So I would say:

Thanks Max! Keep up the good work, you will probably get some help with your question!
Sorry I can't help you myself...
kakemann is offline   Reply With Quote
Old 05-23-07, 10:11 AM   #6
MaxT.dk
Rough night at Langtrees brothel
 
Join Date: Mar 2007
Posts: 480
Downloads: 0
Uploads: 0
Default

1) Thanks for this nifty trick, U-Bones! I hope that now it'll be easier to find the proper values. Thanks again

2) Thanks for understanding kakemann And thanks for the "speech"

I'll continue on this "project" tonight evening
__________________

http://maxt.dk/archives/2007/03/22/s...nter-4-cheats/
Get KillerSub MOD and bring the Hell back to Earth! The FUN way to play SH4! Now with Rail Guns!
MaxT.dk is offline   Reply With Quote
Old 05-23-07, 10:32 AM   #7
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: Canada. The one and only, East Coast
Posts: 10,884
Downloads: 946
Uploads: 5


Default

Quote:
Originally Posted by Lagger123987
Are you a Casual Gamer? Not a realism guy like most of us in the forums?
Whether you count the rivets or not, you have to admit it is nice to have options

Thanks for the info MaxT.dk

RDP
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 05-23-07, 10:35 AM   #8
U-Bones
Grey Wolf
 
Join Date: Mar 2005
Location: Treading Water
Posts: 847
Downloads: 56
Uploads: 0
Default

Quote:
Originally Posted by MaxT.dk
1) Thanks for this nifty trick, U-Bones! I hope that now it'll be easier to find the proper values. Thanks again

2) Thanks for understanding kakemann And thanks for the "speech"

I'll continue on this "project" tonight evening
NP, good luck. Context on the above snippet added for clarity and reference
U-Bones 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 02:04 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.