I use 'Freelancer Companion' (FC) quite a lot for doing business. But it lacks some features and has some bugs. Wizou, the developer, doesn't seem to be interested in it anymore so I think about creating some thing new.
The main question: how does FC extract the data from the game?
I ran into some pages in the wiki that said they were created using data from the game. So it cannot be only Wizou's trick.
Is here anybody who can give me more info? Thank you very much!
PS: I will be using Lazarus/Free Pascal. And I have only a bit of experience in graphics, so creating the little map will be a problem (read: challenge) for the moment.
I use 'Freelancer Companion' (FC) quite a lot for doing business. But it lacks some features and has some bugs. Wizou, the developer, doesn't seem to be interested in it anymore so I think about creating some thing new.
The main question: how does FC extract the data from the game?
I ran into some pages in the wiki that said they were created using data from the game. So it cannot be only Wizou's trick.
Is here anybody who can give me more info? Thank you very much!
PS: I will be using Lazarus/Free Pascal. And I have only a bit of experience in graphics, so creating the little map will be a problem (read: challenge) for the moment.
To my knowledge, most data-extraction tools currently in circulation function by reading the game's .INI files and collating that data.
The data on the Wiki that was "taken from the game" is not loaded in real time; it used some kind of XML database (?) to upload changes directly into Wiki format. (I'm not an expert in the fine mechanics of either process.)
I found INI files that look very promising. So thank you very much! But I have some hurdles to tackle:
- there are a lot of INI files, some are very large, and I have to find out which ones are usable
- I have to find out how they are "coded" (by lack of another word)
- it doesn't seem like a job that will take 'just a few hours'.
OK, it took some time but I think I figured out most things. Now it is time to turn the found things into code. The most difficult thing will be to calculate the route from one base to another base; that's one of the parts I haven't figured out yet.
FYI: the code will become open source once I'm finished. The program will be written in Lazarus/Free Pascal.
[11:20:20] aerelm: its not fl dev work if you dont have to power through the whole thing on your own
[11:20:32] aerelm: help is for pussy devs like in dota
Interesting! But I have to study it a bit more. Thank you!
I ran into a little problem: I cannot extract all the names of the bases from the INI files. For example, the Wedel Mining Facility in Hamburg isn't mentioned anywhere, that is: the name. The base self is, but just with its code name. The person who wote the INI file, added the real names as comment. But not for every base, and not in a consistent way.
In the past I extracted this info from various HTML files and put that in text file. For the moment I'm going to use that as conversion base.
Interesting! But I have to study it a bit more. Thank you!
I ran into a little problem: I cannot extract all the names of the bases from the INI files. For example, the Wedel Mining Facility in Hamburg isn't mentioned anywhere, that is: the name. The base self is, but just with its code name. The person who wote the INI file, added the real names as comment. But not for every base, and not in a consistent way.
In the past I extracted this info from various HTML files and put that in text file. For the moment I'm going to use that as conversion base.
Check the GetIDSParm() at line 705. ids_info for each equip/base/whatever is an unsigned integer which is used as index.
The strings themselves are stored in exe\resources.dll and each library, that is listed in exe\freelancer.ini under [Resources] block, DLL setting. Library loading happens @ lines 198-199.
The sample uses standard windows functions (of user32.dll and kernel32.dll, check lines 27-46) to access the data, I think FPC is able to invoke DLL functions as well. Good luck
[11:20:20] aerelm: its not fl dev work if you dont have to power through the whole thing on your own
[11:20:32] aerelm: help is for pussy devs like in dota
(07-23-2014, 05:52 PM)utrack Wrote: The strings themselves are stored in exe\resources.dll and ...
Good luck
First: Thanks!
I already was afraid of that and I don't have any experience with extracting data from DLLS. But one time has to be the first time
I ran into another challenge: I cannot find the prices of ores. I once visited a server that changed the prices of ores day by day. So I think they can only be found in files only available when FL is running.