LightController

Ultimarc Commands


Ultimarc Commands:


Cut and Paste Safe Commands:

General:

TurnOffLights

RGB:

Flash_RGB
Random_Flash_RGB
Random_Flash_RGB_CM
Random_Flash_2C_RGB
Sequence_RGB
Sequence_RGB_CM
Slash_RGB
Double_Slash_RGB
Follower_RGB
Follower_Random_RGB

Regular:

Flash_Regular
Random_Flash_Regular
Sequence_Regular
Follower_Regular

Cut and Paste NOT Safe Commands:

RGB:

Reload_Flash_RGB - Player Number: Last Asrgument
Death_Flash_RGB - Player Number: Last Asrgument
Reload_Sequence_RGB - Player Number: Last Asrgument
Reload_Sequence_RGB_CM - Player Number: Last Asrgument
Background_RGB - Player Number: 2nd Argument, High Count: 5th Argument, Other Groups: Last Asrgument
Follower_RGB_Value - Value Color and Value Group: 1st & 2nd Arguments

Regular:

Reload_Flash_Regular - Player Number: Last Asrgument
Death_Flash_Regular - Player Number: Last Asrgument
Reload_Sequence_Regular - Player Number: Last Asrgument
Background_Regular - Player Number: 1st Asrgument, High Count: 4th Argument, Other Groups: Last Asrgument

Commands:

RPEG Brooks can only do the RGB commands.

General Commands


TurnOffLights
Turns all the lights off, regular and RGB. It needs at least 1 group number, but uses all the groups, for both regular and RGB. Should mostly be used with the 'mame_stop' output signal. There are no arguments for this command.

example: >TurnOffLights


RGB Light Commands

 

Flash Commands:

 

Flash_RGB (Color) (Time On) (Time Off) (Number of Flashes)
Flashes the color for all the RGB in the group(s), when the output signal data is not equal to 0.

example: >Flash_RGB red 50 50 1

Reload_Flash_RGB (Color) (Time On) (Time Off) (Number of Flashes) (Player Number)
Flashes the color for all the RGB in the group(s), when the player’s reload happens. Output signal needs to be player’s ammo value.

example: >Reload_Flash_RGB green 80 80 1 1

Death_Flash_RGB (Color) (Time On) (Time Off) (Number of Flashes) (Player Number)
Flashes the color for all the RGB in the group(s), when the player’s death happens. Output signal needs to be player’s life value. This currently only works on games that have life points of 3-5, like on HOTD4. It currently doesn’t work on games that use a 100% health bar, like Let’s Go Island. Will be fixed in HOTR v1.2.8.

example: >Death_Flash_RGB red 35 35 8 1

Random_Flash_RGB (Color) (Time On) (Time Off) (Number of Flashes)
Randomly flashes a RGB light with color. Each group will have its own random pin. This executes when the output signal’s value is not equal to 0.

example: >Random_Flash_RGB purple 90 50 1

Random_Flash_RGB_CM (Color Map) (Time On) (Time Off) (Number of Flashes)
Same as the 'Random_Flash_RGB' command, but uses a color map. So then it randomly uses a color from the color map. You can change the probablilities by how you build the color map. For example, if the color map is 1 red and 3 whites, then red will appear 25% of the time and white will appear 75% of the time. So then it looks like you hit the enemy 25% of the time.

example: >Random_Flash_RGB_CM bulletBlood 40 30 1

Random_Flash_2C_RGB (Color) (Side Color) (Time On) (Time Off) (Number of Flashes)
Randomly flashes a RGB light with color, that is not on the ends. Then flash the side color before and after it the random pin. This executes when the output signal’s value is not equal to 0. Each group has to have 3 RGB lights or more.

example: >Random_Flash_2C_RGB white redLight 50 50 1
 

Sequence Commands:

 

Sequence_RGB (Color) (Delay)
Light up the first light of the group, and then delays. Then it will light up the next light and delay, and loop this until all the lights are on. This executes when the output signal’s value is not equal to 0.

example: >Sequence_RGB green 15

Sequence_RGB_CM (Color Map) (Delay)
Same as the 'Sequence_RGB' command, but uses a color map. The lights will light up based on the colors of the color map. The first light will be the first color in the color map. The 2nd light, will be the 2nd color in the color map and so on. If there are more lights than colors, then the color map will restart, or wrap back around. This is to use multiple colors in the sequence commands.

example: >Sequence_RGB_CM bulletBlood 50 1

Reload_Sequence_RGB (Color) (Delay) (Player Number)
Light up the first light of the group, and then delays. Then it will light up the next light and delay, and loop this until all the lights are on. This executes when the player’s reload happens. Output signal needs to be player’s ammo value.

example: >Reload_Sequence_RGB green 25 2

Reload_Sequence_RGB_CM (Color Map) (Delay) (Player Number)
Same as the 'Reload_Sequence_RGB' command, but uses a color map. The lights will light up based on the colors of the color map. The first light will be the first color in the color map. The 2nd light, will be the 2nd color in the color map and so on. If there are more lights than colors, then the color map will restart, or wrap back around. This is to use multiple colors in the sequence commands. This executes when the player’s reload happens. Output signal needs to be player’s ammo value.

example: Reload_Sequence_RGB_CM reloadList 50 1


Slash Commands:

 

Slash_RGB (Color) (Delay)
Light up the first light of the group at full, and then delays. Then it will light up the next light at full and last light at 1/2 and delay. Then it will light up the next light at full, last light at 1/2, and light before the last at 1/4 and delay. This continues, until all the lights are off. For one group, 3 lights can be on at one time, where they are full, 1/2, and 1/4.

example: >Slash_RGB green 35

Double_Slash_RGB (Color) (Delay) (Time Off)
Light up the first light of the group at full, and then delays. Then it will light up the next light at full and last light at 1/2 and delay. Then it will light up the next light at full, last light at 1/2, and light before the last at 1/4 and delay. This continues, until all the lights are off. Then it waits, using the 'Time Off' argument. Then does the reverse of the slash. So, if the slash goes left to right, then the reverse goes right to left. For one group, 3 lights can be on at one time, where they are full, 1/2, and 1/4.

example: >Double_Slash_RGB red 35 65


Follower Commands:

 

Follower_RGB (Color)
If the data value of the output signal is 0, then the light(s) are turn off. If the data value is greater than 0, then the light(s) to the color. Usually used for the start button and other things. Works like MameHooker.

example: >Follower_RGB white

Follower_Random_RGB
If the data value of the output signal is 0, then the light(s) are turn off. If the data value is greater than 0, then the light(s) to a random color. Each cycle the color will change to a random color. Usually used for the start button and other things. Works like MameHooker. Note, there is no arguments for this light command.

example: >Follower_Random_RGB

Follower_RGB_Value (Value Color) (Value Group)
This follows the output signal's data, for the red, green, or blue color. There can be 3 output signals that are the red, green, and blue 8bit color values. For example, SomeBackLight_[R:G:B]. This follows one of them, for one color. To do all three, then three commands are needed for the groups, tied to the 3 output signals. The red, only affects the red pin. The green, only affects the green pin. The blue, only affects the blue pin. The Value Color needs to be set to red, blue, or green. It is case insensitive. Can only be ran on one kind of light controller. Can choose Ultimarc or RPEG Brooks.

example: >Follower_RGB_Value red 0


Background Commands:


Background_RGB (Color Map) (Player Number) (Time Delay From Background to New Command) (Time Delay Background Reload) (High Count) (Other Group Numbers)
Background is used to display information to the player. Also, commands can run on top of the background. The background can only use 1 group, per light controller. If more than 1 group is used, then it will error out. The time delay from background to new command, is the time that the lights are off, before the new command starts. Giving a break between the background and command. If the output signals value is greater than the last value, then a reload will happen automatically. Also, the reload will just affect the lights that are off. For example, 6 lights are used like a revolver, and 3 bullets are left. The player reloads, so the 4th light comes on, then delays using the time reload delay. Then the 5th light delay, 6th light, and delay. It doesn’t start at the 1st light. High count, is how many lights will be used to display data. If 0, then uses all the lights. If there is 8 lights, and just want to use 6, then high count should be 6. Other group numbers, are other groups that use the same pins as the background group, and used in the game/default file. The background group will automatically be added to this group There can only be 4 backgrounds per light controller running at the same time..

example: >Background_RGB revolver 1 35 50 6 0 1 2


Arguments:


Color: Defined RGB Color in Group File
Side Color: Defined RGB Color in Group File
Color Map: List of Colors and Defined in the Group File
Value Color: Red, Green, or Blue. Case doesn't matter.

Time On: 1ms - 65,535ms (0.001s - 65.535s)
Time Off: 1ms - 65,535ms (0.001s - 65.535s)
Time Delay: 1ms - 65,535ms (0.001s - 65.535s)
Time Delay From Background to New Command: 1ms - 65:535ms (0.001s - 65.535s) - The time that the lights are off, before the new command starts.
Time Delay Background Reload: 1ms - 65,535ms (0.001s - 65.535s) - Background sequence delay for reload.

Number of Flashes: 1 - 255

Player Number: 1 – 4

High Count: 0 - Number of Lights - If 0, then defaults to number of lights in group. Number of lights used to display info in background.

Other Group Numbers: Other Groups that have the same pins as the background group, and used with other commands.

Value Group: 0 - 255 Start at 0, and can go up to 255.

 

Example File:


Here is the file that I used during the video. I have no notes or empty lines.

:P1_CtmRecoil
!0 0
>Random_Flash_2C_RGB white red 50 50 1
:P1_Damaged
!0 0
>Flash_RGB red 50 50 1
:P1_Ammo
!0 0
>Reload_Sequence_RGB green 25 1
:P1_Life
!0 0
>Death_Flash_RGB red 35 35 8 1
:mame_start
!0 5
>Flash_RGB blue 100 100 3
:mame_stop
!0 5
>Flash_RGB blue 100 100 3
:P1_LmpStart
!0 3
>Follower_RGB white
:P2_LmpStart
!0 4
>Follower_Random_RGB

Here is the File I used with Virtua Cop 2. That uses the background command.

:P1_Ammo
!0 0
>Background_RGB revolver 1 35 50 6 1 2
:P1_Damaged
!0 1
>Flash_RGB red 60 60 1
:P1_CtmRecoil
!0 1
>Flash_RGB white 50 30 1
:P1_Life
!0 1
>Death_Flash_RGB red 45 45 8 1
:mame_stop
!0 1
>TurnOffLights


Regular Light Commands

 

Flash Commands:

 

Flash_Regular (Time On) (Time Off) (Number of Flashes)
Flashes all the lights in the group(s), when the output signal data is not equal to 0.

example: >Flash_Regular 50 50 1

Reload_Flash_Regular (Time On) (Time Off) (Number of Flashes) (Player Number)
Flashes all the lights in the group(s), when the player’s reload happens. Output signal needs to be player’s ammo value.

example: >Reload_Flash_Regular 80 80 1 1

Death_Flash_Regular (Time On) (Time Off) (Number of Flashes) (Player Number)
Flashes all the lights in the group(s), when the player’s death happens. Output signal needs to be player’s life value. This currently only works on games that have life points of 3-5, like on HOTD4. It currently doesn’t work on games that use a 100% health bar, like Let’s Go Island. Will be fixed in HOTR v1.2.8.

example: >Death_Flash_Regular 35 35 8 1

Random_Flash_Regular (Time On) (Time Off) (Number of Flashes)
Randomly flashes a light. Each group will have its own random pin. This executes when the output signal’s value is not equal to 0.

example: >Random_Flash_Regular 90 50 1


Sequence Commands:

 

Sequence_Regular (Delay)
Light up the first light of the group, and then delays. Then it will light up the next light and delay, and loop this until all the lights are on. This executes when the output signal’s value is not equal to 0.

example: >Sequence_Regular 15

Reload_Sequence_Regular (Delay) (Player Number)
Light up the first light of the group, and then delays. Then it will light up the next light and delay, and loop this until all the lights are on. This executes when the player’s reload happens. Output signal needs to be player’s ammo value.

example: >Reload_Sequence_Regular 25 2


Follower Commands:

 

Follower_Regular
If the data value of the output signal is 0, then the light(s) are turn offed. If the data value is greater than 0, then the light(s) will be on. Used for the start button and other things. Works like MameHooker does..

example: >Follower_Regular


Background Commands:


Background_Regular (Player Number) (Time Delay From Background to New Command) (Time Delay Background Reload) (High Count) (Other Group Numbers)
Background is used to display information to the player. Also, commands can run on top of the background. The background can only use 1 group, per light controller. If more than 1 group is used, then it will error out. The time delay from background to new command, is the time that the lights are off, before the new command starts. Giving a break between the background and command. If the output signals value is greater than the last value, then a reload will happen automatically. Also, the reload will just affect the lights that are off. For example, 6 lights are used like a revolver, and 3 bullets are left. The player reloads, so the 4th light comes on, then delays using the time reload delay. Then the 5th light delay, 6th light, and delay. It doesn’t start at the 1st light. High count, is how many lights will be used to display data. If 0, then uses all the lights. If there is 8 lights, and just want to use 6, then high count should be 6. Other group numbers, are other groups that use the same pins as the background group, and used in the game/default file. The background group will automatically be added to this group There can only be 4 backgrounds per light controller running at the same time..

example: >Background_Regular 1 35 50 6 0 1 2


Arguments:


Time On: 1ms - 65,535ms (0.001s - 65.535s)
Time Off: 1ms - 65,535ms (0.001s - 65.535s)
Time Delay: 1ms - 65,535ms (0.001s - 65.535s)
Time Delay From Background to New Command: 1ms - 65:535ms (0.001s - 65.535s) - The time that the lights are off, before the new command starts.
Time Delay Background Reload: 1ms - 65,535ms (0.001s - 65.535s) - Background sequence delay for reload.

Number of Flashes: 1 - 255

Player Number: 1 – 4

High Count: 0 - Number of Lights - If 0, then defaults to number of lights in group. Number of lights used to display info in background.

Other Group Numbers: Other Groups that have the same pins as the background group, and used with other commands.

Example File:


My hotd4.txt from testing.

:P1_CtmRecoil
!0 1 2
>Random_Flash_Regular 50 50 1
:P1_Damaged
!0 1
>Sequence_Regular 60
:P1_Ammo
!0 7 3 4
>Reload_Flash_Regular 60 60 1 1
:P1_Life
!0 1
>Death_Flash_Regular 35 35 4 1
:mame_start
!0 0
>Flash_Regular 100 100 3
:mame_stop
!0 0
>Flash_Regular 100 100 3
:P1_LmpStart
!0 8
>Follower_Regular

I put a lot of checks into the game file load function. Also, it displays the failed message box correctly, as I had to put extra code in, since it is own its own thread. It should fail out if you used a color name that wasn’t in the group file. Or a group number that doesn’t exists. Since, it is early, I might have not caught everything.