SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   What about an ALL-IN-ONE "SH 3 TOOL"? (https://www.subsim.com/radioroom/showthread.php?t=86117)

timetraveller 11-11-05 10:11 AM

Quote:

Originally Posted by gouldjg
Sounds Like a great tool

So are you saying as long as I know where a hex figure is, I can programm it into this.

I want to fast tweak Hull armour and Hit points for the subs and this tools sounds great.

Can it also hold info from the zones.cfg?

Looking forward to trying it.

If you can identify a hex value's location (you'll still have to look at a hex editor to determine that) and if you can figure out what type of value it is (you can easily experiment with this program to determine the type) ---- then yes.

The program is not for CFG files. They are text files which can better be modified in a text editor.

TT

Marhkimov 11-11-05 11:19 AM

:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:

YEEEEHAAAAAW!!!

rulle34 11-11-05 12:24 PM

This is just great :rock: :rock: :rock:

Do you think you can visualise this hexedit location so I dont misunderstand anything here.

Great again TT. I know this could be done :up: :up:

Rubini 11-11-05 02:09 PM

Hy mates,

I'm very late on this thread. :oops:
But i have a little clarification to you: that DLF files bypassing refer to the dolphins files and you only will see them if you have HT mod installed.

TT,
Thanks and thanks. You and Sansal will make a new game for us! :up: :up:

Rubini.

timetraveller 11-11-05 03:58 PM

Quote:

Originally Posted by rulle34
Do you think you can visualise this hexedit location so I dont misunderstand anything here.

Sure, maybe this will help.

Computers and SH3 store values in several different ways. Here are the common ones:

1. Single precision floating point
-Decimal numbers. Takes 4 bytes (characters, kind of) of space in memory.

2. Double precision floating point
-Decimal numbers of greater precision. Takes 8 bytes of memory.

3. Integer format
-Whole numbers up to +/- 32767. Takes up 2 bytes of memory.

4. Long format
-Whole numbers again, only potentially larger than integer. Takes 4 bytes of memory.

5. Byte
-Positive numbers in the range 0-255. Takes 1 byte of memory. Single characters are stored in byte format, usually (what they call ASCII format). Unicode characters are different, and can take up to 3 bytes bacause of the expanded language and character potential. SH3 does not use Unicode format.

6. Colors
-Essentially 3 bytes of memory. One byte each for blue, green, and red, in that order. Important, remember that order! B-G-R

SH3 uses mostly the single precision format for numeric values. In addition it stores colors digits here and there, and the occassional long, integer, and byte numbers.

The graphic at the bottom of this reply is the last number of bytes of the VIII-7C .ZON file (look in the \Submarines folder). Highlighted are the Crash Depth (crush depth) and the unit Hit Points (kill points). The green highlight is the text that you can read. The yellow are the values. In almost all cases in SH3, the values come after the text (if you can find any text clues at all). Notice each 4 byte yellow field is separated from the text by one blank byte (the red byte). This is true for almost all values in SH3, a one byte separator. Note that stored colors have a 2 byte separator between the name (if any) and the start of the 3 main values of the color field.

Additionally, almost all SH3 values have a terminator marker byte, found at the end of the yellow. The blue 0F is the end marker. It will not always be a hex 0F, but some ending marker will almost always be there. It has NO relationship to the actual value in yellow. It's just a marker.

Since the values shown are 4 bytes in length, we already have a clue as to what type they might be. The only values which can be stored as 4 bytes are the Single precision float and the Long. As I said, SH3 uses the Single probably 90% of the time, so it is a good choice to try.

In the tweaker I will release, all you'll need to do is establish where the value starts, and plug that location into a text file, then see if a nice value comes up when you start the program.

Determining locations:

Note that the Hit_Points value starts at location 1B90. The CrashDepth value starts at location 1BA3.

Remember, hex counting is base 16. The numbers are:

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

0A=10
0B=11
0C=12
0D=13
0E=14
0F=15

carry the one
10=16

After 15 we carry the one and roll over to 10, which = decimal 16. Each 2 digits in the hex graphic represents one byte. Two digits alone can hold a value of 0-255.

So, to code a sample line in the Tweaker program text file to locate this Crash Depth value, we would code this:

absolute,single,1BA3,Crash Depth

All that means is look for a single precision float value at location 1BA3 and name it Crash Depth in the program listing. Pretty simple. Run the program and see the value displayed. If the value looks weird, it probably is a Long value rather than a Single, so you can always substritue the word "long" for "single" in the line and try it that way. No harm is done either way because you won't have changed anything (yet). Once you get a readable (and reasonable) value, you can be fairly certain that you have got the right idea.

So those are the basics in SH3 value hunting. I'll have a ton of tweak files already made up when I release the program. You'll be able to modify a few thousand values. Generally, anything that was available in the rather complicated SH3 File Analyzer will be available in SH3 Mini Tweaker.

HOWEVER, remember, the tweak files are tied to patch 1.4b. They cannot necessarily be used for other versions.

I'm hoping you guys can come up with some of your own tweak files now that it'll be easier to make them.

More again soon.

TT

http://img49.imageshack.us/img49/6738/hexexample6ov.gif

Rubini 11-11-05 04:38 PM

:o :o :o
Incredible!!

Thanks TT!

Rubini.

Marhkimov 11-11-05 04:41 PM

All my hugs and kisses are directed at timetraveller. :D

Man, you rock! :rock: :rock: :rock:

Kpt. Lehmann 11-11-05 04:46 PM

Quote:

Originally Posted by marhkimov
All my hugs and kisses are directed at timetraveller. :D

Man, you rock! :rock: :rock: :rock:

Ummm YEAH!!! ...what HE said!!! :-j :-j :-j

rulle34 11-11-05 05:54 PM

When a real professional speak, you just listen and enjoy :smug:
Fantastic TT :up:
I have to study this a little bit more to feel sure what Im doing, but this was indeed a very good explanation :up:

Huge Thanks :up:
:rock:

Totenkopf 11-12-05 11:03 AM

...Takes out his C for dummies book...

Err... float point variable, ummm ASCII code format...

Hey! this is starting to make sense! Awesome work TT!

Cheers!

UBOAT234 11-12-05 11:52 AM

Hi
 
Simple without words
TT ... FanTasTic :up:

Kpt. Lehmann 11-15-05 09:10 AM

kerrrrr BUMP!!!

rulle34 11-15-05 10:25 AM

I think timetraveller is still in progress with his new tool :cool:

timetraveller 11-15-05 11:15 AM

Quote:

Originally Posted by rulle34
I think timetraveller is still in progress with his new tool :cool:

Getting real close. I have 2 more rules to convert from File Analyzer. They are taking me a little longer than I expected. The readme has been written. The installer is made. I should have something either later today or tomorrow (Wednesday 11/16).

TT

UBOAT234 11-15-05 11:20 AM

Quote:

Originally Posted by timetraveller
Quote:

Originally Posted by rulle34
I think timetraveller is still in progress with his new tool :cool:

Getting real close. I have 2 more rules to convert from File Analyzer. They are taking me a little longer than I expected. The readme has been written. The installer is made. I should have something either later today or tomorrow (Wednesday 11/16).

TT

...yes...

good work tt :sunny: :up:


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