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

Break Formation?

The general place to discuss MOD''ing Freelancer!

Post Sun May 15, 2005 7:58 pm

Break Formation?

Hey Everyone,

For quite some time I've been working on a Galactic War mod. Well, it's finally become a reality although there is one small bug that I need help fixing. I've pre-programed entire systems to be engulfed in one massive war, with a good storyline as the backbone. Liberty, Rheinland, Bretonia, and Kusari are all pitted against each other. I searched all over the forum and can not locate the solution to my problem. I'm not even sure where I would put the solution, which INI file I mean. Here's my problem;

In the areas engulfed I have selected battleship destroier groups dropping out of cruse and running "patrols" of the system. Now, these patrols are not programmed in. They're more like groups set to wander in specific locations. Anyway, the battlegroups drop out in formation with a battleship in the center and destroier escorts flanking the battleship. My problem lies when the fleets run into eachother. The lead battleship controls the entire formation. If it turns 2 degrees to the right, so do the rest of the ships. Normally that would be all well and good, but with the Liberty destroiers it prevents them from being able to lock onto a target with their main forward gun. The battleship is always facing the enemy head on, so the destroiers are always a few degrees off target. As well, it looks somewhat funny when all the ships turn exactly in the same direction all the time. Is there any way to get these ships to break formation when attacked? Here's some INI information about the formation, and please note this isn't all the data, it's just bits and peaces that I hope will help find the answer;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~ Added to Faction_prop.ini ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LOCATION:

[FactionProps
affiliation = li_n_grp

ADDITION:

npc_ship = Liberty_Cruiser
npc_ship = Liberty_Battleship
formation = cruisers, cruiser_wall
formation = battleships, battleship_wall


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~ Added to Formations.ini ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Formation
nickname = battleship_wall
pos = 0, 0, 0
pos = 400, 0, 0
pos = -400, 0, 0
pos = 0, 200, 0
pos = 400, 200, 0
pos = -400, 200, 0
pos = 400, 0, 0
pos = 400, 200, 0
pos = 0, -200, 0
pos = 400, -200, 0
pos = -400, -200, 0
pos = 400, -200, 0
pl_pos = 0, 0, 500


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~ Added to Npcships.ini ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[NPCShipArch
nickname = Liberty_Battleship
loadout = Liberty_Battleship_Loadout
level = d19
ship_archetype = li_dreadnought
pilot = pilot_military_ace
state_graph = FIGHTER
npc_class = lawful, class_battleship, d19


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~ Added to Li01.ini ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[zone
nickname = Zone_Li01_001_Battleships
pos = -16510, 0, -13962
shape = SPHERE
size = 34000
sort = 6
toughness = 1
pop_type = background
density = 48
repop_time = 50
max_battle_size = 20
relief_time = 50
encounter = capitalships_Liberty, 19, 0.500000
faction = li_n_grp, 1.000000
encounter = capitalships_Liberty, 19, 0.500000
faction = li_n_grp, 1.000000
encounter = capitalships_Rheinland, 19, 0.500000
faction = rh_n_grp, 1.000000
encounter = capitalships_Escorts, 19, 0.900000
faction = li_n_grp, 1.000000
encounter = capitalships_Escorts, 19, 0.900000
faction = rh_n_grp, 1.000000

[EncounterParameters
nickname = capitalships_Liberty
filename = missions\encounters\capitalships_Liberty.ini

[EncounterParameters
nickname = capitalships_Rheinland
filename = missions\encounters\capitalships_Rheinland.ini

[EncounterParameters
nickname = capitalships_Escorts
filename = missions\encounters\capitalships_Escorts.ini


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~ capitalships_Liberty.ini added to Encounters directory ~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[EncounterFormation
ship_by_class = 1, 1, sc_battleships
pilot_job = assault_leader_job
make_class = wanderer
ship_by_class = 4, 4, sc_cruisers
pilot_job = assault_job
make_class = wanderer
formation_by_class = battleships
behavior = wander
arrival = cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hopefully this data will help you to help me make this mod complete, and a reality. Yes, I do plan on putting the mod out there on the market for anyone to use however I am going to request that if used it remains unchanged and that the origional credits, both to myself and Nephilim (who did the origional battleship mod) remains intact. Due to the added files for the battleship fleets it is a client-side mod, however I am working hard to make it server-side only so anyone can just jump in and play. If you know the answer to my question, please help me out.



~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Post Sun May 15, 2005 8:10 pm

In this codebase you will find very complete AI schemas. I strongly recommend that you check out the AI code... I have replaced FL's many redundant AI entries with just 4... with significant gains in speed and reduced lag in multiplayer, and greater control for the coder who wants to tweak things to see exactly what they're doing.

But for your specific problem, here's what you need to adjust in the AI entries for your ships in pilots_population.ini:

[FormationBlock
nickname = formation_fighter_easy
force_attack_formation_active_time = 0
force_attack_formation_unactive_time = 0
break_formation_damage_trigger_percent = 0.999999
break_formation_damage_trigger_time = 0
break_formation_missile_reaction_time = 0
break_apart_formation_missile_reaction_time = 0
break_apart_formation_on_evade_break = True
break_formation_on_evade_break_time = 1
formation_exit_top_turn_break_away_throttle = 1
formation_exit_roll_outrun_throttle = 1
formation_exit_max_time = 5

[JobBlock
nickname = fighter_easy_job
wait_for_leader_target = False
maximum_leader_target_distance = 20000
flee_when_leader_flees_style = False
scene_toughness_threshold = hardest
flee_scene_threat_style = hardest
flee_when_hull_damaged_percent = 0.25
flee_no_weapons_style = False
loot_flee_threshold = hardest
attack_subtarget_order = anything
field_targeting = always
loot_preference = lt_all
force_attack_formation = False
combat_drift_distance = 20000
attack_preference = anything, 5000, guns / guided / unguided

Edited by - Argh on 5/15/2005 9:10:19 PM

Edited by - Argh on 5/15/2005 9:12:08 PM

Post Sun May 15, 2005 8:17 pm

Hey, thanks for the speedy reply. I'll make the changes pronto and test them out. I'm also going to take a look at that link you posted. Perhaps there is a few things I've given up on that are addressed. Thanks again!

~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Post Sun May 15, 2005 8:46 pm

Ok, sorry to bother but I've run into a problem. I can't find the specific area your specifying in pilots_population.ini nor do I understand what you mean about the lines.

Do you mean to change the lines you've highlited to the values showing, or do I have to change those lines to other values?

I was able to find "nickname = job_battleship" in the pilots_population.ini file, could that be what I'm looking for? If not, can you maybe request the information you would need to find out what nickname(s) I do need to adjust? I would post the whole mod, but it's far to large and I don't want to spam.

Oh, and there is a problem with using yoru toolkit. If I enable it, then my mod won't.

~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Edited by - Jackel on 5/15/2005 9:52:54 PM

Post Sun May 15, 2005 9:00 pm

Ok... Actually I was able to find JOBBLOCK references to my formations.....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[JobBlock
nickname = assault_leader_job
wait_for_leader_target = False
flee_when_leader_flees_style = True
scene_toughness_threshold = hard
flee_scene_threat_style = hardest
flee_when_hull_damaged_percent = 0.100000
flee_no_weapons_style = True
loot_flee_threshold = hardest
attack_subtarget_order = anything
field_targeting = always
loot_preference = lt_potions
combat_drift_distance = 25000
attack_preference = fighter, 5000, guns / guided / unguided
attack_preference = freighter, 5000, guns / guided / unguided
attack_preference = transport, 5000, guns / guided / unguided
attack_preference = gunboat, 5000, guns / guided / unguided
attack_preference = cruiser, 5000, guns / guided / unguided
attack_preference = capital, 5000, guns / guided / unguided
attack_preference = weapons_platform, 5000, guns / guided / unguided
attack_preference = solar, 5000, guns / guided / unguided
attack_preference = anything, 5000, guns / guided / unguided

[JobBlock
nickname = assault_job
wait_for_leader_target = True
maximum_leader_target_distance = 2500
flee_when_leader_flees_style = True
scene_toughness_threshold = hard
flee_scene_threat_style = hardest
flee_when_hull_damaged_percent = 0.200000
flee_no_weapons_style = True
loot_flee_threshold = hardest
attack_subtarget_order = anything
field_targeting = always
loot_preference = lt_potions
combat_drift_distance = 25000
attack_preference = fighter, 5000, guns / guided / unguided
attack_preference = freighter, 5000, guns / guided / unguided
attack_preference = transport, 5000, guns / guided / unguided
attack_preference = gunboat, 5000, guns / guided / unguided
attack_preference = cruiser, 5000, guns / guided / unguided
attack_preference = capital, 5000, guns / guided / unguided
attack_preference = weapons_platform, 5000, guns / guided / unguided
attack_preference = solar, 5000, guns / guided / unguided
attack_preference = anything, 5000, guns / guided / unguided

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I, however, am unable to locate any FormationBlock that has the "assult" names attached to them.... I assume in the ones I did find that I change the wait_for_leader_target value, and maybe the flee_when_leader_flees_style value, to FALSE?

~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Post Sun May 15, 2005 9:53 pm

ROFL. Of course your mod won't work with my Toolkit enabled. You really, really, really need to sit down and read through its code- it's a complete set of XML extension mods. With documentation. It's not just an AI hack.

Reading through the AI code in my Pilots_Population and will be most useful, since you don't know what the various code chunks do yet. Basically... AIs in FL's default INIs reference each other quite a bit. Figuring out which Blocks are assigned to any given AI is usually pretty annoying, because they have a lot of lines like this:

[Pilot
nickname = pilot_outcast_med
inherit = pilot_outcast_easy
gun_id = gun_outcast_med_style_a
evade_dodge_id = evade_dodge_fighter_chaos_med

See the inherit line? That line means that everything that applies to pilot_outcast_easy also applies to pilot_outcast_med, except when overridden by specific Block IDs, such as the gun_id and evade_dodge_ids listed. So you'd find pilot_outcast_easy... and see this:

[Pilot
nickname = pilot_outcast_easy
gun_id = gun_outcast_easy_style_a
missile_id = missile_fighter_easy_style_a
evade_dodge_id = evade_dodge_fighter_chaos_easy
evade_break_id = evade_break_fighter_style_a
buzz_head_toward_id = buzz_head_toward_fighter_chaos
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_swarm
repair_id = repair_fighter_never
job_id = basic_job_no_formation

This is actually a pretty straightforward one. Some of the AIs have 4 or 5 nested inherited Blocks that you have to hunt down, just to figure out which Blocks to modify to change their behavior.

Go read my version of Pilots_Population, and you will very quickly see what I have done, what effects what, and why. Each large block of code for the 4 AIs is a complete AI with every option enabled, and no inherit tags. Much, much cleaner and simpler than Digital Anvil's approach.

But none of this is going to help you, if you don't take the time to sit and read through the code chunks. The stuff I pointed to you above would solve your problem... if you understood the context . AIs for FL are pretty darn scary, so don't feel bad- it took me several months to figure all of this out. But knowing the contextual use of the Blocks, and how Blocks are referenced by JobBlocks, which in turn are referenced by Pilots... which in turn are referenced by the Pilot entries in npc_ships.ini... is essential, if you want to solve problems with the AI.

Edited by - Argh on 5/15/2005 10:53:36 PM

Post Sun May 15, 2005 10:03 pm

Here's a sample, for those of you modders out there who haven't downloaded my XML Toolkit Mod yet... and are confused as to why I keep referring people to it.

This... ladies and gentlemen... is how I've simplified your lives, with a simple-to-understand AI schema. This is one of the four included with the mod.

;/////////////////////////////////////////
;////////////////////////////////////////////////
;//////////////////////////////////////////////////////
;/////////////////////////////////////////////////////////// EASY
;//////////////////////////////////////////////////////
;////////////////////////////////////////////////
;/////////////////////////////////////////
[Pilot
nickname = pilot_fighter_easy
job_id = fighter_easy_job
formation_id= formation_fighter_easy
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
missile_reaction_id = missile_reaction_fighter_easy
evade_dodge_id = evade_dodge_fighter_easy
evade_break_id = evade_break_fighter_easy
damage_reaction_id = damage_reaction_fighter_easy
countermeasure_id = countermeasure_fighter_easy
repair_id = repair_fighter_easy
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
gun_id = gun_fighter_easy
missile_id = missile_fighter_easy
mine_id = mine_fighter_easy
buzz_head_toward_id = buzz_head_toward_fighter_easy
buzz_pass_by_id = buzz_pass_by_fighter_easy
trail_id = trail_fighter_easy
strafe_id = strafe_fighter_easy
;//////////////////////////////////////////////////////////////////////// JOB
[JobBlock
nickname = fighter_easy_job
wait_for_leader_target = False
maximum_leader_target_distance = 20000
flee_when_leader_flees_style = False
scene_toughness_threshold = hardest
flee_scene_threat_style = hardest
flee_when_hull_damaged_percent = 0.25
flee_no_weapons_style = False
loot_flee_threshold = hardest
attack_subtarget_order = anything
field_targeting = always
loot_preference = lt_all
force_attack_formation = False
combat_drift_distance = 20000
attack_preference = anything, 5000, guns / guided / unguided
;///////////////////////////////////////////////////////////////////////// FORMATION
[FormationBlock
nickname = formation_fighter_easy
force_attack_formation_active_time = 0
force_attack_formation_unactive_time = 0
break_formation_damage_trigger_percent = 0.999999
break_formation_damage_trigger_time = 0
break_formation_missile_reaction_time = 0
break_apart_formation_missile_reaction_time = 0
break_apart_formation_on_evade_break = True
break_formation_on_evade_break_time = 1
formation_exit_top_turn_break_away_throttle = 1
formation_exit_roll_outrun_throttle = 1
formation_exit_max_time = 5
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[MissileReactionBlock
nickname = missile_reaction_fighter_easy
evade_missile_distance = 1000
evade_break_missile_reaction_time = 1
evade_slide_missile_reaction_time = 1
evade_afterburn_missile_reaction_time = 1
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[EvadeDodgeBlock
nickname = evade_dodge_fighter_easy
evade_dodge_style_weight = corkscrew, 1.000000
evade_dodge_cone_angle = 20
evade_dodge_interval_time = 2
evade_dodge_time = 2
evade_dodge_distance = 200
evade_activate_range = 250
evade_dodge_roll_angle = 0
evade_dodge_waggle_axis_cone_angle = 0
evade_dodge_slide_throttle = 1
evade_dodge_turn_throttle = 1
evade_dodge_corkscrew_turn_throttle = 0.750000
evade_dodge_corkscrew_roll_throttle = 0.500000
evade_dodge_corkscrew_roll_flip_direction = False
evade_dodge_interval_time_variance_percent = 0.500000
evade_dodge_cone_angle_variance_percent = 0.500000
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[EvadeBreakBlock
nickname = evade_break_fighter_easy
evade_break_roll_throttle = 0.100000
evade_break_time = 5
evade_break_interval_time = 2.500000
evade_break_afterburner_delay = 0
evade_break_turn_throttle = 1
evade_break_direction_weight = up, 1.000000
evade_break_direction_weight = down, 1.000000
evade_break_direction_weight = left, 1.000000
evade_break_direction_weight = right, 1.000000
evade_break_style_weight = sideways, 1.000000
evade_break_style_weight = outrun, 1.000000
evade_break_style_weight = reverse, 1.000000
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[DamageReactionBlock
nickname = damage_reaction_fighter_easy
evade_break_damage_trigger_percent = 1
evade_dodge_more_damage_trigger_percent = 0.250000
engine_kill_face_damage_trigger_percent = 1
engine_kill_face_damage_trigger_time = 1
roll_damage_trigger_percent = 0.300000
roll_damage_trigger_time = 1
afterburner_damage_trigger_percent = 0.200000
afterburner_damage_trigger_time = 0.500000
brake_reverse_damage_trigger_percent = 1
drop_mines_damage_trigger_percent = 0.250000
drop_mines_damage_trigger_time = 0.100000
fire_guns_damage_trigger_percent = 1
fire_guns_damage_trigger_time = 1
fire_missiles_damage_trigger_percent = 1
fire_missiles_damage_trigger_time = 1
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[CountermeasureBlock
nickname = countermeasure_fighter_easy
countermeasure_active_time = 3
countermeasure_unactive_time = 3
;///////////////////////////////////////////////////////////////////////// DEFENSIVE
[RepairBlock
nickname = repair_fighter_easy
use_shield_repair_pre_delay = 0.1
use_shield_repair_post_delay = 0.1
use_shield_repair_at_damage_percent = 0.5
use_hull_repair_pre_delay = 0
use_hull_repair_post_delay = 0
use_hull_repair_at_damage_percent = 0
;/////////////////////////////////////////
;////////////////////////////////////////////////
;//////////////////////////////////////////////////////
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[GunBlock
nickname = gun_fighter_easy
gun_fire_interval_time = 0
gun_fire_interval_variance_percent = 0.5
gun_fire_burst_interval_time = 4
gun_fire_burst_interval_variance_percent = 0.500000
gun_fire_no_burst_interval_time = 4
gun_fire_accuracy_cone_angle = 4
gun_fire_accuracy_power = 1.100000
gun_range_threshold = 1.000000
gun_target_point_switch_time = 0.5
fire_style = multiple
auto_turret_interval_time = 0
auto_turret_burst_interval_time = 3
auto_turret_no_burst_interval_time = 3
auto_turret_burst_interval_variance_percent = 0.200000
gun_range_threshold_variance_percent = 0.200000
gun_fire_accuracy_power_npc = 1
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[MissileBlock
nickname = missile_fighter_easy
missile_launch_interval_time = 30
missile_launch_interval_variance_percent = 0.500000
missile_launch_range = 2000
missile_launch_cone_angle = 22.500000
missile_launch_allow_out_of_range = False
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[MineBlock
nickname = mine_fighter_easy
mine_launch_interval = 10
mine_launch_cone_angle = 360
mine_launch_range = 250
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[BuzzHeadTowardBlock
nickname = buzz_head_toward_fighter_easy
buzz_min_distance_to_head_toward = 500
buzz_min_distance_to_head_toward_variance_percent = 0.100000
buzz_max_time_to_head_away = 5
buzz_head_toward_engine_throttle = 1
buzz_head_toward_turn_throttle = 1
buzz_head_toward_roll_throttle = 1
buzz_head_toward_style_weight = straight_to, 1.000000
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[BuzzPassByBlock
nickname = buzz_pass_by_fighter_easy
buzz_distance_to_pass_by = 100
buzz_pass_by_time = 1
buzz_break_turn_throttle = 1
buzz_break_direction_weight = left, 1.000000
buzz_break_direction_weight = right, 1.000000
buzz_pass_by_style_weight = break_away, 1.000000
;///////////////////////////////////////////////////////////////////////// OFFENSIVE
[TrailBlock
nickname = trail_fighter_easy
trail_lock_cone_angle = 30
trail_break_time = 2.000000
trail_max_turn_throttle = 0.6
trail_distance = 300
[StrafeBlock
nickname = strafe_fighter_easy
strafe_run_away_distance = 100
strafe_attack_throttle = 1

Post Sun May 15, 2005 10:12 pm

Actually, I started messing around with the two entries I posted earlier and got a few results. The crusiers will now stray from their formation, but just a tad. Havn't been able to get them to stop attacking the fighters before the battleships though. I've set the fighters to 2500 and everything else to 5000, but they still attack the fighters first. Atleast they follow the fighters, their turrets fire at everything. Hmmmmm.....

I also have to drop the spawn ratio simply because the area quickly gets filled with 30+ formations. Forgot that when I set the battle size I'm actually setting how many fleets, not ships, appear. Even set at 5, that's 10 fleets per faction. *LOL* Gotta set it to 1 or 2....

Anyway, I need to sit down and try to figure out the AI here. I did look at your mod and it's very impressive. I like how everything falls into everything else to sort out repeat code. Only problem is, to incorporate it with my mod I would have to completely rewrite my code. At 1000+ lines of code, that's a tall order.

Just have this one small bug to sort out and then the mod is done, finished, and ready to be published.

FYI, I'm not really a beginner when it comes to FL modding. Infact i've been doing it for over 2 years now, starting with models like my Lambda class shuttle. I'm just dipping into an area I've really never touched before. That being the AI. Thus my confusion.



~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Post Sun May 15, 2005 10:20 pm

Well, one easy thing you could do... is simply drop the following files into your mod: npcships.ini, pilots_population.ini, pilots_story.ini. That'd switch everybody over to my mod's set of AI. You could then re-adjust the difficulty levels for Easy, Medium, Hard and Very_Hard to your tastes- I have made them a little (not a lot) tougher than FL's standard AI, with better dodging behaviors. OK, so Very_Hard will take you to school... but... heh... it's so much fun owning the Bounty Hunters in a Titan when you actually have to try ...

At any rate... then you could put the following into your XML:

<script>
<scriptversion>
1.3
</scriptversion>
<data file="DATA\MISSIONS\npcships.ini" method="append">
<source>
;////////////////////////////////////////////////////ADDED BY YOUR MOD NAME HERE
;///////////////////////////////////////////////////////////////////////////////////
;///////////////////////////////////////////////////////////////////////////////////
[NPCShipArch
nickname = li_cruiser_example
loadout = li_cruiser_example_loadout
level = d5
ship_archetype = li_cruiser_example
pilot = pilot_fighter_medium
state_graph = FIGHTER
npc_class = lawful, class_freighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20
;///////////////////////////////////////////////////////////////////////////////////
</source>
</data>
</script>

...and then you're done implementing your ship. Just need to add your faction_prop references (which, if I read your code correctly, you already have)... and now your Liberty Cruisers (or whatever) will use pilot_fighter_medium (which is a good setting for capships- if you set them Hard, they will tend to eat players for lunch, due to improved aim).

Post Mon May 16, 2005 1:54 am

Oke doke.... Did what you said, modifying my files and all... Have the mod replacing the 3 specified INI files and have adjusted my ships like so, using the cruiser as an example;

[NPCShipArch
nickname = Liberty_Cruiser
loadout = Liberty_Cruiser_Loadout
level = d19
ship_archetype = li_cruiser
pilot = pilot_fighter_medium
state_graph = FIGHTER
npc_class = lawful, class_freighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20

Now I'm running into one small problem. All of the battleships/destroiers/cruisers aren't showing up anymore. All I get is a ton of fighters. Any ideas?

~~~~~~~~~~~~~~~~~~EDIT~~~~~~~~~~~~~~~~~~~~~

On a side note, the fighters do react better and are harder to kill. Like that, but miss my big ships.

~~~~~~~~~~~~~~~~ END EDIT ~~~~~~~~~~~~~~~~~~

~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Edited by - Jackel on 5/16/2005 2:56:15 AM

Post Mon May 16, 2005 3:43 pm

Change this line:
npc_class = lawful, class_freighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20
;///////////////////////////////////////////////////////////////////////////////////

To this:

npc_class = lawful, class_fighter, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20
;///////////////////////////////////////////////////////////////////////////////////

Return to Freelancer General Editing Forum