Does Faction editor get it all right?
Anyway here's what you need to do:-
Faction ships are declared in data\missions\faction_prop.ini:-
<pre><font size=1 face=Courier>
[FactionProps
affiliation = rh_n_grp
legality = lawful
nickname_plurality = singular
msg_id_prefix = gcs_refer_faction_rh_n
jump_preference = jumpgate
npc_ship = rh_n_rh_elite_d1-11
npc_ship = rh_n_rh_elite_d12-19
...
formation = fighters, fighter_rh_n
...</font></pre>
NOTE: the line "formation = fighters, fighter_rh_n". When you want to set the formation in your encounter file, i.e. in area_defend.ini etc., you need to use "formation_by_class = fighters" and not "fighter_rh_n".
"npc_ship = rh_n_rh_elite_d1-11" and "npc_ship = rh_n_rh_elite_d12-19" point to entries in data\missions\npcships.ini, here is the D1-11 entry :-
<pre><font size=1 face=Courier>
[NPCShipArch
nickname = rh_n_rh_elite_d1-11
loadout = rh_n_rh_elite_loadout01
level = d11
ship_archetype = rh_elite <-- the rheinland Valkyrie
pilot = pilot_military_hard
state_graph = FIGHTER
npc_class = lawful, class_fighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11
</font></pre>
Now lets follow 3 things from this entry:
1. ... the "loadout = rh_n_rh_elite_loadout01" points to an entry in data\ships\loadouts.ini :-
<pre><font size=1 face=Courier>
[Loadout
nickname = rh_n_rh_elite_loadout01
archetype = rh_elite <-- Valkyrie
equip = ge_re_engine_01
equip = npc_shield01_mark06, HpShield01
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_s_thruster_01, HpThruster01
equip = armor_scale_1
equip = rh_gun01_mark01, HpWeapon01
equip = rh_gun01_mark01, HpWeapon02
equip = rh_gun01_mark01, HpWeapon03
equip = rh_gun01_mark01, HpWeapon04
equip = rh_gun01_mark01, HpWeapon05
equip = rh_turret01_mark01, HpTurret01
equip = cruise_disruptor01_mark01, HpTorpedo01
cargo = cruise_disruptor01_mark01_ammo, 5
equip = mine01_mark01, HpMine01
cargo = mine01_mark01_ammo, 5
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 4
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallYellow, HpRunningLight01
equip = SlowSmallYellow, HpRunningLight02
equip = SlowSmallYellow, HpRunningLight03
equip = SlowSmallYellow, HpRunningLight04
equip = SlowSmallYellow, HpRunningLight05
equip = SlowSmallYellow, HpRunningLight06
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
</font></pre>
2. ... the "pilot = pilot_military_hard" leads us into pilots_population.ini :-
<pre><font size=1 face=Courier>
[Pilot
nickname = pilot_military_easy
gun_id = gun_military_easy_style_a
missile_id = missile_fighter_easy_style_a
evade_dodge_id = evade_dodge_fighter_horiz_easy
evade_break_id = evade_break_fighter_style_a
buzz_head_toward_id = buzz_head_toward_fighter_horiz
buzz_pass_by_id = buzz_pass_by_fighter_style_a
trail_id = trail_fighter_style_a
strafe_id = strafe_fighter_style_a
engine_kill_id = engine_kill_fighter_style_a
mine_id = mine_light_fighter_a
countermeasure_id = countermeasure_handicap_3
damage_reaction_id = damage_reaction_fighter_style_a
missile_reaction_id = missile_reaction_fighter_style_a
formation_id = formation_stay
repair_id = repair_fighter_never
job_id = basic_job_formation
[Pilot
nickname = pilot_military_med
inherit = pilot_military_easy
gun_id = gun_military_med_style_a
evade_dodge_id = evade_dodge_fighter_horiz_med
[Pilot
nickname = pilot_military_hard <-- this is he one we're looking for
inherit = pilot_military_med
gun_id = gun_military_hard_style_a
evade_dodge_id = evade_dodge_fighter_horiz_hard
[Pilot
nickname = pilot_military_ace
inherit = pilot_military_hard
gun_id = gun_military_ace_style_a
evade_dodge_id = evade_dodge_fighter_horiz_ace
</font></pre>
We see how the pilot will behave in combat, the medium pilot uses all the skill of the easy pilot plus his own, and the hard pilot uses all the skill of the medium pilot plus his own. The ace pilot uses the skill of the hard pilot plus his own.
3. ... and the "npc_class = lawful, class_fighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11" line in the npcships.ini entry lists all the classes (groups if you like) that this specific ship and loadout belongs to in data\missions\shipclasses.ini, I've picked out only the ones we need to see:-
<pre><font size=1 face=Courier>
[ShipClass
nickname = lawfuls
member = lawful
[ShipClass
nickname = sc_fighters
member = class_fighter
[ShipClass
nickname = diff1
member = d1
[ShipClass
nickname = diff2
member = d2
[ShipClass
nickname = diff3
member = d3
[ShipClass
nickname = diff4
member = d4
[ShipClass
nickname = diff5
member = d5
[ShipClass
nickname = diff6
member = d6
[ShipClass
nickname = diff7
member = d7
[ShipClass
nickname = diff8
member = d8
[ShipClass
nickname = diff9
member = d9
[ShipClass
nickname = diff10
member = d10
[ShipClass
nickname = diff11
member = d11
</font></pre>
Now - in the system where you want to see this faction with this ship, you need to declare an "EncounterParameter" at the top of that system's .ini file:-
Since it's the Rheinland Navy here, let's see data\universe\systems\rh01\rh01.ini :-
<pre><font size=1 face=Courier>
[EncounterParameters
nickname = area_defend
filename = missions\encounters\area_defend.ini
</font></pre>
and in the same system .ini file we need a patrol zone where the encounter using these ships will occur:-
<pre><font size=1 face=Courier>
[zone
nickname = zone_rh01_pop_berlin
pos = 51766, 0, 7701
shape = SPHERE
size = 6000
comment = Berlin
sort = 9
toughness = 10
density = 12
repop_time = 10
max_battle_size = 8
pop_type = rh_p_grp, co_khc_grp, base_cluster_law
relief_time = 10
faction_weight = rh_n_grp, 6
...
density_restriction = 4, unlawfuls
encounter = area_defend, 10, 0.120000 <-- type, difficulty, %likelihood
faction = rh_n_grp, 0.220000
faction = rh_p_grp, 0.470000
faction = co_khc_grp, 0.310000
....
</font></pre>
Let's see data\missions\encounters\area_defend.ini :-
<pre><font size=1 face=Courier>
[EncounterFormation
ship_by_class = 1, 1, sc_fighters <-- one fighter
pilot_job = defend_leader_job <-- and he's the wing leader
make_class = wanderer
ship_by_class = 1, 2, sc_fighters, -1 <-- 1 or 2 wingmen, 1 skill lower than the leader
pilot_job = defend_job
make_class = wanderer
formation_by_class = fighters <-- which formation they will use
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite
[Creation
permutation = 0, 3
</font></pre>
So:- here we see a group of ships being defined, "ship_by_class = sc_fighters". Above we saw the class sc_fighters will use ships from the class "class_fighter". In our npcships.ini we saw the entry "npc_ship = rh_n_rh_elite_d1-11" and in that entry in loadouts.ini we saw "npc_class = lawful, class_fighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11", and so I think we have all the links we need.
Summary:
1. The encounter in the system's .ini file sets a zone for where the ships will appear and calls for Rheinland Navy ships with difficulty = 10.
2. In npc_ships we saw difficulty 10 is in the difficulty group npc_ship = rh_n_rh_elite_d1-11, and the ship type to use is a Valkyrie, and the pilot is a hard military pilot.
3. The loadout gives us the ship class and the weapons and equipment loadout for that ship.
4. The encounter parameter in the system's .ini file gives us the name of the encounter file where we will find out how many ships of which class will be generated, and what formation they will fly in.
5. The formations.ini file gives us the position in the formation where the first, second and subsequent ships will be flying in relation to each other.
If I was the processor I think I have enough information from this to make this encounter happen. The NPCs know from initialworld.ini who is their enemy for this defence encounter, and from pilots_how the pilots should behave.
Did I miss anything?
Have fun, I did!
Edited by - StarTrader on 9/6/2007 5:29:13 AM
Edited by - StarTrader on 9/6/2007 5:19:08 PM