Another question: Bugged patrol?
-
[Zone] nickname = Zone_SH01_path_libertynavy01 pos = 2145, 0, 47685 rotate = 90, -74, 180 shape = CYLINDER size = 750, 27259 sort = 99 toughness = 0 density = 5 repop_time = 30 max_battle_size = 6 pop_type = lane_patrol relief_time = 20 path_label = libertynavy_01, 1 usage = patrol mission_eligible = false faction_weight = li_n_grp, 10 density_restriction = 1, patroller density_restriction = 1, police_patroller density_restriction = 1, pirate_patroller density_restriction = 4, lawfuls density_restriction = 4, unlawfuls encounter = patrolp_gov_patrol, 0, 0.500000 faction = li_n_grp, 1.000000
This doesnt work…the game accepts the code, but when I move into the spawn area, i Crash to desktop…what have I done wrong?
EDIT: SH is my system prefix (one SH system per house)…That couldn’t be causing the problem could it?
EDIT AGAIN: When I land on “Planet Serenity”…it says it’s called “Planet Serenity Docking Ring, Safe Haven System”. Why is this?
(again: sorry for all the questions, this is my first time in about 3 years modding)
-
You might find this useful, http://the-starport.net/freelancer/forum/viewtopic.php?topic_id=2560&forum=7
It’s not as simple as you think…
-
It’s not as simple as you think…
When is it ever…I’ll take a look, thanks
-
I dont get that at all.
-
If it is a patrol path, then it must be leading to and from a base (can be through a jumphole too, I believe) that the faction you’re spawning is able to dock on - in other words, the mBases.ini entry for the base MUST have the faction listed under its BaseFaction weights with a weight of at least 1. For example,
[MBase] nickname = Li01_01_Base ... ;Whatever code is here [BaseFaction] faction = li_n_grp weight = 1 ;Must be 1 or above ```Without this, li_n_grp will be unable to dock at the base, and the patrol path they spawn into will crash when you are near it. Hope this helps. Edit: Also, BaseFactions can be declared more than once in a base. So, as a lazy hack, 88 Flak has the following code at the top of every base:
[BaseFaction]
faction = li_lsf_grp
weight = 1
[BaseFaction]
faction = li_n_grp
weight = 1
… ;All the way down the factions through
[BaseFaction]
faction = gd_z_grp
weight = 1
[BaseFaction]
faction = gd_bh_grp
weight = 1 -
I notice your
encounter = patrolp_gov_patrol, 0, 0.500000
is calling an encounter with NPC rank (i.e. difficulty, or skill level) of 0 !!
It (NPCs of difficulty 0) does not exist, ranks are 1-19 for fighters.
These ranks (difficulties) are the dx numbers defined in the file DATA\MISSIONS\npcships.ini
Change it to:
encounter = patrolp_gov_patrol, 1, 0.500000So it should become:
encounter = patrolp_gov_patrol, 1, 0.500000
faction = li_n_grp, 1.000000Here’s more explanation in my usual style…!!
What it means:
The encounter patrolp_gov_patrol will be generated.
This is defined in the file defined in the [EncounterParameters] entry at the top of the same system ini file:-
[EncounterParameters]
nickname = patrolp_gov_patrol
filename = missions\encounters\patrolp_gov_patrol.iniThe file missions\encounters\patrolp_gov_patrol.ini contains the ship, wing size and type, pilot ranks, behaviour, and formation definition:-
**[EncounterFormation]
ship_by_class = 1, 1, sc_fighters
pilot_job = patrol_leader_job
make_class = class_police_patroller
ship_by_class = 2, 2, sc_fighters, -1
pilot_job = patrol_job
formation_by_class = fighters
behavior = patrol_path
arrival = cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite[EncounterFormation]
ship_by_class = 1, 1, sc_fighters
pilot_job = patrol_leader_job
make_class = class_police_patroller
ship_by_class = 2, 2, sc_fighters, -1
pilot_job = patrol_job
formation_by_class = fighters
behavior = patrol_path
arrival = cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite[Creation]
permutation = 0, 3**Hmm… See that? Very Interesting!! The encounter formation is repeated, but only the first one is called (permutation 0)! This is an error, I fixed it in my mod by deleting the second one.
OK here’s what this enounter does:
It generates 1 ship of rank d1 (which will actually be a Rank 3 pilot as we will see below) as the patrol leader, and give him 2 wingmen who will be of the leader’s rank minus 1, i.e they will be Rank 2. They will behave as defined in the pilot_job definitions patrol_leader_job and patrol_job - these are in the file DATA\MISSIONS\pilots_population.ini and I won’t list those here, too big.
From the permutation, the first [EncounterFormation] entry (encounter 0) has a 1 in 3 chance of happening in the time frame allocated for it in the zone’s repop_time value seconds), generating 3 NPCs - a leader of Rank (difficulty) of d3 and 2 wingmen of rank d2, with 0.5 chance (50% chance) of it occurring each time it is called for in this zone. The wing generation can be repeated until the zone’s density = 5 value is exceeded.
and the participating factions are:-
li_n_grp, with 1.0 share (i.e. 100% share) of the entire encounter faction capacity ( i.e. it will be them all the time, as there is only 1 faction declared).More info for those who don’t know:-:
The NPC ranks from DATA\MISSIONS\npcships.ini are compared with the ship types used by the faction for each defined rank, which are in turn defined in the file DATA\MISSIONS\faction_props.ini…
Here’s the ship part of the entry for the li_n_grp:-
[FactionProps]
affiliation = li_n_grp
legality = lawful
nickname_plurality = singular
msg_id_prefix = gcs_refer_faction_li_n
jump_preference = jumpgate
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_li_elite_d11-19
npc_ship = li_n_cruiser_d22
npc_ship = li_n_dreadnought_d25
…When FL is initialising it reads each of these and looks for it to exist in npcships.ini and loads the ship type, ship loadout, pilot rank (difficulty), pilot attributes, and behaviour. In this case for difficulty d1 it will use the definition below:-
[NPCShipArch]
nickname = li_n_li_elite_d1-3
loadout = li_n_li_elite_loadout01
level = d3
ship_archetype = li_elite
pilot = pilot_military_med
state_graph = FIGHTER
npc_class = lawful, class_fighter, d1, d2, d3Note the level = d3. This puts pilots of rank d3 in this ship. And remember our encounter asked for 2 wingmen with -1 experience than the leader. This npcship entry caters for that, but if the wing leader had been a rank d1 then d1-1 = 0 and the game would have probably crashed! In this case of this error above, d0-1 = -1! And that would also cause a crash.
Therefore as you can see from this, take care when you design your own dx levels for pilots, ships and loadouts!
So to continue… This is an encounter with li_elite ships (Defenders) in formation “fighters” (the formation layout is defined in DATA\MISSIONS\formations.ini) and consisting of one wing leader of rank (difficulty) d3, and two wingmen of rank d2, all equipped with loadouts li_n_li_elite_loadout01. This loadout is defined in DATA\SHIPS\loadouts.ini:-
[Loadout]
nickname = li_n_li_elite_loadout01
archetype = li_elite
equip = ge_le_engine_01
equip = npc_shield01_mark03, HpShield01
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_s_thruster_01, HpThruster01
equip = armor_scale_2
equip = li_gun01_mark03, HpWeapon01
equip = li_gun01_mark04, HpWeapon02
equip = li_gun01_mark04, HpWeapon03
equip = li_gun01_mark04, HpWeapon04
equip = li_turret02_mark01, HpTurret01
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallBlue, HpRunningLight01
equip = SlowSmallBlue, HpRunningLight02
equip = SlowSmallBlue, HpRunningLight03
equip = SlowSmallBlue, HpRunningLight04
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02So there you have the whole thing, and we found an error in the original patrolp_gov_patrol encounter in the process of probing too!
Got it?
One more but very minor thing - I am a stickler for standard naming, conventions are conventions after all…
So (I only propose to you) since you are using the Liberty Navy (li_n_grp) that I would prefer to see your patrol path name conform, i.e.
not:-
nickname = Zone_SH01_path_libertynavy01
but:-
nickname = Zone_Sh01_path_li_navy1_1because it allows for more than one “leg” to the same path, e.g. navy1_1, navy1_2, navy1_3 etc.
and also,
not:-
path_label = libertynavy_01, 1
but:-
path_label = li_navy1, 1But that’s just me, if it works for you then…!!
The path_label number is **path_label = (pathname), (leg number)[/b
e.g.
path_label = li_navy1, 1
path_label = li_navy1, 2
path_label = li_navy1, 3
etc.But also note that some path legs have two path_label numbers!…
e.g. in Li01:-
path_label = bounty1, 1, 12
path_label = bounty1, 2, 11
path_label = bounty1, 3, 10
path_label = bounty1, 4
path_label = bounty1, 5
path_label = bounty1, 6
path_label = bounty1, 7
path_label = bounty1, 8
path_label = bounty1, 9I’ve not researched it, and I don’t know, could this maybe be a directional number, for example bounty1_1 showing as leg 1 when travelling in one direction and as leg 12 when travelling in the opposite direction? The two other legs bounty1_2 and bounty1_3 support this but it’s only my theory. Anyone know for sure?
Lecture over! Hope you all learned something today!
ROFL**