View Single Post
Old 04-29-07, 12:46 PM   #2
CaptainCox
Sea Lord
 
Join Date: Feb 2007
Location: A Swede in Frankfurt am Main
Posts: 1,897
Downloads: 4
Uploads: 0
Default

Start by looking at the existing TweakFiles. I was doing this a lot yesterday as i tried to get the Zoom for the Scope thingy.

Example

Quote:
// Game version for these changes.
Version=SH4 v1.2
// Path to the file we are changing.
Path=data\Library\USSubParts\Sensors_sub_US.sim
The Orange bit is important at the top of the document, this is so the program knows where to plug it in (as its an example you have to change to what ever you are doing...pretty clear sorry)


Quote:
// Examples of search line, used when searching for a variable:
search,WindCoef,4,single,>2,Wind Coefficient
Description: Look for 4th occurrance of the term WindCoef. The floating point single variable starts at 2 bytes past the end of the search term. Name the list item Wind Coefficient.


search,WindCoef,2,single,+9,Wind Coefficient
Description: Look for 2nd occurrance of the term WindCoef. The floating point single variable starts at 9 bytes past the first byte of the search term (the same as using >2 above). Name the list item Wind Coefficient.


search,WindCoef,1,single,-4,Wind Coefficient
Description: Look for 1st occurrance of the term WindCoef. The floating point single variable starts at 4 bytes before the first byte of the search term. Name the list item Wind Coefficient.
This can be found in some of the tweak files as a sort of small tut and is pretty self explanatory.

As you see in the MiniTweaker there is different things you can search for

-Single
-Double
-Long
-Integer
-Byte

So depending what you see in in the hex editor (use the INSPECTOR! so much easier, its a function that you can activate from the menu, there you can see what type of value each address holds, what it is in Single, byte etc etc).


For example
search,draught,1,single,>2,draughtSurfaced

or
search,draught,1,byte,>2,draughtSurfaced

or
search,draught,1,integer,>2,draughtSurfaced

etc etc.

You have to look for the stuff in a hex editor, i use the one that comes with the pack from Nvdrifter
Once you start looking i think you will slowly understand what I am talking about. Took me a good 2-3h yesterday to sort a get the hang of it...still did not fix that zoom but :p

Look at the stuff from Nvdrifter, try to understand what each code line does, read the tut that comes with the MiniTweaker from timetraveler...
__________________
CaptainCox is offline   Reply With Quote