Map Files Again

  • Thread starter Thread starter crazy_vasey
  • Start date Start date
C

crazy_vasey

Guest
I've found the item numbers for scenery and items in proto.msg does anyone know where the numbers are for misc type I couldnt find them in proto.msg.

Also does anyone anyone know a formula to convert hex to decimal and vice versa?
 
>I've found the item numbers for
>scenery and items in proto.msg
>does anyone know where the
>numbers are for misc type
>I couldnt find them in
>proto.msg.
>
>Also does anyone anyone know a
>formula to convert hex to
>decimal and vice versa?

It's called Windows calculator. Or else it is:

Damn, I can't remember. Ask MatuX.


[TABLE border=5' cellspacing='0' cellpadding='15' bgcolor='#000000' bordercolor='#808080' bordercolorlight='#C0C0C0' bordercolordark='#000000][TR][TD]

[/center]
[TABLE border=0' cellspacing='0' cellpadding='0' bgcolor='#000000][TR][TD]
[TD][center][font face=arial, helvetica, ms sans serif" color="red][a href=mailto: [email]sea_man_stains__@hotmail.com[/email]]Smackrazor[/a][/center]
[font face=arial, helvetica, ms sans serif" color="silver]Webmaster: [a href=//www.pipboy2000le.f2s.com]PIPBoy 2000 LE[/a]
Co-webmaster: [a href=//www.diepokemon.f2s.com]NPA[/A][/TD][/TR]
[/TABLE][/TD][/TR][/TABLE]​
 
>I've found the item numbers for scenery and
>items in proto.msg does anyone know where the
>numbers are for misc type I couldnt find them in
>proto.msg.

pro_crit.msg
pro_item.msg
pro_misc.msg <-- misc type
pro_scen.msg
pro_tile.msg
pro_wall.msg
proto.msg

All of them contains the indexes neccessary to refer to each Proto (object).

They are located in Master.dat\\text\english\game

>Also does anyone anyone know a formula to
>convert hex to decimal and vice versa?

In C: (pseudo-code)

main ()
{
hex_num = 0xFF;

printf("%d\n", hex_num);
printf("%X\n", hex_num);
}

Output:
255
FF

=============================

I once asked the same question in the General Forum, Xotor replied me this:

Basically you divide the number by a power of 16, one that divides into the number less than 16 times (or you must choose a higher power), then take that number and convert it to hex (0123456789ABCDEF). Then subtract that value * 16^power, and repeat with a lower-order power.

Ex:

for i = 10 to 1, step -1
{
Temp = Number / (16^i)
if Temp = 0, HexNumber:Character(i) = '0'
if Temp = 1, HexNumber:Character(i) = '1'
...
if Temp = 15, HexNumber:Character(i) = 'F'

Number = Number - (Temp * (16^i))}
}

I know that there is a Hex() function in C++, but don't know how to use it.



MatuX,
Co-Leader and Chief Programmer on The Mod Squad
http://www.pipboy2000le.f2s.com/
 
Hmm I can use sprintf to put the hex value into a string then write that to the file it might just work.
Are you sure about that hex function? I've used grep to search the include files and it drew a blank.
 
It worked for me...

Maybe you're transcribing wrongly to C?

Try asking in the General Forum, there're a lot of qualified C/C++ programmers.

Xotor told that he was able to get a working C program which converted hex to decimal and visceversa.



MatuX,
Co-Leader and Chief Programmer on The Mod Squad
http://www.pipboy2000le.f2s.com/
 
Back
Top