Making a program, But i need a hex value
Making a program, But i need a hex value
im makinf a program to automatically make the bipd a flying bipd but i need the flying bipd hex value if ne has it thnx
			
			
									
									
						- 
				twolvesfan369
 - Posts: 16
 - Joined: Wed Jul 20, 2005 4:15 pm
 
- 
				[CL]9mm-Man
 - Posts: 773
 - Joined: Tue May 04, 2004 7:14 am
 - Location: Uranus
 
| 
                                                     | 
                
this is the way you have to go about doing that what you do is et a hex editor ex: Hex Workshop now that you have that you can make a original copy of the map know make a second with the fly bipd created now open the one map in the hex editor then go to compare and slect the second then see what has changed
			
			
									
									
						- 
				xxANTMANxx
 - Posts: 108
 - Joined: Sat May 07, 2005 8:21 pm
 - Contact:
 
OR EVEN EASIER
you can find out what type the value it is in this case its a float a.k.a single
then you just go to the correct tag offset then just do the tag offset + the offset that it says on the plugin and thast the value you want to edit
since im in a good mood ill give you a function to read the value and im sure you can figureout how to edit it by just editing the function a bit
			
			
									
									
						you can find out what type the value it is in this case its a float a.k.a single
then you just go to the correct tag offset then just do the tag offset + the offset that it says on the plugin and thast the value you want to edit
since im in a good mood ill give you a function to read the value and im sure you can figureout how to edit it by just editing the function a bit
Code: Select all
   Public Function GetFloatValue(ByVal Filepath As String, ByVal TagOffset as long, ByVal ValueOffset as long)
        Dim read As New System.IO.BinaryReader(New System.IO.FileStream(Filepath, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.ReadWrite))
        read.BaseStream.Seek(TagOffset  + ValueOffset , System.IO.SeekOrigin.Begin)
        Dim value = read.ReadSingle
        Return value
    End Function
- 
				Inquisinator
 - Posts: 89
 - Joined: Sat Nov 26, 2005 8:00 pm
 
wrong its not a float, its a bitmask....xxANTMANxx wrote:OR EVEN EASIER
you can find out what type the value it is in this case its a float a.k.a single
then you just go to the correct tag offset then just do the tag offset + the offset that it says on the plugin and thast the value you want to edit
since im in a good mood ill give you a function to read the value and im sure you can figureout how to edit it by just editing the function a bit
Code: Select all
Public Function GetFloatValue(ByVal Filepath As String, ByVal TagOffset as long, ByVal ValueOffset as long) Dim read As New System.IO.BinaryReader(New System.IO.FileStream(Filepath, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.ReadWrite)) read.BaseStream.Seek(TagOffset + ValueOffset , System.IO.SeekOrigin.Begin) Dim value = read.ReadSingle Return value End Function
- 
				xxANTMANxx
 - Posts: 108
 - Joined: Sat May 07, 2005 8:21 pm
 - Contact:
 
You will need your program to load the biped tags and load the dword of meta that contains the flying flag.  It is in the form of a bitmask so you will need to create a function to go from hex->bin, put a 1 for the flying bit, then create another function that goes from bin->hex and overwrite the bitmask.  You will need to do a little educated guessing as to what bit it is, you can look at the plugin but it will all depend on how the data is loaded in your app.