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

How does the game know that "li_n_dreadnought_d25"

The general place to discuss MOD''ing Freelancer!

Post Tue Apr 01, 2003 2:54 pm

How does the game know that "li_n_dreadnought_d25"

How does the game know that "li_n_dreadnought_d25" belongs to "li_n_grp"?

When a zone encounter has decided which faction of ships it'll spawn in from a given ShipClass, how does it know which ships belong to the faction?

Whoa. That was a mouthful. Let me provide an example from my own INI's for clarity. Let us follow the breadcrumb trail to insanity...

---8<---

I've defined this Liberty Navy encounter in LI01's Manhattan zone:

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>encounter = area_battleship, 19, 1.000000
faction = li_n_grp, 1.00000 </font> </font> </font></pre>

LI01 also has the following EncounterParameters set:

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>[EncounterParameters
nickname = area_battleship
filename = missions\encounters\area_battleship.ini </font> </font> </font></pre>

area_battleship.ini requests a ship to be spawned of class "sc_battleships":

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>ship_by_class = 1, 1, sc_battleships </font> </font> </font></pre>

shipclasses.ini defines the sc_battleships class to be "class_battleship":

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>[ShipClass
nickname = sc_battleships
member = class_battleship </font> </font> </font></pre>

---8<---

To summarize so far, my encounter is asking for a ship to be spawned for the Liberty Navy with a class of "class_battleship". Now here's the interesting part - I have four ships defined in npcships.ini with that class. Here are two:

<pre><font size=1 face=Courier><font size=1 face=Courier><font size=1 face=Courier>[NPCShipArch
nickname = li_n_dreadnought_d25
loadout = li_n_li_dreadnought
level = d19
ship_archetype = li_dreadnought
pilot = cruiser_default
state_graph = CRUISER
npc_class = lawful, class_battleship, d19

[NPCShipArch
nickname = rh_n_battleship_d25
loadout = rh_battleship
level = d19
ship_archetype = rh_battleship
pilot = cruiser_default
state_graph = CRUISER
npc_class = lawful, class_battleship, d19 </font> </font> </font></pre>

As expected, the "li_n_dreadnought_d25" spawns. If I change the zone's encounter faction to "rh_n_grp", then the "rh_n_battleship_d25" will spawn. This is all fine and dandy, but what if I want to allow the Liberty Rogues to pilot a battleship?

How does the game know that "li_n_dreadnought_d25" belongs to "li_n_grp"?

Edited by - Thundercleese on 01-04-2003 15:55:30

Edited by - Thundercleese on 01-04-2003 16:34:10

Post Tue Apr 01, 2003 2:57 pm

I'll give you one hint: faction_prop.ini

Post Tue Apr 01, 2003 2:57 pm

If this forum script was written in Perl, I'd offer to fix it.

Post Tue Apr 01, 2003 2:59 pm

ARGH!!1@!#

I even had that file open! I was editting formation aliases in there.

Thank you!

Regards,
Chris

Post Tue Apr 01, 2003 3:07 pm

Anytime!

BTW, since you're working on random encounters that include capital ships... if you experience any crashes, let me know.

Post Tue Apr 01, 2003 3:33 pm

Haha I read all about your trials and tribulations, Nephilim. The two tutorials I found were both missing things, and I had to figure out half of it through trial-and-error. Your scrutiny of one of the threads really helped me along. I was thinking about writing a better tutorial... Maybe later

Yes, after much fiddling, it's nice to see a battleship, escorted by cruisers and fighters, roaming freely above Manhattan.

Unfortunately, I only seem to be able to get the group set on "wander", and the battleship keeps gently nudging the planet and then plunging one of its cruisers into Manhattan's unwitting populace. I think I'm going to have to add capitol ship encounters to patrol paths instead.

Post Tue Apr 01, 2003 10:16 pm

If you have it running, could you send it to me? I'll try to make it FLMM compatible. So everyone will be able to enjoy it. ;-)

Post Wed Apr 02, 2003 7:06 pm

I could post a 200k Zip file which includes all the changes I've made so far, if you're interested? If you install it, you'll see a Rheinland cruiser and its escorts as the only zone encounter above Planet Manhattan.

I don't really feel like releasing a million tiny mods, but if anyone's interested, I could write a tutorial on how to do this (properly).

Post Wed Apr 02, 2003 10:39 pm

Thunder, a lot of your writing inspired me... but I can't seem to get this to work, any thoughts PLEASE? B4 I loose all my hair? B4 I crash my server AGAIN <sigh> Please take a moment and help if you can, I'm really quite curious about this whole thing....

Checklist
DATA\UNIVERSE\SYSTEMS\li01\li01.ini
data\missions\encounters\msensei_area_battleships.ini
data\missions\shipsclasses.ini
data/missions/faction_prop.ini
data\missions\npcships.ini (no change)
DATA\SHIPS\loadouts_special.ini (nochange)
data/missions/formations.ini

DATA\UNIVERSE\SYSTEMS\li01\li01.ini
[EncounterParameters
nickname = msensei_encounter_parameter
filename = missions\encounters\msensei_area_battleships.ini
[zone
;append here: nickname = Zone_Li01_001_Planet_Li01_01
encounter = msensei_encounter_parameter, 19, 1.000000
faction = li_n_grp, 1.00000

data\missions\encounters\msensei_area_battleships.ini
[EncounterFormation
ship_by_class = 3, 1, msensei_ship_class
pilot_job = scout_leader_job
make_class = wanderer
formation_by_class = msensei_formation_class
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = no
zone_creation_distance = 0
times_to_create = infinite
[Creation
permutation = 0, 3

data\missions\shipsclasses.ini
[ShipClass
nickname = msensei_ship_class
member = class_battleship

[ShipClass
nickname = msensei_formation_class
member = class_battleship


data/missions/faction_prop.ini
[FactionProps
affiliation = li_n_grp
npc_ship = li_n_dreadnought_d25
formation = msensei_ship_class, msensei_formation_1

data/missions/formations.ini
[Formation
nickname = msensei_formation_1
pos = 0, 0, 0
pos = 350, -60, 300
pos = -350, -60, 300
pos = 0, 180, -60
pos = 300, 0, -350
pos = -300, 0, -350
pos = 400, 240, 0
pos = -400, 240, 0
pos = 0, 0, 1400
pl_pos = 300, 350, 275





-----
MSensei
Please visit my freelancer server. http://www.msensei.com/freelancer/

Post Wed Apr 02, 2003 10:58 pm

Alrighty... some bugs that you have to squash, in no particular order:

---

shipsclasses.ini ==>> rename this file to shipclasses.ini

---

Remove the following section from shipclasses.ini in its entirety:

[ShipClass
nickname = msensei_formation_class
member = class_battleship

---

formation = msensei_ship_class, msensei_formation_1 ==>> replace "msensei_ship_class" with "msensei_formation_class"

---

Finally, open npcships.ini and search for the line "li_n_dreadnought_d25". Scroll down a bit to "npc_class = lawful, battleship, d25", then change "battleship" to "class_battleship", OR (alternative fix) open shipclasses.ini and change "member = class_battleship" to "member = battleship" in your msensei_ship_class.

Edited by - Nephilim on 03-04-2003 01:04:19

Post Wed Apr 02, 2003 11:43 pm

Nephilim's right. Your formation class should not be defined as a ShipClass, and your faction formation info needs to include the formation class.

Here are some other things to try:

Zone_Li01_001_Planet_Li01_01:
set "toughness = 25" or so
comment out all other encounters (and their faction chances)

npcships.ini:
make sure you have a ship with a class of msensei_ship_class
also, make sure its "level" is <= d19
see below for example ship:

[NPCShipArch
nickname = li_n_dreadnought_d25
loadout = li_n_li_dreadnought
level = d19
ship_archetype = li_dreadnought
pilot = cruiser_default
state_graph = CRUISER
npc_class = lawful, msensei_ship_class, d19

Post Thu Apr 03, 2003 12:58 am

Still doesn't work... i was really confused by some of your notes, i'm sorry.
This is the latest update, still fully does not work. U guys are SO AWSOME for helping me, I have every confidence that this will work. I'm trying to understand the wholeness of this process so that I can do it over and over again in every system. Thank you so much for your help.

Checklist
DATA\UNIVERSE\SYSTEMS\li01\li01.ini
data\missions\encounters\msensei_area_battleships.ini
data\missions\shipclasses.ini
data/missions/faction_prop.ini
data\missions\npcships.ini
DATA\SHIPS\loadouts_special.ini (nochange)
data/missions/formations.ini

DATA\UNIVERSE\SYSTEMS\li01\li01.ini
[EncounterParameters
nickname = msensei_encounter_parameter
filename = missions\encounters\msensei_area_battleships.ini
[zone
;This zone: nickname = Zone_Li01_001_Planet_Li01_01
;append
encounter = msensei_encounter_parameter, 19, 1.000000
faction = li_n_grp, 1.00000
;mod
toughness = 25


data\missions\encounters\msensei_area_battleships.ini
[EncounterFormation
ship_by_class = 3, 1, msensei_ship_class
pilot_job = scout_leader_job
make_class = wanderer
formation_by_class = msensei_formation_1
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = no
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3

data\missions\shipclasses.ini
[ShipClass
nickname = msensei_ship_class
member = class_battleship

data/missions/faction_prop.ini
[FactionProps
affiliation = li_n_grp
npc_ship = li_n_dreadnought_d25
formation = msensei_ship_class, msensei_formation_1

data/missions/formations.ini
[Formation
nickname = msensei_formation_1
pos = 0, 0, 0
pos = 350, -60, 300
pos = -350, -60, 300
pos = 0, 180, -60
pos = 300, 0, -350
pos = -300, 0, -350
pos = 400, 240, 0
pos = -400, 240, 0
pos = 0, 0, 1400
pl_pos = 300, 350, 275

data/missions/npcships.ini
[NPCShipArch
nickname = li_n_dreadnought_d25
loadout = li_n_li_dreadnought
level = d19
ship_archetype = li_dreadnought
pilot = cruiser_default
state_graph = CRUISER
npc_class = lawful, msensei_ship_class, d19


-----
MSensei
Please visit my freelancer server. http://www.msensei.com/freelancer/

Post Thu Apr 03, 2003 10:43 am

Well, you've plugged a few holes... but introduced new ones in the process

-Edit data\missions\encounters\msensei_area_battleships.ini so that
"formation_by_class = msensei_formation_1" reads
"formation_by_class = msensei_formation_class"

-Edit data\missions\faction_prop.ini so that
"formation = msensei_ship_class, msensei_formation_1" reads
"formation = msensei_formation_class, msensei_formation_1"

-Edit data\missions\npcships.ini so that
"npc_class = lawful, msensei_ship_class, d19" reads
"npc_class = lawful, class_battleship, d19"

That's all there is to it.

Post Fri Apr 04, 2003 2:57 am

THANK YOU ALL SO VERY VERY MUCH
I think this will make you laugh. THANK YOU ALL SO MUCH

Checklist
data\universe\systems\li01\li01.ini
data\missions\encounters\msensei_area_battleships.ini
data\missions\shipclasses.ini
data/missions/faction_prop.ini
data\missions\npcships.ini (no change)
data\ships\loadouts_special.ini (no change)
data/missions/formations.ini
DATA\UNIVERSE\SYSTEMS\li01\li01.ini
[EncounterParameters
nickname = msensei_encounter_parameter
filename = missions\encounters\msensei_encounter_formation.ini
[zone
;This zone: nickname = Zone_Li01_001_Planet_Li01_01
;append
encounter = msensei_encounter_parameter, 19, 1.000000
faction = li_n_grp, 1.00000
;mod
toughness = 25


data\missions\encounters\msensei_encounter_formation.ini
[EncounterFormation
ship_by_class = 2, 1, msensei_ship_class
pilot_job = scout_leader_job
make_class = wanderer
ship_by_class = 3, 1, msensei_fighter_class
pilot_job = defend_job
make_class = wanderer
formation_by_class = msensei_formation_class
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = no
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3

data\missions\shipclasses.ini
[ShipClass
nickname = msensei_ship_class
member = class_battleship

[ShipClass
nickname = msensei_fighter_class
member = FIGHTER

data/missions/faction_prop.ini
[FactionProps
affiliation = li_n_grp
npc_ship = li_n_dreadnought_d25
npc_ship = msensei_fighter_NPCShipArch
formation = msensei_formation_class, msensei_formation_1

data/missions/formations.ini
[Formation
nickname = msensei_formation_1
pos = 0, 0, 0
pos = 350, -60, 300
pos = -350, -60, 300
pos = 0, 180, -60
pos = 300, 0, -350
pos = -300, 0, -350
pos = 400, 240, 0
pos = -400, 240, 0
pos = 0, 0, 1400
pl_pos = 300, 350, 275

data/missions/npcships.ini
[NPCShipArch
nickname = li_n_dreadnought_d25
loadout = li_n_li_dreadnought
level = d19
ship_archetype = li_dreadnought
pilot = cruiser_default
state_graph = CRUISER
npc_class = lawful, class_battleship, d19


[NPCShipArch
nickname = msensei_fighter_NPCShipArch
loadout = no_fighter_loadout02
level = d19
ship_archetype = no_fighter
pilot = MSN13_Nomad_Fighter
state_graph = FIGHTER
npc_class = lawful, FIGHTER, d13, d14, d15, d16, d17, d18, d19


-----
MSensei
Please visit my freelancer server. http://www.msensei.com/freelancer/

Return to Freelancer General Editing Forum