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

Can New Factions Engage in NPC-Battles?

The general place to discuss MOD''ing Freelancer!

Post Wed Apr 07, 2004 9:02 am

That would explain why the Order doesn't attack Liberty Rouges like I set it up...
But then again, I deleted all save games and started anew - they still don't kill eachother...maby it's the lawfull/unlawfull thingy....

Post Wed Apr 07, 2004 9:04 am

I made new factions which work properly. In my testing mod, I added a new faction with a new base. They fly some ships around it. Some rogues and hackers come by to annoy them, and they always duke it out. It works both in openSP and on lan server (before I knew about open SP I used to use the lan server).

I've been considering for the last few days writing a program which will make faction adding / modifying much easier, since alot of people want to do it and because even if you know how to do it it's very tedious and the possibility for error is very high (since there are so many lines that need changing).

I know some c++ (to an extent, but I think enough to do this), but I just need to learn some windows libraries (I only did console linux programming before this) so I can make it pretty and GUI. I'll keep everyone posted on this, and will definitely be posting it in the utils section when it's done.

Post Wed Apr 07, 2004 9:17 am

@Chips:
i dont think its the number of factions.

we have ...hmmm... lemme think, ~10 new factions so far adn i included 15 additional ones for later use. these are set to completely hostile/friendly, who knows what the future brings. i can take one of those as teh reps are already set up when players make their chars. neutral starting new factions can be added the normal way when they are required. this way we save a lot of char-hacking when we need a new friendly/hostile faction.
just thought that this could be interesting for u guys who work on bigger server projects.

---------------------------------
Excelcia Mod Leading Developer

Post Wed Apr 07, 2004 9:25 am


the question is now: what have you done wrong?


LordFjord, we might also reverse that Question: What did you do right?

I use OpenSP, according to Nephilim that migth be the problem but according to Chantdeguerre it shouldn't be... What do you use?

I'm not asking you to write a tutorial, but if it's not too much trouble (and I can accept "indeed, that's way too mucn trouble" for an answer ) you descirbe, or copy-and-paste, the relevant entries for initialworld.ini. empathy.ini (and if you use OpenSP, m13.ini? O, and also the envounter itself of course.

Btw, I think that the msg_id_prefix has to do with the audio files ("This is Zoners", that kind of thing.)



I've been considering for the last few days writing a program which will make faction adding / modifying much easier


Wow, Chantdeguerre, that would be great! If you indeed do so, can you make it so, that it "aims" at yoor mod folder rather than the Freelancer folder? Or at least that it would worlk when the mod's activated.


Edited by - moonhead on 4/7/2004 10:33:33 AM

Post Wed Apr 07, 2004 9:34 am

INITIALWORLD.INI:


Here's the entry for my new faction:

[Group
nickname = cn_n_grp
ids_name = 458782
ids_info = 500001
ids_short_name = 458775
rep = 0.65, li_n_grp
rep = 0.65, li_lsf_grp
rep = 0.65, li_p_grp
rep = 0.65, br_n_grp
rep = 0.65, br_p_grp
rep = 0.65, ku_n_grp
rep = 0.65, ku_p_grp
rep = 0.65, rh_n_grp
rep = 0.65, rh_p_grp
rep = 0.65, co_alg_grp
rep = 0.65, co_be_grp
rep = 0.65, br_m_grp
rep = 0.65, co_nws_grp
rep = 0.65, co_hsp_grp
rep = 0.65, co_ic_grp
rep = 0.65, co_khc_grp
rep = 0.65, co_kt_grp
rep = 0, rh_m_grp
rep = 0.65, co_me_grp
rep = 0.65, co_ni_grp
rep = 0.65, co_os_grp
rep = 0.65, co_rs_grp
rep = 0.65, co_shi_grp
rep = 0.65, co_ss_grp
rep = 0.65, co_ti_grp
rep = 0.65, co_vr_grp
rep = 0, fc_bd_grp
rep = 0, fc_b_grp
rep = -0.65, fc_c_grp
rep = 0, fc_fa_grp
rep = 0, fc_g_grp
rep = 0, fc_gc_grp
rep = 0, fc_h_grp
rep = 0, fc_j_grp
rep = -0.65, fc_lh_grp
rep = -0.65, fc_lr_grp
rep = 0, fc_lwb_grp
rep = 0, fc_m_grp
rep = -0.65, fc_ou_grp
rep = 0, fc_rh_grp
rep = 0, fc_or_grp
rep = -0.65, fc_u_grp
rep = -0.65, fc_x_grp
rep = 0, gd_gm_grp
rep = 0, fc_uk_grp
rep = 0, fc_n_grp
rep = 0, fc_ln_grp
rep = 0, fc_kn_grp
rep = 0, fc_rn_grp
rep = 0, fc_ouk_grp
rep = 0, fc_q_grp
rep = 0, fc_f_grp
rep = 0, gd_im_grp
rep = 0, gd_z_grp
rep = 0, gd_bh_grp
rep = 0.91, cn_n_grp


Here's the entry for another faction (bounty hunters):

[Group
nickname = gd_bh_grp
ids_name = 196894
ids_info = 66175
ids_short_name = 196942
rep = 0, li_n_grp
rep = 0, li_lsf_grp
rep = 0, li_p_grp
rep = 0, br_n_grp
rep = 0, br_p_grp
rep = 0, ku_n_grp
rep = 0, ku_p_grp
rep = 0, rh_n_grp
rep = 0, rh_p_grp
rep = 0, co_alg_grp
rep = 0, co_be_grp
rep = 0, br_m_grp
rep = 0, co_nws_grp
rep = 0, co_hsp_grp
rep = 0, co_ic_grp
rep = 0, co_khc_grp
rep = 0, co_kt_grp
rep = 0, rh_m_grp
rep = 0, co_me_grp
rep = 0, co_ni_grp
rep = 0, co_os_grp
rep = 0, co_rs_grp
rep = 0, co_shi_grp
rep = 0, co_ss_grp
rep = 0, co_ti_grp
rep = 0, co_vr_grp
rep = -0.65, fc_bd_grp
rep = -0.65, fc_b_grp
rep = -0.65, fc_c_grp
rep = -0.3, fc_fa_grp
rep = -0.65, fc_g_grp
rep = -0.65, fc_gc_grp
rep = -0.3, fc_h_grp
rep = -0.3, fc_j_grp
rep = -0.65, fc_lh_grp
rep = -0.65, fc_lr_grp
rep = -0.65, fc_lwb_grp
rep = -0.65, fc_m_grp
rep = -0.65, fc_ou_grp
rep = -0.65, fc_rh_grp
rep = 0, fc_or_grp
rep = -0.65, fc_u_grp
rep = -0.65, fc_x_grp
rep = 0, gd_gm_grp
rep = 0, fc_uk_grp
rep = -0.65, fc_n_grp
rep = 0, fc_ln_grp
rep = 0, fc_kn_grp
rep = 0, fc_rn_grp
rep = 0, fc_ouk_grp
rep = 0, fc_q_grp
rep = 0, fc_f_grp
rep = 0, gd_im_grp
rep = 0, gd_z_grp
rep = 0.91, gd_bh_grp
rep = 0, cn_n_grp

notice that cn_n_grp has gd_bh_grp as zero and vice versa? I'm fairly certain these two numbers need to match. And you need to add an entry for your new faction to each old one.

EMPATHY.INI:

My faction:

[RepChangeEffects
group = cn_n_grp
event = object_destruction, -0.080000
event = random_mission_success, 0.100000
event = random_mission_failure, -0.045000
event = random_mission_abortion, -0.067500
empathy_rate = li_lsf_grp, 0.400000
empathy_rate = li_n_grp, 0.500000
empathy_rate = li_p_grp, 0.350000
empathy_rate = br_n_grp, 0
empathy_rate = br_p_grp, 0
empathy_rate = ku_n_grp, 0
empathy_rate = ku_p_grp, 0
empathy_rate = rh_n_grp, 0
empathy_rate = rh_p_grp, 0
empathy_rate = co_shi_grp, 0
empathy_rate = co_khc_grp, 0
empathy_rate = co_kt_grp, 0
empathy_rate = br_m_grp, 0
empathy_rate = co_me_grp, 0
empathy_rate = co_be_grp, 0
empathy_rate = co_rs_grp, 0
empathy_rate = co_vr_grp, 0
empathy_rate = co_ni_grp, 0
empathy_rate = rh_m_grp, 0
empathy_rate = co_ti_grp, 0
empathy_rate = co_ic_grp, 0
empathy_rate = co_ss_grp, 0
empathy_rate = co_hsp_grp, 0
empathy_rate = co_alg_grp, 0
empathy_rate = co_os_grp, 0
empathy_rate = co_nws_grp, 0
empathy_rate = fc_c_grp, -0.500000
empathy_rate = fc_ou_grp, -0.500000
empathy_rate = fc_rh_grp, 0
empathy_rate = fc_bd_grp, 0
empathy_rate = fc_j_grp, 0
empathy_rate = fc_h_grp, 0
empathy_rate = fc_m_grp, 0
empathy_rate = fc_x_grp, -0.500000
empathy_rate = fc_b_grp, 0
empathy_rate = fc_g_grp, 0
empathy_rate = fc_lh_grp, -0.500000
empathy_rate = fc_u_grp, 0
empathy_rate = fc_gc_grp, 0
empathy_rate = fc_lwb_grp, 0
empathy_rate = fc_fa_grp, 0
empathy_rate = fc_lr_grp, -0.500000
empathy_rate = fc_or_grp, 0
empathy_rate = gd_gm_grp, 0
empathy_rate = fc_uk_grp, 0
empathy_rate = fc_n_grp, 0
empathy_rate = fc_ln_grp, 0
empathy_rate = fc_kn_grp, 0
empathy_rate = fc_rn_grp, 0
empathy_rate = fc_ouk_grp, 0
empathy_rate = fc_q_grp, 0
empathy_rate = fc_f_grp, 0
empathy_rate = gd_im_grp, 0
empathy_rate = gd_z_grp, 0
empathy_rate = gd_bh_grp, 0.050000

Liberty Police:

[RepChangeEffects
group = li_p_grp
event = object_destruction, -0.030000
event = random_mission_success, 0.089600
event = random_mission_failure, -0.045000
event = random_mission_abortion, -0.067500
empathy_rate = li_n_grp, 0.350000
empathy_rate = li_lsf_grp, 0.400000
empathy_rate = br_n_grp, 0
empathy_rate = br_p_grp, 0
empathy_rate = ku_n_grp, 0
empathy_rate = ku_p_grp, 0
empathy_rate = rh_n_grp, 0
empathy_rate = rh_p_grp, 0
empathy_rate = co_shi_grp, 0.050000
empathy_rate = co_khc_grp, 0
empathy_rate = co_kt_grp, 0.050000
empathy_rate = br_m_grp, 0
empathy_rate = co_me_grp, 0.250000
empathy_rate = co_be_grp, 0.050000
empathy_rate = co_rs_grp, 0.050000
empathy_rate = co_vr_grp, 0.250000
empathy_rate = co_ni_grp, 0.250000
empathy_rate = rh_m_grp, 0
empathy_rate = co_ti_grp, 0.050000
empathy_rate = co_ic_grp, 0.250000
empathy_rate = co_ss_grp, 0.250000
empathy_rate = co_hsp_grp, 0.250000
empathy_rate = co_alg_grp, 0.050000
empathy_rate = co_os_grp, 0.250000
empathy_rate = co_nws_grp, 0.050000
empathy_rate = fc_c_grp, 0
empathy_rate = fc_ou_grp, -0.400000
empathy_rate = fc_rh_grp, 0
empathy_rate = fc_bd_grp, 0
empathy_rate = fc_j_grp, -0.100000
empathy_rate = fc_h_grp, 0
empathy_rate = fc_m_grp, 0
empathy_rate = fc_x_grp, -0.450000
empathy_rate = fc_b_grp, 0
empathy_rate = fc_g_grp, 0
empathy_rate = fc_lh_grp, -0.350000
empathy_rate = fc_u_grp, 0
empathy_rate = fc_gc_grp, 0
empathy_rate = fc_lwb_grp, 0
empathy_rate = fc_fa_grp, 0
empathy_rate = fc_lr_grp, -0.250000
empathy_rate = fc_or_grp, 0
empathy_rate = gd_gm_grp, 0
empathy_rate = fc_uk_grp, 0
empathy_rate = fc_n_grp, 0
empathy_rate = fc_ln_grp, 0
empathy_rate = fc_kn_grp, 0
empathy_rate = fc_rn_grp, 0
empathy_rate = fc_ouk_grp, 0
empathy_rate = fc_q_grp, 0
empathy_rate = fc_f_grp, 0
empathy_rate = gd_im_grp, 0
empathy_rate = gd_z_grp, 0
empathy_rate = gd_bh_grp, 0.050000
empathy_rate = cn_n_grp, 0.350000

Again, I went through and made sure that all the numbers matched with all the groups, and that I added "empathy_rate = cn_n_grp, x" (x = the corresponding number in cn_n_grp's listing) to all the existing factions.

(the closing square bracket doesn't show up on this forum, but it has to be there in the ini file. you probably knew that, but just for safety's sake I'm mentioning it).


The program: Ever used FL-EX? It saves to a new mod directory in your FLMM folder. I like that, I don't like the idea of messing with the actual freelancer files, cause I'm lazy and I hate reinstalling things when it's not nessesary. I'm wondering if it should just save to a FLMM script (probably easier for output) or to a new .ini file (more flexible in the end). I want it to be able to add new factions and add their entry to the existing factions, or modify existing factions loyaltie's towards each other (make it able to do both of course). I don't think I will be quite able to handle IDS stuff at this point, (obviously I can make the program write an IDS number into the Ini file for the new factions), but I don't know how I would go about writing a new .dll or modifying an existing one.

Edited by - chantdeguerre on 4/7/2004 10:48:40 AM

Post Wed Apr 07, 2004 9:46 am

LordFjord, Chantdeguerre, and any of you who "managed it": Do you use a custom dll-flie for the faction's name, or did you use some empty entries in the existing dlls (nameresources, infocards e.d.) ?

I use a custom dll. Dont think that will cause the problem, but one never knows.


Edited by - moonhead on 4/7/2004 10:46:22 AM

Post Wed Apr 07, 2004 9:50 am

yep, used 1 custom dll to hold every name and infocard in my mod.

Post Wed Apr 07, 2004 9:54 am

Chantdeguerre,

Thanks for your data, I will look at it (and compare it to mine) right away!

Also good to hear you use a custom dll (if the people who don;t have this problem would have have used exiusting dlls, than I would have to try that too).

Post Wed Apr 07, 2004 10:06 am

you want the encounter code too? It's in a new system though, so if it looks weird...

but i just re-verified it IN game and it works. cn_n_grp's base and ships attack liberty rogues + lane hackers and vice versa. They do it regardless of whether I have joined the battle on one side or another. Those are the only three factions in that system. I had alot of problems with encounters because of loadouts, but you said your seeing the ships, so i guess it's not that. I wasn't seeing ANYTHING.

Post Wed Apr 07, 2004 10:23 am

Chantdeguerre,

Thanks for the Data! I agree the values should cross-correspond.

Unfortunately, your data does not significanly differ from mine. A gradual difference is,that both my lawful as unlawful factions are neutral to most other factions; they have only a few friends and a few foes. I don't think that would be a problem though.

Could you also post an example of an encounter? I don't think the error is in the encounter, because the factiosn do show up.

Here's mine (there used to be more factions, but I have deleted them to simplify the data), where nf_bat_grp is my new faction, with a -0.65 initialworld-rep for the Corsairs (and vice versa) :

[zone
nickname = zone_Bw02_pop_Brussels
pos = -91539, 0, -77473
shape = SPHERE
size = 5000
comment = Brussels
sort = 6
toughness = 10
density = 24
repop_time = 10
max_battle_size = 24
pop_type = nf_bat_grp, single_base_law
relief_time = 20
faction_weight = nf_bat_grp, 50
faction_weight = fc_c_grp, 50
encounter = area_defend, 13, 0.50000
faction = nf_bat_grp, 1.000000
encounter = area_assault, 13, 0.50000
faction = fc_c_grp, 1.000000

(Btw,I know about the closing bracket being erased from this forum; thans for mentioning it nevertheless.)


EDIT: I do indeed see the ships -the Batavian Marine uses a slightly modified Valkyrie, renamed Sea Gull - I can fight with those, and they do fight back (and effectively ended my test player's short existance.)

I am all doing this in my modified version of Omega=5 (Bw02.ini). I don't think that it matters, but I will set up more encounters in other systems.


Edited by - Moonhead on 4/7/2004 11:27:45 AM

Post Wed Apr 07, 2004 10:38 am

I couldn't see anything blatantly wrong with your encounter, and like you said, the ships show up. Something worth trying out, make a base belong to your new faction and put some corsairs around it. Does the base attack the corsairs and vice versa?

here's the encounter I used to test this:

[Zone
nickname = Zone_IW07_pop_ambient_01
pos = -15856, 0, -27840
rotate = 0, 0, 0
shape = SPHERE
size = 3699
sort = 51
toughness = 4
density = 3
repop_time = 25
max_battle_size = 4
pop_type = Background
relief_time = 35
population_additive = false
faction_weight = cn_n_grp, 20
faction_weight = fc_lr_grp, 7
faction_weight = fc_lh_grp, 4
encounter = area_defend, 4, 1.0
faction = cn_n_grp, 1.0
encounter = area_assault, 4, 1.0
faction = fc_lr_grp, 0.7
faction = fc_lh_grp, 0.3

I'm not positive as to how all these values are read by the game, cause my max battle size says four, but it's normal for the pirates to attack in groups of 3 or 4 and then the canadian navy (cn_n_grp) to also have 2, 4 or 5 ships in the area fighting the pirates. for fun you could try lowering some of those numbers (like the uber high faction weights and things like that) to see if it makes a difference. it's all about tweakage. if it REALLY still doesn't work, you can email me your empathy.ini and initialworld.ini at [email protected] ( remove the NOSPAM ). I'm pretty sure those files are responsible for this, because you wouldn't see the ships otherwise.

Post Wed Apr 07, 2004 10:45 am

I believe I did that experiment with the base some days ago, and it also didn't work. But I will try it again.


empathy.ini and initialworld.ini ... I'm pretty sure those files are responsible for this, because you wouldn't see the ships otherwise.


That's what i would expect too; I just don;t see the (possible very stupid and obvious) error. Or else the problem must be something more along what Nephilim suggested. But you say that you've done it OpenSP without problem, which would suggest OpenSp is not the problem.

I will mail you those files.

Post Wed Apr 07, 2004 11:02 am

one more thing worth considering... it still might be opensp..

what version of of FLMM are you using and what version of opensp?

I'm using FLMM 1.21 BETA 10

w/ opensp v1.1 by xerx

I also use the speed mod for faster cruising speed, which works fine.

Post Wed Apr 07, 2004 11:06 am

ChantdeGuerre, I mailed you the files. Please take your time (and if you decide that its actually boring and you don't want to look at it anymore, that;s okay too)

Anyway, the base thing you suggested didn''t wprk either. I think I will leave it for now, ams will look at it again within a few days (busy day tomorrow). I'm data-blind now.

I will also setup the server as Nephilim suggested, just for curiosity's sake. O, if I start up the server with the mod activated (with FLMM), will the mod also automatically run on the server? Or do I have to do something else?

In any case, thank you all for the support and letting me know that it can be done! 'll let you know when it's fixed.


EDIT: Chant, I also use FLMM 1.21 BETA 10 and OpenSP 1.1


Edited by - Moonhead on 4/7/2004 12:08:01 PM

Post Wed Apr 07, 2004 11:08 am

yeah the mod will work on the server like that, make sure you also start freelancer with flmm and the mod activated though.

Return to Freelancer General Editing Forum