Version: 0.1.1 (Beta) Changlog: 2025.12.08 Improved screen size verification, easy color system, anti-lag option. This script allows you to create colored lines connecting events, or from the player to a map event, eliminating the need to create events in parallel and use game variables.
Version: 0.1.1 (Beta)
Changlog:
- 2025.12.08 Improved screen size verification, easy color system, anti-lag option.
This script allows you to create colored lines connecting events, or from the player to a map event, eliminating the need to create events in parallel and use game variables.
It's still a script that can be improved.
Possible future improvements:
Select colors by ID from a palette (Array)
Perhaps increase the line limit (even with the lag issue)
- Adjusted to work with common events in case a map event does not exist.
License:
- Both Non-Commercial and Commercial usage is allowed
- No need to add credits
- Modifications are released
Download:
[RMXP VX VXA] Paint Module.rb
Video:
Instructions:
Create a line between two characters on the map:
Paint.setline(LineID, CharID, CharID, Color, Height Y-Fix)
LineID: 0..7 (To avoid lag, the limit of simultaneous lines is 8)
CharID: A value of 0 will point to the player, while 1 or higher will point to the event on the map.
Color: You can define a custom color or use one of the 8 initial colors, via the color ID or name; the name can be written in lowercase or uppercase letters:
"black" or 0
"red" or 1
"green" or 2
"blue" or 3
"yellow" or 4
"fuchsia" or 5
"aqua" or 6
"white" or 7
Y-Fix: The default height is -12 from the base of the character set graph.
Examples:
Enable line 3 to go from the player to the map event with ID 1:
Enable line 0 to go from event 2 to event 4 with the color blue:
Ruby:
Paint.setline(0,2,4,Color.new(0,0,255))
Connect line 7 with the standard color, but with graphic 28 higher:
Ruby:
Paint.setline(7,0,4,nil,28)
Delete a specific line:
Paint.eraseline(ID)
Examples:
Delete line 8:
Delete all lines:
Paint.clearlines
Anti-Lag:
This allows for fewer pixels to be drawn, making the game smoother.
Paint::ANTI_LAG = 2 (2 or more)
A brief explanation of how colors work:
The Color
class in RGSS functions similarly to other environments, but allows the use of transparency.
The
Color.new command is used to return a color based on the values you enter (0~255).
Color.new(Red,Green,Blue)
Color.new(Red,Green,Blue,Transparency)
There are online tools where you can convert colors into values to use in the script.
Here's a website that might help, although
MS Paint also does this for color selection:
Color-Name.com is a great online tool to find the color name from hex code. Download palettes, patterns, wallpapers of your chosen color and get RGB, CMYK, Pantone, RAL values and more.
www.color-name.com
License: Both Non-Commercial and Commercial usage is allowed No need to add credits Modifications are released