How to add new categories in the rebel radio (rebel drop)
- April 8, 2016 at 11:14 pm #165843neamParticipant
Just to put this somewhere, here is a tutorial on a very specific subject: how item.onlinec is tied to online.stringlookup, and how to rename objects, create new categories, …
I suppose you already know a bit on how item.onlinec is structured. (if not, try to change some values and look how the whole thing behave).
I recently added the ability to the modding tools to “easily” (before it was almost impossible) edit .stringlookup files. So here is the process:
This is a stripped down version of the cargo plane entry in item.onlinec: (I only kept what is interesting for us right now)
<member gbltype="Structure" type-hash="3325717573" type="Item">
<member name="UIType" gbltype=">3</member>
<member name="UIFlag" gbltype=">10</member>
UIType is the type of thing the entry is here 3 mean “vehicle”.
UIFlag is the sub-category of vehicle the entry is. (I’m not sure — I’ve edited this before — but let’s say that 10 is for planes).
UIFlagDescription is the name of the sub category (here: PLANES)
UITypeDescription is the name of… hu. I don’t know, avalanche simply use the singular of the flag (here: PLANE).
UIName is the name of the item (here something like “cargo plane” or “urga something”).
UIDescription is the text that appears on the right. The description of the item. (“best plane ever. but a bit heavy. 10/10 IGN”).
You’ve probably already figured out that those strings are not the actual text, but serves as key in the stringlookup file. But in fact things are worse: they aren’t the key, their hash is the key. To get the hash of a string, execute the program HashName.exe and enter the string to hash.
CREATE A NEW SUBCATEGORY
Just imagine that you have a doge version of the cargo plane and want to put it into a new sub-category “MUCH PLANES”.
You set UIFlag to something like 42 (a value no other vehicle category has). You also want to do things correctly, so you create a new UIFlagDescription and UITypeDescription. You will use item_doge_plane_type and doge_plane_subtype_desc as their respective values. (so you edit item.xml to change those values).
Now all you have to do is create two entries in the stringlookup file (profile/online.stringlookup). Open the online.stringlookup file with ConvertStringlookup. It will create a nice online.xml that you can then edit.
In online.xml, search for “A[HashPropertiesPair]”. The key point is inserting two
<member name="TextOffset">...my text here...</member>
one for the flag description and one the the type description. (the xml part has been stripped of all superfluous information, but the xml file still need that information, so you have to copy an existing entry, paste it and edit it). The first hexadecimal digits are the hash.
For item_doge_plane_type it’s 188C03B8 and for doge_plane_subtype_desc it’s ACBE7E13.
So, the final thing will look like (I’ve also removed the all mandatory attributes for the sake of readability. Don’t remove them)
<member name="TextOffset">MUCH PLANES</member>
<member name="TextOffset">MUCH PLANE</member>
One more thing. We are not all using the english version of JC3, so copy and paste those two entries for all the languages (search for “A[HashPropertiesPair]”).
Convert online.xml back to a stringlookup file, convert item.xml back to an onlinec file, copy them in your dropzone/profile. Launch the game.
CREATE A NEW ITEM NAME
It’s exactly the same process as the subcategory. Just it’s for the name or the description.
CHANGING AN ITEM NAME
Ha ! something different. You want to change the name of the plane subcategory. Search for a plane in item.xml, and find that UIFlagDescription has the following value: plane_subtype_desc. Run HashName.exe, enter plane_subtype_desc, and it says the hash is 4F96EECC. Search in online.xml (the file created from the stringlookup file) for that and change the text below it.
Convert back online.xml into online.stringlookup and you’re done !
NOTE: converting online.stringlookup into online.xml is a very slow process. Very very slow. (but not the conversion from the xml back to a stringlookup).
- You must be logged in to reply to this topic.