Recompiling Audio Files with XML-to-UTF: what about those Hash Codes?
-
I almost completely avoided the hash codes, except for some more complex error hunting somewhere in an ancient past.
But now I found these lines of code in an XML’ed UTF file (and I presume this is what is usually called a hash code; my apologies if it’s not):
... <_x8569CAC3 name="0x8569CAC3" type="file" filename="rvp541_utf\GCS_FM_A03aG_fc_lh_grp.wav"/> <_x85A84ACC name="0x85A84ACC" type="file" filename="rvp541_utf\GCS_FM_A03aG_fc_rh_grp.wav"/> <_x866B3D42 name="0x866B3D42" type="file" filename="rvp541_utf\GCS_FM_D06aG_fc_j_grp.wav"/> <_x866B7742 name="0x866B7742" type="file" filename="rvp541_utf\GCS_FM_D06aG_fc_b_grp.wav"/> ...
So, how must I proceed to add entries for new factions?? How do calculate such a code as 0x8569CAC3 ? And, does this mean I have to recalculate all those codes, also for the autio files I didn’t do anything with?
I had hoped this was just a matter of adding audio files, like making icons for commodities or news items, is just a matter of adding images
NB I’m not talking about the audio part; I can sort that probably out myself; it’s the 0x8569CAC3 which I don’t understand, especially how I would make such a code for a new entry, and if and to what extent this would affect the existing codes? Because afaik these hash codes are not universally the same, right? Meaning in each mod they would differ.
-
In StarTrader’s tutorial the hash code part is just mentioned as if it were not too complicated:
8. Enter the name ‘good_luck’ into CRC Tool, giving us the hash code ‘A70F6143’.
Is it really that simple?!
So, to add an audio file named GCS_FM_A03aG_br_m_grp.wav I should (for the hash code node) just enter “GCS_FM_A03aG_br_m_gp”" into CRC tool??
-
I know it’s going to sound edgy and really, really scary, but how about you try it out? You have the input, the expected output, and the software to do input -> output.
It’s not hard and the program won’t bite, I promise
Bonus round, if it doesn’t work, try variations! Remove parts of the input and see if a pattern works for the output. You might just be surprised at how much you can figure out like this.
-
Each ‘type’ of entry can be different, I explained it all somewhere over there. Go 3 pages down from here: http://freelancercommunity.net/viewtopic.php?f=5&t=316 to see one of the entries.
-
RTFM.
To assist with creating new audio entries, the hash attribute
can be used - it generates the hash of its value, using that as the node name.
For example:<msg hash=“gcs_refer_fc_new_short” …=“”>is equivalent to
<_xBC3D4807 name=“0xBC3D4807” …/></msg>
-
adoxa wrote:
RTFM.To assist with creating new audio entries, the hash attribute
can be used - it generates the hash of its value, using that as the node name.
For example:<msg hash=“gcs_refer_fc_new_short” …=“”>is equivalent to
<_xBC3D4807 name=“0xBC3D4807” …/></msg>
Great!!!
Now, where did I get the idea that the hash codes were different for each version (i.e. mod) of Freelancer? I thought that was why there were no 1:1 translations possible, and a database had to be generated each time…