LightController

Group File


Group File Information



Supported Devices:

  • PacDrive - 16 LEDs (RGB Not Supported)
  • UHID - 16 LEDs (RGB Not Supported)
  • Blue-HID - 16 LEDs (RGB Not Supported)
  • NanoLED - 60 LEDs (20 RGBs)
  • PacLED64 - 64 LEDs (21 RGBs + 1 LED)
  • I-Pac Ultimate IO - 96 LEDs (32 RGBs)


Group File Info:

The light controller group file tells Hook of the Reaper (HOTR) the groups of lights being used for the light controller. The group file can be located anywhere, but preferable stored in the ‘lightCntlr’ directory. The light pin number can be used in multiple groups. The pin number cannot be higher than the number of pins on the device. For example, on PacLED64, pin #69 will error out, as the pin numbers are 1 to 64. There can be blank lines in the file. Also, the group pins can be spread out, onto multiple lines. As long as there are under the group definition.

Below is the 3 groups that are allowed in the group file.

  • GRP
  • GRP_RGB
  • GRB_RGB_FAST

There are two groups for RGB lights, and one group for regular lights. The RGB group (GRP_RGB) is used to enter all the RGB pins into the group, meaning the 3 pins for the 3 colors. If you are adding 5 RGB lights to the group, then it needs 15 (3 x 5) pin numbers. The pin count must be divisible by 3, or the group file will error out Also, it needs at least 3 pins minium. The last RGB group is the RGB Fast group (GRP_RGB_FAST). This group assumed that all the pins are sequential for the RGB group. Therefore, you only enter the red (R) pin number. Then HOTR assumes that the green pin number is +1 from red, and blue pin number is +2 from red. This can speed things up, as dealing with 1 pin for the group is easier. Only the RGB needs to be sequential, the group list number don’t have to be. For example, pin 1, 8, 30, 49 would be allowed. Also, only group RGB or group RGB Fast can be used. They both cannot be used in the same group file, so the user has to choose which RGB they will use. If both are used, the group file will error out and not load.

The last group (GRP), is for regular lights. This if the user has color arcade buttons, and a light is used to light up the colored buttons. For example, player's 1 buttons are blue, and player's 2 buttons are red. When the lights are on for player 1, the blue buttons will light up blue. For player2, the red buttons will light up as red. This is the only group that can be used with the PacDrive, UHID, and Blu-HID.

For the regular lights, the default brightness, AKA intensity, can be set in the group file. This is only needed for the NanoLED, PacLED64, and PacUltimateIO devices. To do this, put 'Default_Brightness' at the beginning of a new line. Then put in a space and then a number from 1-255. I suggest using a number that is bigger than 84, as the light might not turn on. If the default brightness is not set, then it will default to '255' for the regular lights. Please see below for an example of setting the default brightness to 240.

Default_Brightness 240

Also, the Fade can be set in the group file. This is only for the NanoLED, PacLED64, and PacUltimateIO devices. To do this, put 'Default_Fade' at the beginning of a new line. Then put in a space and then a number from 0-255. If the default fade is not set, then it will default to '0' for the lights. Please see below for an example of setting the default fade to 50.

Default_Fade 50

The group is first declared by what kind of group it is, and then followed by it’s number. The allowable group numbers are 0 to 255. So 256 can exist for every light controller. Then the group minimum is 1 pin for regular group and RGB Fast group, while the RGB group minimum is 3 pins. The maximum number of pins for the regular and RGB lights group is the number of lights pins on the controller. The maximum number of pins for the RGB Fast group, is the highest pin count that is divisible by 3. For the PacLED64, which has 64 light pins, it would be 63, where 1 pin is left over. Then 63/3 is 21, so 21 pins can be used for RGB_FAST, for the PacLED64, because 1 pin represents 3 pins, where 3 * 21 is 63. For NanoLED it is 20, and PacUltimateIO is 32. Also, for the RGB Fast group, you cannot reuse pins that are used in the sequential. If you use pin 7 in the group, then pin 8 and 9 cannot be used in that group. If they are, the group file will error out, because of that group.

Another item that can be entered into the group file is an 8bit RGB color. This is started with the “Color” followed by the name of the color. Then 3 numbers are followed after the name. The first number can be 0 to 255, and is for red. The second number can be 0 to 255, and is for green. Finally, the third number can be 0-255, and is for blue. This is all contained on one line. If you make it into multiple line, it will error out. I recommend not to use numbers under 80, as they may not light up. The colors can only be used with the RGB lights.

After the colors has been defined, than the color map(s) can be defined. A color map is a list of colors. So the color map has to be defined after the colors. To define a color map, 'Color_Map' has to be at the beginning of the line. Then it is followed by the color map's name, which can be used in the game/default file. After the name, at least 2 8bit RGB colors or more are listed out. There can be 256 colors in a color map, so it can be 2 to 256 colors. Also, colors can be repeated in a color map. For example, green color can be used 2 times to meet the requirements. The color maps can only be used with the RGB lights.

The group definition can be ended in 4 ways. The first, is if a new group definition is started. The second, is that a RGB color is added. The 3rd and new way, is to add the 'END_GRP' to the front of the line, to end the group definition. The fourth and final way, is to come to the end of the file. The 'END_GRP' was added to make it easier to add in notes to the file.

Between the group start and end, there can only be pin numbers in the group definition. Also, there has to be at least 1 pin for 'GRP' and 'GRP_RGB_FAST', and 3 pins for 'GRP_RGB'. As stated above, there are 4 ways to close the group definition. If there are any characters in the group definition, it will error out. There can be empty spaces in the group definition.

Start the group definition, by using 'GRP', 'GRP_RGB', or 'GRP_REG_FAST' at the front of the line, followed by it’s group number. For Example:

GRP 0

Then only numbers or empty line can be used after the group has started. For Example:

GRP_RGB 1
1 2 3 4 5 6
7 8 9 10 11

12

Then there are 4 ways to close the group definition. One way is to use the 'END_GRP' at the beginning of the line. For Example:

GRP_RGB_FAST 1
1 4 7 10
END_GRP

Another way to close the group definition is to start a new group. For Example:

GRP 1
1 2 3 4 5
5 6 8

GRP 2
12 13 14 15 16 17

Another way to close the group definition is to add a RGB color.

GRP_RGB_FAST
1 4 7 10

Color red 255 0 0

The last way to close the group definition is to get to the end of the file. Which I cannot show in a good way. But mostly built in for safety.

Below are examples of group files that could be used.

1st Example – Just RGB Groups and Colors

GRP_RGB 0
1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24
END_GRP

GRP_RGB 1
1 2 3 4 5 6 7 8 9 10 11 12

GRP_RGB 2
13 14 15 16 17 18 19 20 21 22 23 24
END_GRP

Color red 255 0 0
Color green 0 255 0
Color blue 0 0 255
Color yellow 255 255 0

Color_Map bulletBlood red white white white
Color_Map revolver green green green green green green

2nd Example – Just Using RGB Fast Groups

GRP_RGB_FAST 20
1 4 7 10
13 16 19 22

GRP_RGB_FAST 8
10 2 1 7
END_GRP

GRP_RGB_FAST 69
1 22 25
16 19 22

Color purple 255 0 255
Color cyan 0 255 255
Color white 255 255 255
Color redLight 96 0 0

3rd Example – Mix of Regular and RGB

GRP 0
30 31 32 33 34 35 36 37

GRP_RGB 1
1 2 3 4 5 6 7 8 9 10 11 12
END_GRP

GRP_RGB 2
13 14 15 16 17 18 19 20 21 22 23 24
END_GRP

Color red 255 0 0
Color green 0 255 0
Color blue 0 0 255
Color yellow 255 255 0

Color_Map revolver green green green green green green

4th Example - Group File from Vitual Cop 2 Game, using Background

This is to make it look like a revolver
And to reload like a revolver, as reload starts in the bottom left

GRP_RGB_FAST 0
13 16 19
7 4 1
END_GRP

GRP_RGB_FAST 1
1 4 7 10 13 16 19 22
END_GRP

Color red 255 0 0
Color green 0 255 0
Color blue 0 0 255
Color yellow 255 255 0
Color purple 255 0 255
Color cyan 0 255 255
Color white 255 255 255
Color redLight 96 0 0
Color brass 156 135 44

Color_Map bulletBlood red white white white
Color_Map revolver green green green green green green


Examples of Illegal Things in Group Files:

Error #1 – Group Number Can Only Be 0-255
GRP_RGB 500
1 2 3 4 5 6 7 8 9 10 11 12

Error #2 – Pin Number Out of Range
GRP_RGB 10
1 4 7 9 200

Error #3 – Need At Least 3 Pin Numbers for GRP_RGB
GRP_RGB 0
1 2
GRP_RGB 1
6

Error #4 Need At Least 1 Pin Numbers for GRP & GRP_RGB_FAST
GRP_RGB_FAST
END_GRP
GRP

Error #5 – Using Both ‘GRP_RGB’ & ‘GRP_RGB_FAST’ in Group file
GRP_RGB 0
1 2 3
GRP_RGB_FAST 1
1 4

Error #6 – Re-Use Used Green or Blue Pin(s) in RGB Fast Group
GRP_RGB_FAST 6
1 4 7 9
20 21 <- Error is 21, as 20 has 21 and 22 after it in RGB Fast

Error #7 – No Color Name
Color 230 128 255

Error #8 – 8Bit Color Number out of Range of 0-255
Color blue 0 0 375

Error #9 - Have Characters in the Group Definition
GRP_RGB_FAST 0
1 4 7 10 13
Blah Blah Blah
16 19 21
END_GRP

Error #10 - Only 1 Color in the Color Map
Color_Map badMap red