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

**Tutorial** - Making custom NPC encounters (from scratch)

Here you find the different tutorials on editing and MODing Freelancer

Post Thu Jan 29, 2004 9:36 am

**Tutorial** - Making custom NPC encounters (from scratch)

So, want some custom NPC encounters. Well this is going to build from the ground up. Starting with the basics and running through stage by stage.

Now, for starters........
The real basics.


First off - you probs have your faction in mind, and the ship to fly. If you haven't - think quick.lol

Right - got it? Now then. Firstly we go to the shiparch.ini You NEED to look at the ship your going for here. this can be exisiting game (I have made xenos fly falcons, unioners and xenos fly eagles, lane hackers fly sabres and others kitted out nicely to!).
So, pick the ship. What are you looking for when picking the ship.

You need to know
a) The EXACT NICKNAME as it is in the ini files as.
b) The EXACT WEAPON HARDPOINTS (like HpWeapon01 to HpWeapon06)
c) EXACT mines, counter measure and more points.

Okay - got one? Good. Well, will use a nice simple one for starters. Lets use the eagle. Here is some stuff from its entry (sorry, i like giving examples
EXTRACT OF ENTRIES :

nickname = ge_fighter6
shield_link = cv_fighter6_shield01, HpMount, HpShield01
hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06
hp_type = hp_elite_shield_special_10, HpShield01
hp_type = hp_thruster, HpThruster01
hp_type = hp_mine_dropper, HpMine01
hp_type = hp_countermeasure_dropper, HpCM01
hp_type = hp_turret_special_10, HpTurret01
hp_type = hp_torpedo_special_1, HpTorpedo01
hp_type = hp_torpedo_special_2, HpTorpedo01

Looks a bit strange don't it? I took out all the class 1 - 8 at least of weapons, shields and turrets. Why? cause it doesn't matter about lower ones, i just care WHAT mounts are there, and also how high in class they go up to*

So you know we have
1 x Thruster (HpThruster01)
1 x Mine (Hpmine01)
1 x Counter Measure (HpCM01)
6 x Weapons (HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06) - class don't matter for now
1 x Turret (HpTurret01)
1 x Shield (hpShield01)

* For NPC's you can mount class 10 guns on class 1 mounts,its not a problem, i just like to keep things realistic

The rest? Screw it - this is all we want

Okay - so we know the ship you want them to fly? Don't sigh, this is slow and detailed so EVERYONE can enjoy it. If you already know most of this - then zoom right ahead! lol

Okay - good stuff. Next thing - you need to know WHAT type of ship is it?
type = FIGHTER
So its a fighter. does that matter? Yes it does - for several reasons!!
So what are the other classes?
type = FREIGHTER
type = CAPITAL
type = TRANSPORT
type = MINING


So - there we go. We know its a fighter. Like you wonder - does that matter? yep - it sure does, and here is why.

We have the ship - but where do we say what it will have ON it? In the loadouts.ini file......well, loadouts.ini IF you are a fighter for Freighter!!
However, for capital ships you would build it in the loadouts_special.ini, for transports and miners - in the loadouts_utility.ini file. So there we go - first problem, make sure you get the right place

Anyway - ONWARDS TO THE LOADOUTS.INI FILE!!!



Edited by - Chips on 10/31/2004 3:32:35 PM

Post Thu Jan 29, 2004 9:37 am

So - we have to build a loadout for it. This is just so the game knows what will be on the ship that they are flying. Obviously you can create MANY loadouts here! not just one.

So - what we need - well, all the info we found out of course!!!

First up - lets see what you need for a loadout! For a player ship - you do this in the goods.ini file - and it needs three things. Engine, power, scanner. For NPC's, well, it needs nothing really - but they don't kill/shoot/move/maim/do anything. They just sit in space. So - what have we got?

[Loadout
nickname = gd_im_ge_fighter6_loadout01;NICKNAME - must be unique
archetype = ge_fighter6 - ;Familiar? - its the shiparch.ini nickname EXACT!
equip = ge_bwe_engine_01 - ;the engine
equip = npc_shield03_mark08, HpShield01;its shield
equip = infinite_power ;power supply
equip = ge_s_scanner_02;scanner
equip = ge_s_tractor_01not the one you drive, but tractor in loot!
equip = ge_s_thruster_01, HpThruster01;thruster
equip = armor_scale_2 - ;armor - makes their hulls stronger
equip = gd_im_gun01_mark05, HpWeapon01;boom sticks
equip = gd_im_gun01_mark05, HpWeapon02 ;"
equip = gd_im_gun01_mark05, HpWeapon03 ;"
equip = gd_im_gun01_mark05, HpWeapon04 ;"
equip = gd_im_gun01_mark05, HpWeapon05 ;"
equip = missile01_mark03, HpWeapon06 ;missile
cargo = missile01_mark03_ammo, 20 ;the shots for missile!!
equip = gd_im_turret01_mark03, HpTurret01;turret
equip = cruise_disruptor01_mark01, HpTorpedo01;Cruise disruptor
cargo = cruise_disruptor01_mark01_ammo, 5;ammo for it
equip = mine01_mark01, HpMine01;mine launcher
cargo = mine01_mark01_ammo, 20;ammo for mine
equip = ge_s_cm_01, HpCM01 ;counter measure flare launcher
cargo = ge_s_cm_01_ammo, 20;ammo for it!
equip = LargeWhiteSpecial, HpHeadlightlights from here down - who cares?
equip = SlowSmallOrange, HpRunningLight01
equip = SlowSmallOrange, HpRunningLight02
equip = SlowSmallOrange, HpRunningLight03
equip = SlowSmallOrange, HpRunningLight04
equip = SlowSmallOrange, HpRunningLight05
equip = SlowSmallOrange, HpRunningLight06
equip = SlowSmallOrange, HpRunningLight07
equip = SlowSmallOrange, HpRunningLight08
equip = SlowSmallOrange, HpRunningLight09
equip = SlowSmallOrange, HpRunningLight10
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = contrail01, HpContrail03
equip = contrail01, HpContrail04
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02


Okay - so get rid of the lights for now - cause they don't matter, and you don't want to be mounting lights on things that don't exist. IF you are doing this on custom ships, you will need UTF editor, open it up and SEE what mounts its got, then you can put them in. Okay - for now though - that is an example here.

[Loadout ;lets game know that ship loadout is below this thing. It also defines end of one loadout and beginning of another.

nickname = gd_im_ge_fighter6_loadout01;NICKNAME - must be unique The reason why this MUST be unique is that it will confuse and crash the game if its not. This is how things are identified in the game. It identifies ships models by the nickname in the shiparch.ini files - which also tells it what mounts etc. This loadout means that if you put loadout = this nickname in another file, it finds ALL that we have in this loadout
ship - very very important. This is where the shiparch.ini ships nickname needs to be put EXACTLY. This means that the loadout is for that ship. DO NOT GET THIS WRONG!The loadout is then equipment mounted on the ship. You can work out what they are all for. It doesn' matter too much about the different types - but if you are replacing them, ONE spelling mistake or error, and its crash time!!

Be careful. Okay - what you need to give them to make them worthwhile
1 - Engine. WIthout this they cannot move!
2 - Power - without this they cannot shoot, OR move.
3 - Scanner - if you fail to give them a scanner they NEVER shoot you - why? cause they cannot see you.
4 - Weapons - without these - whats the point. Note that IF you give them missiles of mass destruction that they WILL need ammo. They cannot buy it or work out they need it, you have to GIVE it to them here!
5 - Thruster - without one of these they are dull as anything to fight.

Okay - things NOT to do here.
1. give them a torp. It doesn't work okay - i tried. It might be possible to get them using them, infact it probabily is, but i have better things to do with my time then trying to give an NPC a torp he can use.
2. Adding nano bots and shield bats - this won't make them use them OR drop them. Add them if you WANT them to, but they go as cargo like this:

cargo = ge_s_battery_01, 30
cargo = ge_s_repair_01, 30
Note the comma then the amount of them! That is a necessatiy. See my other threads on newbie questions 2 for how to make them use nano bots and bats.
So - you know what to do eh? thats right - make your loadout. If you care about lights - either find other ships loadouts in this file/goods.ini file - or look at CMP file for what mounts Don't just plug em in and hope

Okay - so here is a loadout.
[Loadout
nickname = mikes_eagle_loadout01
archetype = ge_fighter6
equip = ge_bwe_engine_01
equip = npc_shield02_mark10, HpShield01
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_s_thruster_03, HpThruster01
equip = gd_z_gun01_mark05, HpWeapon01
equip = gd_z_gun01_mark05, HpWeapon02
equip = gd_z_gun01_mark05, HpWeapon03
equip = gd_z_gun01_mark05, HpWeapon04
equip = gd_z_gun01_mark05, HpWeapon05
equip = gd_z_gun01_mark05, HpWeapon06
equip = gd_z_turret01_mark03, HpTurret01
equip = cruise_disruptor01_mark02, HpTorpedo01
cargo = cruise_disruptor01_mark02_ammo, 50
equip = mine01_mark05, HpMine01
cargo = mine01_mark05_ammo, 50
equip = ge_s_cm_03, HpCM01
cargo = ge_s_cm_03_ammo, 50

okay - mine have decent mines now (screamer) lots of ammo for them, hornet cruise disruptors and adv counter measures. They also have class 10 shield, and a decent thruster - mind you, with the infinite power supply, it won't matter what thruster they have. Likewise - engine doesn't matter too much. Okay - so there we go, an eagle loadout for an eagle. now - you can make more if you like. This way you can give your first loadout lighter weapons, and then make several progressively harder loadouts. So they start with crap mines and guns and shield and by loadout 4 you have got rippers, cannonball missiles, firestalker missiles and class 10 shields Give them del cids and watch the players vacate omicron gamma

So - done for loadout eh? Hope you understood that - it was kinda long winded! lol.

Okay - moving on now. You have a ship, and a loadout. now what you need to do is to TELL THE B**GERS TO USE IT!!(self censorship for kids )

Hmm - now we move folders, but make a note of your loadouts nickname, and the ships nickname as in the shiparch.ini file! Now shifting to the missions folder!

Post Thu Jan 29, 2004 10:17 am

Okay - so in the missions folder. There are TONS of files here for encounters and more

however, we are going to keep this from being mega complicated at the moment, - so we aren't going to be making new classes or anything else here okay!! We are just making a new fighter for some crap outfit- like the xenos

okay - so, we need two files in here, and these two are SO closely interwined that they are inseperable. So, we may have do some cross referencing here

okay - pop open the npcships.ini file

[NPCShipArch
nickname = ku_p_ku_fighter_d9-19
loadout = ku_p_ku_fighter_loadout01
level = d9
ship_archetype = ku_fighter
pilot = pilot_police_ace
state_graph = FIGHTER
npc_class = lawful, class_fighter, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19


There are tons and tons of these things Doesn't look good huh?
[NPCShipArchTitle header - knows whats coming beneath
nickname = ku_p_ku_fighter_d9-19the nickname of this
loadout =ku_p_ku_fighter_loadout01the nickname of loadout in loadouts.ini file
level = d11 level of difficult - goes to d19
ship_archetype = ku_fighterthe nickname of the ship from shiparch.ini file
pilot = pilot_police_acepilots - later
state_graph = FIGHTERship type - remember?
npc_class = lawful, class_fighter, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19
lawful or unlawful followed by class of encounter it will be in and then the levels of difficulty he can be in too!

So some new, some not eh? Nickname - yet again, so it can find this entry. Other files refer to THIS nickname.

The loadouts name is the nickname for the loadout in the loadouts.ini file - so that the game sees this, reads the name, then hunts through the loadouts.ini file FOR that nickname. Told you its a reference - and therefore why it needs to be singular

The level - this is what level pilots. d1 is dead easy, d19 is hard You know when you see ships flying round with the name and then a 1 or 5 or11 or 19 next to them? this is it here! When your doing missions in gamma against bounty hunters, and you get ones with 17, 18 or 19 next to them, this is the part right here. 19 is the tough guys There is more to this than meets the eye, cause thats not strictly true - but it will do for now

Ship_archetype - this is the nickname of the ship you chose in the shiparch.ini file AGAIN!! God, this thing checks, double checks and then makes sure don't it

State_graph - this is linked to the type of ship it is again. Fighter, freighter, transport etc etc

Pilot - this is linked to a file called pilots population.ini - and that tells them how good they are at shooting, dodging, evading, manouvering, how long to hold trigger down for, how far to be before attacking, how to attack, what to do if shot, whether to use nano bots and shield bats. So its kinda important. However, that has been done. Further down there are lots of pilots, but generally there are a easy, medium, hard and ace - guess which are the best huh?
Okay - so pick what you want.

pilot = pilot_pirate_ace
pilot = pilot_pirate_hard
pilot = pilot_pirate_med
pilot = pilot_corsair_ace
pilot = pilot_military_ace
pilot = pilot_police_ace

By the way - i typed those from memory, so DON'T copy them! I might have spelt it wrong, find them in the file!

okay - moving on

npc_class = unlawful or lawful
guess what that is.........yup - for pirates or good guys

Now - the part after that is relating to encounters again. This is more envolved than you though huh? It gets worse if you are after making TRULY custom ones, we are doing the easy thing here Basically - for now, we will stick to class_fighter
so - what are the d10, d11, d12 etc after things in there? That is also related to the level of difficulty of the pilot in encounters. If it says d9-19 - then if you had an encounter zone which says it wants level 10 ships - this might appear there (as long as you are wanting the kusari police in a fighter of course), but if you say its a level 19 zone, he will STILL appaer there. BUT if it only said D9 instead, then he would ONLY appear in level 9 zones, and NOT in hte level 10 or 19 or 18 etc etc okay

Okay - so now we kinda know some parts about this. So - what are we doing here then? Well - we are making one of these. SO - lets do it. Military pilots are best along with police (they have better shot accuracy and more).

So here goes.
[NPCShipArch
nickname = my_eagle_d17-19
loadout = mikes_eagle_loadout01
level = d19
ship_archetype = ge_Figher6
pilot = pilot_police_ace
state_graph = FIGHTER
npc_class = unlawful, class_fighter, d17, d18, d19

Okay - so do you follow what has happened? Note that my nickname includes the levels that he will be appearing in. This makes it so much easier to work with if you do this, cause then you can hone in on the right level thing to change stuff. If it works - why change it? this makes it easy to reference- so i don't

Good stuff. Okay - so we got MY loadout, and the fighter (remember - nickname from shiparch.ini). Uh oh - its unlawful - that is cause i am going to give it to the xenos

Now then - there we go. IF you had more than one loadout - you could make a range like this, see below:

[NPCShipArch
nickname = my_eagle_d14-15
loadout = mikes_eagle_loadout01
level = d14
ship_archetype = ge_Figher6
pilot = pilot_police_ace
state_graph = FIGHTER
npc_class = unlawful, class_fighter, d14, d15, d15

[NPCShipArch
nickname = my_eagle_d16-18
loadout = mikes_eagle_loadout02
level = d17
ship_archetype = ge_Figher6
pilot = pilot_police_ace
state_graph = FIGHTER
npc_class = unlawful, class_fighter, d16, d17, d18

[NPCShipArch
nickname = my_eagle_d19
loadout = mikes_eagle_loadout03
level = d19
ship_archetype = ge_Figher6
pilot = pilot_police_ace
state_graph = FIGHTER
npc_class = unlawful, class_fighter, d19


Now you can see why its so handy to have the loadouts named fairly similar - so its easy to keep track of, and also why the nicknames in this file have the difficulty - its easy to keep track of which is which eh?

So - will they use this yet? Nope - we have another file to add to at the moment. That file is the faction_prop.ini file - the twin of this one

Okay - so dive in. this is seperated up by factions okay - so we need to search for our faction. And here are the xenos:

[FactionProps;title again - it lets the game know its a new part to be read
affiliation = fc_x_grp the faction name
legality = unlawful;good or bad guys
nickname_plurality = plural ;plural? Xeno or Xenos when more of them (you don't get polices when more do you?
msg_id_prefix = gcs_refer_faction_fc_xHow they are referred to , so fc_x is the "I am Xenos" voice recording
jump_preference = jumpholeBad guys don't come via jumpgates at the mo
npc_ship = fc_x_ge_fighter_d1-2[binteresting bit

npc_ship = fc_x_ge_fighter_d3
npc_ship = fc_x_ge_fighter2_d4-7
npc_ship = fc_x_ge_fighter4_d8
npc_ship = fc_x_ge_fighter4_d9
npc_ship = fc_x_ge_fighter4_d10
npc_ship = fc_x_ge_fighter4_d11-19
voice = pilot_f_ill_m01pilots voices here
voice = pilot_f_ill_m02
mc_costume = mc_fc
space_costume = pi_pirate2_head, pi_pirate5_body, comm_ge_generic1
space_costume = pi_pirate4_head, pi_pirate5_body, comm_pi_pirate
space_costume = sh_male4_head, pi_pirate5_body, comm_ge_generic1
space_costume = ge_male2_head, pi_pirate5_body, comm_pi_pirate
space_costume = ge_male4_head, pi_pirate5_body, comm_ge_generic1
space_costume = ge_male1_head, pi_pirate5_body, comm_pi_pirate
firstname_male = 226608, 226741names - inbetween numbes as well
lastname = 227008, 227307ditto, so inbetween these two numbres are all names they use
rank_desig = 197101, 197102, 197103, 5, 8corporal, captain, idiot if you make it say so - lol
formation_desig = 197808, 197820alpha xenos Jon doe - formation alpha when you have pilots in formation - erm, bloody look when playing!
scan_for_cargo = commodity_diamonds, 1what they are after - you can add your own or others here, then they will want it if they scan you and your carrying
scan_for_cargo = commodity_food, 0
scan_for_cargo = commodity_gold, 1
scan_for_cargo = commodity_H_fuel, 0
scan_for_cargo = commodity_mox_fuel, 2
scan_for_cargo = commodity_oxygen, 0
scan_for_cargo = commodity_pharm, 0
scan_for_cargo = commodity_sidearms, 2
scan_for_cargo = commodity_water, 0
scan_announce = falseno warning - just a drop cargo
scan_chance = 0.30000030% chance of them scanning you
formation = fighters, fighter_pirate[bformations that they use


Okay - so yes you can add commodities, and the 0 or 1 or 2 is priority of things! If you are carrying 3 things then the one with the 2 behind it is MORe important then the others okay.
Formation - what formation they fly in - check formations.ini - there the fighter_pirate will specify how far apart and other stuff.

okay - the npc_ship = is the part we are interested in okay. This is the meat and bones, and you guessed it, each of those refers to a npcships.ini file nickname okay.So you can see that there are some already there for the levels - but who cares, as longs as ours is named differently - its fine

Okay - so you can put yours in there. Now you can see how they are all linked! they are also linked via the encounters parameter - but my stubbs that used to be fingers are actually getting some blisters on the end i think!! lol - too much typing

okay - add yours in there then! SO you get this:
npc_ship = fc_x_ge_fighter_d1-2
npc_ship = fc_x_ge_fighter_d3
npc_ship = fc_x_ge_fighter2_d4-7
npc_ship = fc_x_ge_fighter4_d8
npc_ship = fc_x_ge_fighter4_d9
npc_ship = fc_x_ge_fighter4_d10
npc_ship = fc_x_ge_fighter4_d11-19
npc_ship = my_eagle_d14-15
npc_ship = my_eagle_d16-18
npc_ship = my_eagle_d19

Now your done. Now you need to edit an encounter in system of theirs so that higher classed Xenos popup. Yours will be mixed in with the normal ones - like the hawks cause they STILL have those there. Don't worry thouhg - you can change that Put YOUR loadout into that npcships.ini part, add YOUR ship archetype part in, and bingo - done. I personally edit the nickname to be d11-13, and then do the same in the npcships - also taking down the d14, d15, d16, d17, d18, d19 part as well, and leaving it as d11, d12, d13. Then i make mine go from d14 - 19 instead, and have about three loadouts.

Have fun, my fingers are bleeding.

Also - back up files, and check spelling - DO NOT COPY AND PASTE, cause i am lazy and didn't bother to check if i spelt somethings correctly etc, so although the weapons in the loadouts should exist, maybe hours of typing drove me made and made it so they didn't

Chips






Edited by - Chips on 10/31/2004 3:33:52 PM

Post Thu Jan 29, 2004 10:17 am

******************************RESERVED FOR FUTURE ADDITIONS!***********************

Post Thu Jan 29, 2004 10:18 am

*****************************RESERVED FOR FUTURE ADDITIONS!************************

Sorry, will edit it in later if i feel like adding anymore to this, or if demand wants me to add more

Post Fri Jan 30, 2004 12:20 pm

Hey, I thank you for going through all this trouble. This is what every modder needs--a "NPC encounters for dummies" reference list that breaks down everything and anything about encounters.

Could you cover the formation files and explain each line as well? the battleship encounter topic listed the changes, but didn't really say what each line means. And what the bloody hell is permutations anyway?

Also, could you list how to set encounter for either a random spawn or for mission spawn? I heard you need to set the difficulty high so missions will recognize them.

___________________________________
There is no knowledge that is not power.

Post Fri Jan 30, 2004 2:05 pm

Will do tomorrow (eating diner now) - but if you just have zones of population, and then have some nice ol vignettes, then you get missions. There aren't any zones JUST for missions, they are ANY population can be used for missions (not sure about base populations), and their aint a restriction on what they are

Post Sun Feb 01, 2004 11:29 pm

Hey Chips, long time no see

Anway, a few additions for you:

In npc_ships.ini:

level = d11 This is really just the level that shows up when you target them

npc_class = lawful, class_fighter, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19 This is where their difficulty level is pulled from when the encounters figure out which ships to spawn. Also, only "class_fighter" ships will show up in missions so if you assign that to other ships, such as freighters, transports, battleships, etc. you can get them into missions (and all of the other encounters that you don't want them in if you're not careful). They'll use the default mission ship formations and AI though so the results may not be as expected.

As a side note, it is entirely possible to have multiple NPC ships with the exact same npc_class within a faction. This is a great way to add variety to the game as you can have several loadouts of the same difficulty and the encounter will randomly choose which of them to use. Or, as I like to do, both light fighters and heavy fighters throughout all of the difficulty levels.

Post Mon Feb 02, 2004 9:51 am

Thankyou Victor - i take it that class_fighter doesn't have anything to do with the line in shiparch.ini - erm - is it state = fighter (nothing with me here! lol). If so, in npcships.ini = the stategraph entry (really need to find some files) is the only reference then to whether its a figher/freighter etc etc??

just curious - lol.

Thanks again.

by the way, I sorted out nearly all of my console error messages thanks to you guys - and also to Silverfires tool for creating the numbers (i scanned around 20 files then did a find the number in those twenty files of numbers compared to the one i get on console readouts - soooo handy , and the problem with the nano bats and bots i had was that in fact nothing - just swapping the order over in the ini file that they appear seemed to fix it :0

Anyway - sorry to whomever is reading this and wanting it finished, but i am in over my head at the mo, and don't really have time. I have two large mods, a job interview, and a website too - lol, i will hopefully get this done by the weekend

Post Mon Feb 02, 2004 10:31 pm

Victor,

They'll use the default mission ship formations and AI though so the results may not be as expected.


What do you mean by default formation and AI?
Is it the default formation of every faction?
And the AI default is the pilotjobtest?



---------------- E·N·D O·F M·E·S·S·A·G·E ... ----------------


Edited by - firebase on 2/2/2004 10:36:12 PM

Post Sun Feb 22, 2004 9:21 pm

Has anyone got skinny on the formation files, and what each line is for?

___________________________________
There is no knowledge that is not power.

Post Fri Feb 27, 2004 6:27 pm

Hey chips, is possible to make spawn an npc encounter with some fx like cloaking devices? Yep like rheinland nomads in the single player?

stupid question? B-)

ok never mind , keep up the great work anyway

Post Fri Feb 27, 2004 7:41 pm

Ah - fraid not, as you have to look in the storyline mission to see that its told to decloak at specified times.

Here:
[Trigger
nickname = dst_pl_bw01_01
Cnd_DistShip = inside, Player, bw01_01_dock_ring_1, 3000
Act_SpawnFormation = cloaked_fighters
Act_GiveObjList = cloaked_rf1, ol_hold
Act_CallThorn = missions\m05\M05_Sprague_Decloak.thn, cloaked_rf2
Act_PlayMusic = none, none, none, music_stab_danger
Act_ActTrig = stop_player
Act_NagOff = sprague_nag
Act_ActTrig = fighters_decloak

The two bold lines refer to the ships in the first block, and then the actions in the second. As you can see, they are told what to do.
Which relates to this in the files:

[MsnFormation
nickname = cloaked_fighters
position = -16442, -33, 2907
orientation = 0.998859, 0.046037, 0.003736, -0.012130
formation = fighter_rh_n
ship = cloaked_rf1
ship = cloaked_rf2
ship = cloaked_rf3
ship = cloaked_rf4


[Trigger
nickname = fighters_decloak
Cnd_Timer = 2
Act_PlayerEnemyClamp = 2, 2
Act_GiveObjList = Player, ol_break_formation
Act_Cloak = lbl_enc1, false
Act_MarkObj = cloaked_rf1, 1
Act_MarkObj = cloaked_rf2, 1
Act_MarkObj = cloaked_rf3, 1
Act_MarkObj = cloaked_rf4, 1
Act_GiveObjList = juni, ol_break_formation
Act_ActTrig = bse_bw01_01
Act_ActTrig = d_enc1
Act_LockDock = Player, bw01_01_dock_ring_1, lock
Act_SendComm = juni, Player, DX_M05_0260_Juni
Act_ActTrig = com_0260

Truth be told - there is alot more references that really deal with it all - but it basically shows that the cloaks used by NPC's are almost programmed in. If you shove a cloak onto an NPC - he won't know how to use it at all - he needs to be told........however - give him the loadout, and he will be invisible.......

Post Fri Feb 27, 2004 8:07 pm

Formations are harder than they look, and regard many files.

Easiest way is to use existing ones, but if you are dying to make your own (I don't know why ) - then go for it.

[EncounterFormation
ship_by_class = 1, 1, sc_fighters ;ship class - see below
pilot_job = scout_job
make_class = wanderer
formation_by_class = fighters
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3


Ship class is as per the shipclasses file:
[ShipClass
nickname = sc_fighters
member = class_fighter

This is the entry as per above. The member is class_fighter - and if you look at npcships.ini file:
[NPCShipArch
nickname = gd_z_ge_fighter4_d10
loadout = gd_z_ge_fighter4_loadout01
level = d10
ship_archetype = ge_fighter4
pilot = pilot_pirate_hard
state_graph = FIGHTER
npc_class = lawful, class_fighter , d10

pilot_job = scout_job
make_class = wanderer
formation_by_class = fighters

Pilot job is in the pilots populations:

[JobBlock
nickname = scout_job
wait_for_leader_target = False
maximum_leader_target_distance = 10000
flee_when_leader_flees_style = False
scene_toughness_threshold = hardest
flee_scene_threat_style = hardest
flee_when_hull_damaged_percent = 0
flee_no_weapons_style = True
loot_flee_threshold = equal
attack_subtarget_order = anything
field_targeting = always
loot_preference = lt_all
combat_drift_distance = 10000
attack_preference = fighter, 5000, guns / guided / unguided
attack_preference = anything, 5000, guns / guided / unguided

okay - make class only seems to be in fighters parts, otherwise its just pilot_jobs
make_class does appera in the shipclass though:

[ShipClass
nickname = wanderers
member = wanderer

The formation line is referenced to the faction_prop.ini file:
formation_by_class = fighters

formation = fighters , fighter_li_n

where the fighter_li_n is now referencing the formations.ini file.
[Formation
nickname = fighter_li_n
pos = 0, 0, 0
pos = -45, 0, 14
pos = 45, 0, 14
pos = -90, 0, 26
pos = 90, 0, 26
pos = -135, 0, 40
pos = 135, 0, 40
pl_pos = 0, -50, 105

Which tells them where to be positioned (notice player position as well).

behavior = wander
arrival = all, -tradelane, -object_jump_gate

Okay - arrival is easy, tradelanes - they will spawn out the end of tradelanes (arrival), from jumpgates, from anywhere. Others are different as to where tehy spawn from.

Behaviour - how the behave when they arrive - they "wander" is the fighters, trade is the traders and stuff, and patrol is for patrol paths,


These are always the same i think, but I would guess at them though:
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

Allow more than one to be made (if zone can take population).....yes
zone_creation_distance = 0 - have no idea. Is it really the distance from the zone for the creation to be (ie you need to enter the zone for NPC's to spawn in the zone?!).
times_to_create - not a foggiest - its always infinite.

The permutation part - dunno either - I don't know what permutation means! Suppose i should get out a dictionary and look HOwever - there is a permutation count line in the voices - so i am not sure.
[mVoiceProp
voice = pilot_f_ill_m01a
permutation_count = gcs_scan_happy, 3

Anyway - there is a lowdown on what it means. What you can do is make your own formations and much more - as long as its all referenced. I haven't found the file telling me what the different things are (behaviours) or if i did, as usual, i wasn't paying attention as to what it meant. One thing is for sure though - these files interlink ALOT here, so be careful what you change

Post Fri Feb 11, 2005 7:09 pm

Ok i am trying to make the police that patrol manhatten become eagles; it aint working this is what I ghave so far can you please help!!!??????

Shiparch.ini
[Ship
ids_name = 237019
ids_info = 66570
ids_info1 = 66571
ids_info2 = 66608
ids_info3 = 66572
ship_class = 0
nickname = ge_fighter6
LODranges = 0, 40, 60, 140, 300, 1000
msg_id_prefix = gcs_refer_shiparch_Liblf
mission_property = can_use_berths
type = FIGHTER
mass = 100.000000
hold_size = 25
linear_drag = 1.000000
fuse = li_fighter_gas01, 0.000000, -1
fuse = li_fighter_smoke01, 0.000000, -1
fuse = intermed_damage_smallship02, 0.000000, 400
fuse = intermed_damage_smallship03, 0.000000, 200
max_bank_angle = 35
camera_offset = 6, 22
camera_angular_acceleration = 0.050000
camera_horizontal_turn_angle = 23
camera_vertical_turn_up_angle = 5
camera_vertical_turn_down_angle = 30
camera_turn_look_ahead_slerp_amount = 1.000000
nanobot_limit = 12
shield_battery_limit = 12
hit_pts = 1300
DA_archetype = ships\liberty\li_fighter\li_fighter.cmp
material_library = ships\liberty\li_playerships.mat
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
cockpit = cockpits\liberty\l_fighter.ini
pilot_mesh = generic_pilot
explosion_arch = explosion_li_fighter
surface_hit_effects = 0, small_hull_hit_light01, small_hull_hit_light02, small_hull_hit_light03
surface_hit_effects = 150, small_hull_hit_medium01, small_hull_hit_medium02, small_hull_hit_medium03
surface_hit_effects = 300, small_hull_hit_heavy01, small_hull_hit_heavy02, small_hull_hit_heavy03
steering_torque = 24000.000000, 24000.000000, 58000.000000
angular_drag = 15000.000000, 15000.000000, 35000.000000
rotation_inertia = 2800.000000, 2800.000000, 1000.000000
nudge_force = 30000.000000
strafe_force = 20000
strafe_power_usage = 2
bay_door_anim = Sc_open baydoor
bay_doors_open_snd = cargo_doors_open
bay_doors_close_snd = cargo_doors_close
HP_bay_surface = HpBayDoor01
HP_bay_external = HpBayDoor02
num_exhaust_nozzles = 1
HP_tractor_source = HpTractor_Source
shield_link = cv_fighter6_shield01, HpMount, HpShield01
hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06
hp_type = hp_elite_shield_special_10, HpShield01
hp_type = hp_thruster, HpThruster01
hp_type = hp_mine_dropper, HpMine01
hp_type = hp_countermeasure_dropper, HpCM01
hp_type = hp_turret_special_10, HpTurret01
hp_type = hp_torpedo_special_1, HpTorpedo01
hp_type = hp_torpedo_special_2, HpTorpedo01

npcships.ini
[NPCShipArch
nickname = ge_fighter6_d8-17
loadout = kyles_gefighter6_loadout01
level = d10
ship_archetype = ge_fighter6
pilot = pilot_police_med
state_graph = FIGHTER
npc_class = lawful, class_fighter, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17

loadouts.ini
[Loadout
nickname = kyles_gefighter6_loadout01
archetype = ge_fighter6
equip = ge_bwe_engine_01
equip = npc_shield03_mark08, 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 = gd_im_gun01_mark05, HpWeapon01
equip = gd_im_gun01_mark05, HpWeapon02
equip = gd_im_gun01_mark05, HpWeapon03
equip = gd_im_gun01_mark05, HpWeapon04
equip = gd_im_gun01_mark05, HpWeapon05
equip = missile01_mark03, HpWeapon06
cargo = missile01_mark03_ammo, 20
equip = gd_im_turret01_mark03, HpTurret01
equip = cruise_disruptor01_mark01, HpTorpedo01
cargo = cruise_disruptor01_mark01_ammo, 5
equip = mine01_mark01, HpMine01
cargo = mine01_mark01_ammo, 20
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
cargo = ge_s_battery_01, 30
cargo = ge_s_repair_01, 30

Return to Freelancer Editing Tutorial Forum