- 26
- Posts
- 6
- Years
- Seen Mar 22, 2025
Overview:
I made this plugin after seeing (broken link removed). With this plugin, you can make dark maps more lively with a light source that you can control freely. One example of this kind of darkness is Ecruteak's Gym in HGSS, Dewford's Gym in RSE, and Hearthome's Gym in Platinum.
DOWNLOAD LINK (v1.2.1)
How to install the script:
In the plugin Settings section, you may edit several variables.
Below is a list of the settings.
Script Commands
There are several script commands that you can use to control the darkness.
Below is a list of script commands.
Event Behaviours
These are several pieces of text that can be put into the event's name,
which will cause those events to have particular behaviours.
Below is a list of those texts and behaviours.
This plugin has several limitations that make it work properly.
I made this plugin after seeing (broken link removed). With this plugin, you can make dark maps more lively with a light source that you can control freely. One example of this kind of darkness is Ecruteak's Gym in HGSS, Dewford's Gym in RSE, and Hearthome's Gym in Platinum.
DOWNLOAD LINK (v1.2.1)
How to install the script:
- Download and Extract the file
- Move it to your plugin folder inside the main game directory.
- Compile your game (press CTRL while booting your game in debug mode)
In the plugin Settings section, you may edit several variables.
Below is a list of the settings.
Spoiler:
- INITIAL_DARKNESS_CIRCLE
The initial radius of the darkness circle on dark maps - FLASH_CIRCLE_RADIUS
Radius of darkness circle while using Flash - VARIABLE_RADIUS_DARK_MAP
Variable ID of initial radius based on Map ID. Any radius changes on these map IDs will be reset after the player gets out of the dark map and saved to this variable. - INITIAL_DARKNESS_OPACITY
Initial opacity of darkness on dark maps - OPACITY_DARK_MAP_BY_ID
Value of initial opacity based on Map ID. This will give a different opacity for every map IDs listed here. - FLASH_PROHIBITED_MAPS
List of maps that prohibit the player from using flash - FLASHLIGHT_ONLY_MAPS
List of maps where the player will automatically use a flashlight and also prohibit player to use Flash. - INITIAL_FLASHLIGHT_DIST
Initial value of distance for a flashlight - FLASHLIGHT_MAX_DIST
The initial value of the maximum distance for a flashlight - FLASHLIGHT_X_OFFSET and FLASHLIGHT_Y_OFFSET
The value of a flashlight's light sources X and Y offset from the centre of the character sprites - CUSTOM_IMAGE_DARKNESS
Custom darkness images based on Map ID. Custom darkness image is located in "Graphics/Fogs/". The size of the image must have the same size as the map.
Script Commands
There are several script commands that you can use to control the darkness.
Below is a list of script commands.
Spoiler:
- pbGetDarknessOpacity
This script command is used to get the darkness opacity on the current map. - pbGetDarknessRadius
This script command is used to get the darkness radius on the current map. - pbSetDarknessRadius(value)
This script command is used to set the darkness radius on the current map. - pbMoveDarknessRadius(value)
This script command is used to change the darkness radius gradually on the current map. - pbMoveDarknessRadiusMax
This script command is used to change the darkness radius gradually to the max on the current map. It will fully brighten the map. - pbMoveDarknessRadiusMin
This script command is used to change the darkness radius gradually to the min on the current map. The player will be lost its light source.
Event Behaviours
These are several pieces of text that can be put into the event's name,
which will cause those events to have particular behaviours.
Below is a list of those texts and behaviours.
- "glowalways"
An event with this text in its name will always become a light source.
- "glowswitch(X)"
An event with this text in its name will become a light source if the switch is ON. If there is a "glowswitchreverse" in its name, it will become a light source if the switch is OFF instead. The "X" is the game variable ID (1 - xxx) or the event's self switch (A, B, C, or D).
- "glowsize(X)"
An event with this text in its name will become a light source with a radius of "X" pixels. This is also treated as "glowalways" if there is no "glowswitch(X)" in its name.
- "glowstatic"
An event with this text in its name will become a static light source. This is also treated as "glowalways" if there is no "glowswitch(X)" in its name.
- "flashlight" or "flashlight(X)"
An event with this text in its name will use a flashlight. The "X" is the distance of the flashlight (max. FLASHLIGHT_MAX_DIST).
This plugin has several limitations that make it work properly.
- It only work on dark maps. You can check it on your map metadata PBS file.
- It doesn't support connected maps.
- It doesn't support colored light source.
Last edited: