Rival Species Mapping Reference

Appendix 1
Rival Species Particle Systems

By Char0n

Overview :

This tutorial is meant to be an explanation how to create working Particle-Systems (further only mentioned as "PS") in Rival Species (RS).
You will be able to create streams, clouds, areas and a lot more shapes with it to give your map a nice atmosphere. Don't hesitate to experiment with all values :)
Just one warning until we delve into the creation : huge PS with lots of particles can and will slow down even fast computers! So test your kick-ass effect on a slow computer until you make it public ;)


Usage :
The *.fgd file included with RS already contains an entity called "rs_particle_emitter". Create one like you create other point-entities and have a look at its properties :


Not much you may think but the magic lies in the Inifile I will discuss later.
Target Like in every other entity you declare the target with it. If you don't create a sphere your particles will fly in the direction of the target. So in most cases you will need to type the name of a target in here. A future release may allow the target to be a train or any other moving entity.
Name The name of the PS so you can trigger it.
Particle The name of the used Inifile in the particles subfolder. If you want to use "rain.ini" just type "rain" in this field.
Thinktime Its not used yet. When set it will tell the PS how often it may "think". This means how often the PS will adjust its particles direction to i.e. follow a train-entity.



Start active Your PS will start active when checked.
May Think Unused. Will enable your PS to think when checked.
May Toggle When checked your PS gets toggled on/off when triggered.


The Inifile :

Inifiles tell the rs_particle_emitter what kind of particles to spawn.
Here you can find an example how an Inifile for RS will look : default.ini

Lets cover every value so you can start creating your own PS :

fParticlesPerSecond_min
fParticlesPerSecond_max
These values tell your PS how many particles to create per second. The min and max means random values between both will be picked. This behaviour is the same for every value having a min and max setting.

fLifeTime_min
fLifeTime_max
How long each particle will stay in the world. Values are in seconds.

fVelocity_min
fVelocity_max
The speed each particle will have. Values are in world-units.

fVelocitySpread_x_min
fVelocitySpread_x_max
fVelocitySpread_y_min
fVelocitySpread_y_max
fVelocitySpread_z_min
fVelocitySpread_z_max
With these Values you can adjust the Direction your Particles will fly. Set all to 0.0 and your Particles will perfectly fly in the direction specified with the target. Put different values here and you'll get a cone or other shapes.

fOriginSpread_x_min
fOriginSpread_x_max
fOriginSpread_y_min
fOriginSpread_y_max
fOriginSpread_z_min
fOriginSpread_z_max
Usually your particles will be created at the origin of the PS. With setting these values to something different than 0.0 you can change the point (or area) where each particle is created. Setting x_min to -100, x_max to 100, y_min to -100 and y_max to 100 would create a square area with a length of 200 units and no vertical dimension. Setting the z_min and z_max values too you would create a small cube.

fColour_r_start
fColour_g_start
fColour_b_start
fColour_a_start
The color each particle will start with. Every value may be in the range 0.0-1.0. The "a" setting defines how translucent the particle will be where 1.0 means completely visible and 0.0 completely translucent.

fColour_r_end
fColour_g_end
fColour_b_end
fColour_a_end
The color each particle will end with. Same usage like the start-color. Use this to i.e. blend your particles from yellow to red to create flames. Only used when the flag PARTICLE_FLAG_COLORFADE is set.

fTimeFadein
The time in seconds it takes each particle to be completely visible. Only used when the flag PARTICLE_FLAG_FADEIN is set.

fSize_x_start
fSize_y_start
The size each particle will start with.

fSize_x_end
fSize_y_end
The size each particle will end with. Only used when the flag PARTICLE_FLAG_SIZE is set.

fGravity
The gravity which will affect each particle. Say you don't want to create a straight particle-trail but your particles shall move in a slight curve down to the floor, you will have to set a value different to 0 and set the flag PARTICLE_FLAG_GRAVITY.

fFlags
PARTICLE_FLAG_NONE No special behaviour.
PARTICLE_FLAG_FADEIN Each particle will be faded in. Set "fTimeFadein" to tell the PS how long it shall take to fade in.
PARTICLE_FLAG_COLLIDE Causes the particles to collide with the world. Use this if you don't want your rain to go thru the ceiling.
PARTICLE_FLAG_COLORFADE Lets the particles change their color during lifetime. Set the fColour_X_end values to the color you want when using this flag.
PARTICLE_FLAG_SIZE Particles will change their size to the one specified in fSize_x_end and fSize_y_end during theit lifetime.
PARTICLE_FLAG_Z_AA Z-Axis-Aligned. The particles Z-Axis will be aligned to the global Z-Axis. Useful for raindrops.
PARTICLE_FLAG_SPHERIC The particles will fly randomly in every direction. Useful for i.e. explosions.
PARTICLE_FLAG_GRAVITY Particles with this flag will react to both global gravity and gravity specified in the PS' Inifile.


Lag :

As long as you don't trigger a lot PS every second you won't create LAG.
What can happen though is that you create too much particles which will slow down the clients computer. Maybe they interprete this as lag.


You already got a few finished inifiles shipped with RS. Have a look at them and try to see what each value does.
If you want to create a new one just copy a predefined and edit this new one. Altering the predefined ones isn't advised since you could screw up things (actually most predefined ones are already used in one or another map).