Chips this one is for you.
First i need to sign a disclaimer.
The party of the first part here by agrees to buy the party of the second part a beer when you see him the pub
Ok ?
Right, whilst you follow these examples remember this. The difference between an encounter Battleship and Mission Battleship is as small as copying your entry in shiparch.ini for your battleship and changing a few lines to say fighter and adding the type line. EG treat it like a fighter and it will appear in your missions. I'll make some notes about any changes you need to make to get them to appear in missions as i go along. Otherwise you just have to dupicate the process im about to tell you about.
For our example we need a battleship from Shiparch.ini
By thats handy, the devs made one for us
Lookup
nickname = rh_battleship
Thats the exact name in shiparch.ini.
Next we need to give it a loadout in loadouts_special.ini. For fighters its loadouts.ini. EG Battleships classed as fighters dont use the loadouts_special.ini file. Though the loudout it self may be exactly the same as a standard special entry.
Heres a loadout you can use but why call it rh_battleship2. Well rh_battleship was taken and we dont want to change the ships in the game the devs added unless we intend to do a good job of reballancing the entire game afterwards.
[Loadout
nickname = rh_battleship2
archetype = rh_battleship
equip = infinite_power
equip = ge_s_scanner_02
equip = sfx_rumble_battleship
equip = capitalshipweapon1, HpTurret_R1_01
equip = capitalshipweapon1, HpTurret_R1_02
equip = capitalshipweapon3, HpTurret_R1_03
equip = capitalshipweapon3, HpTurret_R1_04
equip = capitalshipweapon2, HpTurret_R2_01
equip = capitalshipweapon2, HpTurret_R2_02
equip = fc_c_turret02_mark02, HpTurret_R2_03
equip = fc_c_turret02_mark02, HpTurret_R2_04
equip = fc_c_turret02_mark02, HpTurret_R3_01
equip = fc_ou_turret02_mark03, HpTurret_R3_02
equip = fc_ou_turret02_mark03, HpTurret_R3_03
equip = missile01_mark05, HpTurret_R3_04
equip = missile01_mark05, HpTurret_R3_05
equip = missile01_mark05, HpTurret_R3_06
equip = missile01_mark05, HpTurret_R4_01
equip = missile01_mark05, HpTurret_R4_02
equip = missile01_mark05, HpTurret_R4_03
cargo = missile01_mark05_ammo, 100
equip = capitalshipweapon3, HpTurret_R4_04
equip = capitalshipweapon2, HpTurret_R4_05
equip = capitalshipweapon2, HpTurret_R4_06
equip = capitalshipweapon2, HpTurret_R4_07
equip = ge_rb_engine_01
equip = armor_scale_0
equip = SlowLargeYellow, HpRunningLight03
equip = SlowLargeYellow, HpRunningLight04
equip = SlowLargeYellow, HpRunningLight08
equip = SlowLargeYellow, HpRunningLight07
equip = SlowLargeYellow, HpRunningLight05
Did you notice one of my changes in that loadout ?
Cough Custom weapon called capitalshipweapon2 Cough. You wont have that entry. I found standard weapons on Battleships just make them huge turkies and they are not much of a challenge. So added a really mean weapon to them to make them feel like the big bad beasts they really are. I'll leave that to you to experient with. It will give you something to do
Besides it is fun watching various weapons take out 20 fighters in seconds before you finally get the ballance right
Time to move on...
NPCSHIPS.ini is the next file we want, it can be found in the data/missions folder.
Entries in here are divided up into lawful and unlawful AI ships so we need two entries. One for each. Ho my, i have two here. How handy is that
[NPCShipArch
nickname = rh_battleship2_d10
loadout = rh_battleship2
level = d10
ship_archetype = rh_battleship
pilot = pilot_military_ace
state_graph = CRUISER
npc_class = lawful, battleship, d10, d11, d12, d13, d14, d15
[NPCShipArch
nickname = rh_battleship2_u_d10
loadout = rh_battleship2
level = d10
ship_archetype = rh_battleship
pilot = pilot_military_ace
state_graph = CRUISER
npc_class = unlawful, battleship, d10, d11, d12, d13, d14, d15
The police pilots perform better in the game so best leave those. The D10 stuff is the base level. These ships will not appear in system zones less with a toughness less than 10. Given most zones do not go higher than 13, 10 is a nice figure. D13 zones are VERY rare btw. D10 are fairly common outside of liberty.
The Battleship is now setup and ready, all we need to do now is assign it to an AI and everything is done except for the system stuff.
Now its time to open Faction_props.ini from the missions folder
You will notice each faction has an entry here. Also each faction has several lines that start with npc_ship =. The name after npc_ship = is the nickname used in NPCships.ini for the ship you want the AI to have.
So for our Battleships it will be.
npc_ship = rh_battleship2_d10
or for pirates it will be
npc_ship = rh_battleship2_u_d10
Just add those lines to what ever fact you want to have battleships.
Now for word about difficult levels.
By making several different loadouts with several different weapon configurations and making some extra NPCship.ini entries to use them, you can create battleships suitable for all difficulty levels. You just fit weak weapons to low end battleships and kick ass weapons to high end battleships then add each ncpships.ini entry to the faction you want to have those ships just as i have described above.
If you scroll down to the bottom of a faction that already has Battleships by default you will see lines that look something like this.
formation = fighters, fighter_li_p
formation = gunboats, gunboat_rh_n
formation = CAPITALS, fleet_rh_n_battleship
You can setup formations easy enough by assigning a ship class, eg CAPITALS to a Formation.
I dont like giving everything away to people who ask me questions as it means they do not have to have to think. So if you want to add formations that are based on ship classes guess which two files you need to look at to get the available shipclass nicknames and formation nicknames. Heres a clue. Go to missions and just add ini to the end of those names
Whilst we are here its time to talk about mission Battleships. We are entering one area that changes must be applied that differ from encounter battleships so let me explain the mission battleships stuff here so you know.
If your level 10 battleship (fighter class) spawned with 2 other Battleships in formation (all fighter class), they would use a fighter formation unless you change the formation used in the faction_props.ini for the faction using Battleships in missions. So you need to assign a Fleet formation to fighters in faction_props so they are spaced out correctly. Easy stuff if you do your home work as i suggested 2 paragraphs up from this one
Talking of Shipclasses. Did you know you can make up your own ship classes for use in your own encounter scripts ?
Heres a fleet class i created for example. Its a new shipclass that uses any of the ships listed in it for encounters that list FLEET as the class of ship required. Interest stuff dont you think
[ShipClass
nickname = FLEET
member = destroyer
member = battleship
member = gunboat
member = armored
Anyway we are drifting off a bit. Back to the encounters again.
By this point you have everything you need to make battleships work in encounters except for the encounter script and and entry in your system file. So lets take the encounter script first.
A typical encounter script that we shall called battleships.ini for the sake of arguement would look like this and needs to be saved off in data/missions/encounters/.
[EncounterFormation
ship_by_class = 1, 1, CAPITALS
pilot_job = job_battleship
make_class = wanderer
ship_by_class = 1, 3, sc_fighters, -1
pilot_job = defend_job
make_class = wanderer
formation_by_class = CAPITALS
behavior = wander
arrival = all, -tradelane, -object_jump_gate
allow_simultaneous_creation = yes
zone_creation_distance = 10000
times_to_create = infinite
[Creation
permutation = 0, 3
BTW if you still have not spotted where the new FLEET class goes here is a clue taken from the above script.
ship_by_class = 1, 1, CAPITALS
Should be
ship_by_class = 1, 1, FLEET
Thats all thats required to use the FLEET class list of ships instead of the CAPITAL class list of ships from shipclasses.ini. Nothing that even approaches complex.
Anyway save off the Capital version of that script above but make a mental note about how easy it is to create your own shipclasses for future reference.
Open up your systems ini file where you want your Battleships to appear.
In encounters you need something like this.
[EncounterParameters
nickname = battleships
filename = missions\encounters\battleships.ini
Now find a zone where you want them to spawn in the script.
At the bottom of the zone added
encounter = battleships, 12, 0.290000
faction = Yourfaction, 1.000000
Where Yourfaction = a faction you gave the battleships too in faction_props.ini
If you mess up here the game will crash as soon as you enter the system. If you mess up with the AI files above, the game will crash as soon as it spawns a battleship.
And thats it.
Working battleships.
The exact same system can be used to add fighter or freighter encounters with the right encounter script.
As for missions. Missions require a fighter entry in shiparch.ini, a loadout in loadouts.ini and an entry in NPCShips.ini, then just add the new fighter (really a battleship pretending to be fighter) to faction props as described above.
Only missions appear to use difficulty levels higher than 13 at anything approaching regular intervals. Systems generally dont use anything higher than that. Some may be they are very rare.
Anyway, if you make your battleship fighters level 14 in ncpships.ini, they wont appear as fighter encounters. Lets face it, your dont want 8 Battleships raiding the tradelanes at random intervals do you...humm.. well your sadist ok... thats cool then
The capital ship entries still allow you to use Battleships in encounters but at locations of your choosing and not all over the place as they would appear with the fighter versions of the same battleships. It is all a matter of controling where they appear using difficulty levels in npcships.ini.
Players wont get any missions saying "go to location x and destroy the battleship". All they will get is Difficulty 14 mission, go to location x and destroy the enemy ships". When they get their and are suddenly faced with 5 battleships they will mess their pants
BTW battleships will not appear all the time. Normal fighters will normally be mixed in with them when they do appear. To space out battleships when they are used as fighters just give the faction using the fighter battleships a fleet formation of some kind and things will look great.
Hope this helps..
Now wheres that beer
BTW if you get it working your going to love it.
You can add gunboats the same way
Giskard
Edited by - giskard on 23-08-2003 05:42:11