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

=> STANDARD => MOD Distribution

The general place to discuss MOD''ing Freelancer!

Post Tue Mar 11, 2003 4:30 am

=> STANDARD => MOD Distribution

The other thread on MOD Distribution had some great ideas and suggestions. In playing around with those, and testing out some other ideas, I think I have come up with a potentially good standard that makes it VERY easy to use/play multiple mods.

For the mod creator:

Step 1) Create this subdirectory: FREELANCER\DATA\MODS\

Step 2) Create a subdirectory for the mod you are installing (for mine, I use THRESH). Example: FREELANCER\DATA\MODS\THRESH\

Step 3) Create these subdirectories inside \FREELANCER\DATA\MODS\THRESH\ =>

AUDIO\
AUDIO\MUSIC\
CHARACTERS\
EQUIPMENT\
MISSIONS\
RANDOMMISSIONS\
SHIPS\
SOLAR\
UNIVERSE\

(you might want a few others, but those are the main ones for now)

Step 4) Any .ini files you edit should be stored in the above listed directories, NOT in the main directory structure.

Step 5) Open FREELANCER\EXE\freelancer.ini

Go down to approximately line 202, just before you see this:

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>
[Error
;EMAURER these four should remain as set.
</font> </font> </font> </font></pre>

This is where you add the references to *YOUR* .ini files. For example, in mine I have this:




;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@ BEGIN ALL NEW DATA RELEVANT TO THRESH FREELANCER MOD @@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

sounds = mods\thresh\audio\thresh_music.ini

equipment = mods\thresh\equipment\thresh_light_equip.ini
equipment = mods\thresh\equipment\thresh_select_equip.ini
equipment = mods\thresh\equipment\thresh_misc_equip.ini
equipment = mods\thresh\equipment\thresh_engine_equip.ini
equipment = mods\thresh\equipment\thresh_ST_equip.ini
equipment = mods\thresh\equipment\thresh_weapon_equip.ini
equipment = mods\thresh\equipment\thresh_prop_equip.ini

ships = mods\thresh\ships\thresh_shiparch.ini
ships = mods\thresh\ships\thresh_rtc_shiparch.ini
goods = mods\thresh\equipment\thresh_goods.ini
goods = mods\thresh\equipment\thresh_engine_good.ini
goods = mods\thresh\equipment\thresh_misc_good.ini
goods = mods\thresh\equipment\thresh_st_good.ini
goods = mods\thresh\equipment\thresh_weapon_good.ini

loadouts = mods\thresh\ships\thresh_loadouts.ini
loadouts = mods\thresh\ships\thresh_loadouts_special.ini
loadouts = mods\thresh\ships\thresh_loadouts_utility.ini

markets = mods\thresh\equipment\thresh_market_misc.ini
markets = mods\thresh\equipment\thresh_market_ships.ini
markets = mods\thresh\equipment\thresh_market_commodities.ini
NewCharDB = mods\thresh\characters\thresh_NewCharacter.ini
WeaponModDB = mods\thresh\equipment\thresh_WeaponModDB.ini

;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@




The very COOL part of this is that anything you did in your .ini files will overwrite anything in the "stock" .ini files.

For example, if you create custom data for the Anubis in shiparch.ini (or in the case of my mod mods\thresh\ships\thresh_shiparch.ini), all you have to include in that file are the NEW entries for the Anubis. This means you can "pick and choose" pieces of various mods if they only include the CHANGED data in their .ini files.

This system is great for the mod creator because you are never touching the core files. You are always editing files in a separate subdirectory structure which reduces the chances of a screw up. It is also very organized since all the files you have changed are in their own subdir structure.

==============================

As great as this is for the mod creator, it is even better for the mod PLAYER.

If a mod creator uses this method, all he or she has to do to distribute their mod to someone else is:

1) Send them a copy of the mod's freelancer.ini file

2) Send them a zip of the mod's ini files (the zip should include the MODS\YOURMODNAME\Etc\ directory structure.

Then the user simply does the following:

1) Backup their original freelancer.ini file

2) Copy over the new one

3) Unzip the .zip file into FREELANCER\DATA

That's it!

They can have MULTIPLE mods "installed" at one time since they all go under FREELANCER\DATA\MODS\.

To switch between mods, all they have to do is change the freelancer.ini file. I am sure a script could easily be written to automate that process as well.

==============================

Anyway, tell me what you think. I have tested all of this and it WORKS.

It is also very easy to work with. It has made my modding life a lot easier and a lot more organized.







Edited by - ThresholdRPG on 11-03-2003 04:34:50

Post Tue Mar 11, 2003 4:39 am

Great.. Because of YOU Ill have to re-install freelancer again.. for the 3rd time.. (first 2 cuz i screwed something up..)

HAAHHA..

SUPURB idea.. I would suggest that you get with IGx89 to have is mod installer work on that..

A quick suggestion for the both of you - Instead of sending a full copy of the freelancer.ini, couldnt we just use a placeholder? Have the mod install program look for the [ERROR stuff, and then insert the contents of "modname.ini"?

Might be a task for uninstalling a mod, but at least a starting point?

hehe.. I was never much in to making mods for games, but for some reason, with this game, im becoming more and more involved.. hehe..I love it..

KEEP UP the WORK! We really like it..

Post Tue Mar 11, 2003 4:46 am

I say we make this one STICKY... Incredibly AWESOME idea Thresh! Keep up the awesome work!

Post Tue Mar 11, 2003 4:52 am

Thanks beltic and SuPaFrEaK.

I have to give thanks to Xlancer who was the first to come up with the idea of using the freelancer.ini file to point to DIFFERENT .ini files.

Then I starting playing around with it and realized that as long as we can point anywhere, why not REALLY get things organized so it is easy for people to have the files for multiple mods on their system at one time.

Considering the fact that only 1 file has to be different to play one mod or another, I imagine it would be REALLY easy to write some kind of script to handle this.

All the script would have to do is this:

First time the launcher is run: backup freelancer.ini to freelancer_original.ini

When the launcher opens, you select the name of the mod (based on the subdir names in FREELANCER\DATA\MODS\ ).

The script then copies MODNAME.ini to freelancer.ini

The game is launched.

If you tell the launcher to run "stock" Freelancer, it copes freelancer_original.ini to freelancer.ini

I think that covers everything.

Post Tue Mar 11, 2003 6:31 am

Hi Thresh,

Could you post a link to a sample distribution so that I can see the exact layout of the files and the content of the changes in the ini files? I may be able to put something together in c# to automate distribution. Also, what must be done in freelancer.ini if multiple mods are installed at the same time? The process of assembling the distribution could also be automated as well. Just some possibilities.

BoarK

Post Tue Mar 11, 2003 6:55 am

Ok, I have been testing all sorts of things with this and I have discovered something odd.

For the most part, the way the game loads data via .ini files is such that any LATER .ini file overrides any data in a prior .ini file.

Thus, if the game loads shiparch.ini first, and then loads yourmod_shiparch.ini afterward, the data in YOUR file overrides the data in the stock file.

That being said, there appear to be some .ini files that RESIST this behavior *boggle*.

newcharacter.ini is one of them.

engine_equip.ini appears to be another one.

This is VERY confusing. For these two files (and I imagine possibly a few others), the "controlling" file is whichever .ini file is loaded first.

My temporary "solution" to this is to paste my block of ini pointers TWICE. The first time at approximately line 123, and the second time where I already stated it should be posted.

As an added bonus, since you are now pasting this so early in the file, you have to add this to your block of ini pointers:



; bases has no filename but the key specifies the load order
bases



So the short version of this is that you have to insert the following block of code in TWO places.



;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@ BEGIN ALL NEW DATA RELEVANT TO THRESH FREELANCER MOD @@@@@@@@@@@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@ For some retarded reason, this info has to be included twice. @@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

; bases has no filename but the key specifies the load order
bases

universe = mods\thresh\universe\thresh_universe.ini
sounds = mods\thresh\audio\thresh_music.ini

equipment = mods\thresh\equipment\thresh_light_equip.ini
equipment = mods\thresh\equipment\thresh_select_equip.ini
equipment = mods\thresh\equipment\thresh_misc_equip.ini
equipment = mods\thresh\equipment\thresh_engine_equip.ini
equipment = mods\thresh\equipment\thresh_ST_equip.ini
equipment = mods\thresh\equipment\thresh_weapon_equip.ini
equipment = mods\thresh\equipment\thresh_prop_equip.ini

ships = mods\thresh\ships\thresh_shiparch.ini
ships = mods\thresh\ships\thresh_rtc_shiparch.ini
goods = mods\thresh\equipment\thresh_goods.ini
goods = mods\thresh\equipment\thresh_engine_good.ini
goods = mods\thresh\equipment\thresh_misc_good.ini
goods = mods\thresh\equipment\thresh_st_good.ini
goods = mods\thresh\equipment\thresh_weapon_good.ini

loadouts = mods\thresh\ships\thresh_loadouts.ini
loadouts = mods\thresh\ships\thresh_loadouts_special.ini
loadouts = mods\thresh\ships\thresh_loadouts_utility.ini

markets = mods\thresh\equipment\thresh_market_misc.ini
markets = mods\thresh\equipment\thresh_market_ships.ini
markets = mods\thresh\equipment\thresh_market_commodities.ini
NewCharDB = mods\thresh\characters\thresh_NewCharacter.ini
WeaponModDB = mods\thresh\equipment\thresh_WeaponModDB.ini

;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@



Technically, you would only need to "preload" the files that have this weird behavior, but for the sake of simplicity I think it is easier just to paste it in twice.

I have no idea why a scant few .ini files work like this. If anyone can figure that out, perhaps we can find a more elegant solution.

On the plus side, the PLAYER of the mod is unaffected by this. This only adds an extra step to the mod maker (and the "step" is nothing more complicated than just pasting it into two spots).

Post Tue Mar 11, 2003 7:55 am

Great idea, and nice research. The only thing I see missing is a way to handle modifications to the resource .dll files, for those that need to add strings for new equipment/systems/etc.

later...sb

'I know a song, would you like to hear it?...Dai-sy...dai-sy...'

Post Tue Mar 11, 2003 11:46 am

Support for DLL mods can be added later, standardization is needed if people are going to create more distributable mods.

Post Tue Mar 11, 2003 4:07 pm

I wish I had seen this thread before I made an installer

Threshold, my installer work in that it appends, search/replaces, or adds a new file. Doing that makes the filesize of the mod a lot smaller (13kb uncompressed for the battleship mod). Also, I have plans to have a mod manager, that lets one mix and match different mods, and tells you if there is any conflicts. I'm also planning on making a one-click install: a user clicks on a link, and it automatically installs the mod without the user having to do anything.

Well, let me know what you think; give me an e-mail

Post Wed Mar 12, 2003 1:16 am

how, exactly, would you add the support for DLL modifications? Without edited DLLs, I can't think of ANY in-game text that you can change...

Post Wed Mar 12, 2003 2:32 am

I could probably add that into my installer/mod manager program I'm making.

Post Wed Mar 12, 2003 1:00 pm

There are pointers to the .dlls in freelancer.ini

When we have reached a greater understanding of the .dlls, I imagine we can probably make new .dlls and have the freelancer.ini file point to them.

It appears that they tried to make the freelancer.ini file an "index" that the game uses to find all of its information. If that is true, then we can use it to point to a new mod's files and avoid the necessity of altering or overwriting existing/stock files.

I think that is definitely a good goal to pursue as it is far safer in the long run.

Barring that, it would be simple to the point of triviality to have an install program run a simple script that backed up existing files before copying over "mod files".

Post Thu Mar 13, 2003 3:37 am

bump

Post Thu Mar 13, 2003 7:30 am

Would'nt it be interesting to make up a server browser program, that would automatically load up (and if necessary, download) any appropriate assets needed to join the server, and upon exiting the browser program, reverts the game back to its pure state?
How the program would know what mod is running is that tags could be left in the server news that the browser looks for. The program would check this code against its stored listing, or against a master listing stored elsewhere, or even store the master list and refresh manually or automatically, and then using this master MOD list, determine if it had it installed already or to automatically download the files and install, then join the server.

The goal here is to make mod setup, determining which mod and where to get the mod necessary to join a server, as simple, transparent, and effortless to the user as possible.

Post Fri Mar 14, 2003 3:07 am

*Bump*

Can we get this stickied? This is a really interesting topic.

Return to Freelancer General Editing Forum