After looking through the tutorials forum i was unable to find the one listed, so i'm going to give you an overview here.
Programs needed
FLEids (for changing the faction name in names_resources.dll and infocards)
Save game editor (for editing newplayer.fl)
Chips Singleplayer Addon, for testing purposes
Adding a new faction
In order to add a new faction you need to edit:
Faction_prop, npcships, initialworld, empathy, exe/mpnewcharacter.fl, exe/newplayer.fl, vigrette_params and killable_solars
So, start with backing everything up. With factions if you make mistakes it can make you mod unstable and be a real pain to find the problem.
00.I'm assuming you are working with SDK and have it already installed.
01.Next, open data/initialworld and have a look through the file.
02.You need to add an entry for your faction, so copy the race that is most similar to your custom race and paste it at the bottom.
03.Rename the nickname to be something unique. It shouldn't be more than 15 characters long as Ioncross dosen't read them properly.
04.We'll do the naming of factions first, open up FLEids and start making entries similar to the existing ones.
05.You need to be in a similar range as the other ones which will be explained later.
06.Once you find the nearest space in names_resources higher than those used
07.Input the name and save to file
08.The "ids_name =" must be in namesresources, the "ids_short_name =" may be in a custom dll if you want to.
09.You may as well leave the "ids_info =" for the time being. Put it in if you want to, but you can always come back and edit it later and it won't affect how a faction works in game.
10.Next, we need to add entries for for every faction in the game for the new one. These values can only be 0.91, 0.65, 0.3, 0, -0.3, -0.65. -091 otherwise it leads to problems.
11.So if you added:
nickname = cu_n_grp
ids_name = 196846
ids_info = 66200
ids_short_name = 459218;custom dll
.. then every other faction will have an entry for cu_n_grp:
rep = 0.91, cu_n_grp
The faction should be 0.91 to itself, 0.3 or 0.65 to allies and -0.65 to enemies.
12.Once done, and checked Save and close, then open up missions/empathy.ini
13.Empathy can be treated mostly the same as initialworld, you find the closest existing faction and paste it to the bottom.
14.Try to make as few changes as possible, if it works don't try to fix it.
15.The entries should be added to every other faction with your new custom one. So you add, "empathy_rate = cu_n_grp, 0.300000" or something under each group
except your custom faction. Save and close.
16.So in initialworld every group has every other group and in empathy every group has every other except itself.
17.Once done we need to add to add to faction_prop. Open it up and choose the closest faction, copy it and paste at the bottom.
18.Don't make any changes to the factions appearance or ships yet. We can do that later, for now we just want to see the faction in the game. It will help in finding any bugs. Just change the nickname. Save and close.
19.No changes are needed in npcships yet as we are using existing ones that already work.
20.Next open up randommissions\vigrette_params and do the sneaky fix. If your group is lawful copy (exactly):
", li_n_grp" and choose from the top menu Edit>Replace and replace:
", li_n_grp" with ", li_n_grp, cu_n_grp" substituting my cu_n_grp for your custom one. Then choose "all", this will add entries to every one in the file.
If unlaw then choose ", fc_ou_grp" and use that instead. Save and close.
21.Next Killablesolars, treat it the same as vigretteparams and use the sneaky fix for that one too. You can use gd_im_grp (IMG) for targets if you faction is more corporate or gd_bh_grp if they are more similar to the bounty hunters. Save and close.
22.Open up exe\mpnewcharacter in notepad and add an entry for your new group. Save and close.
23.Open up Newplayer (with the saved game editor) add the entry , then save and close.
24.That should be enough for the faction to be usable in the game. I would recommend that you use a program like FLE to create encounters with the system as its very good and makes it a lot easier.
25.For testing purposes we could add your faction to any zone that you want, but bear in mind, different encounters use different ships. So, depending on your choice, you may not have freighters or transports to be spawned.
26.We could add the custom ships to the missouri local area (for testing purposes if you want.
27.If so, open up Universe/systems/LI01/Li01.ini and search for "Missouri". You will find zone "Zone_Li01_015_Station_Li01_07"
28.In it replace:
faction_weight = li_n_grp, 12
with
faction_weight = li_n_grp, 2
faction_weight = cu_n_grp, 10;Again using your own name
and replace:
encounter = area_defend, 1, 0.070000
faction = li_n_grp, 0.940000
faction = li_p_grp, 0.060000
with
encounter = area_defend, 1, 0.070000
faction = cu_n_grp, 0.800000
faction = li_n_grp, 0.140000
faction = li_p_grp, 0.060000
This will add you custom faction to the zone using fighters.
29.I would recommend using an opensp for testing. You could try Chips Singleplayer Addon, you will need to edit it slightly.
30.Install it using FLMM and activate. Next open up the missions/m13/m13 in the game's directory (not the mods) and add you custom faction to the list. Then save and close.
31.The list of locations for where to begin from are in the Ioncross datafiles. You would just need to edit in m13:
system = Li01
Act_ForceLand = Li01_01_Base
Cnd_BaseEnter = Li01_01_Base
to be
system = Li01<-Whatever system you want
Act_ForceLand = Li01_03_Base
Cnd_BaseEnter = Li01_03_Base
32.Final thing you do before testing is to delete or remove the save games, autosave and restart from:
My Documents\My Games\Freelancer\Accts\SinglePlayer
as they have saved data for factions written into their files.
33.That should be enough to get the faction in the game and be tested. Once they are in you can start adding new ship loadouts/ships, your faction to base populations and their appearance.
Edited by - Mace_166 on 10/17/2006 7:15:02 AM