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

Getting custom ships to show up in space

The general place to discuss MOD''ing Freelancer!

Post Sun Feb 26, 2006 10:48 am

Getting custom ships to show up in space

This has to be posted somewhere here, and I am just unable to find it.

I am trying to get random encounters with custom ships I have added into my mod. Can someone point to a post here that walks you through that?

I know you need a loadout, and some other things for this to be done, but just cannot figure it out.

Post Sun Feb 26, 2006 5:15 pm

Well, how far have you got to? Have u actually seen ur ship in the game yet as a player buyable? Thats the first step. If you can buy it and fly it then thats half the work, the rest is a different list of problems.

So the easy way, is to find a ship with the same weapon mounts and to copy the entry from shiparch.ini. You will need the SDK if you haven't already, its the uncompressed ini files made readable.
It dosen't matter too much about the fine details right away, by using an original entry for their ships you are cutting down on possible errors in shiparch. If you have problems in shiparch it causes major problems.
Next, have u used FLEd-ids.exe to make new entries for names and infocards. If not it dosen't matter right now, just use an existing one.
In order to make the ship buyable, you need to add it to goods.ini and market_ships. Let me know if you need a hand doing this. Could you post up your shiparch entry when you've done it? Just so we can check through it..

Post Sun Feb 26, 2006 8:17 pm

I have all ships buyable and everything is scripted so FLMM generates all ID and info cards. This all works and all are flyable.

What I want now is to see the AI flying these ships in space. This is what I am stuck on.

Post Mon Feb 27, 2006 8:40 am

Ok, first backup everything up. Then open up faction_prop.ini in the missions folder. In it there are entries for each faction, like this:
[FactionProps
affiliation = li_n_grp<--Liberty Navy
legality = lawful
nickname_plurality = singular
msg_id_prefix = gcs_refer_faction_li_n<--What u hear in space
jump_preference = jumpgate
npc_ship = li_n_li_elite_d1-3<--all of these are nicknames not params
npc_ship = li_n_li_elite_d4<--they point to entries in npcships
npc_ship = li_n_li_elite_d5<--multiple entries are good so that the ship is
npc_ship = li_n_li_elite_d6<--balanced for the difficulty setting
npc_ship = li_n_li_elite_d7<--I like to overlap entries too life is more random
npc_ship = li_n_li_elite_d8
npc_ship = li_n_li_elite_d9
npc_ship = li_n_li_elite_d10
npc_ship = li_n_li_elite_d11-19
npc_ship = li_n_cruiser_d22
npc_ship = li_n_dreadnought_d25
voice = pilot_f_mil_m01
voice = pilot_f_mil_m02
voice = pilot_f_leg_f01
voice = pilot_f_leg_f01a
mc_costume = mc_li
space_costume = li_captain_head, li_male_elite_body, comm_ge_generic2
..
formation = fighters, fighter_li_n

In npcships, a few of the entries are:
[NPCShipArch
nickname = li_n_li_elite_d1-3<--the nickname again, must be unique in npcships
loadout = li_n_li_elite_loadout01<--the loadout in ships/loadout.ini
level = d3<--Used i think mostly for generating random missions, not encounters
ship_archetype = li_elite<--the ship name from shiparch.ini
pilot = pilot_military_med<--theres various types, more or less accurate/styles
state_graph = FIGHTER
npc_class = lawful, class_fighter, d1, d2, d3<--class_fighter is linked to the encounter file actually generated from the system. You can add custom ones but for now its best to leave. "D1, D2, D3" is the difficulty level at which the encounter will spawn form. The ship will be visable with its loadout at a difficulty setting of D1, D2, D3.
The loadouts are pretty simple as long as the hardpoints are named uniformly. But, if you can buy equipment and fly the ships then there shouldn't be any trouble there.
Are you adding the ships to a custom faction or an existing one? If you need a hand modifying systems to add new encounters then let me know. Oh, and i usually have entries in faction_prop like..
npc_ship = li_n_li_elite_d10A
npc_ship = li_n_li_elite_d10B
npc_ship = li_n_li_elite_d10C
npc_ship = li_n_li_elite_d10D
.. with each of them given a different pilot and unique loadout. But its up to you.

Post Mon Feb 27, 2006 11:37 am

Thank you, That helps a ton.

I have tried to add custom factions, but have been unsuccsesful thus far. So, for now, I will be adding them to existing factions.

I will post again if I need mroe help.

Post Mon Feb 27, 2006 11:44 am

S'ok, no problem.

Post Tue Feb 28, 2006 8:09 am

So, if I were to add new factions, I know I need to create it and then also add it to the other factions as to there tsrating empathy.

ALong with that, I need to go into empathy.ini and add the new faction and also append it to the existing factions.

Am I missing anything needed to add a faction and have it work?

If I want it to show on your F8 list, do I need to edit common.dll?

Post Tue Feb 28, 2006 1:00 pm

@ fadius, there are 5 essential files that you need to add your faction to, if you miss out even just one your faction won't work right.

Initialworld.ini - This is where each faction is given their friends and enemies.

Empathy.ini - This is where your actions towards any faction will change your rep with the rest. ie if your nice to the LSF the rogues hate you even more.

Faction_prop.ini - This is where each factions legal status, ship type, pilots and formations are set.

mpnewcharacter.fl - This is your initial multi-player settings, however I believe this is for the server side of a mod.

NewPlayer.fl - this is the key to your factions working right as this sets your initial rep's with each faction, it's also where FL get's it's initial settings to allow any new factions to be added to the save games for both SP & MP.

The first 3 will have your faction working OK providing you get the right numbers in the right places. The mpnewcharacter.fl is like the M13.ini from the older OpenSP mods in that it changes your setting but not the games initial settings.
You would be surprised at just how many of the big mods have got their factions wrong all because they forgot to add the newplayer.fl to it.

Initialworld numbers: 0.91, 0.65, 0.3, 0, -0.3, -0.65

Lawful <-> Lawful = 0.91, 0.65, 0.3, 0

Unlawful <-> Ulawful = 0.91, 0.65, 0.3, 0, -0.3, -0.65

Lawful <-> Unlawful = 0, -0.3, -0.65

If you stick to these you'll avoid causing conflicting arguments in you code ( Bad for the CPU )

Before anybody says anything I know that there are Lawful factions that hate each other, but their reps are set at "0" so it's something else that sets them off.

**shuffles of with a new headache**

Post Tue Feb 28, 2006 5:36 pm

Another thing to remember is that once you have made the changes, you will need to delete restart.fl and the autosave from the saved game folder. Would be best to move the saved games out into a different folder or freelancer will start preloading stuff.

Post Tue Feb 28, 2006 11:56 pm

There is a whole tutorial thread dedicated to adding new factions, creating the ships they should fly, and therefore adding them to encounters in the game.

Check the tutorials forum, you may need to set the thread date back to a year though.

Return to Freelancer General Editing Forum