public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MV/MZ SDJB_EventSelfSwitches

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: MV/MZ SDJB_EventSelfSwitches
  • Original author: ShadowDragon
  • Original date: January 7, 2026
  • Source thread: https://forums.rpgmakerweb.com/threads/sdjb_eventselfswitches.181827/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugins In Development

Summary

PluginName: SDJB_EventSelfSwitches Author: ShadowDragon Spoiler: How it works Code:

Archived First Post

PluginName: SDJB_EventSelfSwitches
Author: ShadowDragon

Code:
 Introduction
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This plugin adds unlimited self switches to events and allows
 them to be easily activated via script calls.

 You can name self switches however you want and activate them
 from a different map.

 Keep in mind that triggering a self switch from a different map
 will not work unless that map has been visited at least once.


 How to Use
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Use the comment tag: <SelfSwitch: NameHere>

 "NameHere" is your switch name. This can be important if you use
 specific "phases", where only one should be ON at a time.

 You can also reset a group of switches for the current event,
 which is useful for repeatable quest events.

 IMPORTANT:
 Default self switches (A, B, C, D) can still be used normally.
 However, if a page uses <SelfSwitch: NameHere>, it is best to
 avoid using self switches (A, B, C, D) on that page and instead
 leave the Self Switch condition blank.

 When the Self Switch condition is blank and the comment tag is
 used, the page is treated as a named self switch activation page.


 Examples
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 setNamedSelfSwitch(name, value, mapId, eventId);

 mapId and eventId can be omitted when used on the current event.
 Valid values: "on", "off", "true", "false", true, false, "toggle"

 setNamedSelfSwitch("DoorOpen", "on");
 setNamedSelfSwitch("Phase2", "toggle");
 setNamedSelfSwitch("BossAwake", true, 12, 3);


 setExclusiveSelfSwitch(name, value);

 name  : the self switch name (treated as a group name)
 value : see valid values above

 setExclusiveSelfSwitch("Phase2", "on");

 The name "Phase2" will turn off "Phase1", "Phase3", etc.
 Other switch names are ignored.


 You can also turn off all self switches, either fully or partially:

 resetEventSelfSwitches(name, mapId, eventId);

 Fully reset all self switches for an event:

 resetEventSelfSwitches();         => Current event
 resetEventSelfSwitches("", 7, 3); => Explicit map and event

 Or partially, for repeatable quests or mini-games:

 resetEventSelfSwitches("Bonus");        => Turns off Bonus1, Bonus2, etc.
 resetEventSelfSwitches("Phase", 12, 3); => Only resets Phase1, Phase2, Phase3


=== TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB


=== WARNING ===
YOU ARE NOT ALLOWED TO:
* MODIFY without permission
* EXTEND without permission
* TAKE CODE without permission
* CLAIM AS YOU MADE IT
* REDISTRIBUTE but link back to the forum or itch.io
* SELL this product as standalone.
* DO NOT REMOVE THE HEADER.


(file is below as it require my base plugin (SDJB_Base or SDJB_BaseMZ (minified version))

Download from itch.io

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

=== TERMS OF USE === Free for Non-Commercial and Commercial use when credit is given. credit one of the following: ShadowDragon

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#js-development

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar