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

Creating a new faction?

The general place to discuss MOD''ing Freelancer!

Post Sat Oct 14, 2006 10:25 pm

Creating a new faction?

Excuse me,
This may of been posted somewhere else but please forgive me if it was.

--
So does anybody know how to create a faction and include this with the faction?
-What they wear?
-There voices?
-What are there allies?

So does anybody know and are kind enough to let me know?
Surely someone does.
Please Please Help me,
Dudeofthed

__________________________________
General Freelancer Modder - In The Makings

Post Sun Oct 15, 2006 3:07 am

here ya go mate...

Click Here For The Tutorial

24/7 Blaster Universe
Website

Post Sun Oct 15, 2006 11:33 pm

Where is the tutorial please?
The person who posted that topic needed a tutorial!

Post Mon Oct 16, 2006 2:39 am

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

Post Mon Oct 16, 2006 3:00 am

For the voices, there are a number of entries in faction_prop like this:
voice = pilot_f_mil_m01
voice = pilot_f_mil_m02
voice = pilot_f_leg_f01
voice = pilot_f_leg_f01a
These are all linked to the audio that you hear for pilots. You have to add audio to bases in the system files. If you mean the name of the faction's audio, then that is set with:
msg_id_prefix = gcs_refer_faction_li_n
So, it says Navy. The police are unfortunately set so they say Liberty Police or Kusari Police instead. You can choose the name that you want and replace it with you custom faction without any real problems. It comes up in FLSpit, but can be ignored.
When testing faction changes for factions and editing things like initialworld, you need to delete the restart, autosave and saved files and start a new player every time in order to see the changes.
Adding new ships and loadouts
34.Once tested in game and behaving properly, new entries can be made to faction_prop and npcships.
35.For an example, i'm going to give the Liberty Navy the Anubis and arm it with suitable weapons.
36.Open up faction_prop:
npc_ship = li_n_li_elite_d1-3
..
npc_ship = li_n_li_elite_d10
npc_ship = li_n_li_elite_d11-19

These are all nicknames that are linked to npcships. They can be anything but they must be unique. Its good practice to keep the same format of adding the difficulty range after the faction and ship names.
37.I'm going to replace the entries with:
npc_ship = li_n_li_elite_d1-3
npc_ship = li_n_li_elite_d4
npc_ship = li_n_li_elite_d5
npc_ship = li_n_li_elite_d6
npc_ship = li_n_li_elite_d7
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_anubis1_d11-19
npc_ship = li_n_anubis2_d11-19
38.Then save, but leave open. If you have a mistake in faction_prop here its very bad. It will crash about halfway to the title menu when starting up.
39.In npcships, choose edit>find "li_n_li_elite_d11-19" from the top menu and copy:
[NPCShipArch<--removed for this forum
nickname = li_n_li_elite_d11-19
loadout = li_n_li_elite_loadout03
level = d11
ship_archetype = li_elite
pilot = pilot_military_ace
state_graph = FIGHTER
npc_class = lawful, class_fighter, d11, d12, d13, d14, d15, d16, d17, d18, d19

and replace with:
[NPCShipArch<--ditto
nickname = li_n_anubis1_d11-19
loadout = li_n_anubis_loadout01
level = d11
ship_archetype = or_elite
pilot = pilot_military_ace
state_graph = FIGHTER
npc_class = lawful, class_fighter, d11, d12, d13, d14, d15, d16, d17, d18, d19

[NPCShipArch<--ditto
nickname = li_n_anubis2_d11-19
loadout = li_n_anubis_loadout02
level = d12
ship_archetype = or_elite
pilot = pilot_military_ace
state_graph = FIGHTER
npc_class = lawful, class_fighter, d11, d12, d13, d14, d15, d16, d17, d18, d19

Save and close faction_prop. Would be worth checking the nicknames match before closing.
40.Open up ships/loadouts.ini and do edit>find for "archetype = or_elite"
Then copy it to the bottom of the loudouts file and change the name to match one in npcships. Its better to just copy and paste it instead of typing anything.
41.We are going to change the ships weapons to match the faction. If you open up equipment/weapon_equip and search for "li_n" you will find the weapons used in there. Some are from the story so leave those ones.

Edited by - Mace_166 on 10/16/2006 4:50:19 AM

Post Mon Oct 16, 2006 3:26 am

42.
[Loadout<--ditto
nickname = li_n_anubis_loadout01
archetype = or_elite
equip = ge_oe_engine_01;I'm going to change this to liberty instead
equip = npc_shield01_mark02, HpShield01;Shield is Graviton class 2, that'll change
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = fc_or_gun01_mark01_m1, HpWeapon01;Will replace with liberty weaps
equip = fc_or_gun01_mark01_m1, HpWeapon02
equip = fc_or_gun01_mark01_m1, HpWeapon03
equip = fc_or_gun01_mark01_m1, HpWeapon04
equip = missile01_mark01_rtc, HpWeapon05;The rtc version is from the story, that'll go too
cargo = missile01_mark01_rtc_ammo, 2
equip = missile01_mark01_rtc, HpWeapon06
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallYellow, HpRunningLight01;You can change the lights if you want
equip = SlowSmallYellow, HpRunningLight02;They are in light_equip
equip = SlowSmallYellow, HpRunningLight03
equip = SlowSmallYellow, HpRunningLight04
equip = SlowSmallYellow, HpRunningLight05
equip = SlowSmallYellow, HpRunningLight06
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = contrail01, HpContrail03
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
to
[Loadout<--ditto
nickname = li_n_anubis_loadout01
archetype = or_elite
equip = ge_le_engine_01;Same as the defender
equip = npc_shield01_mark06, HpShield01;Shield is Graviton class 6
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = li_gun01_mark06, HpWeapon01;Vengence 3's
equip = li_gun01_mark06, HpWeapon02
equip = li_gun01_mark06, HpWeapon03
equip = li_gun01_mark06, HpWeapon04
equip = li_gun01_mark06, HpWeapon05
equip = missile02_mark03, HpWeapon06;Moonstalker
equip = co_turret02_mark02, HpTurret01;There was a turret missing too
cargo = missile02_mark03_ammo, 15
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallYellow, HpRunningLight01
..
equip = DockingLightRedSmall, HpDockLight02
43.I could show you the loadout for the second loadout but will just save forum space, it would be a plasma based variant and be armed with magma hammer 3's instead.
44. If you wanted to you could change the entries so that there are:
li_n_anubis1_d11-12
li_n_anubis1_d13-14
li_n_anubis1_d15-16
li_n_anubis1_d17-19
and add entries for each. For liberty this would be fairly pointless as there are no encounters to that level. I normally add high encounters around the House capitals, but its up to you.
45.Its best to playtest for a bit to see the new ship loadouts and once happy, we'll move on to base populations.
46.Base populations are handled by mbase, this will go through adding the faction cu_n_grp to Detroit Munitions (Li01_10).
47.In order for this to work, the custom faction cannot be hostile to the faction owning the base. Here's a typical mbase entry:
[MBase<--
nickname = Li01_10_Base
local_faction = co_vr_grp
diff = 1
msg_id_prefix = gcs_refer_base_Li01_10_Base

[MVendor<--
num_offers = 2, 4

[BaseFaction<--
faction = li_p_grp
weight = 9
offers_missions = true
mission_type = DestroyMission, 0.000000, 0.112387, 20
npc = li0110_lpolice_001_f

[BaseFaction<--
faction = co_vr_grp
weight = 64
offers_missions = true
mission_type = DestroyMission, 0.000000, 0.112387, 40
npc = li0110_ageira_001_m
npc = li0110_ageira_002_m
npc = li0110_ageira_003_f
npc = li0110_ageira_004_f

[BaseFaction<--
faction = co_ss_grp
weight = 9
npc = li0110_universal_001_m

[BaseFaction<--
faction = gd_bh_grp
weight = 18
offers_missions = true
mission_type = DestroyMission, 0.000000, 0.112387, 40
npc = li0110_bounty_001_m
npc = li0110_bounty_002_f

Notice the mission_types and weight all add up to 100. They are percentages that set who spawns and who's missions are shown in the mission vendor.
So, all you need to do is reduce the co_vr_grp to weight 44 and mission_type 30. The gd_bh_grp to mission_type 30 and add this:
[BaseFaction<--
faction = cu_n_grp
weight = 20
offers_missions = true
mission_type = DestroyMission, 0.000000, 0.112387, 20
npc = li0110_customnavy_001_m
npc = li0110_customnavy_002_f

The npc = must be unique for every entry in the file, so its good to keep to the same format.
Next add:
[GF_NPC<--
nickname = li0110_customnavy_001_m
body = li_male_elite_body
head = ge_male6_head
lefthand = male_hand_left_black
righthand = male_hand_right_black
individual_name = 220034<--These are all unique. You can either add you own unique ones or use the ids_name form initialworld for a general faction name. In larger mods it can be easier to just use the faction's long name istead.
affiliation = cu_n_grp
voice = rvp111
misn = DestroyMission, 0.000000, 0.112387
room = bar

[GF_NPC<--
nickname = li0110_customnavy_002_f
body = li_female_elite_body
head = ge_female1_head
lefthand = benchmark_female_hand_left
righthand = benchmark_female_hand_right
individual_name = 220035
affiliation = cu_n_grp
voice = rvp511
misn = DestroyMission, 0.000000, 0.112387
room = bar

I have removed the rumours for the new entries. You can leave them in if you want, but some refer to certain bases, so its best to check through first.

Edited by - Mace_166 on 10/16/2006 4:53:57 AM

Post Mon Oct 16, 2006 3:45 am

Well, that should be enough for getting the custom faction into a base. In order to get random missions, you need to have a population zone or patrol that has a vigrette overlapping and both the faction and their enemies fighting.
48.Faction appearance. I'll add this as you have asked about their appearance in your post.
49.These are in faction_prop and the changes you make there will affect the appearance of the pilots that you meet in the game.
50.Its best to copy and paste the entries from the faction that you want to avoid any typos.
51.The Freelancer Character Editor can be good for seeing visually the appearance of the costumes.
52.In order to change the base appearance, you need to edit the entries in mbases.
53.The next step is to get the custom faction's name to appear when offering missions.
54.In Initialworld, the ids_name is linked to entries in offerbribesresources.dll
55.It is thankfully pretty simple (once Chips showed us how),
The ids name + the magic number 131834 = the first entry. This can be shown with Liberty navy:
nickname = li_n_grp
ids_name = 196846 + 131834 = 328680
In offerbribesresources, there are entries for Liberty Navy at:
328680 - Liberty Navy
328780 - the Liberty Navy
328880 - Liberty Navy
328980 - The Liberty Navy
Notice its entries go up in blocks of 100? Thats all you need to do, keep to the same format and the text will show up ok. The ids_name has to be within a set area of names_resources for it to work, so make sure it is just after the existing entries.
In order to make space for yourself, you can move the ids_short_name for the original factions to a custom dll and use their places for new factions instead.

Well, that should be enough to keep you busy for a while, feel free to post up if you get stuck or need any more help.
(Edit)
Just realised that i have missed out a file to edit. In equipment/commodities_per_faction.ini it sets which npc trade encounter carries what. You should add your custom faction to here using the most similar faction as a template.

Edited by - Mace_166 on 10/16/2006 5:08:11 AM

Post Mon Oct 16, 2006 9:39 pm

Yea but newplayer.fl is all encrypted/encoded for me. I don't know how to un-encrypt/decode it.

Please tell me. And great tutorial.

Click Here to visit my FL website. It contains mod's, downloads and more. Check it out (The website is getting updated) .

Post Mon Oct 16, 2006 10:21 pm



23.Open up Newplayer (with the saved game editor) add the entry , then save and close.


I know it is a bit of a read. the saved game editor can read .fl files so you just open it up and add the entry like with mpnewcharacter.fl

Post Mon Oct 16, 2006 11:57 pm

Yea i have that program and i decode the .fl files but i can never encode them again. I can still understand it after i have encoded it again. Do you know why?

Click Here to visit my FL website. It contains mod's, downloads and more. Check it out (The website is getting updated) .

Post Tue Oct 17, 2006 5:12 am

You don't need to encode them again

Post Tue Oct 17, 2006 6:05 am

Oh, no you just use the program to open the file, make the changes and then save. You don't have to do anything else.

Post Tue Oct 17, 2006 6:43 am

Mace, You are a helpingpeopleinmodding device (lol).
No,really,when I read some topic and see your reply there then I can tell for sure without reading it that it's the answer.

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.

Post Tue Oct 17, 2006 7:48 am

Great Job Mace thanks to you another mod maker can continue, again great job.

"It doesn’t matter what universe you’re from. That’s got to hurt!"

Post Tue Oct 17, 2006 9:31 pm

oh ok. so you don't need to encode them again. thanks.

Click Here to visit my FL website. It contains mod's, downloads and more. Check it out (The website is getting updated) .

Return to Freelancer General Editing Forum