Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Resource Numbers (IDs)

The general place to discuss MOD''ing Freelancer!

Post Wed Jun 30, 2004 8:10 am

Resource Numbers (IDs)

Hi all, I'm new to Lancer's Reactor but I've been playing and editing FreeLancer for quite a while. I've been enjoying Lancer's Reactor for a couple of months, now.

I'm working on a GUI based system editor (in C++) that may branch off into something more. I'm still at the stage where I'm interpreting the various INI files into the proper classes of objects.

Loading and interpreting the INI files is straighforward and fairly simple and even loading the various resource DLLs is not a problem. But right now I'm trying to get a handle on the resource IDs. The strid_name tag in files like universe.ini don't seem to make any sense. When I scan through the string tables in the nameresources.dll file I can see the names of the system, bases, jump-gates, etc. But the numbers I find the in the strid_names don't match up to the string ids in the DLL files. For example in universe.ini the strid_name for "Planet Manhattan" is 196766. But in the string table it's 158. Now this is offset by an exact multiple of 65536*3. But I don't know what the 3 signifies unless it's a resource class.

Does anyone know if there is a secondary layer for translating these strings correctly? Or is there a resource class (i.e. the 3)? Or do you just have to "fudge" the numbers? I would prefer to read the resources correctly in order to get the correct labels on everything and make this a proper editor.

Thanks and nice to meet all of you.

Post Wed Jun 30, 2004 8:25 am

Welcome

The IDS numbers are offset by the order in which they're loaded. Look in Freelancer/EXE/Freelancer.ini and you should see this:

[Resources
DLL = InfoCards.dll ; Contains all infocard text resources
DLL = MiscText.dll ; Contains other bulk text resource: rumor, offer, and mission text
DLL = NameResources.dll ; Contains names of things, primarily.
DLL = EquipResources.dll ;Contains names of equipment (in string table) and infocards for equipment (in HTML resources)
DLL = OfferBribeResources.dll ; Contains random mission offers and bribes
DLL = MiscTextInfo2.dll ;Contains MP UI elements as well as other misc. text

These DLL's hold all the strings, and they are loaded in the order that they are specified in this file. So for the tenth string in EquipResources.dll, for example, the IDS entry would be 65536*4 + 10. You can add new DLL's easily by just adding them to this file.

Edited by - Accushot on 6/30/2004 9:24:58 AM

Post Wed Jun 30, 2004 8:27 am

I would suggest you download FL-IDS, it makes figuring out those numbers a breeze.

If you really want to do it manually, you'll have to open up your freelancer.ini file, and look at the lines:


[Resources
DLL = InfoCards.dll
DLL = MiscText.dll
DLL = NameResources.dll
DLL = EquipResources.dll
DLL = OfferBribeResources.dll
DLL = MiscTextInfo2.dll

This is the order that Freelancer loads up the resource dll's, and each dll has a potential 65536 entries. So the numbers in NameResources.dll will be + 65536*3 (since it's the 3rd dll loaded).

EDIT: haha, accushot posted 2 seconds before I could, hehehehe

Edited by - wasabe on 6/30/2004 9:27:19 AM

Post Wed Jun 30, 2004 2:46 pm

Thanks for the info. I knew about the freelancer.ini file and the dlls (that's how I know where to look). But I didn't think about what position the DLL file was in the list would be the key. Incidentally, either number works in the nameresource.dll file (158 or 196766) Both return the same string. But the 196766 will tell me to look in DLL number three in my list.

This will help a lot as I go forward. It will be much easier to tell if I'm doing something right in debug mode by looking at the string values associated with what I'm doing.

Is there are a resource that defines what the data cards are? I've poked around a bit for that and what info there is seems somewhat scattered. I'll probably figure it out, but thanks again to both of you for your help.

Post Mon Jul 05, 2004 11:26 am

Hello!

The Data Cards are XML Files, which are saved in hexadecimal system I think.
If you use a recource hacker you can save the "23" Tables in Binary Format and these are xml files.

Return to Freelancer General Editing Forum