├── LICENSE ├── MV ├── event_on_load.js ├── max_file_size.js └── variable_event_id.js ├── README.md └── VXAce ├── dt_autosave_cleaned.rb ├── dynamic_variables.rb ├── switch_variable_logger.rb └── transfer_player_on_gameover.rb /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Erisa (ErisaMoe, Seriel) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MV/event_on_load.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // event_on_load.js 3 | //============================================================================= 4 | 5 | 6 | /*: 7 | * @author Erisa (Seriel) 8 | * 9 | * @plugindesc This plugin runs a common event every time a file is loaded. 10 | * 11 | * @help 12 | * -------------------------------------------------------------------------------- 13 | * Version 1.0 14 | * -------------------------------------------------------------------------------- 15 | * 16 | * -------------------------------------------------------------------------------- 17 | * Version History 18 | * -------------------------------------------------------------------------------- 19 | * 1.0 - Release 20 | * 21 | * @param Run event on load? 22 | * @desc Set to true or false. 23 | * @default false 24 | * 25 | * @param Load Event ID 26 | * @desc The ID of the common event called when a file is loaded. Only occurs if Load Event ID is true. 27 | * @default 1 28 | * 29 | * @param Run event on New Game? 30 | * @desc Set to true or false. 31 | * @default false 32 | * 33 | * @param New Game Event ID 34 | * @desc The ID of the common event called when a file is loaded. Only occurs if Load Event ID is true. 35 | * @default 2 36 | */ 37 | 38 | (function() { 39 | var parameters = PluginManager.parameters('SE_LoadEvent'); 40 | 41 | var SELoadEvent = Boolean(parameters['Run event on load?']) || false; 42 | var SELoadID = Number(parameters['Load Event ID']) || 0; 43 | 44 | var SENewGame = Boolean(parameters['Run event on New Game?']) || false; 45 | var SENewGame = Number(parameters['New Game Event ID']) || 0; 46 | 47 | var _Seriel_Scene_Load_prototype_onLoadSuccess = Scene_Load.prototype.onLoadSuccess; 48 | Scene_Load.prototype.onLoadSuccess = function(args) { 49 | _Seriel_Scene_Load_prototype_onLoadSuccess.call(this, args); 50 | if (SELoadEvent) { 51 | $gameTemp.reserveCommonEvent(SELoadID); 52 | } 53 | }; 54 | 55 | var _Seriel_DataManager_setupNewGame = DataManager.setupNewGame; 56 | DataManager.setupNewGame = function() { 57 | _Seriel_DataManager_setupNewGame.call(this); 58 | if (SENewGame) { 59 | $gameTemp.reserveCommonEvent(SENewGame); 60 | } 61 | }; 62 | 63 | })(); 64 | -------------------------------------------------------------------------------- /MV/max_file_size.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // max_file_size.js 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc 7 | * @author Erisa (Seriel) 8 | * 9 | * @plugindesc Allows you to change the maximum number of save files. 10 | * 11 | * @help 12 | * -------------------------------------------------------------------------------- 13 | * Version 1.0 14 | * -------------------------------------------------------------------------------- 15 | * 16 | * -------------------------------------------------------------------------------- 17 | * Version History 18 | * -------------------------------------------------------------------------------- 19 | * 1.0 - Release 20 | * 21 | * @param Max save files 22 | * @desc Set the max number of save files. 23 | * @default 20 24 | */ 25 | 26 | (function() { 27 | var parameters = PluginManager.parameters('JK_FileNum'); 28 | var SEsavefiles = Number(parameters['Max save files']) || 20; 29 | 30 | DataManager.maxSavefiles = function() { 31 | return SEsavefiles ; 32 | } 33 | })(); 34 | -------------------------------------------------------------------------------- /MV/variable_event_id.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // variable_evnt_id.js 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc 7 | * @author Erisa (Seriel) 8 | * 9 | * @plugindesc Makes a variable contain the ID of the event being executed. Common Events will return the Event that last ran. 10 | * 11 | * @help 12 | * -------------------------------------------------------------------------------- 13 | * Free for commercial and non commercial use. 14 | * Version 1.0 15 | * -------------------------------------------------------------------------------- 16 | * 17 | * -------------------------------------------------------------------------------- 18 | * Version History 19 | * -------------------------------------------------------------------------------- 20 | * 1.0 - Release 21 | * 22 | * @param Variable ID 23 | * @desc The variable where the event ID is stored. 24 | * @default 1 25 | */ 26 | 27 | (function() { 28 | var parameters = PluginManager.parameters('JK_EventVariable'); 29 | var SEeventvariableid = Number(parameters['Variable ID']) || 1; 30 | 31 | var _SerielGame_Interpreter_prototype_setup = Game_Interpreter.prototype.setup; 32 | Game_Interpreter.prototype.setup = function(list, eventId) { 33 | _SerielGame_Interpreter_prototype_setup.call(this, list, eventId); 34 | var oldValue = $gameVariables.value(SEeventvariableid); 35 | $gameVariables.setValue(SEeventvariableid, oldValue = eventId); 36 | }; 37 | })(); 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RPG Maker Scripts/Plugins 2 | This repository contains a collection of scripts and plugins for the RPG Maker engines that I have created over the past years, collected in one place for easy browsing and use. 3 | 4 | ## VX Ace 5 | 6 | To install a VX Ace script: select the "Raw" button on the script page, open your projects script editor, copy all the text and paste it in a new script slot above "Insert here" by right clicking that entry and selecting "Insert". 7 | 8 | ### DT's Autosave (Cleaned up & Switch disable) 9 | This script is a script [originally created by DoctorTodd](https://forums.rpgmakerweb.com/index.php?threads/autosave.2707/) with modifications by myself that clean up the code and add the ability to disable the autosave with the use of a switch. All credits belong to the original author. 10 | 11 | -> [Download Script](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/VXAce/dt_autosave_cleaned.rb) 12 | 13 | ### Dynamic Variables 14 | This script works by intercepting any call to get a variable and replacing the result with the result of whatever script you have specified in the configuration. 15 | Using this, you can create "Dynamic" variables which change based on different factors, for example a variable which always displays the current map ID, or the health of the first party member. 16 | Due to the nature of how this works, trying to set one of these variables to a specific value in-game will NOT WORK. These only support get. 17 | 18 | -> [Download Script](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/VXAce/dynamic_variables.rb) 19 | 20 | ### Switch/Variable Logger 21 | This simple script will send debug output to the games console whenever a switch or variable is changed, allowed you to track the flow of gameplay while playtesting. 22 | 23 | -> [Download Script](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/VXAce/switch_variable_logger.rb) 24 | 25 | ### Transfer Player on Gameover 26 | This code works by intercepting the Game Over flow of the game and instead tranfering the player to a specific map. This can be used to create your own custom Game Over event, before returning the player to the title screen or simply starting the game anew -- whatever you prefer! 27 | To stop the game from triggering the Game Over flow repeatedly, all of the actor HP is set to 1. 28 | 29 | -> [Download Script](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/VXAce/transfer_player_on_gameover.rb) 30 | 31 | ## MV 32 | 33 | To install an MV plugin: select "Raw" on the scripts page, go to save the page from the right click menu or Ctrl+S and then save the file into the `js/plugins` folder of your project. 34 | 35 | ### Event on Load 36 | This plugin lets you run events when loading save files. 37 | This is done by specificying whether you want an event to load when loading a file, on a New Gamer or on both and then specifying the Common Event ID to be used. 38 | 39 | -> [Download Plugin](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/MV/event_on_load.js) 40 | 41 | ### Max File Size 42 | Simple plugin that allows you to change the max amount of file slots in your game. 43 | 44 | -> [Download Plugin](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/MV/max_file_size.js) 45 | 46 | 47 | ### Variable Event ID 48 | Simple plugin that makes a specified variable contain the map ID that the player is currently on. Used for referring to the ID in events without unnecessary script calls. 49 | 50 | -> [Download Plugin](https://github.com/Erisa/RPG-Maker-Scripts/blob/master/MV/variable_event_id.js) 51 | -------------------------------------------------------------------------------- /VXAce/dt_autosave_cleaned.rb: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # 3 | # DT's Autosave 4 | # Author: DoctorTodd 5 | # Date (06/22/2012) 6 | # Version: (1.0.0) (VXA) 7 | # Level: (Simple) 8 | # Email: Todd@beacongames.com 9 | # Cleaned up and switch disable added by: 10 | # Erisa A. 11 | # 12 | #=============================================================================== 13 | # 14 | # NOTES: 1)This script will only work with ace. 15 | # 16 | #=============================================================================== 17 | # 18 | # Description: Saves the game when transferring the map, before battle, 19 | # and opening the menu (all optional). 20 | # 21 | # Credits: Me (DoctorTodd) 22 | # 23 | #=============================================================================== 24 | # 25 | # Instructions 26 | # Paste above main. 27 | # Call using Autosave.call 28 | # 29 | #=============================================================================== 30 | # 31 | # Free for any use as long as I'm credited. 32 | # 33 | #=============================================================================== 34 | # 35 | # Editing begins 40 and ends on 56. 36 | # 37 | #=============================================================================== 38 | module ToddAutoSaveAce 39 | 40 | #Max files (without autosave). 41 | MAXFILES = 16 42 | 43 | #Autosave file name. 44 | AUTOSAVEFILENAME = "Autosave" 45 | 46 | #Autosave before battle? 47 | AUTOSAVEBB = true 48 | 49 | #Autosave when menu opened? 50 | AUTOSAVEM = true 51 | 52 | #Autosave when changing map? 53 | AUTOSAVETM = true 54 | 55 | #ID of switch which must be enabled for autosave to function. 56 | ENABLEDSWITCH = 1 57 | 58 | end 59 | #============================================================================== 60 | # ** Autosave 61 | #------------------------------------------------------------------------------ 62 | # This module contains the autosave method. This is allows you to use the 63 | # "Autosave.call" command. 64 | #============================================================================== 65 | 66 | module Autosave 67 | #-------------------------------------------------------------------------- 68 | # * Call method 69 | #-------------------------------------------------------------------------- 70 | def self.call 71 | DataManager.save_game_without_rescue(0) 72 | end 73 | end 74 | #============================================================================== 75 | # ** DataManager 76 | #------------------------------------------------------------------------------ 77 | # This module manages the database and game objects. Almost all of the 78 | # global variables used by the game are initialized by this module. 79 | #============================================================================== 80 | 81 | module DataManager 82 | #-------------------------------------------------------------------------- 83 | # * Maximum Number of Save Files 84 | #-------------------------------------------------------------------------- 85 | def self.savefile_max 86 | return ToddAutoSaveAce::MAXFILES + 1 87 | end 88 | end 89 | #============================================================================== 90 | # ** Scene_Map 91 | #------------------------------------------------------------------------------ 92 | # This class performs the map screen processing. 93 | #============================================================================== 94 | 95 | class Scene_Map < Scene_Base 96 | #-------------------------------------------------------------------------- 97 | # * Preprocessing for Battle Screen Transition 98 | #-------------------------------------------------------------------------- 99 | alias toddsave_pre_battle_scene pre_battle_scene 100 | def pre_battle_scene 101 | toddsave_pre_battle_scene 102 | temp = ToddAutoSaveAce::ENABLEDSWITCH 103 | Autosave.call if (ToddAutoSaveAce::AUTOSAVEBB && $game_switches[temp]) 104 | end 105 | #-------------------------------------------------------------------------- 106 | # * Call Menu Screen 107 | #-------------------------------------------------------------------------- 108 | alias toddsave_call_menu call_menu 109 | def call_menu 110 | temp = ToddAutoSaveAce::ENABLEDSWITCH 111 | if (ToddAutoSaveAce::AUTOSAVEM && $game_switches[temp]) 112 | Autosave.call 113 | end 114 | end 115 | #-------------------------------------------------------------------------- 116 | # * Post Processing for Transferring Player 117 | #-------------------------------------------------------------------------- 118 | alias toddsave_post_transfer post_transfer 119 | def post_transfer 120 | toddsave_post_transfer 121 | temp = ToddAutoSaveAce::ENABLEDSWITCH 122 | Autosave.call if (ToddAutoSaveAce::AUTOSAVETM && $game_switches[temp]) 123 | end 124 | end -------------------------------------------------------------------------------- /VXAce/dynamic_variables.rb: -------------------------------------------------------------------------------- 1 | if true #Set to false to disable script. 2 | # (C) Copyright Erisa A. (Seriel, erisa.moe) 2019 3 | ############################################################################### 4 | # Erisa ~ Dynamic Variables # 5 | # See under this notice for some help. # 6 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 7 | # The code here can be reused for any purpose, with credit given. # 8 | # This includes both Commercial and Non-Commercial use. # 9 | # However, contact is appreciated before Commercial use. # 10 | # Modified versions must give credit, however it must not be implied that the # 11 | # modifications were carried out by me. # 12 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 13 | # Contact: | seriel@erisa.moe # 14 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 15 | # Created with ♥ by Erisa A. (Seriel, erisa.moe) in 2019 # 16 | # Last edited: 2019-01-15 19:16:53 +0000 # 17 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 18 | # This script works by intercepting any call to get a variable and replacing # 19 | # the result with the result of whatever script you have specified below. # 20 | # Using this, you can create "Dynamic" variables which change based on # 21 | # different factors, for example a variable which always displays the # 22 | # current map ID, or the health of the first party member. # 23 | # Due to the nature of how this works, trying to set one of these variables # 24 | # to a specific value in-game will NOT WORK. These only support get. # 25 | ############################################################################### 26 | 27 | # Config is down here somewhere :) 28 | module Serie_DynVar 29 | ## START CONFIG 30 | 31 | # Make sure to add a comma on the end of the previous line. 32 | # Basic format: 33 | # 1 => "script_to_execute", 34 | # No comma on the last one! 35 | VAR_ASSIGNMENTS = { 36 | 500 => "$game_map.map_id", 37 | 501 => "$game_party.members[0].hp" 38 | } 39 | 40 | ## END CONFIG 41 | end 42 | 43 | 44 | #============================================================================== 45 | # ** Game_Variables 46 | #------------------------------------------------------------------------------ 47 | # This class handles variables. It's a wrapper for the built-in class "Array." 48 | # The instance of this class is referenced by $game_variables. 49 | #============================================================================== 50 | 51 | class Game_Variables 52 | alias :eri_getvar :[] 53 | 54 | #-------------------------------------------------------------------------- 55 | # * Get Variable 56 | #-------------------------------------------------------------------------- 57 | def [](variable_id) 58 | if Serie_DynVar::VAR_ASSIGNMENTS.key?(variable_id) 59 | eval(Serie_DynVar::VAR_ASSIGNMENTS[variable_id]) 60 | else 61 | eri_getvar(variable_id) 62 | end 63 | end 64 | 65 | end 66 | 67 | end # if true -------------------------------------------------------------------------------- /VXAce/switch_variable_logger.rb: -------------------------------------------------------------------------------- 1 | if true #Set to false to disable script. 2 | 3 | # (C) Copyright Erisa A. (Seriel, erisa.moe) 2019 4 | ############################################################################### 5 | # Erisa ~ Switch/Variable Logger # 6 | # You must enable Game -> Show Console before use. Only works in test mode # 7 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 8 | # The code here can be reused for any purpose, with credit given. # 9 | # This includes both Commercial and Non-Commercial use. # 10 | # However, contact is appreciated before Commercial use. # 11 | # Modified versions must give credit, however it must not be implied that the # 12 | # modifications were carried out by me. # 13 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 14 | # Contact: | seriel@erisa.moe # 15 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 16 | # Created with ♥ by Erisa A. (Seriel, erisa.moe) in 2019 # 17 | # Last edited: 2019-01-14 23:54:46 +0000 # 18 | ############################################################################### 19 | 20 | 21 | #============================================================================== 22 | # ** Game_Switches 23 | #------------------------------------------------------------------------------ 24 | # This class handles switches. It's a wrapper for the built-in class "Array." 25 | # The instance of this class is referenced by $game_switches. 26 | #============================================================================== 27 | 28 | class Game_Switches 29 | alias :eri_setbool :[]= 30 | 31 | def []=(switch_id, value) 32 | puts "[Debug] Switch #{switch_id} changed to #{value}!" if $TEST 33 | eri_setbool(switch_id, value) 34 | end 35 | end 36 | 37 | #============================================================================== 38 | # ** Game_Variables 39 | #------------------------------------------------------------------------------ 40 | # This class handles variables. It's a wrapper for the built-in class "Array." 41 | # The instance of this class is referenced by $game_variables. 42 | #============================================================================== 43 | 44 | class Game_Variables 45 | 46 | alias :eri_setvar :[]= 47 | #-------------------------------------------------------------------------- 48 | # * Set Variable 49 | #-------------------------------------------------------------------------- 50 | def []=(variable_id, value) 51 | puts "[Debug] Variable #{variable_id} changed to '#{value}'!" if $TEST 52 | eri_setvar(variable_id, value) 53 | end 54 | end 55 | 56 | end # if true -------------------------------------------------------------------------------- /VXAce/transfer_player_on_gameover.rb: -------------------------------------------------------------------------------- 1 | if true #Set to false to disable script. 2 | # Copyright Erisa A. (Seriel, erisa.moe) 2018 3 | ############################################################################### 4 | # Erisa ~ Transfer Player on Gameover ~ <3 # 5 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 6 | # The code here can be reused for any purpose, with credit given. # 7 | # This includes both Commercial and Non-Commercial use. # 8 | # However, contact is appreciated before Commercial use. # 9 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 10 | # Contact email | seriel@erisa.moe # 11 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 12 | # Created with ♥ by Erisa A. (Seriel, erisa.moe) (2018) # 13 | ############################################################################### 14 | 15 | # Edit below here ↓ to configure the script. 16 | module SerieTransferOnGameover 17 | 18 | # The ID of the map that the player should be sent to. 19 | MAP_ID = 3 20 | 21 | # The X and Y co-ordinates of the map where the player should be sent. 22 | # The third argument is direction where: 23 | # 2: down, 4: left, 6: right, 8: up 24 | # Format: [x,y,d] 25 | MAP_COORDS = [12,15,8] # [x,y,direction] 26 | 27 | # Optional, change nil to a Common Event ID to play it on tranfer. 28 | # This can be used for example to display a message box or change gold values. 29 | EVENT_ID = nil 30 | 31 | end 32 | 33 | #============================================================================== 34 | # ** Scene_Gameover 35 | #------------------------------------------------------------------------------ 36 | # This class performs game over screen processing. 37 | #============================================================================== 38 | class Scene_Gameover < Scene_Base 39 | #-------------------------------------------------------------------------- 40 | # * Start Processing 41 | #-------------------------------------------------------------------------- 42 | def start 43 | super 44 | params = SerieTransferOnGameover::MAP_COORDS 45 | map = SerieTransferOnGameover::MAP_ID 46 | SceneManager.clear 47 | $game_party.members.each { |actor| actor.hp = 1; actor.mp = 1} 48 | SceneManager.goto(Scene_Map) 49 | $game_player.reserve_transfer(map, params[0], params[1], params[2]) 50 | unless SerieTransferOnGameover::EVENT_ID.nil? 51 | $game_temp.reserve_common_event(SerieTransferOnGameOver::EVENT_ID) 52 | end 53 | end 54 | 55 | def update 56 | end 57 | def perform_transition 58 | end 59 | undef play_gameover_music 60 | undef fadeout_speed 61 | undef fadein_speed 62 | undef goto_title 63 | def dispose_background 64 | end 65 | end 66 | 67 | 68 | end # of the script --------------------------------------------------------------------------------