Tutorial on adding/changing, sfx, projectiles, systems.
General note: All parameter files are text files editable with common notepad.
Creating new SFX
Note: Thing about SFX(at least for now) is that it's only present on the client side. The server doesn't have anything to do with SFX.
1. Go to Client\Data\sfx folder
2. Open one of the images to see how animation frames are stored.(ex. LASER_EXP.png)
3. Each frame is of the same size.
4. Now open the corresponding .ani file(LASER_EXP.ani)
5. There are 3(can change in future) parameters: FRAMES, DELAY, SOUND
6. FRAMES=7 - This tells the game how many frames this sfx animation has.
7. DELAY=1 - This is a delay between switching from one frame to next.
8. SOUND=LASER_EXP - This is the name of the sound file that should be played when the SFX is added to the screen.
9. About FRAMES. When game loads it will load the image of the sfx and cut it into specefied amount of frames of equal width.
10. About DELAY. If you have an animation of only 2 frames then they will switch between each other so fast that it looks like some flickering. Increasing this DELAY helps solving this.
11. About SOUND. If you open the Client\Data\sounds folder, you will find there a file named LASER_EXP.ogg. When the game loads it goes through the sounds folder and loads all the sound files(ogg, mp3, wav)
12. Now let's create a new sfx. I want to make a plasma explosion sfx.
13. To keep it simple I will just copy the laser explosion sfx and change it's color.
14. I will call it PLASMA_EXP
15. Now since it has the same amount of frames, and can use the same frame delay, I will leave it to use the same sound as the laser explosion does.
16. So I will just copy the animation config file LASER_EXP.ani and rename it to PLASMA_EXP.ani
17. Put PLASMA_EXP.png and PLASMA_EXP.ani to Clien\Data\sfx folder and that's it. Easy right?
Creating new Projectile
Note: The projectile is alot like sfx, but it also has a separate file for the server.
1. Go to Client\Data\projectiles folder
2. Here you see the same thing as the SFX folder has - for each projectile there's an image file with animation frames, and an animation config file .ani
3. The image act the same way as for an sfx.
4. The .ani file has a bit diferent parameters inside
5. There are 4(can change in future) parameters: FRAMES, DELAY, SFX, SHAKER
6. FRAMES and DELAY are the same as for an sfx.
7. SFX=LASER_EXP - This is the name of the SFX that will be added to the screen when the projectile is destroyed(reached it's target).
8. SHAKER=1 - If this is set to 1 then, if you are on a ship, and that ship get's hit by a projectile with this parameter, you will get a screen shake.
9. Now let's create a new projectile, since we already have a projectile called PLASMA_CHARGE I will create a LASER_CHARGE.
10. Again to keep it simple I will just take the PLASMA_CHARGE image and change it's color.
11. Place the LASER_CHARGE.png and LASER_CHARGE.ani files into the Client\Data\projectiles folder, and we're done with the client side.
12. Also in the PLASMA_CHARGE.ani I will change the SFX parameter to SFX=PLASMA_EXP so that the plasma charge uses the plasma explosion sfx and the laser charge uses the laser explosion sfx.
13. Now go to Server\models\projectiles folder
14. There we have the .prj model files.
15. They have only 1 parameter(for now) inside - SPEED
16. SPEED=80 - the speed with which the projectile travels on the level
17. About SPEED. Each room cell on the level is 48x48 size. By default the size of a sector level is 300x300. So you can do some math and determine how fast you want your projectile to be.
18. Add LASER_CHARGE.prj file with SPEED=80 to the Server\models\projectiles folder, and we're done.
Ship system models
Note: Ship systems are configured only on the server side(except for weapons).
1. Go to Server\models\systems folder
2. There you see system type folders. All system models are sorted in those foldes for ease of use.
3. But they cal all be in Server\models\systems folder directly.
4. For now there are 13(This will change in future) system types: CAPACITOR, DOOR_CONTROL, ENGINES, HYPERDRIVE, MEDICAL, OXYGEN, PILOTING, REACTOR, SENSORS, SHIELDS, WEAPONS_CONTROL, LASER_WEAPONS, MISSILE_WEAPONS
5. Diferent system types have diferent parameters in the models files.
6. First let's go over the parameters that are comon for all systems
TYPE - Type of the system.
HP - Health of the system
MINHP - When system is broken, it needs to be repaired to atleast this % of full HP to start working again
FIX - Repair speed boost. The higher this parameter is - the easier(faster) it is to repair this system.
WIDTH - How many room cells does this system take in width
HEIGHT - How many room cells does this system take in height
7. Now let's go over the specific system parameters
8. CAPACITOR
ENERGY - How much capacity is added to the ship's power capacitor.
9. DOOR_CONTROL
LEV=0 - Doors level (0 - 4)
10. ENGINES
CHARGE - How much charge speed is added ti the ship's ENGINE(up to a max of 15 for the whole ship)
11. HYPERDRIVE
CHARGE - How much charge speed is added ti the ship's HYPERDRIVE(up to a max of 15 for the whole ship)
ENERGY - How much capacity is added to the ship's hyper drive capacitor.
12. MEDICAL
REP - How much health is restored to the mobs/players per game tick
CHARGE - How much energy is needed for the system to work.
ex: if REP = 4 and CHARGE = 4, then, when this system is powered by 4 power it will heal at speed 4, if it is powered by 1 it will heal at speed 1.
13. OXYGEN
SHIP_REP - How much oxygen is restored to the ship room cells every 4th game tick.
MOB_REP - How much oxygen is restored to the mobs/players per game tick
The power/output proportion is the same as for MEDICAL system.
14. PILOTING
Has no specific parameters for now, but it will have later.
15. REACTOR
ENERGY - How much energy does the reactor provide to the ship's capacitor every game tick.
16. SENSORS
LEV - level of sensors - this is not yet balanced but diferent levels will give diferent information all over the game.
Already now you can see that if you don't have this system - you can't see your ship's rooms.
If level >= 2 you will be albe to see enemy ship's rooms in your weapons systems.
If level >= 3 you will also be able to see the mobs/players in your weapons systems.
if level >= 4 you will be able to see the amount of ships detected in the sector
17. SHIELDS
CHARGE - Maximum charge speed of the system
TIME - How many seconds it takes for the system to replenish 1 shield, when it is running at max charge speed.
SHIELDS - how many shields does the system provide to the ship.
18. WEAPONS_CONTROL
Has no specific parameters for now, but it will have later.
19. LASER_WEAPONS
CHARGE - Maximum charge speed of the system
TIME - How many seconds it takes for the system to recharge, when it is running at max charge speed.
PROJ - Name of the projectile that this weapon fires.(There should be a model for this projectile in the Server\models\projectiles folder)
DAMAGE - Damage dealt to the ship's hull
SYSTEM_DAMAGE - Damage dealt to the system that was hit.
MOB_DAMAGE - Damage dealt to mobs/players
SHIELD_DAMAGE - If ship has this or less amount of shields, then projectile will hit the ship.
SHIELD_PENETRATION - If projectile hit's shields(did not penetrate) then this amount of shields will be removed.
MISS - Miss chance in %
IMAGE - Name of the image file. There has to be an image for this weapon in Client\Data\weapons folder.
BASE - Name of the image file for the base of the weapon. There has to be an image for this weapon base in Client\Data\weapons\base folder.
BURST - How many projectiles are being launched every shot.
SOUND - Name of the sound file that will be played when the weapon fires. There has to be a sound file for this in Client\Data\sounds folder.
FIRE - Chance of starting a fire in %
BREACH - Chance of making a hull breach in %
20. MISSILE_WEAPONS
For now it's the same as for Laser weapons
Creating new weapon
First of all I went and changed all laser weapons to use the new LASER_CHARGE projectile.
Now I want to create a new Plasma canon that will be installed on space stations
1. First let's find or make a new image for the weapon. (Thanks NarnKar)
2. Notice that I have left some empty space on the left, this is to make the weapon image rotate properly. The image is always rotated around the center point.
3. Now let's make a Base image for the weapon
4. Let's create a model file for our weapon, I'll call it STATION_PLASMA.sys
5. Here's what it contains
TYPE=LASER_WEAPONS
NAME=Station plasma cannon
CHARGE=8
HP=10000
MINHP=100
FIX=2
WIDTH=2
HEIGHT=2
TIME=30
PROJ=PLASMA_CHARGE
DAMAGE=4
SYSTEM_DAMAGE=4000
MOB_DAMAGE=800
SHIELD_DAMAGE=4
SHIELD_PENETRATION=2
MISS=5
IMAGE=PLASMA1
BASE=P1
SOUND=PLASMA
FIRE=30
BREACH=80
6. I'll put the model file into the Server\models\systems\plasma folder. And that's it.
NOTE: AVOID USING WHITE SPACE CHARACTERS in all parameter/model files and file names. I'm pretty sure that if you use them, the game might crash at some point.