FLFacHash Tool
-
FLDev also creates a similar file in its CRC tab (has both CRCs and Hashes), but I thought this wasn’t what you were after, from what I gathered.
-
StarTrader wrote:
I’ve been using excel to do it line by line until now, and it’s a pain.
If you actually want to use it in Excel, CreateID’s output is tab-delimited (with an option for CSV), so you should be able to import that and just swap the columns around. Or I could just modify CreateID to put the nickname first…
-
Wow, good responses guys!
Now you gave me another problem, I’ll have to try out and assess each of your suggestions! :?
But I ain’t got enough time! Haven’t you lot seen my avatar for goodness’ sakes!!??
Haen - now I KNOW you’re an old bugger like me!!
Actually your suggestion is very helpful, I think I can work my way around the FOR command and make a cmd/bat file to give it the input & output filenames and tailor the output results the way I want too.
Many thanks, guys.
-
Haen - now I KNOW you’re an old bugger like me!!
I’m not THAT old. In fact, believe or not, I’m not even an programmer – I’m a business major!
A quick question for Jason: I just noticed you mentioned “location hashes” for your createid program. Are you referring to the hash number after the “location =” entry in the save game files? If yes, do you know if they are used anywhere else?
Cheers,
– The Haen.
-
downloaded the tool to try it out, double clicked the exe file and i get a black box appear for a nano second and then nothing.
-
It’s a command-line program! Try running it through the command host (cmd)
-
adoxa wrote:
That’s right. I don’t believe so.Ah, I see. Thanks for your answer.
I always thought of location hashes as FLHash being applied twice over. I didn’t know that Freelancer actually called a different routine just for location hashes. Though on further reflection, I guess I should have anticipated that.
At any rate, now that I’ve got these three hashes, that gives me an idea with which I can play around…
– The Haen.
-
Having decoded the faction hash algorithm, I would’ve thought you’d know how it generates the location hash, too. It takes the hex of the base hash, appends an underscore and the name of the room, then hashes that. For example, Manhattan’s bar is: Manhattan = li01_01_base = A7303E0D, so hash “A7303E0D_bar” = 2729128783. Of course, if you’re importing from common.dll, just do MakeLocationID( CreateID( “li01_01_base” ), “bar” ). My version of FlCodec is capable of converting the hashes back to nicknames (Li01_01_Base/Bar) or names (Planet Manhattan Bar), using the database made by CreateID.
-
adoxa wrote:
Having decoded the faction hash algorithm, I would’ve thought you’d know how it generates the location hash, too.Oh, I know how to generate it all right. I apologize if I conveyed otherwise.
Like you wrote, it hashes the base name, prepends the hex as a string plus the underscore to the room name, and then hashes the new string. I have been manually determining location hashes using this process via the original FLHash.exe tool. I simply thought of the entire process as calling on the default hash algorithm twice, which was what I meant as “applied twice over”.
On another note, I spotted a minor error with FLFacHash’s output formatting. I’ve corrected the error and will re-upload once the problems with the Downloads are gone.
– The Haen.
-
It’s a command-line program! Try running it through the command host (cmd)
tried that and it tells me
Error, wrong number of arguments
whatever that means
-
Dragnite_MU wrote:
It’s a command-line program! Try running it through the command host (cmd)
tried that and it tells me
Error, wrong number of arguments
whatever that means
That means you need to give FLFacHash a faction ID to process. This error message appears if you entered the FLFacHash in the command prompt by itself without supplying any IDs with which it can work.
For example, if you want find out the hash code for the Kusari State Police, then you’d enter the following in the command line:
C:\>FLFacHash ku_p_grp
This should return the hashcode of 552.
– The Haen.
-
ah i see, ill give that a try then
-
A suggestion, perhaps, Haen: if you have a help command, maybe default to its output if not arguments are given? Or at least, put a “type –help for more information” in the error message.
It’s something simple, but it can help a lot with usability
-
Tssk! Tssk!
8-)
-
FriendlyFire wrote:
A suggestion, perhaps, Haen: if you have a help command, maybe default to its output if not arguments are given? Or at least, put a “type –help for more information” in the error message.It’s something simple, but it can help a lot with usability
Actually, the tool already does that: if it detects that the wrong number of arguments were supplied, it prints the error message and then runs the usage function. The usage function, in turn, prints out the proper syntax for the tool.
Having said that, I can see perhaps the usage function may be better in conveying its message. Since I’ll be re-uploading FLFacHash to fix the output formatting issues, I’ll go ahead and write up a better help message. Thanks for the suggestion.
On a related note: any timetable on when the ability to upload will be fixed?
Cheers,
– The Haen.
-
Hard to say, I’m afraid. The forum uploads seem to be absolutely borked, but the downloads could be fixed in a little while, with some luck.
-
Eh, just upload the file to a 1-click-hoster like www.depositfiles.com and post the DL link here then.
-
The upload section seems to be working again. I’ve submitted the new version that should appear soon pending admin approval.
No big changes in the new version: I fixed a minor bug that caused output redirected to a text file to look odd, and I also expanded the help section to be a bit more…helpful.
The updated source code is included with the file, and I’ll also be updating the source code located on page 1 of this thread very shortly.
– The Haen.