-
Notifications
You must be signed in to change notification settings - Fork 0
DMX Configuration
The basis of hardware configuration is hardware.ini file. It is used to configure lights, sounds, smoke and such systems to be triggered by events in the game or changes of the game state. For example illuminate the room of blue color when shields are up or blink lights when your ship takes hull damage.
This article shows the basics of configuration but doesn't cover DMX device setup.
The file is not created by game so it needs to be created manually. The table below shows where hardware.ini must be created.
| Operation system | Location of hardware.ini
|
|---|---|
| Linux, Mac OS X | ~/.emptyepsilon/hardware.ini |
| Windows |
hardware.ini is in the same directory where EmptyEpsilon.exe is. |
hardware.ini consists of sections. Each section starts with [...] and ends with an empty line. Comment lines start with #.
You can have multiple hardware definitions and thus more than just one hardware device connected. Below are all supported device types:
DMX512SerialDeviceEnttecDMXProDevicesACNDMXDeviceVirtualOutputDevice
VirtualOutputDevice is for debugging as it draws device blocks on top of the game.
Port is the serial port where your dmx device is connected.
For using VirtualOutputDevice port name doesn't need to be valid.
The serial port can be defined with a "pseudo" name. For example in windows you can say port = \Device\USBSER@@@ to connect to any Arduino connected to the system, no matter the port number.
You can also have multiple hardware definitions.
You can also define how many channels are available for device via channel -parameter. This defaults to 512 if not defined.
[hardware]
device = DMX512SerialDevice
port = COM1
[hardware]
device = DMX512SerialDevice
port = COM2
channels = 32
To use a channel a name must be assigned to it. In this case we're configuring three lamps. 4channelSpot represents generic RGB device that needs four channels, one for intensity and three for each color channel. MainCabinLights and WarningLights need one channel.
If a device needs multiple channels supply a comma separated list instead of a single value. See the example below.
There are 512 channels available to use.
[channels]
MainCabinLights = 1
WarningLights = 2
# This device has four channels (intensity, red, blue, green)
4channelSpot = 10, 11, 12, 13
To simply turn lights on give a value to some channel. The value is float.
[state]
condition = Always # The simplest condition
target = MainCabinLight # Channel
value = 1 # value can be 0..1
To change 4channelSpot output simply define comma separated list of values. The following example makes the device output purple color at 50% intensity.
[state]
condition = Always
target = 4channelSpot
value = 0.5, 1, 0, 1 # intensity, red, green, blue
```
`condition` can of course be more complex. This section set's cabin light to 50% when the game is not yet started.
```
[state]
condition = HasShip == 0
target = MainCabinLight
value = 0.5
```
It's possible to light up warning lights when the ship has taken quite a lot of damage.
```
[state]
condition = Hull < 50
target = WarningLight
value = 0.5
```
State can also have effects. Two different effects are supported, `Glow` and `Blink`.
`Glow`
```
[state]
condition = ShieldsUp
target = WarningLights
effect = Glow # Effect name
min_value = 0.3
max_value = 1
time = 1.0 # Seconds
```
`Blink`
```
[state]
condition = Hull < 50
target = WarningLights
effect = Blink # Effect name
on_time = 0.1 # Seconds
off_time = 0.1 # Seconds
```
### `[event]`
Events are one time only type of things. For example when the ship takes a hit lights blink.
`trigger` is a parameter to look for. When it changes the event fires. Before `trigger` it's possible to have operator `<` or `>`. Couple of examples:
```
[event]
trigger = HasShip
target = WarningLights
runtime = 1.0 # Seconds
value = 1.0
[event]
trigger = Energy # Energy level changes
target = MainCabinLights
runtime = 1.0
value = 1.0
[event]
trigger = <Hull # Hull takes damage
target = WarningLights
runtime = 1.0
value = 1.0
[event]
trigger = <FrontShield # Front shield absorbs damage
target = WarningLights
runtime = 0.25
value = 1.0
```
### `condition`/`trigger` values
Conditions for states, or triggers for events can be based of the following properties. All these properties are based on the current ship that you are flying.
| Property | Description | Value |
|-----------------------|---------------------------------------------------------------------------------------|-----------|
| `Always` | Always active | `1.0` |
| `HasShip` | 1 when you have a ship or it's selected. Otherwise 0. | `0` / `1` |
| `Hull` | 0 to 100 hull percentage. | `0..100` |
| `FrontShield` | 0 to 100 shield percentage. | `0..100` |
| `RearShield` | 0 to 100 shield percentage. | `0..100` |
| `Shield0` | 0 to 100 shield percentage. Same as Front shield. | `0..100` |
| `Shield1` | 0 to 100 shield percentage. Same as Rear shield. | `0..100` |
| `Shield[2-7]` | 0 to 100 shield percentage. Additional shields, not yet supported. | `0..100` |
| `Energy` | Amount of energy your ship has. Up to 1000 for most player ships. | `float` |
| `ShieldsUp` | 1 when your shields are up, 0 when they are down. | `0` / `1` |
| `Impulse` | Amount of impulse output in 0 to 1 | `0..1` |
| `Warp` | Amount of warp, from 0 to 4 | `0..4` |
| `Docking` | If we are in the process of docking, or docked, this is 1. Else it is 0. | `0` / `1` |
| `Docked` | If we are actually docked, this is 1. Else it is 0. | `0` / `1` |
| `InNebula` | If we are in a nebula, this is 1, else it is 0. | `0` / `1` |
| `IsJammed` | If we are being jammed, this is 1. Else it is 0. | `0` / `1` |
| `Jumping` | If we are counting down to jump, this is 1. Else it is 0. | `0` / `1` |
| `Jumped` | If we just jumped and are now at our new location. This is 1 for 1 second. | `0` / `1` |
| `Alert` | True if no alert. | `0` / `1` |
| `YellowAlert` | True if alert level is yellow. | `0` / `1` |
| `RedAlert` | True if alert level is red. | `0` / `1` |
| `TubeLoaded[0-16]` | If we have a weapon loaded in this tube it is 1. Else it is 0. | `0` / `1` |
| `TubeLoading[0-16]` | When we are loading this tube, this property is 1. Else it is 0. | `0` / `1` |
| `TubeUnloading[0-16]` | When we are unloading this tube, this property is 1. Else it is 0. | `0` / `1` |
| `TubeUnloading[0-16]` | When we are unloading this tube, this property is 1. Else it is 0. | `0` / `1` |
| `TubeFiring[0-16]` | When firing a tube, this property is 1. Else it is 0. | `0` / `1` |
(If you need more options. Feel free to file an issue)
- Home
- Building and installing the game
- Configuring the game
- Playing the game
- Officer roles and screens
- Captain
- Main screen
- Ship window
- Crews of 5-6 players
- Crews of 3-4 players
- Single-player crew
- Game Master (GM) screens
- Extra screens
- Minigames
- Weapon types
- Officer roles and screens
- Extending the game
- Troubleshooting
- Fork content