Author: Qlippoth
SRUCorp website: SRUCorp
Personal IWar2 Website: SRUCorp/~qlippoth
Permission from author to post given to I-War2.com

 

So many people have sent me email with questions on how they could start modding their ships. This is a basic primer on where many of the ship attributes are stored and how anyone might approach changing these attributes:
FYI: IWar2 was created in such a way that the game will look down a path and accept a folder location first, then if none is found will look for a zip file of the same name. This makes things very easy in that you only have to extract the files you wish to edit to the same path dictated in the resource.zip. This also has the additional benefit of allowing you to simply erase the resource folder and start over in case you make a big mistake (your game will crash if you make bad edits). This search path is editable and located in your flux.ini file. This allows you to make a zip of the folder you create and have it as a MOD package. Today there is no mod support for this, a patch is forthcoming to allow this but I'll get into this at a later date.

 

PLAYER SHIP ATTRIBUTES

The first and easiest changes can be made to the player ship files. These files are stored in your resource.zip file in the main IWar2 game directory. The easiest method I have found for editing these files is to extract ("with subfolders") the \sims\ships\player directory and all of the files therein to your main IWar2 game folder. This should create a resource folder with the directory structure above with all of the player ship files inside.

FYI: In my AI to Player ship conversions I pretty much used the AI version of the <ship>.ini file, but changed the maneuvering atributes and system spec so that the player could change their weapons and systems in the loadout screen. to do this I pretty much followed the guidelines as layed out int he original player ship files.

This is the content of the tug.ini file which dictates how your tug behaves in the single player game. It lists almost all of the ship attributes you would wish to edit. The text from the file is in light grey, my comments are in this color light blue. You can also open the original tug.ini file so you can both follow my comments and see the tug spec in it's uneditted entirety.

;
; (c) 1999 Particle Systems Ltd. All Rights Reserved
;
; tug.ini
;
; Template for the tug
;
; Revision control information:
;
; $Header: /iwar2/resource/sims/ships/player/tug.ini   48    11/05/01 12:16 Tim $


; Header info for the dev team, it is all commented out as it is only to reference when the file was last changed and by whom.

[Class]
name=icShip

Many attributes are self explanatory, so I will not be making comments on those such entries. In this case Class tells the game what type of object it is supposed to be treated as.

[Avatar]
name=lws:/avatars/tug_hull/setup

This defines the attributes of the ship graphic (model). If I were to change it to an old_cruiser I would act like a tug, but I would appear to be a cruiser. (Like an illusion).

[CollisionHull]
name=collision_hull:/collisionhulls/tug_hull

The collisionHull tells the game how big and of what dimensions this object is, if you changed the Avatar to a cruiser, but did not change the CollisionHull other objects would fly right through you. Note that the AI will not be fooled, it will target and fire upon you using this value, not on your appearance.

[SetupScene]
name=lws:/sims/ships/common_setups/tug

Your best bet is to use the value as defined in another version of the same ship and copy that file. If you copy it you can move it to another directory and edit it to your hearts content. In that case you would simply change the path to reference the new file you want to use.

[Subsims]

Ok, this is the juicy part most of you have been looking for. Before we start note how each template and null value is numbered. This is very important, as if you do not sequence your entries properly the game will crash using that file. Also, each line must be numbered in sequence and not share any number value or the latter line with the same number will simply replace the previous.

EXAMPLE:


template[0]=ini:/subsims/dockports/universal_port
template[0]=ini:/subsims/systems/player/life_support

In the example above, your docking port would be replaced immediately by your lifesupport system.

; Dockports
template[0]=ini:/subsims/dockports/universal_port
null[0]=dockport_rear

Note how this has 2 entries with the same sequence number. The "template" line is where the specification file is for that system, the "null" line is the reference to WHERE, spacially, the systems is placed in the model. The null should have the same number, as doing so states that it correlates directly to the same system as it is numbered.

To add or change a location of a system you will need to alter or make note of those in the [SetupScene] name=lws:/sims/ships/common_setups/tug above. For now you can use any location in that file, later I'll make a nother primer on how to change or add them.

; Permanent systems
template[1]=ini:/subsims/systems/player/powerplant_tug
template[2]=ini:/subsims/systems/player/life_support
null[2]=crew

; Mountpoints for vital systems
template[3]=ini:/subsims/mountpoints/heatsink
template[4]=ini:/subsims/mountpoints/thrusters
template[5]=ini:/subsims/mountpoints/drive
null[5]=drive
template[6]=ini:/subsims/mountpoints/lds
null[6]=lds
template[7]=ini:/subsims/mountpoints/passive_sensors

; Other system mountpoints
template[8]=ini:/subsims/mountpoints/CPU
template[9]=ini:/subsims/mountpoints/eps
template[10]=ini:/subsims/mountpoints/auto_repair
template[11]=ini:/subsims/mountpoints/active_sensors
null[11]=sensors
template[12]=ini:/subsims/mountpoints/capsule_drive
null[12]=capsule_drive
template[13]=ini:/subsims/mountpoints/sensor_disruptor

FYI: Items 0-13 are pretty much the staple systems required for you to fly. If you do not specify all of the required systems the game will tell you that the ship is not spaceworthy. Also note that all of these systems are "mountpoints" This means that in the loadout screen you can dictate a system you have in your inventory (CPU, weapons, etc) rather than specifying a specific system.

If you specify an actual weapon or system you will not be able to change it in the loadout screen. If I say item 16 below is a PBC, that is all that will be there in the game, I will be unable to change it in-game and will have to change the ship file itself to make any changes. Of course, if you don't HAVE that particular system yet, you can cheat and specify a Anti-Matter weapon which you shouldn't get until much later in the game.

; Shield mountpoints
template[14]=ini:/subsims/mountpoints/lda
null[14]=shield_upper
template[15]=ini:/subsims/mountpoints/lda
null[15]=shield_lower

; Hardpoints
template[16]=ini:/subsims/mountpoints/light_cannon_mount
null[16]=light_pbc
template[17]=ini:/subsims/mountpoints/medium_internal_weapon_mount
null[17]=front_pbc
template[18]=ini:/subsims/mountpoints/pylon_mount
null[18]=pylon1
template[19]=ini:/subsims/mountpoints/pylon_mount
null[19]=pylon2
template[20]=ini:/subsims/mountpoints/internal_countermeasure_mount
null[20]=countermeasure
template[21]=ini:/subsims/mountpoints/aggressor_shield
template[22]=ini:/subsims/mountpoints/light_cannon_mount
null[22]=light_pbc

WEAPONS!

Most of you will no doubt not care for much else, so I'm going to tell you how to add weapons to your ship so you can lay waste to the universe. If I wanted to add a weapon I would specify a specific weapon and add it to the number sequence.

EXAMPLE:
Say I want to add another mount point for an additional weapon. I might simply copy an earlier entry and up it's index sequence. Here I copied item 17 and upped its index to 23 so the game won't crash. (Or simply replace 17 with the newly copied 17, which would appear to make no difference at all. ;)

template[23]=ini:/subsims/mountpoints/medium_internal_weapon_mount
null[23]=front_pbc

If you specify a location (such as "front_pbc" above) which does not exist, the game will crash. If I simply made a mistake and erased the "c" in "front_pbc" the game will crash. So be careful. :)

FYI: You can put as many systems on the same mount location as you like. I could, for example, make 20 medium weapon mountpoints and put them on the "front_pbc" mount location, as long as I indexed the entried properly. (Entries 23-43, including the example above :)

[Properties]

; The name of the object
name=ship_type_tug

This is the name of the object. As far as I can tell it only applies to how an object is decribed. If I changed it to name=BigBadWolf I would show up on the sensors ID'ed as "BigBadWolf".

; The threat rating 'points value' of the hull
threat=80

I believe this value tells the AI how to react to your presence. If you're in a weak tug with 1 light PBC your threat value is low, and the AI will try to pound you to dust. If you are in a Heavy Corvette with 4 Gatling Cannon it is likely that a good pounding an an enemy will cause them to flee.

; Damage model properties
hit_points=1000
armour=65

HP and Armor: Someone else had a good analysis on how the armor values work, I'll will include this when I can find it. Hitpoints are how much damage your hull can take, Armor is how much prtection you have against a given weapon.

; Sim type (ship class)
type="T_Tug"

; Docking port priority
docking_priority=85

In my research I have come to believe (not exatly understand) that this value determines how heavy a load they can move. A base has a value of 100, which means they cannot be moved at all. If I dock with a cargo pod, it's value determines what percentage of a penalty I take on my maneuverability.

The larger the value the larger the impact, if I dock with something with a higher value than mine I cannot move. If I dock with something with a value a little lower than mine it might take a very long time before I'm moving in any direction.

; Dimensions
width=80
height=70
length=120

I've seen notations in other files that state this places a modifyer on you maneuverability. The larger the ship the more sluggish the control response. I have not explored this, so perhaps I will make an addendum at a later date.

; Maximum linear speeds as a vector (m/s)
speed=(200,200,850)

This dictates how fast your AI can fly in a given direction. If I engage the approach or dock Autopilot I will be limited to 850 m/s forward and backward, and 200 m/s in lateral movement. This can be overcome using thrust override and manually piloting your ship. Also note that the 850 m/s limitation is also your max normal throttle limit. I believe PS decided to make this a maneuvering limitation to illustrate the different flight abilities of each craft. I tend to set the forward and reverse value to around 1000, this is for combat purposes as anything over 1000 m/s is very difficult to dogfight at. If I wish to go faster I am likely to disengage the flight assist anyway.

; Maximum linear acceleration as a vector (m/s/s)
acceleration=(100, 100, 150)

This dictates the power of your thrusters. The Tug is fairly maneuverable, it just doesn't have a very high top speed. These values correspond to how much thrust each axis can dish out. Throttling forward I can accellerate at 100 m/s until I reach my desired speed. The AdvParCom on the other hand is more maneuverable (it is a somewhat light ship) and can accellerate a bit faster.

FYI: Many of the values in the ship file will be modified by the equipment you install. A better CPU for instance often gives a thrust/acceleration bonus. Thruster upgrades specifically boost this performance value.

; Maximum angular rotation (deg/s)
yaw_rate=60
roll_rate=60
pitch_rate=60

This is pretty much the same as above, but is set the maximum speed with which you can turn your ship on any axis.

; Maximum angular acceleration (deg/s/s)
yaw_accel=30
roll_accel=30
pitch_accel=30

Same here, but again how quickly you accellerate to your maximum rotaional value.

EXAMPLE:
I made a cruiser which is supposed to be a large powerful but lumbering capital ship. I set the max value to 8,9,8 (which is quite slow) and the accelleration values to 1,2,1 (This is a very HEAVY ship, so you have to plan and execute your maneuvers very carefully).

; Applied in free flight to the max angular speed
angular_speed_boost=1.4

I believe the above places an accelleration bonus on thrusting on more than one direction.Fro me this is still unclear.

; Brightness for the sensors to spot
brightness=0.6
min_brightness=0.4

This states the default visibiliy (to sensors) for your hull.

FYI: Other systems (like active sensors) can make you more or less visible to sensors. Active sensors actually broadcast a medium which will be (hopefully) reflected back to help the sensor analyze what is out there. An engine upgrade might generate more heat which is something a sensor package looks for, thereby making you more visible.

; Heat and power - only modified by upgrades
power=0
heat_rate=0

This is the default modifyer for your heat and power values. Like above, additional systems will add modifyers to this value. Your hull alone generate nor dissipate/use  heat or power, so the normal values are 0.

; The number of internal cargo slots
cargo_space=1

This is how many cargo slots you can use in your ship. The tug has one, so I could add a internal missile magazine to increase my missile loadout. My cruiser on the other hand has a cargo capacity of 10, as it is much larger than a tug and a larger internal capacity. I don't really use this yet, but later mods might include having boarding parties, or new weaponssystems. So all of my ship additions or mods include a SWAG'ed value. (I like to think it is based on a somewhat logical evaluation.)

SHIP SYSTEM PLACEMENT WITHIN THE MODEL

This is long but simple analysis, I'm going to release this as-is and update it in the near future, for now I need breakfast! ;)

SOUNDS USED FOR SHIP EVENTS

In this section I will have to claim some ignorance. Each of the sounds you hear are usually stored in a file of the same name as the device which makes it (such as your ship engine sounds).

In a specific case, such as the Sniper PBC gun sound, it is specified in the setup_effects.lws file in this body of text. If you create a new object you can either use an already existing sound like the one specified, or you can also use or create a new sounds by specifying the location and name of that sound in the text below.

AddNullObject <node template=ini||audio|sfx|snipercannon>
ShowObject 8 7
ObjectMotion (unnamed)
  9
  1
  0 0 0 0 0 0 1 1 1
  0 0 0 0 0
EndBehavior 1
ParentObject 1
ShadowOptions 7

I myself have only created one weapon in which I have used a different sound. My "Pinpoint Cannon" is an energy based long range weapon, akin to those Anime weapons which require a loooong charge time but provide an extreme punch. In this such case I used the beam weapon firing sound (and default beam weapon muzzle flash) with a different weapon graphic. This is fairly simple to research, so I hope you will excuse me if I don't go too in-depth.

Add comment