Page 1 of 1

Inventory Selection

Posted: Sat Mar 25, 2017 11:20 am
by Morpheus
I need to know what file I need to look at to change the inventory selection for the soldiers, if anyone has the info it will be much appreciated, I've looked around the site but my searching skills need to be improved..... a lot. nods01

Re: Inventory Selection

Posted: Sat Mar 25, 2017 2:32 pm
by Stern
You mean equipment, that can be selected before mission ?

For multiplayer, there is a file: mpmaplist.txt, it stores all selectable items for missions.

For singleplayer, its files: Gamedata00.gdt and Gamedata01.gdt, (00 is for HD2 and 01 is SabreSquadron)
Unpack Others.dta, and from there folder Gamedata.
Editing these files are tricky, have to know basics for HEX editing and must understand file structure.

Re: Inventory Selection

Posted: Sat Mar 25, 2017 11:11 pm
by Morpheus
Hmmm, I see this file isn't going to be easy, can you give me a clue as to where the weapons and bullets begin and end, I think maybe I could get to grips with the rest through some trial and error.

Re: Inventory Selection

Posted: Sun Mar 26, 2017 11:35 am
by Stern
Maybe you can get some info if you compare original file and edited file:
Here is Sicily2(Delivery2)SP, its a coop mission converted to singleplayer and it has edited equipment and objectives.
https://drive.google.com/drive/folders/ ... VhCSlg3ZFk
or here:
https://onedrive.live.com/?id=4B98E0D55 ... D558EF1B3E

Here is a small example (mission: Brest):
The equip. block starts with 1400, next four is the size, (1042).
Every individual item starts with 1800, next four is the size, (22).
All that is left is 2x4 and it holds the item data; 2 and 5 (LongWord32bit).
equip.jpg
equip.jpg (55.02 KiB) Viewed 22279 times
Items list:
http://hd2.wikia.com/wiki/Items

Re: Inventory Selection

Posted: Tue Mar 28, 2017 5:10 pm
by Morpheus
Thank you Stern, your last post was invaluable, I wouldn't have been able to edit that file without your help. thup01

Re: Inventory Selection

Posted: Wed Mar 29, 2017 8:05 am
by Stern
Maybe then you can discover the way to add or delete equipment items and objectives, it would help to convert some other coop missions to singleplayer.

In this file, there are also overall size value and some sub-block size values (also a campaign is a big sub-block), I deleted Objecytive and then made all changes to correct size values, but it still crashed the game when loading mission, I missed something there...

Re: Inventory Selection

Posted: Wed Mar 29, 2017 12:51 pm
by Morpheus
Crikey Stern I've only just learned how to crawl, :lol: I can't get SS to load my modified items.sav file at the moment so I'm assuming that we're not allowed to mess around with it, can anyone confirm if this is true.

Re: Inventory Selection

Posted: Wed Mar 29, 2017 1:12 pm
by Stern
This file holds all items data, weapon properties, all can be changed.
Is it in the right place ? ("...game install dir"\Tables\items.sav).

Its not loading edited properties or just game crashes ?

What did you change there ?
If you know the basics, you should succeed... :cool:

Select right type and size to change numbers.
Some values are stored as Float (2.5 is a float and 10.0 is float, but 10 is integer).
In HEX program, there are SingleFloat and DoubleFloat.
I have never seen DoubleFloat value in HD2 files, if float, then all has been SingleFloat (selecting 4 characters in HEX program, its 8 characters in hex value).
Some are stored with LongWord, it can hold 0 -> 4294967295 (65536*65536).
If the number is correct, but wrong datatype is selected then the number cannot be read correctly.

If 180 is set as LongWord, it gives hex value: B4000000, if it reads it as a Float, it gets 2.52233723578....
If 180 is set as SingleFloat , it gives hex value: 00003443, if it is read as integer, it is 1127481344

If you really stuck, you could post the file somewhere, maybe i find what is wrong there.

Re: Inventory Selection

Posted: Wed Mar 29, 2017 5:53 pm
by Morpheus
I've finally got the items.sav file to work, I must have made a change in it that SS did not like, this hex editing is a blinking nightmare isn't there any tools to make it simpler to edit it for a simpleton like me. :roll:

Re: Inventory Selection

Posted: Thu Mar 30, 2017 4:58 am
by Stern
No there isn't any program to help with this file, its hardly never edited... and there is an other side to it, it could lead to easy cheating in public servers.

Re: Inventory Selection

Posted: Wed Jun 07, 2017 9:45 pm
by Grimples
Ha! i got this sussed & am having some fun with it, anything i want in SP :grin: Thankyou very much Stern.

I would appreciate Gamedata01.gdt as i cannot unpack SS.