Make reveal destionations optional

This commit is contained in:
dazedanon 2025-12-21 12:29:40 -06:00
parent 0ee782cdd0
commit f1c1f2c68c

View file

@ -29,9 +29,15 @@
* - Exit Discovery: Exits are only shown after the player uses them
*
* Settings (Options Menu):
* - "Minimap (Mod)": Enable/disable the minimap feature entirely
* - "Fog of War": When ON, only explored areas and used exits are shown
* When OFF, the entire map and all exits are revealed
* - "Minimap Mod (M)": Enable/disable the minimap feature entirely
* - "Fog of War": Dark overlay hiding unexplored map areas
* - "Hide Exits": Hide exits/locations until discovered by the player
*
* Combinations:
* - Both ON: Full exploration mode (dark fog + hidden exits)
* - Fog OFF, Exits ON: See full map but exits hidden until used
* - Fog ON, Exits OFF: Dark fog but all exits visible
* - Both OFF: See everything immediately
*/
(function() {
@ -87,7 +93,8 @@
// Default values (enabled by default)
ConfigManager.minimapEnabled = true;
ConfigManager.minimapFogOfWar = true; // Fog of war enabled by default
ConfigManager.minimapFogOfWar = true; // Fog of war (dark overlay) enabled by default
ConfigManager.minimapRevealAll = false; // Reveal all destinations OFF by default (exploration mode)
// Hook into makeData to save the settings
const _ConfigManager_makeData = ConfigManager.makeData;
@ -95,6 +102,7 @@
const config = _ConfigManager_makeData.call(this);
config.minimapEnabled = this.minimapEnabled;
config.minimapFogOfWar = this.minimapFogOfWar;
config.minimapRevealAll = this.minimapRevealAll;
return config;
};
@ -104,6 +112,7 @@
_ConfigManager_applyData.call(this, config);
this.minimapEnabled = this.readFlag(config, "minimapEnabled", true);
this.minimapFogOfWar = this.readFlag(config, "minimapFogOfWar", true);
this.minimapRevealAll = this.readFlag(config, "minimapRevealAll", false);
};
//=========================================================================
@ -115,6 +124,7 @@
_Window_Options_makeCommandList.call(this);
this.addCommand("Minimap Mod (M)", "minimapEnabled");
this.addCommand(" Fog of War", "minimapFogOfWar");
this.addCommand(" Reveal Destinations", "minimapRevealAll");
};
//=========================================================================
@ -338,13 +348,13 @@
const rawExits = [];
const mapId = $gameMap.mapId();
// Collect all transfer events (only activated exits in explored areas, unless fog of war is disabled)
const fogEnabled = ConfigManager.minimapFogOfWar;
// Collect all transfer events (show all if revealAll is ON, otherwise filter by exploration)
const revealAll = ConfigManager.minimapRevealAll;
for (const event of $gameMap.events()) {
if (!event) continue;
// Only include exits in explored areas (if fog of war is enabled)
if (fogEnabled && !$gameSystem.isTileExplored(mapId, event.x, event.y)) {
// Only include exits in explored areas (unless revealAll is enabled)
if (!revealAll && !$gameSystem.isTileExplored(mapId, event.x, event.y)) {
continue;
}
@ -361,8 +371,8 @@
if (params[0] === 0) { // Direct designation (not variable)
const targetMapId = params[1];
// Only show exits that have been activated (used by player) - if fog of war is enabled
if (fogEnabled && !$gameSystem.isExitActivated(mapId, targetMapId, event.x, event.y)) {
// Only show exits that have been activated (used by player) - unless revealAll is enabled
if (!revealAll && !$gameSystem.isExitActivated(mapId, targetMapId, event.x, event.y)) {
continue;
}
@ -1201,12 +1211,12 @@
}
// Draw important events as markers (except transfers - those are drawn as numbered markers separately)
const fogEnabledForMarkers = ConfigManager.minimapFogOfWar;
const revealAllMarkers = ConfigManager.minimapRevealAll;
for (const event of $gameMap.events()) {
if (!event) continue;
// Only show markers in explored areas (if fog of war is enabled)
if (fogEnabledForMarkers && !$gameSystem.isTileExplored($gameMap.mapId(), event.x, event.y)) {
// Only show markers in explored areas (unless revealAll is enabled)
if (!revealAllMarkers && !$gameSystem.isTileExplored($gameMap.mapId(), event.x, event.y)) {
continue;
}