Modding Support - ladyfey22/Hyperline GitHub Wiki
Custom Hair Types
Custom hair types can be added by other mods, and will be handled within the hyperline UI and can be swapped to. This is done through a codemod. Hair types are expected to inherit from IHairType. Documentation of what each member function does is written in IHairType.cs. Please look at the built in hair types for examples.
Adding them is as simple as calling
Hyperline.Instance.AddType(new MyHairType());
in a startup function (ensure it's called before settings load).
Hair Trigger
Hyperline now supports hair triggers in maps, which simply change the players hair temporarily to match the settings provided in the map.
- Reset On Leave
Whether or not to reset the players hair to it's original state when the player leaves the trigger.
- Hair Changes
All changes to the hair settings. This is expected in a fairly specific format:
DashCount;HairLength;HairSpeed;HairType;HairParameters;
This can be repeated as much as needed to get all settings.
- Dash Count
Which hair settings to change dash count wise. So 1 would change the hair the player has when they have one dash.
- Hair Length
Fairly self explanatory, changes the length of the hair of the player as with the Hair Length setting in the mod options menu for hyperline.
- Hair Speed
Acts the same as the Speed setting in the mod options menu for hyperline.
- __Hair Type and Hair Parameters
This is where the hair type is specified and any settings specific to that hair type. Hair type is the Id of the hair type you want to set it to. Valid Id's are
Hyperline_GradientHair
Hyperline_PatternHair
Hyperline_RainbowHair
Hyperline_SolidHair
Each of these has different parameters to be expected.
Hair Type Parameters
- Gradient Hair
Expects 2 colors in the parameter list, representing the start and end colors of the gradient as a comma separated list. For example
1;10;10;Hyperline_GradientHair;FF0000,00FF00;
would create a gradient between Red (FF000) and Green (00FF00).
- Solid Hair Expects a single color in the parameter list, representing the color of the hair. For example
1;5;5;Hyperline_SolidHair;0000FF;
would create a solid hair with the color blue (0000FF).
- Rainbow Hair Expects two numbers, representing the saturation and value of the hair on a range from 1-10. For example
1;10;0;Hyperline_RainbowHair;10,5;
would create a set of rainbow hair with saturation 1.0 (10) and value 0.6 (6).
- Pattern Hair Expects a number, representing the quantity of colors in the pattern, and then the colors of said pattern. For example:
1;10;0;Hyperline_PatternHair;5,00FF00,FF0000,000000,0000FF,FFFFFF;
Would create a pattern with 5 colors, Green (00FF00), Red (FF0000), Black (000000), Blue (0000FF), and White (FFFFFF).
Example
0;5;5;Hyperline_SolidHair;0000FF;1;10;0;Hyperline_PatternHair;5,00FF00,FF0000,000000,0000FF,FFFFFF;2;10;10;Hyperline_GradientHair;FF0000,00FF00;
This is a combination of the above, setting each to a different dash count. 0 dash is a solid hair type, 1 dash is a pattern hair type, and 2 is a gradient hair type.