Advanced Customization

Engine Sound

To apply an engine sound to your ship first import the audio file you want to include, you should make sure it’s a .wav or .ogg file. Next open the ship importer and drag your sounds asset onto the Engine Sound field or click the circle icon next to it and select your audio asset from the object browser window.

../../../_images/engine_sound_setup.png

Lua Runner

Lua Runners, like with custom tracks, allow you to run custom LUA code on your ships.

  • With the Ingame Ship object selected, navigate to Add Component -> BallisticNG -> Behaviour -> Lua Runner in the inspector.

  • In the Lua Runner component, assign Lua Script to the lua script you’d like to run on your ship. The script you attached should have been created from the ship lua template.

Note

For simple setups it’s reccomended you keep lua runners on the Ingame Ship object, but the game will run them from any child objects too. As long as the object containing the lua runners is parented to the Ingame Ship object, it’ll work!

Custom Modules

Ships in BallisticNG are handled through a system that seperates behaviours into different modules that are executed in an explicit order and can intercommunicate with each other. Custom modules allows code mods to add their own behaviour modules into the game that custom ships can then reference.

Once you have a custom module programmed in a code mod (or you’ve downloaded one) you reference the name that the module registers into the game and use the Custom Ship Module field in the ship inspector to tell the game which module to load. If the module doesn’t exist or the name isn’t correct the game won’t load anything.

Keep in mind that for this system to work you will need to install and active code mods. If you’re programming your own code mod for this feature it’s strongly reccomended that you distribute your c# source files instead of libraries so others can inspect your code.

Build In Modules

INTERNAL_DRAG

The ship module used for drag ships. Contains several user variables to customize it (see section below for more details).

Variable Name

Variable Type

Variable Description

updateColors

boolean

Whether the module should update the engine colors.

useBoostColors

boolean

Whether the module should update the engine colors when boosting.

useTurboSounds

boolean

Whether the module should play additional turbo sounds when hitting speed pads.

User Variables

User Variables allow you to enter custom data into a ship that custom ship modules can use. You can add them under the Edit User Data section of the Ingame Ship inspector.

Type

Description

Integer

A whole number.

Float

A decimal number.

Boolean

True/False

Vector2

A 2 dimensional vector.

Vector3

A 3 dimensional vector.

Quaternion

A 4D rotation, can also be used as a 4 dimensional vector.

Color

A static color.

Animation Curve

A curve that can be sampled along.