SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [TEC] Torpedo tweaks for SH4 v1.2 (https://www.subsim.com/radioroom/showthread.php?t=115185)

MaxT.dk 05-22-07 06:11 PM

[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 :know:

Lagger123987 05-22-07 08:27 PM

Are you a Casual Gamer? Not a realism guy like most of us in the forums?

MaxT.dk 05-23-07 04:26 AM

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? :down:
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... :shifty:

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"...

U-Bones 05-23-07 08:02 AM

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.

kakemann 05-23-07 08:14 AM

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! :up:
Sorry I can't help you myself...

MaxT.dk 05-23-07 10:11 AM

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" :up:

I'll continue on this "project" tonight evening :)

ReallyDedPoet 05-23-07 10:32 AM

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:yep:

Thanks for the info MaxT.dk

RDP

U-Bones 05-23-07 10:35 AM

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" :up:

I'll continue on this "project" tonight evening :)

NP, good luck. Context on the above snippet added for clarity and reference


All times are GMT -5. The time now is 09:22 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.