<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Save-Point - RPGMaker VX/VXAce (RGSS2/3) Engines]]></title>
		<link>https://www.save-point.org/</link>
		<description><![CDATA[Save-Point - https://www.save-point.org]]></description>
		<pubDate>Wed, 29 Jul 2026 22:25:57 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Map Resizer]]></title>
			<link>https://www.save-point.org/thread-13661.html</link>
			<pubDate>Mon, 27 Jul 2026 22:54:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=5">DerVVulfman</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13661.html</guid>
			<description><![CDATA[<div align="center"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Map Resizer</span></span><br />
<span style="font-size: medium;" class="mycode_size">Version: 1.0</span><br />
Also available for RPGMaker XP</div>
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction</span></span><br />
<br />
Tired of being stuck with maps  that cannot be any larger than 500x500 or whatever limitation  was set within your game editor?  This script allows one to tell RPGMaker to take a hike!<br />
<br />
With this script,  you can force a map to a new width and height  of your choice. And that map size remains stored in your maps file data so altering the 'properties' doesn't change anything... unless you alter the size in the map's properties window itself.<br />
<br />
If you create dimensions for a map  that does not exist in your map tree, no error will occur as it will any settings you created that are invalid.<br />
<br />
After execution, t he script/program will end.  If your currently viewed map is one of those being resized, merely switch to another map and then return and you will see the new map freshly reloaded and resized!<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Features</span></span><ul class="mycode_list"><li>Break the maximum size limit</li>
<li>Works with all three Ruby-based editors<ul class="mycode_list"><li>Change the SUFFIX value to rxdata/rvdata/rvdata2</li>
</ul>
</li>
<li>Keep editing even after run</li>
</ul>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Screenshots</span></span><br />
<br />
It would just be two shots of the map editor, before map resizing and after.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Script</span></span><br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Have Fun!</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;"><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# ** Map Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;&nbsp;&nbsp;by DerVVulfman<br />
#&nbsp;&nbsp;&nbsp;&nbsp;version 1.0<br />
#&nbsp;&nbsp;&nbsp;&nbsp;07-27-2026 (mm/dd/yyyy)<br />
#&nbsp;&nbsp;&nbsp;&nbsp;RGSS(1-3) / RPGMaker XP to VXAce<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;INTRODUCTION:<br />
#<br />
#&nbsp;&nbsp;Tired of being stuck with maps&nbsp;&nbsp;that cannot be any larger than 500x500 or<br />
#&nbsp;&nbsp;whatever limitation&nbsp;&nbsp;was set within your game editor?&nbsp;&nbsp;This script allows<br />
#&nbsp;&nbsp;one to tell RPGMaker to take a hike!<br />
#<br />
#&nbsp;&nbsp;With this script,&nbsp;&nbsp;you can force a map to a new width and height&nbsp;&nbsp;of your<br />
#&nbsp;&nbsp;choice. And that map size remains stored in your maps file data so alter-<br />
#&nbsp;&nbsp;ing the 'properties' doesn't change anything... unless you alter the size<br />
#&nbsp;&nbsp;in the map's properties window itself.<br />
#<br />
#&nbsp;&nbsp;If you create dimensions for a map&nbsp;&nbsp;that does not exist in your map tree,<br />
#&nbsp;&nbsp;no error will occur as it will any settings you created that are invalid.<br />
#<br />
#&nbsp;&nbsp;After execution, t he script/program will end.&nbsp;&nbsp;If your currently viewed<br />
#&nbsp;&nbsp;map is one of those being resized, merely switch to another map and then<br />
#&nbsp;&nbsp;return and you will see the new map freshly reloaded and resized!<br />
#<br />
#------------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;NOTES:<br />
#<br />
#&nbsp;&nbsp;Originally, it was meant as an exercise for RPGMaker XP as I am more flu-<br />
#&nbsp;&nbsp;end in that editor.&nbsp;&nbsp;But upon looking,&nbsp;&nbsp;I realized that there was nothing<br />
#&nbsp;&nbsp;within that would prevent it&nbsp;&nbsp;from working with&nbsp;&nbsp;the other two Ruby-based<br />
#&nbsp;&nbsp;editors.&nbsp;&nbsp;However, the script does set the minimum map size to 20x15.<br />
#<br />
#&nbsp;&nbsp;I have the intention&nbsp;&nbsp;to eventually update this system with various modes<br />
#&nbsp;&nbsp;in which the maps are resized.&nbsp;&nbsp;But for now,&nbsp;&nbsp;I merely have Mode #0&nbsp;&nbsp;as a<br />
#&nbsp;&nbsp;placeholder.&nbsp;&nbsp; The current and only mode existing will take the tile data<br />
#&nbsp;&nbsp;from the top-left most corner of the map and&nbsp;&nbsp;create a whole new map with<br />
#&nbsp;&nbsp;just that data.<br />
#<br />
#&nbsp;&nbsp;So it is recommended NOT for use on maps that already have drawn content.<br />
#<br />
#------------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;COMPATIBILITY:<br />
#<br />
#&nbsp;&nbsp;Fairly compatible for all Ruby-based RPGMaker engines. No default classes<br />
#&nbsp;&nbsp;were touched.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;TERMS OF USE:<br />
#<br />
#&nbsp;&nbsp;Free for use, even in commercial games.&nbsp;&nbsp;Only due credit is required.<br />
#<br />
#<br />
#==============================================================================<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** Map_Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;The configuration portion<br />
#==============================================================================<br />
<br />
module Map_Resizer<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;MAP_LIST = {}&nbsp;&nbsp; # Do Not Touch<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
<br />
<br />
&nbsp;&nbsp;# GENERAL SETTINGS<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# Basic safety parameter settings that the end user should still be aware.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;ACTIVATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Enabled/disabled.&nbsp;&nbsp;Set to true to execute<br />
&nbsp;&nbsp;&nbsp;&nbsp;SUFFIX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= ".rvdata"&nbsp;&nbsp; # File suffix (for XP/VX/ACE usage)<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_WIDTH&nbsp;&nbsp;= 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Maximum width of any map despite settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_HEIGHT = 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Maximum height of any map despite settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_DEPTH&nbsp;&nbsp;= 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Maximum layer depth of any map<br />
<br />
<br />
&nbsp;&nbsp;# INDIVIDUAL MAPS BY ID<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# Hash array where each map is given a 3 or 4-parameter array defining <br />
&nbsp;&nbsp;# how the map is resized.&nbsp;&nbsp;Depth is optional ans assumed 3-layer standard.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Mode&nbsp;&nbsp; : Drawing Mode.&nbsp;&nbsp;Currently just '0' and required<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Width&nbsp;&nbsp;: Revised width (in tiles) for the given map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Height : Revised height (in tiles) for the given map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Depth&nbsp;&nbsp;: (optional) Number of layers in the map (ground, lower, etc)<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; Map ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mode&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp; Height&nbsp;&nbsp;Depth<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; ====&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;======&nbsp;&nbsp;======&nbsp;&nbsp;======&nbsp;&nbsp;======<br />
&nbsp;&nbsp;&nbsp;&nbsp;MAP_LIST[1] = [&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp; 50,&nbsp;&nbsp;&nbsp;&nbsp; 30]<br />
&nbsp;&nbsp;&nbsp;&nbsp;MAP_LIST[2] = [&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp; 30,&nbsp;&nbsp;&nbsp;&nbsp; 30,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3]<br />
<br />
<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** Map_Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module will increase and/or decrease the size of designated maps.<br />
#==============================================================================<br />
<br />
module Map_Resizer&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Start execution of all maps to be updated<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.start<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Exit if disabled (and leaving it in?)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return unless ACTIVATE == true<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire a list of all valid maps by ID<br />
&nbsp;&nbsp;&nbsp;&nbsp;info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= load_data("Data/MapInfos" + SUFFIX)<br />
&nbsp;&nbsp;&nbsp;&nbsp;map_keys&nbsp;&nbsp;= info.keys<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sort through maps in the list<br />
&nbsp;&nbsp;&nbsp;&nbsp;for key in MAP_LIST.keys<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Skip if no map with key/id exists<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next unless map_keys.include?(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Process individual map<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_map(key, dimensions(key) )<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Exit execution<br />
&nbsp;&nbsp;&nbsp;&nbsp;exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Acquire creation mode and new dimensions for the map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; map_id : Map ID<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.dimensions(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Obtain map mode &amp; dimensions<br />
&nbsp;&nbsp;&nbsp;&nbsp;mode&nbsp;&nbsp;&nbsp;&nbsp;= MAP_LIST[key][0]<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = MAP_LIST[key][1]<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= MAP_LIST[key][2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = MAP_LIST[key][3] if MAP_LIST[key][3] != nil<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire safety settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_w = SAFETY_WIDTH<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_h = SAFETY_HEIGHT<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_d = SAFETY_DEPTH<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure safety settings not below minimum<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Yes, I consider someone may BOTCH safety settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_w&nbsp;&nbsp;= 20&nbsp;&nbsp;if safety_w &lt; 20<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_h&nbsp;&nbsp;= 15&nbsp;&nbsp;if safety_h &lt; 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_d&nbsp;&nbsp;= 3&nbsp;&nbsp; if safety_d &lt; 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure map settings not below minumum<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = 20&nbsp;&nbsp;if width&nbsp;&nbsp;&lt; 20<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= 15&nbsp;&nbsp;if height &lt; 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = 3&nbsp;&nbsp; if depth&nbsp;&nbsp;&lt; 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure valid maximums<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = safety_w&nbsp;&nbsp;if width&nbsp;&nbsp;&gt; safety_w<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= safety_h&nbsp;&nbsp;if height &gt; safety_h<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = safety_d&nbsp;&nbsp;if depth&nbsp;&nbsp;&gt; safety_d<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;return [mode, width, height, depth]<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Process recreation of individual map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; map_id&nbsp;&nbsp;&nbsp;&nbsp; : Map ID<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; dimensions : recreation dimensions for map<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.process_map(map_id, dimensions)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Get filename and new dimensions<br />
&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;&nbsp;&nbsp;&nbsp;= sprintf("Data/Map%03d" + SUFFIX, map_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;system_mode = dimensions[0]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_width&nbsp;&nbsp; = dimensions[1]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_height&nbsp;&nbsp;= dimensions[2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_depth&nbsp;&nbsp; = dimensions[3]<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Obtain data from already existing map<br />
&nbsp;&nbsp;&nbsp;&nbsp;map&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = load_data(filename)<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_height&nbsp;&nbsp;= map.height<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_width&nbsp;&nbsp; = map.width<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_data&nbsp;&nbsp;&nbsp;&nbsp;= map.data<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Make storage array for top-left tile data<br />
&nbsp;&nbsp;&nbsp;&nbsp;tiledata = Array.new(new_depth)<br />
&nbsp;&nbsp;&nbsp;&nbsp;for z2 in 0...new_depth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tiledata[z2] = old_data[0, 0, z2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Create new table for data<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_data&nbsp;&nbsp;= Table.new(new_width, new_height, 3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Populate new table with tile data<br />
&nbsp;&nbsp;&nbsp;&nbsp;for z2 in 0...new_depth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for y2 in 0...new_height<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for x2 in 0...new_width<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new_data[x2,y2,z2] = tiledata[z2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Replace map data and save<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.data&nbsp;&nbsp;&nbsp;&nbsp;= new_data<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.width&nbsp;&nbsp; = new_width<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.height&nbsp;&nbsp;= new_height<br />
&nbsp;&nbsp;&nbsp;&nbsp;save_data(map, filename) <br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
end<br />
<br />
<br />
<br />
#----------------------------------------------------------------------------<br />
# Executes the script<br />
#----------------------------------------------------------------------------<br />
Map_Resizer.start</code></div></div></div>
		</div>
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Instructions</span></span><br />
<br />
Place below Scene_Debug and above Main.  Make sure the ACTIVATE value is set to true when you DO want it to run. And set the SUFFIX value to the proper file extension of your chosen RPG Maker editor's data files.<br />
<br />
Other content should be easily understandable.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">FAQ</span></span><br />
<br />
Heh.  I didn't expect I'd make something that works carte blanche for all three when I started half an hour ago.  Yep, this was a quick script creation with a hella good payout!<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Compatibility</span></span><br />
<br />
Fairly compatible for all Ruby-based RPGMaker engines. No default classes were touched.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Terms and Conditions</span></span><br />
<br />
Free for use, even in commercial games.  Only due credit is required.]]></description>
			<content:encoded><![CDATA[<div align="center"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Map Resizer</span></span><br />
<span style="font-size: medium;" class="mycode_size">Version: 1.0</span><br />
Also available for RPGMaker XP</div>
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction</span></span><br />
<br />
Tired of being stuck with maps  that cannot be any larger than 500x500 or whatever limitation  was set within your game editor?  This script allows one to tell RPGMaker to take a hike!<br />
<br />
With this script,  you can force a map to a new width and height  of your choice. And that map size remains stored in your maps file data so altering the 'properties' doesn't change anything... unless you alter the size in the map's properties window itself.<br />
<br />
If you create dimensions for a map  that does not exist in your map tree, no error will occur as it will any settings you created that are invalid.<br />
<br />
After execution, t he script/program will end.  If your currently viewed map is one of those being resized, merely switch to another map and then return and you will see the new map freshly reloaded and resized!<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Features</span></span><ul class="mycode_list"><li>Break the maximum size limit</li>
<li>Works with all three Ruby-based editors<ul class="mycode_list"><li>Change the SUFFIX value to rxdata/rvdata/rvdata2</li>
</ul>
</li>
<li>Keep editing even after run</li>
</ul>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Screenshots</span></span><br />
<br />
It would just be two shots of the map editor, before map resizing and after.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Script</span></span><br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Have Fun!</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;"><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# ** Map Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;&nbsp;&nbsp;by DerVVulfman<br />
#&nbsp;&nbsp;&nbsp;&nbsp;version 1.0<br />
#&nbsp;&nbsp;&nbsp;&nbsp;07-27-2026 (mm/dd/yyyy)<br />
#&nbsp;&nbsp;&nbsp;&nbsp;RGSS(1-3) / RPGMaker XP to VXAce<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;INTRODUCTION:<br />
#<br />
#&nbsp;&nbsp;Tired of being stuck with maps&nbsp;&nbsp;that cannot be any larger than 500x500 or<br />
#&nbsp;&nbsp;whatever limitation&nbsp;&nbsp;was set within your game editor?&nbsp;&nbsp;This script allows<br />
#&nbsp;&nbsp;one to tell RPGMaker to take a hike!<br />
#<br />
#&nbsp;&nbsp;With this script,&nbsp;&nbsp;you can force a map to a new width and height&nbsp;&nbsp;of your<br />
#&nbsp;&nbsp;choice. And that map size remains stored in your maps file data so alter-<br />
#&nbsp;&nbsp;ing the 'properties' doesn't change anything... unless you alter the size<br />
#&nbsp;&nbsp;in the map's properties window itself.<br />
#<br />
#&nbsp;&nbsp;If you create dimensions for a map&nbsp;&nbsp;that does not exist in your map tree,<br />
#&nbsp;&nbsp;no error will occur as it will any settings you created that are invalid.<br />
#<br />
#&nbsp;&nbsp;After execution, t he script/program will end.&nbsp;&nbsp;If your currently viewed<br />
#&nbsp;&nbsp;map is one of those being resized, merely switch to another map and then<br />
#&nbsp;&nbsp;return and you will see the new map freshly reloaded and resized!<br />
#<br />
#------------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;NOTES:<br />
#<br />
#&nbsp;&nbsp;Originally, it was meant as an exercise for RPGMaker XP as I am more flu-<br />
#&nbsp;&nbsp;end in that editor.&nbsp;&nbsp;But upon looking,&nbsp;&nbsp;I realized that there was nothing<br />
#&nbsp;&nbsp;within that would prevent it&nbsp;&nbsp;from working with&nbsp;&nbsp;the other two Ruby-based<br />
#&nbsp;&nbsp;editors.&nbsp;&nbsp;However, the script does set the minimum map size to 20x15.<br />
#<br />
#&nbsp;&nbsp;I have the intention&nbsp;&nbsp;to eventually update this system with various modes<br />
#&nbsp;&nbsp;in which the maps are resized.&nbsp;&nbsp;But for now,&nbsp;&nbsp;I merely have Mode #0&nbsp;&nbsp;as a<br />
#&nbsp;&nbsp;placeholder.&nbsp;&nbsp; The current and only mode existing will take the tile data<br />
#&nbsp;&nbsp;from the top-left most corner of the map and&nbsp;&nbsp;create a whole new map with<br />
#&nbsp;&nbsp;just that data.<br />
#<br />
#&nbsp;&nbsp;So it is recommended NOT for use on maps that already have drawn content.<br />
#<br />
#------------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;COMPATIBILITY:<br />
#<br />
#&nbsp;&nbsp;Fairly compatible for all Ruby-based RPGMaker engines. No default classes<br />
#&nbsp;&nbsp;were touched.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;TERMS OF USE:<br />
#<br />
#&nbsp;&nbsp;Free for use, even in commercial games.&nbsp;&nbsp;Only due credit is required.<br />
#<br />
#<br />
#==============================================================================<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** Map_Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;The configuration portion<br />
#==============================================================================<br />
<br />
module Map_Resizer<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;MAP_LIST = {}&nbsp;&nbsp; # Do Not Touch<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
<br />
<br />
&nbsp;&nbsp;# GENERAL SETTINGS<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# Basic safety parameter settings that the end user should still be aware.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;ACTIVATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Enabled/disabled.&nbsp;&nbsp;Set to true to execute<br />
&nbsp;&nbsp;&nbsp;&nbsp;SUFFIX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= ".rvdata"&nbsp;&nbsp; # File suffix (for XP/VX/ACE usage)<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_WIDTH&nbsp;&nbsp;= 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Maximum width of any map despite settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_HEIGHT = 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Maximum height of any map despite settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;SAFETY_DEPTH&nbsp;&nbsp;= 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Maximum layer depth of any map<br />
<br />
<br />
&nbsp;&nbsp;# INDIVIDUAL MAPS BY ID<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# Hash array where each map is given a 3 or 4-parameter array defining <br />
&nbsp;&nbsp;# how the map is resized.&nbsp;&nbsp;Depth is optional ans assumed 3-layer standard.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Mode&nbsp;&nbsp; : Drawing Mode.&nbsp;&nbsp;Currently just '0' and required<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Width&nbsp;&nbsp;: Revised width (in tiles) for the given map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Height : Revised height (in tiles) for the given map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;* Depth&nbsp;&nbsp;: (optional) Number of layers in the map (ground, lower, etc)<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; Map ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mode&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp; Height&nbsp;&nbsp;Depth<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; ====&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;======&nbsp;&nbsp;======&nbsp;&nbsp;======&nbsp;&nbsp;======<br />
&nbsp;&nbsp;&nbsp;&nbsp;MAP_LIST[1] = [&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp; 50,&nbsp;&nbsp;&nbsp;&nbsp; 30]<br />
&nbsp;&nbsp;&nbsp;&nbsp;MAP_LIST[2] = [&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp; 30,&nbsp;&nbsp;&nbsp;&nbsp; 30,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3]<br />
<br />
<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** Map_Resizer<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module will increase and/or decrease the size of designated maps.<br />
#==============================================================================<br />
<br />
module Map_Resizer&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Start execution of all maps to be updated<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.start<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Exit if disabled (and leaving it in?)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return unless ACTIVATE == true<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire a list of all valid maps by ID<br />
&nbsp;&nbsp;&nbsp;&nbsp;info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= load_data("Data/MapInfos" + SUFFIX)<br />
&nbsp;&nbsp;&nbsp;&nbsp;map_keys&nbsp;&nbsp;= info.keys<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sort through maps in the list<br />
&nbsp;&nbsp;&nbsp;&nbsp;for key in MAP_LIST.keys<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Skip if no map with key/id exists<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next unless map_keys.include?(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Process individual map<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_map(key, dimensions(key) )<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Exit execution<br />
&nbsp;&nbsp;&nbsp;&nbsp;exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Acquire creation mode and new dimensions for the map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; map_id : Map ID<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.dimensions(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Obtain map mode &amp; dimensions<br />
&nbsp;&nbsp;&nbsp;&nbsp;mode&nbsp;&nbsp;&nbsp;&nbsp;= MAP_LIST[key][0]<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = MAP_LIST[key][1]<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= MAP_LIST[key][2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = MAP_LIST[key][3] if MAP_LIST[key][3] != nil<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire safety settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_w = SAFETY_WIDTH<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_h = SAFETY_HEIGHT<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_d = SAFETY_DEPTH<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure safety settings not below minimum<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Yes, I consider someone may BOTCH safety settings<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_w&nbsp;&nbsp;= 20&nbsp;&nbsp;if safety_w &lt; 20<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_h&nbsp;&nbsp;= 15&nbsp;&nbsp;if safety_h &lt; 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;safety_d&nbsp;&nbsp;= 3&nbsp;&nbsp; if safety_d &lt; 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure map settings not below minumum<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = 20&nbsp;&nbsp;if width&nbsp;&nbsp;&lt; 20<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= 15&nbsp;&nbsp;if height &lt; 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = 3&nbsp;&nbsp; if depth&nbsp;&nbsp;&lt; 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Ensure valid maximums<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = safety_w&nbsp;&nbsp;if width&nbsp;&nbsp;&gt; safety_w<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= safety_h&nbsp;&nbsp;if height &gt; safety_h<br />
&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;&nbsp; = safety_d&nbsp;&nbsp;if depth&nbsp;&nbsp;&gt; safety_d<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;return [mode, width, height, depth]<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# * Process recreation of individual map<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; map_id&nbsp;&nbsp;&nbsp;&nbsp; : Map ID<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp; dimensions : recreation dimensions for map<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def self.process_map(map_id, dimensions)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Get filename and new dimensions<br />
&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;&nbsp;&nbsp;&nbsp;= sprintf("Data/Map%03d" + SUFFIX, map_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;system_mode = dimensions[0]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_width&nbsp;&nbsp; = dimensions[1]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_height&nbsp;&nbsp;= dimensions[2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_depth&nbsp;&nbsp; = dimensions[3]<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Obtain data from already existing map<br />
&nbsp;&nbsp;&nbsp;&nbsp;map&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = load_data(filename)<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_height&nbsp;&nbsp;= map.height<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_width&nbsp;&nbsp; = map.width<br />
&nbsp;&nbsp;&nbsp;&nbsp;old_data&nbsp;&nbsp;&nbsp;&nbsp;= map.data<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Make storage array for top-left tile data<br />
&nbsp;&nbsp;&nbsp;&nbsp;tiledata = Array.new(new_depth)<br />
&nbsp;&nbsp;&nbsp;&nbsp;for z2 in 0...new_depth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tiledata[z2] = old_data[0, 0, z2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Create new table for data<br />
&nbsp;&nbsp;&nbsp;&nbsp;new_data&nbsp;&nbsp;= Table.new(new_width, new_height, 3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Populate new table with tile data<br />
&nbsp;&nbsp;&nbsp;&nbsp;for z2 in 0...new_depth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for y2 in 0...new_height<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for x2 in 0...new_width<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new_data[x2,y2,z2] = tiledata[z2]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Replace map data and save<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.data&nbsp;&nbsp;&nbsp;&nbsp;= new_data<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.width&nbsp;&nbsp; = new_width<br />
&nbsp;&nbsp;&nbsp;&nbsp;map.height&nbsp;&nbsp;= new_height<br />
&nbsp;&nbsp;&nbsp;&nbsp;save_data(map, filename) <br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
end<br />
<br />
<br />
<br />
#----------------------------------------------------------------------------<br />
# Executes the script<br />
#----------------------------------------------------------------------------<br />
Map_Resizer.start</code></div></div></div>
		</div>
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Instructions</span></span><br />
<br />
Place below Scene_Debug and above Main.  Make sure the ACTIVATE value is set to true when you DO want it to run. And set the SUFFIX value to the proper file extension of your chosen RPG Maker editor's data files.<br />
<br />
Other content should be easily understandable.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">FAQ</span></span><br />
<br />
Heh.  I didn't expect I'd make something that works carte blanche for all three when I started half an hour ago.  Yep, this was a quick script creation with a hella good payout!<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Compatibility</span></span><br />
<br />
Fairly compatible for all Ruby-based RPGMaker engines. No default classes were touched.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Terms and Conditions</span></span><br />
<br />
Free for use, even in commercial games.  Only due credit is required.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Battle Swap & Last Resort]]></title>
			<link>https://www.save-point.org/thread-13648.html</link>
			<pubDate>Thu, 23 Jul 2026 17:09:07 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=9557">Ebanyle</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13648.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: x-large;" class="mycode_size">Battle Swap &amp; Last Resort v 1.0</span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size">By Ebanyle</span></div>
<div style="text-align: left;" class="mycode_align">Have you ever felt the need to try another strategy in the middle of the battle, but not being able to pull your warrior or archer into the team? Did you ever helplessly watch a Game Over after your party was beaten to a pulp, even though it has 1001 members who are not currently in battle?<br />
 Fear no more! This script will (perhaps) help you!</div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size">Features</span></div><ul class="mycode_list"><li>Call members in reserve to battle;<br />
</li>
<li>Call a reserve member to battle when your current battle members have been defeated; <br />
</li>
<li>Set a cooldown for swaps; <br />
</li>
<li>Set a limit for swaps.<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">How to Use</span><br />
<br />
Paste this below materials but above main. If you have any battle scripts, I recommend you to paste this below them.<br />
<br />
<span style="font-size: large;" class="mycode_size">Compatibility</span><br />
<br />
This script may not work with any scripts that modify the battle scene, such as HUDs and some battle systems, especially ATB.<br />
<br />
It is supposed to be compatible with the following:<ul class="mycode_list"><li>Yanfly Engine Ace - Battle Engine<br />
</li>
</ul>
<ul class="mycode_list"><li>Theolized Sideview Battlescript<br />
</li>
</ul>
I may or may not be able to make some scripts compatible if asked.<br />
<br />
<span style="font-size: large;" class="mycode_size">Screenshots</span><br />
<span style="color: #000000;" class="mycode_color"><div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Content Hidden</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;"> <img src="https://i.imgur.com/uhsqKLi.png" loading="lazy"  alt="[Image: uhsqKLi.png]" class="mycode_img" /> </span><br />
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/rT73Crt.png" loading="lazy"  alt="[Image: rT73Crt.png]" class="mycode_img" /> </span><br />
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/ri51KVb.png" loading="lazy"  alt="[Image: ri51KVb.png]" class="mycode_img" /> </span><br />
<br />
<div style="text-align: left;" class="mycode_align">With YEA - Battle Engine </div>
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/zFwKlbE.png" loading="lazy"  alt="[Image: zFwKlbE.png]" class="mycode_img" /> </div>
		</div></span><br />
<br />
<span style="font-size: large;" class="mycode_size">Code</span><br />
<br />
<a href="https://github.com/ponchaka-munchaka/i-do-not-code/blob/main/Battle%20Swap%20&amp;%20Last%20Resort" target="_blank" rel="noopener" class="mycode_url">Github</a><br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Content Hidden</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# Battle Swap &amp; Last Resort 1.0<br />
# By Ebanyle<br />
#==============================================================================<br />
&#36;imported = {} if &#36;imported.nil?<br />
&#36;imported["EBONY_BattleSwap"] = true<br />
#==============================================================================<br />
# Version History (DD/MM/YY)<br />
# 24/01/23 - v. 1.0 - Release<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# This script allows you to swap members mid-battle. No more lazy backup!<br />
# You can also set cooldowns and a limit for swaps per battle.<br />
#==============================================================================<br />
# Instructions<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Paste this script above Main and below Materials, preferably under all battle<br />
# scripts.<br />
#==============================================================================<br />
# Terms of Use<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# - You may post this anywhere, edited or not;<br />
# - You may use it in any games, commercial or not;<br />
# - Credit me as Ebanyle;<br />
# - Do not remove this header.<br />
#==============================================================================<br />
# Thanks<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Yanfly - For some coding reference<br />
# Traverse - Snippet fix for adding members mid-battle in TSBS<br />
#==============================================================================<br />
# Compatibility<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# This script may need some patches with any script that changes the battle<br />
# scene, including HUDs, ATB, etc.<br />
# It is currently (supposed to be) compatible with the following:<br />
# - Yanfly Engine Ace - Battle Engine<br />
# - Theolized Sideview Battle System<br />
#==============================================================================<br />
# Know issues<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# - If you are using YEA - Battle Engine and have too many members, it might not<br />
# look good;<br />
# - If you have a Popup script, it may pop up the Death state when swapping.<br />
#==============================================================================<br />
# Configuration<br />
#==============================================================================<br />
module EBONY<br />
  module SWAP<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
#   Vocab: Name of the command in battle<br />
    Vocab = "Swap"    <br />
#<br />
#   Cooldown: Amount of turns that command will be inactive after swapping.<br />
#   Set to zero if you don't want to use this option.<br />
    Cooldown = 2<br />
#<br />
#   Max_Uses: Amount of times you can use command per battle.<br />
#   Set to zero if you don't want to use this option.<br />
    Max_Uses = 3<br />
#<br />
#   Log: Message to appear in the battle log when swapping.<br />
#   Names must be set by %s. 1st is the battle member, 2nd the reserve member.<br />
#   If you don't want a log to appear, simply leave string empty like this: ""<br />
    Log = "%s swapped places with %s."<br />
#<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Configuration for Yanfly Engine Ace - Battle Engine<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
#   Style: Layout of the reserve members window for YEA - Battle Engine.<br />
#          Does not affect anything if the aforementioned script is not present.<br />
#          For Battle Engine, actors will get real squishy if there's too<br />
#          many of them. Unfortunately there's no scroll option (yet?).<br />
#<br />
#   :side    - Reserve window will appear to the side of the party window.<br />
#              Recommended if you have 1 or 2 reserve members as it is tiny<br />
#              and any more members than that get REAL squishy.<br />
#   :default - Reserve window will appear above party window.<br />
    Style = :default<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
  end<br />
end<br />
#==============================================================================<br />
# ** Game_Troop<br />
#==============================================================================<br />
class Game_Troop<br />
  attr_reader    :swap_cooldown<br />
  attr_reader    :swap_max<br />
  attr_accessor  :allow_swap<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: clear<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_clear clear<br />
  def clear<br />
      eb_swap_clear<br />
      @swap_cooldown = 0<br />
      @swap_max = 0<br />
      @allow_swap = false<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: apply swap cooldown<br />
  #--------------------------------------------------------------------------<br />
  def apply_swap_cooldown<br />
    unless EBONY::SWAP::Cooldown == 0<br />
      @swap_cooldown = (EBONY::SWAP::Cooldown)<br />
      @swap_max += 1<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: allow swap?<br />
  #--------------------------------------------------------------------------<br />
  def allow_swap?<br />
    if @swap_max == EBONY::SWAP::Max_Uses &amp;&amp; EBONY::SWAP::Max_Uses != 0<br />
      @allow_swap = false<br />
    elsif @swap_cooldown != 0 or !&#36;game_party.reserve_exist?<br />
      @allow_swap = false<br />
    else<br />
      @allow_swap = true<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Increase Turns<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_increase_turn increase_turn<br />
  def increase_turn<br />
    eb_swap_increase_turn<br />
    @swap_cooldown -= 1 unless @swap_cooldown == 0<br />
  end<br />
end # Game_Troop<br />
<br />
#==============================================================================<br />
# ** Game_Party<br />
#==============================================================================<br />
<br />
class Game_Party<br />
  attr_accessor :dead_reserve_members<br />
  attr_accessor :after_swap_dead_members<br />
  #--------------------------------------------------------------------------<br />
  # * alias method: initalize<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_initialize initialize<br />
  def initialize<br />
    eb_swap_initialize<br />
    @dead_reserve_members = []<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: last resort<br />
  #--------------------------------------------------------------------------<br />
  def last_resort<br />
    all_dead? &amp;&amp; reserve_exist? &amp;&amp; !reserve_all_dead?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_all_dead?<br />
  #--------------------------------------------------------------------------<br />
  def reserve_all_dead?<br />
    return if reserve_members == nil<br />
    dead_reserve_members.size == reserve_members.size<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Array of Incapacitated Reserve Members<br />
  #--------------------------------------------------------------------------<br />
  def dead_reserve_members<br />
    unless reserve_members == nil<br />
      @dead_reserve_members = reserve_members.select {|member| member.dead? }<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: party_will_be_dead?<br />
  #--------------------------------------------------------------------------<br />
  def party_will_be_dead?(battle_member,reserve_member)<br />
    party_after_swap = members.map { |member| member }<br />
    party_after_swap[battle_member] = all_members[reserve_member]<br />
    @after_swap_dead_members = party_after_swap.select {|member| member.dead? }<br />
    if @after_swap_dead_members.size == members.size<br />
      return true<br />
    else<br />
      return false<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve amount<br />
  #--------------------------------------------------------------------------<br />
  def reserve_amount<br />
    all_members.size - max_battle_members<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve members<br />
  #--------------------------------------------------------------------------<br />
  def reserve_members<br />
    return [] if all_members.size &lt; max_battle_members<br />
    all_members[max_battle_members, reserve_amount].select {|actor| actor.exist? }<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_exist?<br />
  #--------------------------------------------------------------------------<br />
  def reserve_exist?<br />
    return true if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
  end<br />
end # Game_Party<br />
<br />
#==============================================================================<br />
# ** Window_ReserveActor<br />
#  Window for showing party that is currently not in battle.<br />
#==============================================================================<br />
<br />
class Window_ReserveActor &lt; Window_BattleStatus<br />
  #--------------------------------------------------------------------------<br />
  # * Object Initialization<br />
  #--------------------------------------------------------------------------<br />
  def initialize<br />
    super()<br />
    self.x = Graphics.width - width<br />
    self.visible = false<br />
    self.openness = 255<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Activate Window<br />
  #--------------------------------------------------------------------------<br />
  def activate<br />
    select(0)<br />
    super<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Number of Items<br />
  #--------------------------------------------------------------------------<br />
  def item_max<br />
    if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
      return &#36;game_party.reserve_members.size<br />
    else<br />
      super<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Draw Item<br />
  #--------------------------------------------------------------------------<br />
  def draw_item(index)<br />
    if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
      actor = &#36;game_party.reserve_members[index]<br />
      draw_basic_area(basic_area_rect(index), actor)<br />
      draw_gauge_area(gauge_area_rect(index), actor)<br />
    else<br />
      super<br />
    end<br />
  end<br />
end  # Window_ReserveActor<br />
<br />
#==============================================================================<br />
# ** Window_PartyCommand<br />
#==============================================================================<br />
<br />
class Window_PartyCommand &lt; Window_Command<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: create Command List<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_make_command_list make_command_list<br />
  def make_command_list<br />
    eb_swap_make_command_list<br />
    add_command(EBONY::SWAP::Vocab, :swap, &#36;game_troop.allow_swap?)<br />
  end<br />
end<br />
<br />
#==============================================================================<br />
# ** Window_BattleLog<br />
#==============================================================================<br />
<br />
class Window_BattleLog &lt; Window_Selectable<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Display Swap<br />
  #--------------------------------------------------------------------------<br />
  def display_swap(target,subject)<br />
    add_text(sprintf(EBONY::SWAP::Log, target, subject))<br />
    wait if line_number &gt; 0<br />
  end<br />
end # Window_BattleLog<br />
<br />
#==============================================================================<br />
# ** Scene_Battle<br />
#==============================================================================<br />
<br />
class Scene_Battle<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: create All Windows<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_create_all_windows create_all_windows<br />
  def create_all_windows<br />
    eb_swap_create_all_windows<br />
    create_reserve_window<br />
    create_swap_actor_window<br />
    create_dactor_window<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: create Reserve Window<br />
  #--------------------------------------------------------------------------<br />
  def create_reserve_window<br />
    @reserve_window = Window_ReserveActor.new<br />
    @reserve_window.set_handler(:ok,     method(:on_reserve_ok))<br />
    @reserve_window.set_handler(:cancel, method(:on_reserve_cancel))<br />
    oy = Graphics.height - @reserve_window.height - @status_window.height<br />
    @reserve_window.y = oy<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Create Swap Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_swap_actor_window<br />
    @swap_actor_window = Window_BattleActor.new(@info_viewport)<br />
    @swap_actor_window.set_handler(:ok,     method(:on_s_actor_ok))<br />
    @swap_actor_window.set_handler(:cancel, method(:on_s_actor_cancel))<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Create Party Commands Window<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_create_party_command_window create_party_command_window<br />
  def create_party_command_window<br />
    eb_swap_create_party_command_window<br />
    @party_command_window.set_handler(:swap, method(:command_swap))<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Create Dead Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_dactor_window<br />
    @dactor_window = Window_BattleActor.new(@info_viewport)<br />
    @dactor_window.set_handler(:ok,     method(:on_dactor_ok))<br />
    @dactor_window.x = (@party_command_window.width / 2)<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: on_dactor_ok<br />
  #--------------------------------------------------------------------------<br />
  def on_dactor_ok<br />
    on_s_actor_ok<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Processing at End of Action<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_process_action_end process_action_end<br />
  def process_action_end<br />
    apply_last_resort if &#36;game_party.last_resort<br />
    eb_swap_process_action_end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: apply last resort<br />
  #--------------------------------------------------------------------------<br />
  def apply_last_resort<br />
    @dactor_window.refresh<br />
    @dactor_window.show.activate<br />
    @status_window.hide<br />
    @reserve_window.refresh<br />
    @reserve_window.show<br />
    @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Reserve actor [OK]<br />
  #--------------------------------------------------------------------------<br />
  def on_reserve_ok<br />
    if check_for_disallow_swap_process<br />
      disallow_swap_process<br />
    else<br />
      process_swap<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: Check if to Disallow Swap Process<br />
  #--------------------------------------------------------------------------<br />
  def check_for_disallow_swap_process<br />
    bm = battle_member_to_swap<br />
    rm = reserve_member_to_swap<br />
    bmd = both_members_dead?<br />
    ald = &#36;game_party.all_dead?<br />
    return true if &#36;game_party.party_will_be_dead?(bm,rm) or bmd &amp;&amp; ald<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: disallow swap process<br />
  #--------------------------------------------------------------------------<br />
  def disallow_swap_process<br />
    Sound.play_buzzer<br />
    &#36;game_party.reserve_amount != 1 ? w = @reserve_window : w = @swap_actor_window<br />
    i = w.index<br />
    w.refresh<br />
    w.activate<br />
    w.select(i)<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Reserve actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  def on_reserve_cancel<br />
    if !&#36;game_party.last_resort<br />
      @swap_actor_window.refresh<br />
      @swap_actor_window.activate<br />
    else<br />
      @dactor_window.refresh<br />
      @dactor_window.activate<br />
    end<br />
    @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: both_members_dead?<br />
  #--------------------------------------------------------------------------<br />
  def both_members_dead?<br />
    bm = &#36;game_party.members[battle_member_to_swap]<br />
    rm = &#36;game_party.reserve_members[@reserve_window.index]<br />
    return true if bm.dead? &amp;&amp; rm.dead?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: battle_member_to_swap<br />
  #--------------------------------------------------------------------------<br />
  def battle_member_to_swap<br />
    if &#36;game_party.last_resort<br />
      return @dactor_window.index<br />
    else<br />
      return @swap_actor_window.index<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_member_to_swap<br />
  #--------------------------------------------------------------------------<br />
  def reserve_member_to_swap<br />
    ra = &#36;game_party.reserve_amount<br />
    mxb = &#36;game_party.max_battle_members<br />
    if ra != 1<br />
      return mxb + @reserve_window.index<br />
    else<br />
      return mxb<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: process direct swap<br />
  #--------------------------------------------------------------------------<br />
  def process_swap<br />
    &#36;game_troop.apply_swap_cooldown<br />
    rmn = &#36;game_party.reserve_members[@reserve_window.index].name<br />
    bmn = &#36;game_party.members[battle_member_to_swap].name<br />
    @reserve_window.hide<br />
    @swap_actor_window.hide<br />
    @dactor_window.hide<br />
    @status_window.show<br />
    start_party_command_selection<br />
    &#36;game_party.swap_order(battle_member_to_swap,reserve_member_to_swap)<br />
    &#36;game_party.make_actions<br />
    refresh_status<br />
    unless (EBONY::SWAP::Log).empty?<br />
      @party_command_window.show<br />
      @log_window.display_swap(rmn,bmn)<br />
      @log_window.wait_and_clear<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Command Swap<br />
  #--------------------------------------------------------------------------<br />
  def command_swap<br />
    select_s_actor_selection<br />
    @reserve_window.refresh &amp;&amp; @reserve_window.show &amp;&amp; @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Start Swap Actor Selection<br />
  #--------------------------------------------------------------------------<br />
  def select_s_actor_selection<br />
    @swap_actor_window.refresh<br />
    @swap_actor_window.show.activate<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: start reserve selection (unused?)<br />
  #--------------------------------------------------------------------------<br />
  def select_reserve_selection<br />
    @reserve_window.activate<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: Swap Actor [OK]<br />
  #--------------------------------------------------------------------------<br />
  def on_s_actor_ok<br />
    if &#36;game_party.reserve_amount != 1<br />
      @reserve_window.activate<br />
    else<br />
      check_for_disallow_swap_process ? disallow_swap_process : process_swap<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Swap Actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  def on_s_actor_cancel<br />
    @party_command_window.refresh<br />
    @party_command_window.activate<br />
    @swap_actor_window.hide<br />
    @reserve_window.hide<br />
  end<br />
<br />
end # Scene_Battle<br />
<br />
class &lt;&lt; BattleManager<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite: Determine Win/Loss Results<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_judge_win_loss judge_win_loss<br />
  def judge_win_loss<br />
    if &#36;game_party.last_resort<br />
      turn_end<br />
      @phase = :input<br />
      return<br />
    else<br />
      eb_swap_judge_win_loss<br />
    end<br />
  end<br />
end # BattleManager<br />
<br />
if &#36;imported["YEA-BattleEngine"]<br />
<br />
#==============================================================================<br />
# ** Window_ReserveActor<br />
#==============================================================================<br />
<br />
class Window_ReserveActor &lt; Window_BattleStatus<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: col_max<br />
  #--------------------------------------------------------------------------<br />
  def col_max<br />
    if &#36;game_party.reserve_members.empty?<br />
      return 1<br />
    else<br />
      return &#36;game_party.reserve_amount<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # new method: battle_members<br />
  #--------------------------------------------------------------------------<br />
  def battle_members; return &#36;game_party.reserve_members; end<br />
 <br />
  #--------------------------------------------------------------------------<br />
  # new method: actor<br />
  #--------------------------------------------------------------------------<br />
  def actor; return battle_members[@index]; end<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: item_rect<br />
  #--------------------------------------------------------------------------<br />
  def item_rect(index)<br />
    rect = Rect.new<br />
    rect.width = [[128, contents.width / col_max].min,0].max<br />
    rect.height = contents.height<br />
    rect.x = index * rect.width<br />
    if YEA::BATTLE::BATTLESTATUS_CENTER_FACES<br />
      rect.x += (contents.width - &#36;game_party.reserve_amount * rect.width) / 2<br />
    end<br />
    rect.y = 0<br />
    return rect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: draw_item<br />
  #--------------------------------------------------------------------------<br />
  def draw_item(index)<br />
    return if index.nil?<br />
    clear_item(index)<br />
    actor = battle_members[index]<br />
    rect = item_rect(index)<br />
    return if actor.nil?<br />
    draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)<br />
    draw_actor_name(actor, rect.x-20, rect.y, rect.width)<br />
    draw_actor_icons(actor, rect.x, line_height*1, rect.width)<br />
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS<br />
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE<br />
    draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)<br />
    if draw_tp?(actor) &amp;&amp; draw_mp?(actor)<br />
      dw = rect.width/2-2<br />
      dw += 1 if &#36;imported["YEA-CoreEngine"] &amp;&amp; YEA::CORE::GAUGE_OUTLINE<br />
      draw_actor_tp(actor, rect.x+2, line_height*3, dw)<br />
      dw = rect.width - rect.width/2 - 2<br />
      draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)<br />
    elsif draw_tp?(actor) &amp;&amp; !draw_mp?(actor)<br />
      draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)<br />
    else<br />
      draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Window Width<br />
  #--------------------------------------------------------------------------<br />
  def window_width<br />
    if EBONY::SWAP::Style == :side<br />
      return 128<br />
    else<br />
      super<br />
    end<br />
  end<br />
end # Window_ReserveActor<br />
<br />
class Scene_Battle<br />
  #--------------------------------------------------------------------------<br />
  # * new method: window_side?<br />
  #--------------------------------------------------------------------------<br />
  def window_side?<br />
    EBONY::SWAP::Style == :side<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: create Reserve Window<br />
  #--------------------------------------------------------------------------<br />
  def create_reserve_window<br />
    @reserve_window = Window_ReserveActor.new<br />
    @reserve_window.set_handler(:ok,     method(:on_reserve_ok))<br />
    @reserve_window.set_handler(:cancel, method(:on_reserve_cancel))<br />
    oy = Graphics.height - @reserve_window.height<br />
    oy = oy - @party_command_window.height unless window_side?<br />
    @reserve_window.y = oy<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: Create Swap Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_swap_actor_window<br />
    @swap_actor_window = Window_BattleActor.new(@info_viewport)<br />
    @swap_actor_window.set_handler(:ok,     method(:on_s_actor_ok))<br />
    @swap_actor_window.set_handler(:cancel, method(:on_s_actor_cancel))<br />
    @swap_actor_window.x = @party_command_window.width unless window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: Create Dead Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_dactor_window<br />
    @dactor_window = Window_BattleActor.new(@info_viewport)<br />
    @dactor_window.set_handler(:ok,     method(:on_dactor_ok))<br />
    @dactor_window.x = (@party_command_window.width / 2) if !window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * alias method: apply last resort<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_apply_last_resort apply_last_resort<br />
  def apply_last_resort<br />
    eb_yeab_apply_last_resort<br />
    @party_command_window.show if !window_side?<br />
    @reserve_window.x = @dactor_window.x if !window_side? &amp;&amp; &#36;game_party.last_resort<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: hide windows on swap<br />
  #--------------------------------------------------------------------------<br />
  def hide_windows_on_swap<br />
    @help_window.hide<br />
    refresh_status<br />
    @status_window.show<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Swap Actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  alias yeab_on_s_actor_cancel on_s_actor_cancel<br />
  def on_s_actor_cancel<br />
    yeab_on_s_actor_cancel<br />
    hide_windows_on_swap<br />
    @party_command_window.show<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: process direct swap<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_process_swap process_swap<br />
  def process_swap<br />
    eb_yeab_process_swap<br />
    hide_windows_on_swap<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: command swap<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_command_swap command_swap<br />
  def command_swap<br />
    eb_yeab_command_swap<br />
    @party_command_window.hide if window_side?<br />
    @status_window.hide<br />
    @reserve_window.x = @party_command_window.width if !window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: disallow swap process<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_disallow_swap_process disallow_swap_process<br />
  def disallow_swap_process<br />
    eb_yeab_disallow_swap_process<br />
  end<br />
end # Scene_Battle<br />
<br />
#==============================================================================<br />
end # Imported<br />
<br />
if &#36;imported[:TSBS]<br />
#==============================================================================<br />
# ** Game_Party<br />
#==============================================================================<br />
<br />
class Game_Party<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Change Order<br />
  #--------------------------------------------------------------------------<br />
  alias eb_tsbs_swap_order swap_order<br />
  def swap_order(index1, index2)<br />
    eb_tsbs_swap_order(index1, index2)<br />
    if SceneManager.scene_is?(Scene_Battle)<br />
      SceneManager.scene.spriteset.actor_sprites.each_index { |i|<br />
          sprite = SceneManager.scene.spriteset.actor_sprites[i]<br />
          mem = &#36;game_party.battle_members[i] ; return unless mem<br />
          if sprite.battler.nil? || sprite.battler != mem<br />
            mem.init_oripost ; mem.reset_pos(1) ; mem.battle_phase = :idle<br />
          end<br />
        }<br />
        SceneManager.scene.spriteset.update<br />
    end<br />
  end<br />
end # Game_Party<br />
#==============================================================================<br />
end # Imported</code></div></div><br />
</div>
		</div>
<br />
<span style="font-size: large;" class="mycode_size">Terms of Use</span><br />
<ul class="mycode_list"><li>You may post this anywhere, edited or not;<br />
</li>
<li>You may use it in any games, commercial or not;<br />
</li>
<li>Credit me as Ebanyle;<br />
</li>
<li>Do not remove the header.<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">Thanks</span><ul class="mycode_list"><li>Yanfly - For some code reference<br />
</li>
<li>Traverse - Snippet fix for adding members mid-battle in TSBS (<a href="https://web.archive.org/web/20260723170333/https://forums.rpgmakerweb.com/threads/vxace-script-request-simple-ctb-type-battle-system.117203/page-2" target="_blank" rel="noopener" class="mycode_url">from here</a>)<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">Notes</span><br />
There is an issue with the battle log's speed (message spawns out too fast iirc), and also with both active and reserve party's windows not being properly centralized (they keep to the right accounting for battle command's window). I unfortunately have not managed to be able to move either at this state.<br />
I kind of f*ed around and found out with whatever methods would work to prevent a Game Over before checking for swaps, which in my case was... aliasing a BattleManager method.<br />
I don't know anything about programming and consider it a miracle I even managed to make such a script, so it's probably really crude even for my own usage within other systems, really. I was just bummed there was no script available with such a concept, which I'm a sucker for. But well! Everyone starts somewhere, right?]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: x-large;" class="mycode_size">Battle Swap &amp; Last Resort v 1.0</span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size">By Ebanyle</span></div>
<div style="text-align: left;" class="mycode_align">Have you ever felt the need to try another strategy in the middle of the battle, but not being able to pull your warrior or archer into the team? Did you ever helplessly watch a Game Over after your party was beaten to a pulp, even though it has 1001 members who are not currently in battle?<br />
 Fear no more! This script will (perhaps) help you!</div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size">Features</span></div><ul class="mycode_list"><li>Call members in reserve to battle;<br />
</li>
<li>Call a reserve member to battle when your current battle members have been defeated; <br />
</li>
<li>Set a cooldown for swaps; <br />
</li>
<li>Set a limit for swaps.<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">How to Use</span><br />
<br />
Paste this below materials but above main. If you have any battle scripts, I recommend you to paste this below them.<br />
<br />
<span style="font-size: large;" class="mycode_size">Compatibility</span><br />
<br />
This script may not work with any scripts that modify the battle scene, such as HUDs and some battle systems, especially ATB.<br />
<br />
It is supposed to be compatible with the following:<ul class="mycode_list"><li>Yanfly Engine Ace - Battle Engine<br />
</li>
</ul>
<ul class="mycode_list"><li>Theolized Sideview Battlescript<br />
</li>
</ul>
I may or may not be able to make some scripts compatible if asked.<br />
<br />
<span style="font-size: large;" class="mycode_size">Screenshots</span><br />
<span style="color: #000000;" class="mycode_color"><div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Content Hidden</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;"> <img src="https://i.imgur.com/uhsqKLi.png" loading="lazy"  alt="[Image: uhsqKLi.png]" class="mycode_img" /> </span><br />
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/rT73Crt.png" loading="lazy"  alt="[Image: rT73Crt.png]" class="mycode_img" /> </span><br />
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/ri51KVb.png" loading="lazy"  alt="[Image: ri51KVb.png]" class="mycode_img" /> </span><br />
<br />
<div style="text-align: left;" class="mycode_align">With YEA - Battle Engine </div>
<span style="color: #000000;" class="mycode_color"><img src="https://i.imgur.com/zFwKlbE.png" loading="lazy"  alt="[Image: zFwKlbE.png]" class="mycode_img" /> </div>
		</div></span><br />
<br />
<span style="font-size: large;" class="mycode_size">Code</span><br />
<br />
<a href="https://github.com/ponchaka-munchaka/i-do-not-code/blob/main/Battle%20Swap%20&amp;%20Last%20Resort" target="_blank" rel="noopener" class="mycode_url">Github</a><br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Content Hidden</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# Battle Swap &amp; Last Resort 1.0<br />
# By Ebanyle<br />
#==============================================================================<br />
&#36;imported = {} if &#36;imported.nil?<br />
&#36;imported["EBONY_BattleSwap"] = true<br />
#==============================================================================<br />
# Version History (DD/MM/YY)<br />
# 24/01/23 - v. 1.0 - Release<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# This script allows you to swap members mid-battle. No more lazy backup!<br />
# You can also set cooldowns and a limit for swaps per battle.<br />
#==============================================================================<br />
# Instructions<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Paste this script above Main and below Materials, preferably under all battle<br />
# scripts.<br />
#==============================================================================<br />
# Terms of Use<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# - You may post this anywhere, edited or not;<br />
# - You may use it in any games, commercial or not;<br />
# - Credit me as Ebanyle;<br />
# - Do not remove this header.<br />
#==============================================================================<br />
# Thanks<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Yanfly - For some coding reference<br />
# Traverse - Snippet fix for adding members mid-battle in TSBS<br />
#==============================================================================<br />
# Compatibility<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# This script may need some patches with any script that changes the battle<br />
# scene, including HUDs, ATB, etc.<br />
# It is currently (supposed to be) compatible with the following:<br />
# - Yanfly Engine Ace - Battle Engine<br />
# - Theolized Sideview Battle System<br />
#==============================================================================<br />
# Know issues<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# - If you are using YEA - Battle Engine and have too many members, it might not<br />
# look good;<br />
# - If you have a Popup script, it may pop up the Death state when swapping.<br />
#==============================================================================<br />
# Configuration<br />
#==============================================================================<br />
module EBONY<br />
  module SWAP<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
#   Vocab: Name of the command in battle<br />
    Vocab = "Swap"    <br />
#<br />
#   Cooldown: Amount of turns that command will be inactive after swapping.<br />
#   Set to zero if you don't want to use this option.<br />
    Cooldown = 2<br />
#<br />
#   Max_Uses: Amount of times you can use command per battle.<br />
#   Set to zero if you don't want to use this option.<br />
    Max_Uses = 3<br />
#<br />
#   Log: Message to appear in the battle log when swapping.<br />
#   Names must be set by %s. 1st is the battle member, 2nd the reserve member.<br />
#   If you don't want a log to appear, simply leave string empty like this: ""<br />
    Log = "%s swapped places with %s."<br />
#<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Configuration for Yanfly Engine Ace - Battle Engine<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
#   Style: Layout of the reserve members window for YEA - Battle Engine.<br />
#          Does not affect anything if the aforementioned script is not present.<br />
#          For Battle Engine, actors will get real squishy if there's too<br />
#          many of them. Unfortunately there's no scroll option (yet?).<br />
#<br />
#   :side    - Reserve window will appear to the side of the party window.<br />
#              Recommended if you have 1 or 2 reserve members as it is tiny<br />
#              and any more members than that get REAL squishy.<br />
#   :default - Reserve window will appear above party window.<br />
    Style = :default<br />
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
  end<br />
end<br />
#==============================================================================<br />
# ** Game_Troop<br />
#==============================================================================<br />
class Game_Troop<br />
  attr_reader    :swap_cooldown<br />
  attr_reader    :swap_max<br />
  attr_accessor  :allow_swap<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: clear<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_clear clear<br />
  def clear<br />
      eb_swap_clear<br />
      @swap_cooldown = 0<br />
      @swap_max = 0<br />
      @allow_swap = false<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: apply swap cooldown<br />
  #--------------------------------------------------------------------------<br />
  def apply_swap_cooldown<br />
    unless EBONY::SWAP::Cooldown == 0<br />
      @swap_cooldown = (EBONY::SWAP::Cooldown)<br />
      @swap_max += 1<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: allow swap?<br />
  #--------------------------------------------------------------------------<br />
  def allow_swap?<br />
    if @swap_max == EBONY::SWAP::Max_Uses &amp;&amp; EBONY::SWAP::Max_Uses != 0<br />
      @allow_swap = false<br />
    elsif @swap_cooldown != 0 or !&#36;game_party.reserve_exist?<br />
      @allow_swap = false<br />
    else<br />
      @allow_swap = true<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Increase Turns<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_increase_turn increase_turn<br />
  def increase_turn<br />
    eb_swap_increase_turn<br />
    @swap_cooldown -= 1 unless @swap_cooldown == 0<br />
  end<br />
end # Game_Troop<br />
<br />
#==============================================================================<br />
# ** Game_Party<br />
#==============================================================================<br />
<br />
class Game_Party<br />
  attr_accessor :dead_reserve_members<br />
  attr_accessor :after_swap_dead_members<br />
  #--------------------------------------------------------------------------<br />
  # * alias method: initalize<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_initialize initialize<br />
  def initialize<br />
    eb_swap_initialize<br />
    @dead_reserve_members = []<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: last resort<br />
  #--------------------------------------------------------------------------<br />
  def last_resort<br />
    all_dead? &amp;&amp; reserve_exist? &amp;&amp; !reserve_all_dead?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_all_dead?<br />
  #--------------------------------------------------------------------------<br />
  def reserve_all_dead?<br />
    return if reserve_members == nil<br />
    dead_reserve_members.size == reserve_members.size<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Array of Incapacitated Reserve Members<br />
  #--------------------------------------------------------------------------<br />
  def dead_reserve_members<br />
    unless reserve_members == nil<br />
      @dead_reserve_members = reserve_members.select {|member| member.dead? }<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: party_will_be_dead?<br />
  #--------------------------------------------------------------------------<br />
  def party_will_be_dead?(battle_member,reserve_member)<br />
    party_after_swap = members.map { |member| member }<br />
    party_after_swap[battle_member] = all_members[reserve_member]<br />
    @after_swap_dead_members = party_after_swap.select {|member| member.dead? }<br />
    if @after_swap_dead_members.size == members.size<br />
      return true<br />
    else<br />
      return false<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve amount<br />
  #--------------------------------------------------------------------------<br />
  def reserve_amount<br />
    all_members.size - max_battle_members<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve members<br />
  #--------------------------------------------------------------------------<br />
  def reserve_members<br />
    return [] if all_members.size &lt; max_battle_members<br />
    all_members[max_battle_members, reserve_amount].select {|actor| actor.exist? }<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_exist?<br />
  #--------------------------------------------------------------------------<br />
  def reserve_exist?<br />
    return true if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
  end<br />
end # Game_Party<br />
<br />
#==============================================================================<br />
# ** Window_ReserveActor<br />
#  Window for showing party that is currently not in battle.<br />
#==============================================================================<br />
<br />
class Window_ReserveActor &lt; Window_BattleStatus<br />
  #--------------------------------------------------------------------------<br />
  # * Object Initialization<br />
  #--------------------------------------------------------------------------<br />
  def initialize<br />
    super()<br />
    self.x = Graphics.width - width<br />
    self.visible = false<br />
    self.openness = 255<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Activate Window<br />
  #--------------------------------------------------------------------------<br />
  def activate<br />
    select(0)<br />
    super<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Number of Items<br />
  #--------------------------------------------------------------------------<br />
  def item_max<br />
    if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
      return &#36;game_party.reserve_members.size<br />
    else<br />
      super<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Draw Item<br />
  #--------------------------------------------------------------------------<br />
  def draw_item(index)<br />
    if &#36;game_party.all_members.size &gt; &#36;game_party.max_battle_members<br />
      actor = &#36;game_party.reserve_members[index]<br />
      draw_basic_area(basic_area_rect(index), actor)<br />
      draw_gauge_area(gauge_area_rect(index), actor)<br />
    else<br />
      super<br />
    end<br />
  end<br />
end  # Window_ReserveActor<br />
<br />
#==============================================================================<br />
# ** Window_PartyCommand<br />
#==============================================================================<br />
<br />
class Window_PartyCommand &lt; Window_Command<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: create Command List<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_make_command_list make_command_list<br />
  def make_command_list<br />
    eb_swap_make_command_list<br />
    add_command(EBONY::SWAP::Vocab, :swap, &#36;game_troop.allow_swap?)<br />
  end<br />
end<br />
<br />
#==============================================================================<br />
# ** Window_BattleLog<br />
#==============================================================================<br />
<br />
class Window_BattleLog &lt; Window_Selectable<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Display Swap<br />
  #--------------------------------------------------------------------------<br />
  def display_swap(target,subject)<br />
    add_text(sprintf(EBONY::SWAP::Log, target, subject))<br />
    wait if line_number &gt; 0<br />
  end<br />
end # Window_BattleLog<br />
<br />
#==============================================================================<br />
# ** Scene_Battle<br />
#==============================================================================<br />
<br />
class Scene_Battle<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: create All Windows<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_create_all_windows create_all_windows<br />
  def create_all_windows<br />
    eb_swap_create_all_windows<br />
    create_reserve_window<br />
    create_swap_actor_window<br />
    create_dactor_window<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: create Reserve Window<br />
  #--------------------------------------------------------------------------<br />
  def create_reserve_window<br />
    @reserve_window = Window_ReserveActor.new<br />
    @reserve_window.set_handler(:ok,     method(:on_reserve_ok))<br />
    @reserve_window.set_handler(:cancel, method(:on_reserve_cancel))<br />
    oy = Graphics.height - @reserve_window.height - @status_window.height<br />
    @reserve_window.y = oy<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Create Swap Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_swap_actor_window<br />
    @swap_actor_window = Window_BattleActor.new(@info_viewport)<br />
    @swap_actor_window.set_handler(:ok,     method(:on_s_actor_ok))<br />
    @swap_actor_window.set_handler(:cancel, method(:on_s_actor_cancel))<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Create Party Commands Window<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_create_party_command_window create_party_command_window<br />
  def create_party_command_window<br />
    eb_swap_create_party_command_window<br />
    @party_command_window.set_handler(:swap, method(:command_swap))<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Create Dead Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_dactor_window<br />
    @dactor_window = Window_BattleActor.new(@info_viewport)<br />
    @dactor_window.set_handler(:ok,     method(:on_dactor_ok))<br />
    @dactor_window.x = (@party_command_window.width / 2)<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: on_dactor_ok<br />
  #--------------------------------------------------------------------------<br />
  def on_dactor_ok<br />
    on_s_actor_ok<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Processing at End of Action<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_process_action_end process_action_end<br />
  def process_action_end<br />
    apply_last_resort if &#36;game_party.last_resort<br />
    eb_swap_process_action_end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: apply last resort<br />
  #--------------------------------------------------------------------------<br />
  def apply_last_resort<br />
    @dactor_window.refresh<br />
    @dactor_window.show.activate<br />
    @status_window.hide<br />
    @reserve_window.refresh<br />
    @reserve_window.show<br />
    @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Reserve actor [OK]<br />
  #--------------------------------------------------------------------------<br />
  def on_reserve_ok<br />
    if check_for_disallow_swap_process<br />
      disallow_swap_process<br />
    else<br />
      process_swap<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: Check if to Disallow Swap Process<br />
  #--------------------------------------------------------------------------<br />
  def check_for_disallow_swap_process<br />
    bm = battle_member_to_swap<br />
    rm = reserve_member_to_swap<br />
    bmd = both_members_dead?<br />
    ald = &#36;game_party.all_dead?<br />
    return true if &#36;game_party.party_will_be_dead?(bm,rm) or bmd &amp;&amp; ald<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: disallow swap process<br />
  #--------------------------------------------------------------------------<br />
  def disallow_swap_process<br />
    Sound.play_buzzer<br />
    &#36;game_party.reserve_amount != 1 ? w = @reserve_window : w = @swap_actor_window<br />
    i = w.index<br />
    w.refresh<br />
    w.activate<br />
    w.select(i)<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Reserve actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  def on_reserve_cancel<br />
    if !&#36;game_party.last_resort<br />
      @swap_actor_window.refresh<br />
      @swap_actor_window.activate<br />
    else<br />
      @dactor_window.refresh<br />
      @dactor_window.activate<br />
    end<br />
    @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: both_members_dead?<br />
  #--------------------------------------------------------------------------<br />
  def both_members_dead?<br />
    bm = &#36;game_party.members[battle_member_to_swap]<br />
    rm = &#36;game_party.reserve_members[@reserve_window.index]<br />
    return true if bm.dead? &amp;&amp; rm.dead?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: battle_member_to_swap<br />
  #--------------------------------------------------------------------------<br />
  def battle_member_to_swap<br />
    if &#36;game_party.last_resort<br />
      return @dactor_window.index<br />
    else<br />
      return @swap_actor_window.index<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: reserve_member_to_swap<br />
  #--------------------------------------------------------------------------<br />
  def reserve_member_to_swap<br />
    ra = &#36;game_party.reserve_amount<br />
    mxb = &#36;game_party.max_battle_members<br />
    if ra != 1<br />
      return mxb + @reserve_window.index<br />
    else<br />
      return mxb<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: process direct swap<br />
  #--------------------------------------------------------------------------<br />
  def process_swap<br />
    &#36;game_troop.apply_swap_cooldown<br />
    rmn = &#36;game_party.reserve_members[@reserve_window.index].name<br />
    bmn = &#36;game_party.members[battle_member_to_swap].name<br />
    @reserve_window.hide<br />
    @swap_actor_window.hide<br />
    @dactor_window.hide<br />
    @status_window.show<br />
    start_party_command_selection<br />
    &#36;game_party.swap_order(battle_member_to_swap,reserve_member_to_swap)<br />
    &#36;game_party.make_actions<br />
    refresh_status<br />
    unless (EBONY::SWAP::Log).empty?<br />
      @party_command_window.show<br />
      @log_window.display_swap(rmn,bmn)<br />
      @log_window.wait_and_clear<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Command Swap<br />
  #--------------------------------------------------------------------------<br />
  def command_swap<br />
    select_s_actor_selection<br />
    @reserve_window.refresh &amp;&amp; @reserve_window.show &amp;&amp; @reserve_window.unselect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Start Swap Actor Selection<br />
  #--------------------------------------------------------------------------<br />
  def select_s_actor_selection<br />
    @swap_actor_window.refresh<br />
    @swap_actor_window.show.activate<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: start reserve selection (unused?)<br />
  #--------------------------------------------------------------------------<br />
  def select_reserve_selection<br />
    @reserve_window.activate<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new metod: Swap Actor [OK]<br />
  #--------------------------------------------------------------------------<br />
  def on_s_actor_ok<br />
    if &#36;game_party.reserve_amount != 1<br />
      @reserve_window.activate<br />
    else<br />
      check_for_disallow_swap_process ? disallow_swap_process : process_swap<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: Swap Actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  def on_s_actor_cancel<br />
    @party_command_window.refresh<br />
    @party_command_window.activate<br />
    @swap_actor_window.hide<br />
    @reserve_window.hide<br />
  end<br />
<br />
end # Scene_Battle<br />
<br />
class &lt;&lt; BattleManager<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite: Determine Win/Loss Results<br />
  #--------------------------------------------------------------------------<br />
  alias eb_swap_judge_win_loss judge_win_loss<br />
  def judge_win_loss<br />
    if &#36;game_party.last_resort<br />
      turn_end<br />
      @phase = :input<br />
      return<br />
    else<br />
      eb_swap_judge_win_loss<br />
    end<br />
  end<br />
end # BattleManager<br />
<br />
if &#36;imported["YEA-BattleEngine"]<br />
<br />
#==============================================================================<br />
# ** Window_ReserveActor<br />
#==============================================================================<br />
<br />
class Window_ReserveActor &lt; Window_BattleStatus<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: col_max<br />
  #--------------------------------------------------------------------------<br />
  def col_max<br />
    if &#36;game_party.reserve_members.empty?<br />
      return 1<br />
    else<br />
      return &#36;game_party.reserve_amount<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # new method: battle_members<br />
  #--------------------------------------------------------------------------<br />
  def battle_members; return &#36;game_party.reserve_members; end<br />
 <br />
  #--------------------------------------------------------------------------<br />
  # new method: actor<br />
  #--------------------------------------------------------------------------<br />
  def actor; return battle_members[@index]; end<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: item_rect<br />
  #--------------------------------------------------------------------------<br />
  def item_rect(index)<br />
    rect = Rect.new<br />
    rect.width = [[128, contents.width / col_max].min,0].max<br />
    rect.height = contents.height<br />
    rect.x = index * rect.width<br />
    if YEA::BATTLE::BATTLESTATUS_CENTER_FACES<br />
      rect.x += (contents.width - &#36;game_party.reserve_amount * rect.width) / 2<br />
    end<br />
    rect.y = 0<br />
    return rect<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # overwrite method: draw_item<br />
  #--------------------------------------------------------------------------<br />
  def draw_item(index)<br />
    return if index.nil?<br />
    clear_item(index)<br />
    actor = battle_members[index]<br />
    rect = item_rect(index)<br />
    return if actor.nil?<br />
    draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)<br />
    draw_actor_name(actor, rect.x-20, rect.y, rect.width)<br />
    draw_actor_icons(actor, rect.x, line_height*1, rect.width)<br />
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS<br />
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE<br />
    draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)<br />
    if draw_tp?(actor) &amp;&amp; draw_mp?(actor)<br />
      dw = rect.width/2-2<br />
      dw += 1 if &#36;imported["YEA-CoreEngine"] &amp;&amp; YEA::CORE::GAUGE_OUTLINE<br />
      draw_actor_tp(actor, rect.x+2, line_height*3, dw)<br />
      dw = rect.width - rect.width/2 - 2<br />
      draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)<br />
    elsif draw_tp?(actor) &amp;&amp; !draw_mp?(actor)<br />
      draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)<br />
    else<br />
      draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)<br />
    end<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * Get Window Width<br />
  #--------------------------------------------------------------------------<br />
  def window_width<br />
    if EBONY::SWAP::Style == :side<br />
      return 128<br />
    else<br />
      super<br />
    end<br />
  end<br />
end # Window_ReserveActor<br />
<br />
class Scene_Battle<br />
  #--------------------------------------------------------------------------<br />
  # * new method: window_side?<br />
  #--------------------------------------------------------------------------<br />
  def window_side?<br />
    EBONY::SWAP::Style == :side<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: create Reserve Window<br />
  #--------------------------------------------------------------------------<br />
  def create_reserve_window<br />
    @reserve_window = Window_ReserveActor.new<br />
    @reserve_window.set_handler(:ok,     method(:on_reserve_ok))<br />
    @reserve_window.set_handler(:cancel, method(:on_reserve_cancel))<br />
    oy = Graphics.height - @reserve_window.height<br />
    oy = oy - @party_command_window.height unless window_side?<br />
    @reserve_window.y = oy<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: Create Swap Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_swap_actor_window<br />
    @swap_actor_window = Window_BattleActor.new(@info_viewport)<br />
    @swap_actor_window.set_handler(:ok,     method(:on_s_actor_ok))<br />
    @swap_actor_window.set_handler(:cancel, method(:on_s_actor_cancel))<br />
    @swap_actor_window.x = @party_command_window.width unless window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * overwrite method: Create Dead Actor Window<br />
  #--------------------------------------------------------------------------<br />
  def create_dactor_window<br />
    @dactor_window = Window_BattleActor.new(@info_viewport)<br />
    @dactor_window.set_handler(:ok,     method(:on_dactor_ok))<br />
    @dactor_window.x = (@party_command_window.width / 2) if !window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * alias method: apply last resort<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_apply_last_resort apply_last_resort<br />
  def apply_last_resort<br />
    eb_yeab_apply_last_resort<br />
    @party_command_window.show if !window_side?<br />
    @reserve_window.x = @dactor_window.x if !window_side? &amp;&amp; &#36;game_party.last_resort<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * new method: hide windows on swap<br />
  #--------------------------------------------------------------------------<br />
  def hide_windows_on_swap<br />
    @help_window.hide<br />
    refresh_status<br />
    @status_window.show<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Swap Actor [Cancel]<br />
  #--------------------------------------------------------------------------<br />
  alias yeab_on_s_actor_cancel on_s_actor_cancel<br />
  def on_s_actor_cancel<br />
    yeab_on_s_actor_cancel<br />
    hide_windows_on_swap<br />
    @party_command_window.show<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: process direct swap<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_process_swap process_swap<br />
  def process_swap<br />
    eb_yeab_process_swap<br />
    hide_windows_on_swap<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: command swap<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_command_swap command_swap<br />
  def command_swap<br />
    eb_yeab_command_swap<br />
    @party_command_window.hide if window_side?<br />
    @status_window.hide<br />
    @reserve_window.x = @party_command_window.width if !window_side?<br />
  end<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: disallow swap process<br />
  #--------------------------------------------------------------------------<br />
  alias eb_yeab_disallow_swap_process disallow_swap_process<br />
  def disallow_swap_process<br />
    eb_yeab_disallow_swap_process<br />
  end<br />
end # Scene_Battle<br />
<br />
#==============================================================================<br />
end # Imported<br />
<br />
if &#36;imported[:TSBS]<br />
#==============================================================================<br />
# ** Game_Party<br />
#==============================================================================<br />
<br />
class Game_Party<br />
  #--------------------------------------------------------------------------<br />
  # * aliased method: Change Order<br />
  #--------------------------------------------------------------------------<br />
  alias eb_tsbs_swap_order swap_order<br />
  def swap_order(index1, index2)<br />
    eb_tsbs_swap_order(index1, index2)<br />
    if SceneManager.scene_is?(Scene_Battle)<br />
      SceneManager.scene.spriteset.actor_sprites.each_index { |i|<br />
          sprite = SceneManager.scene.spriteset.actor_sprites[i]<br />
          mem = &#36;game_party.battle_members[i] ; return unless mem<br />
          if sprite.battler.nil? || sprite.battler != mem<br />
            mem.init_oripost ; mem.reset_pos(1) ; mem.battle_phase = :idle<br />
          end<br />
        }<br />
        SceneManager.scene.spriteset.update<br />
    end<br />
  end<br />
end # Game_Party<br />
#==============================================================================<br />
end # Imported</code></div></div><br />
</div>
		</div>
<br />
<span style="font-size: large;" class="mycode_size">Terms of Use</span><br />
<ul class="mycode_list"><li>You may post this anywhere, edited or not;<br />
</li>
<li>You may use it in any games, commercial or not;<br />
</li>
<li>Credit me as Ebanyle;<br />
</li>
<li>Do not remove the header.<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">Thanks</span><ul class="mycode_list"><li>Yanfly - For some code reference<br />
</li>
<li>Traverse - Snippet fix for adding members mid-battle in TSBS (<a href="https://web.archive.org/web/20260723170333/https://forums.rpgmakerweb.com/threads/vxace-script-request-simple-ctb-type-battle-system.117203/page-2" target="_blank" rel="noopener" class="mycode_url">from here</a>)<br />
</li>
</ul>
<br />
<span style="font-size: large;" class="mycode_size">Notes</span><br />
There is an issue with the battle log's speed (message spawns out too fast iirc), and also with both active and reserve party's windows not being properly centralized (they keep to the right accounting for battle command's window). I unfortunately have not managed to be able to move either at this state.<br />
I kind of f*ed around and found out with whatever methods would work to prevent a Game Over before checking for swaps, which in my case was... aliasing a BattleManager method.<br />
I don't know anything about programming and consider it a miracle I even managed to make such a script, so it's probably really crude even for my own usage within other systems, really. I was just bummed there was no script available with such a concept, which I'm a sucker for. But well! Everyone starts somewhere, right?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Skip Party Command Window]]></title>
			<link>https://www.save-point.org/thread-13614.html</link>
			<pubDate>Sat, 27 Jun 2026 15:51:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=9528">Sneezycat</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13614.html</guid>
			<description><![CDATA[Not surprisingly Helladen's dropbox link to his <a href="showthread.php?tid=4288">Skip Party Command Window</a> post 404'd.<br />
<br />
<blockquote class="mycode_quote"><cite>Helladen - 07-27-2012 Wrote:</cite>This script will skip the party command window when a battle starts and when a turn ends, because it is really annoying to click fight, and most of the time you will not run. Furthermore, I have added an option to disable it from skipping when a battle starts to help make it more friendly to developers. I also left in the compatibility for <a href="http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/command-party/" target="_blank" rel="noopener" class="mycode_url">YEA - Command Party</a> since it won't really affect anyone as well.<br />
<br />
This script should work with almost every system, and to install it just paste it above main and below all your other scripts.</blockquote><br />
I tried to recreate it, modifying Yanfly's YEA - Battle Engine's code, like OP.<br />
So like, all the credit goes to Yanfly.<br />
<br />
To be clear, this is not OP's code, this is what I imagine it was like. It works, though.<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>class Scene_Battle &lt; Scene_Base<br />
<br />
  alias scene_battle_battle_start_abe battle_start<br />
  def battle_start<br />
    scene_battle_battle_start_abe<br />
    @party_command_window.deactivate<br />
    if BattleManager.input_start<br />
      command_fight <br />
    else<br />
      turn_start<br />
    end<br />
  end<br />
  <br />
  alias scene_battle_turn_end_abe turn_end<br />
  def turn_end<br />
    scene_battle_turn_end_abe<br />
    return if end_battle_conditions?<br />
    if BattleManager.input_start<br />
      @party_command_window.deactivate<br />
      command_fight<br />
    else<br />
      @party_command_window.deactivate<br />
      turn_start<br />
    end<br />
  end<br />
  <br />
  def end_battle_conditions?<br />
    return true if &#36;game_party.members.empty?<br />
    return true if &#36;game_party.all_dead?<br />
    return true if &#36;game_troop.all_dead?<br />
    return true if BattleManager.aborting?<br />
    return false<br />
  end<br />
end</code></div></div>]]></description>
			<content:encoded><![CDATA[Not surprisingly Helladen's dropbox link to his <a href="showthread.php?tid=4288">Skip Party Command Window</a> post 404'd.<br />
<br />
<blockquote class="mycode_quote"><cite>Helladen - 07-27-2012 Wrote:</cite>This script will skip the party command window when a battle starts and when a turn ends, because it is really annoying to click fight, and most of the time you will not run. Furthermore, I have added an option to disable it from skipping when a battle starts to help make it more friendly to developers. I also left in the compatibility for <a href="http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/command-party/" target="_blank" rel="noopener" class="mycode_url">YEA - Command Party</a> since it won't really affect anyone as well.<br />
<br />
This script should work with almost every system, and to install it just paste it above main and below all your other scripts.</blockquote><br />
I tried to recreate it, modifying Yanfly's YEA - Battle Engine's code, like OP.<br />
So like, all the credit goes to Yanfly.<br />
<br />
To be clear, this is not OP's code, this is what I imagine it was like. It works, though.<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>class Scene_Battle &lt; Scene_Base<br />
<br />
  alias scene_battle_battle_start_abe battle_start<br />
  def battle_start<br />
    scene_battle_battle_start_abe<br />
    @party_command_window.deactivate<br />
    if BattleManager.input_start<br />
      command_fight <br />
    else<br />
      turn_start<br />
    end<br />
  end<br />
  <br />
  alias scene_battle_turn_end_abe turn_end<br />
  def turn_end<br />
    scene_battle_turn_end_abe<br />
    return if end_battle_conditions?<br />
    if BattleManager.input_start<br />
      @party_command_window.deactivate<br />
      command_fight<br />
    else<br />
      @party_command_window.deactivate<br />
      turn_start<br />
    end<br />
  end<br />
  <br />
  def end_battle_conditions?<br />
    return true if &#36;game_party.members.empty?<br />
    return true if &#36;game_party.all_dead?<br />
    return true if &#36;game_troop.all_dead?<br />
    return true if BattleManager.aborting?<br />
    return false<br />
  end<br />
end</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KTrespass VX]]></title>
			<link>https://www.save-point.org/thread-13613.html</link>
			<pubDate>Sat, 27 Jun 2026 06:22:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13613.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KTrespass VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Let the player do crazy stuff like slipping into a pond or climbing a mountain (no batteries nor UI included) by just owning a very specific item.<br />
<br />
Everything is handled by the very short KTrespass module. Just a custom note in the item's notebox:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;passable terrain: 0-63&gt;</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">NOTES:</span><ul class="mycode_list"><li>The VX tileset is composed of very minuscule pieces so you are in need of setting a tile ID range to make the script work properly.<br />
</li>
<li>You will eventually need to create events that include a special script call in order to retrieve a tile ID.<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KTrespass VX * # <br />
#   Scripter : Kyonides<br />
#   v1.0.1 - 2026-06-27<br />
<br />
# Let the player slip into a pond or climb a mountain (no UI included)<br />
# if the party owns a specific item.<br />
# Just leave a note in the item's notebox. Replace TileID with a number.<br />
# You must set ranges because the tileset is composed of very tiny pieces.<br />
#   &lt;passable terrain: TileID1-TileID2&gt;<br />
<br />
# * Helpful Script Call * #<br />
# - Get the Next Tile IDs (From Bottom to Top) During Playtest:<br />
# x, y, dir = &#36;game_player.x_y_dir<br />
# &#36;game_map.next_tile_id?(x, y, dir)<br />
<br />
module KTrespass<br />
  NOTE_TAG = /&lt;passable terrain: (.*)&gt;/i<br />
end<br />
<br />
module RPG<br />
  class BaseItem<br />
    def item?<br />
      false<br />
    end<br />
  end<br />
<br />
  class Item<br />
    def item?<br />
      true<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Party<br />
  alias :kyon_trespass_gm_pty_init :initialize<br />
  alias :kyon_trespass_gm_pty_gain_item :gain_item<br />
  def initialize<br />
    kyon_trespass_gm_pty_init<br />
    @terrain_items = {}<br />
  end<br />
<br />
  def gain_item(item, n, include_equip=false)<br />
    kyon_trespass_gm_pty_gain_item(item, n, include_equip)<br />
    refresh_item_terrain_tags(item) if item.item?<br />
  end<br />
<br />
  def refresh_item_terrain_tags(item)<br />
    item_id = item.id<br />
    n = @items[item_id] || 0<br />
    if n &gt; 0 and !@terrain_items.has_key?(item_id)<br />
      item.note[KTrespass::NOTE_TAG]<br />
      return unless &#36;1<br />
      range = &#36;1.scan(/(&#92;d+)-(&#92;d+)/).flatten<br />
      range.map! {|n| n.to_i }<br />
      range = Range.new(*range)<br />
      @terrain_items[item_id] = range<br />
    else<br />
      @terrain_items.delete(item_id)<br />
    end<br />
  end<br />
<br />
  def terrain_items<br />
    @terrain_items ||= {}<br />
  end<br />
<br />
  def item_has_terrain_id?(terrain_id)<br />
    @terrain_items.values.flatten.include?(terrain_id)<br />
  end<br />
end<br />
<br />
class Game_Map<br />
  def terrain_tile_id?(x, y)<br />
    tile_ids = &#36;game_party.terrain_items.values.flatten<br />
    for i in [2, 1, 0]<br />
      tile_id = @map.data[x, y, i]<br />
      for range in tile_ids<br />
        return true if range.include?(tile_id)<br />
      end<br />
    end<br />
    return false<br />
  end<br />
<br />
  def next_tile_id?(x, y, dir)<br />
    x += dir == 4 ? -1 : dir == 6 ? 1 : 0<br />
    y += dir == 2 ? 1 : dir == 8 ? -1 : 0<br />
    tile_ids = []<br />
    for i in [2, 1, 0]<br />
      tile_ids &lt;&lt; @map.data[x, y, i]<br />
    end<br />
    tile_ids.reverse!<br />
    print tile_ids.join("&#92;n")<br />
  end<br />
end<br />
<br />
class Game_Player<br />
  def map_passable?(x, y)<br />
    case @vehicle_type<br />
    when 0  # Boat<br />
      return &#36;game_map.boat_passable?(x, y)<br />
    when 1  # Ship<br />
      return &#36;game_map.ship_passable?(x, y)<br />
    when 2  # Airship<br />
      return true<br />
    else    # Walking<br />
      pass = &#36;game_map.passable?(x, y)<br />
      pass = &#36;game_map.terrain_tile_id?(x, y) unless pass<br />
      return pass<br />
    end<br />
  end<br />
<br />
  def x_y_dir<br />
    [@x, @y, @direction]<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Under MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KTrespass VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Let the player do crazy stuff like slipping into a pond or climbing a mountain (no batteries nor UI included) by just owning a very specific item.<br />
<br />
Everything is handled by the very short KTrespass module. Just a custom note in the item's notebox:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;passable terrain: 0-63&gt;</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">NOTES:</span><ul class="mycode_list"><li>The VX tileset is composed of very minuscule pieces so you are in need of setting a tile ID range to make the script work properly.<br />
</li>
<li>You will eventually need to create events that include a special script call in order to retrieve a tile ID.<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KTrespass VX * # <br />
#   Scripter : Kyonides<br />
#   v1.0.1 - 2026-06-27<br />
<br />
# Let the player slip into a pond or climb a mountain (no UI included)<br />
# if the party owns a specific item.<br />
# Just leave a note in the item's notebox. Replace TileID with a number.<br />
# You must set ranges because the tileset is composed of very tiny pieces.<br />
#   &lt;passable terrain: TileID1-TileID2&gt;<br />
<br />
# * Helpful Script Call * #<br />
# - Get the Next Tile IDs (From Bottom to Top) During Playtest:<br />
# x, y, dir = &#36;game_player.x_y_dir<br />
# &#36;game_map.next_tile_id?(x, y, dir)<br />
<br />
module KTrespass<br />
  NOTE_TAG = /&lt;passable terrain: (.*)&gt;/i<br />
end<br />
<br />
module RPG<br />
  class BaseItem<br />
    def item?<br />
      false<br />
    end<br />
  end<br />
<br />
  class Item<br />
    def item?<br />
      true<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Party<br />
  alias :kyon_trespass_gm_pty_init :initialize<br />
  alias :kyon_trespass_gm_pty_gain_item :gain_item<br />
  def initialize<br />
    kyon_trespass_gm_pty_init<br />
    @terrain_items = {}<br />
  end<br />
<br />
  def gain_item(item, n, include_equip=false)<br />
    kyon_trespass_gm_pty_gain_item(item, n, include_equip)<br />
    refresh_item_terrain_tags(item) if item.item?<br />
  end<br />
<br />
  def refresh_item_terrain_tags(item)<br />
    item_id = item.id<br />
    n = @items[item_id] || 0<br />
    if n &gt; 0 and !@terrain_items.has_key?(item_id)<br />
      item.note[KTrespass::NOTE_TAG]<br />
      return unless &#36;1<br />
      range = &#36;1.scan(/(&#92;d+)-(&#92;d+)/).flatten<br />
      range.map! {|n| n.to_i }<br />
      range = Range.new(*range)<br />
      @terrain_items[item_id] = range<br />
    else<br />
      @terrain_items.delete(item_id)<br />
    end<br />
  end<br />
<br />
  def terrain_items<br />
    @terrain_items ||= {}<br />
  end<br />
<br />
  def item_has_terrain_id?(terrain_id)<br />
    @terrain_items.values.flatten.include?(terrain_id)<br />
  end<br />
end<br />
<br />
class Game_Map<br />
  def terrain_tile_id?(x, y)<br />
    tile_ids = &#36;game_party.terrain_items.values.flatten<br />
    for i in [2, 1, 0]<br />
      tile_id = @map.data[x, y, i]<br />
      for range in tile_ids<br />
        return true if range.include?(tile_id)<br />
      end<br />
    end<br />
    return false<br />
  end<br />
<br />
  def next_tile_id?(x, y, dir)<br />
    x += dir == 4 ? -1 : dir == 6 ? 1 : 0<br />
    y += dir == 2 ? 1 : dir == 8 ? -1 : 0<br />
    tile_ids = []<br />
    for i in [2, 1, 0]<br />
      tile_ids &lt;&lt; @map.data[x, y, i]<br />
    end<br />
    tile_ids.reverse!<br />
    print tile_ids.join("&#92;n")<br />
  end<br />
end<br />
<br />
class Game_Player<br />
  def map_passable?(x, y)<br />
    case @vehicle_type<br />
    when 0  # Boat<br />
      return &#36;game_map.boat_passable?(x, y)<br />
    when 1  # Ship<br />
      return &#36;game_map.ship_passable?(x, y)<br />
    when 2  # Airship<br />
      return true<br />
    else    # Walking<br />
      pass = &#36;game_map.passable?(x, y)<br />
      pass = &#36;game_map.terrain_tile_id?(x, y) unless pass<br />
      return pass<br />
    end<br />
  end<br />
<br />
  def x_y_dir<br />
    [@x, @y, @direction]<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Under MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Enter Monster Message ACE]]></title>
			<link>https://www.save-point.org/thread-13605.html</link>
			<pubDate>Fri, 19 Jun 2026 23:40:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13605.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Enter Monster Message ACE</span><br />
<br />
<span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Introduction</span></span><br />
<br />
In the last few days of RMW, a forumer called avelanch had made a couple of requests. One of them was monster related: the engine should display a custom enter monster message before you can get access to the battle menu. This script is a very simplistic approach to the original concept.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Required Steps</span></span><br />
<br />
<ol type="1" class="mycode_list"><li>Create a new Constant inside the small Vocab module extension my scripts has provided you.<br />
</li>
<li>Add a new entry to the LIST hash. Use the enemy's name as the key and any of the Vocab Constants as its specific value.<br />
</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script(s)</span><br />
<br />
Constant Version</span> - Because it relies on CONSTANTS to store all the custom text messages.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Enter Monster Message ACE * #<br />
# * Constant Version          * #<br />
#   Scripter : Kyonides<br />
#   2026-06-19<br />
<br />
module Vocab<br />
  Bite    = "%s is ready to bite you!"<br />
  Chewing = "%s started chewing some cheese!"<br />
  SlipIn  = "%s slips into the battlefield!"<br />
  Buzzing = "%s starts buzzing!"<br />
  Bonfire = "%s lit a bonfire!"<br />
end<br />
<br />
module EnterMonster<br />
  include Vocab<br />
  LIST = {} # Leave this line alone!<br />
  LIST.default = Emerge<br />
  LIST["Slime"] = SlipIn<br />
  LIST["Bat"] = Bite<br />
  LIST["Hornet"] = Buzzing<br />
  LIST["Spider"] = Bite<br />
  LIST["Rat"] = Chewing<br />
  LIST["Wisp"] = Bonfire<br />
end<br />
<br />
module BattleManager<br />
  def self.find_monster_start_message(name)<br />
    template = EnterMonster::LIST[name]<br />
    sprintf(template, name)<br />
  end<br />
<br />
  def self.battle_start<br />
    &#36;game_system.battle_count += 1<br />
    &#36;game_party.on_battle_start<br />
    &#36;game_troop.on_battle_start<br />
    &#36;game_troop.all_enemy_names.each do |name|<br />
      text = find_monster_start_message(name)<br />
      &#36;game_message.add(text)<br />
    end<br />
    if @preemptive<br />
      &#36;game_message.add(sprintf(Vocab::Preemptive, &#36;game_party.name))<br />
    elsif @surprise<br />
      &#36;game_message.add(sprintf(Vocab::Surprise, &#36;game_party.name))<br />
    end<br />
    wait_for_message<br />
  end<br />
end<br />
<br />
class Game_Troop<br />
  def all_enemy_names<br />
    members.map(&amp;:original_name)<br />
  end<br />
end</code></div></div><br />
In the future I may publish another version that relies on custom note tags placed in the enemy's notebox.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
Under MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Enter Monster Message ACE</span><br />
<br />
<span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Introduction</span></span><br />
<br />
In the last few days of RMW, a forumer called avelanch had made a couple of requests. One of them was monster related: the engine should display a custom enter monster message before you can get access to the battle menu. This script is a very simplistic approach to the original concept.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Required Steps</span></span><br />
<br />
<ol type="1" class="mycode_list"><li>Create a new Constant inside the small Vocab module extension my scripts has provided you.<br />
</li>
<li>Add a new entry to the LIST hash. Use the enemy's name as the key and any of the Vocab Constants as its specific value.<br />
</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script(s)</span><br />
<br />
Constant Version</span> - Because it relies on CONSTANTS to store all the custom text messages.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Enter Monster Message ACE * #<br />
# * Constant Version          * #<br />
#   Scripter : Kyonides<br />
#   2026-06-19<br />
<br />
module Vocab<br />
  Bite    = "%s is ready to bite you!"<br />
  Chewing = "%s started chewing some cheese!"<br />
  SlipIn  = "%s slips into the battlefield!"<br />
  Buzzing = "%s starts buzzing!"<br />
  Bonfire = "%s lit a bonfire!"<br />
end<br />
<br />
module EnterMonster<br />
  include Vocab<br />
  LIST = {} # Leave this line alone!<br />
  LIST.default = Emerge<br />
  LIST["Slime"] = SlipIn<br />
  LIST["Bat"] = Bite<br />
  LIST["Hornet"] = Buzzing<br />
  LIST["Spider"] = Bite<br />
  LIST["Rat"] = Chewing<br />
  LIST["Wisp"] = Bonfire<br />
end<br />
<br />
module BattleManager<br />
  def self.find_monster_start_message(name)<br />
    template = EnterMonster::LIST[name]<br />
    sprintf(template, name)<br />
  end<br />
<br />
  def self.battle_start<br />
    &#36;game_system.battle_count += 1<br />
    &#36;game_party.on_battle_start<br />
    &#36;game_troop.on_battle_start<br />
    &#36;game_troop.all_enemy_names.each do |name|<br />
      text = find_monster_start_message(name)<br />
      &#36;game_message.add(text)<br />
    end<br />
    if @preemptive<br />
      &#36;game_message.add(sprintf(Vocab::Preemptive, &#36;game_party.name))<br />
    elsif @surprise<br />
      &#36;game_message.add(sprintf(Vocab::Surprise, &#36;game_party.name))<br />
    end<br />
    wait_for_message<br />
  end<br />
end<br />
<br />
class Game_Troop<br />
  def all_enemy_names<br />
    members.map(&amp;:original_name)<br />
  end<br />
end</code></div></div><br />
In the future I may publish another version that relies on custom note tags placed in the enemy's notebox.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
Under MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SPECIAL!  RMWEBS RMVX and ACE PAGES (Limited Time)]]></title>
			<link>https://www.save-point.org/thread-13603.html</link>
			<pubDate>Fri, 19 Jun 2026 14:42:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=5">DerVVulfman</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13603.html</guid>
			<description><![CDATA[I'm going to cut this short and sweet. <br />
<br />
This download for all of the RPGMaker VX files is  260MB in size.<br />
And the downloads for the RPGMaker VXAce files is likely to average between 300MB to 600MB in size.<br />
<br />
These archives contain the 1st page... the MAIN page... of VX and VXAce RubyScript Plugins post at RPGMaker Webs.<br />
<br />
<br />
For a limited time.  These can be deleted when need no longer exists.<br />
<br />
The Index to the VX RubyScript (RGSS2) Scripts has roughly 9 pages, with 20 released RGSS2 scripts per page.  With some threads being requests and some having dl.dropbox links that have long expired and with no alternate sources anywyere, that amounts to over 400  plugins.<br />
<br />
And the VXAce Rubyscripts (RGSS3) Scripts will be in download packages of 10 index pages, up to 9 downloads in total.<br />
<br />
ONLY the first page of each was saved given that it was the main page with the scripts or download links.  I endeavored to grab every requisite attachment, though very little in attachments even existed as posters opted for off-site image source links.<br />
<br />
So without further adieu, the LINKS:<br />
<br />
The RPGMaker Webs RMVX Links!<br />
<br />
<a href="https://www.mediafire.com/file/jhun5c2fo9dxn1n/RGSS2_Scripts_%2528RMVX%2529.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/jhun5c2fo...9.zip/file</a><br />
<span class="highlight">NOTE:  Well over half of these are actually by kyonides, and all of that content already exists here.</span><br />
<br />
<hr class="mycode_hr" />
<br />
The RPGMaker Webs RMVX Ace Links!<br />
<br />
<a href="https://www.mediafire.com/file/34d73wfn4wailbo/RGSS3_Scripts_%2528RMVX_Ace%2529_01-10.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/34d73wfn4...0.zip/file</a>      (01-10) 511 MB<br />
<a href="https://www.mediafire.com/file/zhyx2gtey7kmuow/RGSS3_Scripts_%2528RMVX_Ace%2529_11-20.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/zhyx2gtey...0.zip/file</a>     (11-20) 477 MB<br />
<a href="https://www.mediafire.com/file/e7sc7ebm56swvbh/RGSS3_Scripts_%2528RMVX_Ace%2529_21-30.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/e7sc7ebm5...0.zip/file</a>    (21-30) 445 MB<br />
<a href="https://www.mediafire.com/file/b0ciz31dkqk05an/RGSS3_Scripts_%2528RMVX_Ace%2529_31-40.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/b0ciz31dk...0.zip/file</a>      (31-40) 445 MB<br />
<a href="https://www.mediafire.com/file/vc3j7jwjfm7yuvq/RGSS3_Scripts_%2528RMVX_Ace%2529_41-50.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/vc3j7jwjf...0.zip/file</a>      (41-50) 413 MB<br />
<a href="https://www.mediafire.com/file/bges7ge64z5p0os/RGSS3_Scripts_%2528RMVX_Ace%2529_51-60.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/bges7ge64...0.zip/file</a>     (51-60) 387 MB<br />
<a href="https://www.mediafire.com/file/6vfqwsazbnjzli6/RGSS3_Scripts_%2528RMVX_Ace%2529_61-70.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/6vfqwsazb...0.zip/file</a>      (61-70) 347 MB<br />
<a href="https://www.mediafire.com/file/xzar7qh6lzfyfc1/RGSS3_Scripts_%2528RMVX_Ace%2529_71-80.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/xzar7qh6l...0.zip/file</a>      (71-80) 326 MB<br />
<a href="https://www.mediafire.com/file/9lgy1z26uyvvhjv/RGSS3_Scripts_%2528RMVX_Ace%2529_81-88.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/9lgy1z26u...8.zip/file</a>      (81-88) 254 MB<br />
<br />
<a href="https://www.mediafire.com/file/dscal2n6af7cov5/OZ_Overtiles.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/dscal2n6a...s.zip/file</a>  (OZ_Overtiles) <br />
--- a file supplied by Orochii that was originally a missing dl.dropbox link he recovered for us<br />
---  OZ Overlays is a script from index Page 73<br />
<br />
<br />
<hr class="mycode_hr" /><hr class="mycode_hr" />
<br />
STRUCTURE:<br />
<br />
Every index page filled with scripts has its own folder (~1, ~2, ~8...).  And you can find those within their own master folders in groups of ten... except the very last few folders.<br />
<br />
In each numbered folder filled with plugins, you will find (on average) 20 html files and matching folders containing their webpage graphics. Sadly, the webpage graphics is what causes the filesize bloat. But removing the wrong files could cause issues with the page display. <br />
<br />
Also within each numbered folder, there will be a subfolder named ~ATTACHMENTS.  It is here where necessary graphics and files are stored, those that the poster did not supply links (such as Imgur, photobucket, etc, or Github, ItchIo). To prevent their loss, they were downloaded and all placed within this folder.  It is a bit mix-n-match, but the graphic files should have names attributed to their posts and numbered in the order they were 'attached' to their post.]]></description>
			<content:encoded><![CDATA[I'm going to cut this short and sweet. <br />
<br />
This download for all of the RPGMaker VX files is  260MB in size.<br />
And the downloads for the RPGMaker VXAce files is likely to average between 300MB to 600MB in size.<br />
<br />
These archives contain the 1st page... the MAIN page... of VX and VXAce RubyScript Plugins post at RPGMaker Webs.<br />
<br />
<br />
For a limited time.  These can be deleted when need no longer exists.<br />
<br />
The Index to the VX RubyScript (RGSS2) Scripts has roughly 9 pages, with 20 released RGSS2 scripts per page.  With some threads being requests and some having dl.dropbox links that have long expired and with no alternate sources anywyere, that amounts to over 400  plugins.<br />
<br />
And the VXAce Rubyscripts (RGSS3) Scripts will be in download packages of 10 index pages, up to 9 downloads in total.<br />
<br />
ONLY the first page of each was saved given that it was the main page with the scripts or download links.  I endeavored to grab every requisite attachment, though very little in attachments even existed as posters opted for off-site image source links.<br />
<br />
So without further adieu, the LINKS:<br />
<br />
The RPGMaker Webs RMVX Links!<br />
<br />
<a href="https://www.mediafire.com/file/jhun5c2fo9dxn1n/RGSS2_Scripts_%2528RMVX%2529.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/jhun5c2fo...9.zip/file</a><br />
<span class="highlight">NOTE:  Well over half of these are actually by kyonides, and all of that content already exists here.</span><br />
<br />
<hr class="mycode_hr" />
<br />
The RPGMaker Webs RMVX Ace Links!<br />
<br />
<a href="https://www.mediafire.com/file/34d73wfn4wailbo/RGSS3_Scripts_%2528RMVX_Ace%2529_01-10.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/34d73wfn4...0.zip/file</a>      (01-10) 511 MB<br />
<a href="https://www.mediafire.com/file/zhyx2gtey7kmuow/RGSS3_Scripts_%2528RMVX_Ace%2529_11-20.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/zhyx2gtey...0.zip/file</a>     (11-20) 477 MB<br />
<a href="https://www.mediafire.com/file/e7sc7ebm56swvbh/RGSS3_Scripts_%2528RMVX_Ace%2529_21-30.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/e7sc7ebm5...0.zip/file</a>    (21-30) 445 MB<br />
<a href="https://www.mediafire.com/file/b0ciz31dkqk05an/RGSS3_Scripts_%2528RMVX_Ace%2529_31-40.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/b0ciz31dk...0.zip/file</a>      (31-40) 445 MB<br />
<a href="https://www.mediafire.com/file/vc3j7jwjfm7yuvq/RGSS3_Scripts_%2528RMVX_Ace%2529_41-50.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/vc3j7jwjf...0.zip/file</a>      (41-50) 413 MB<br />
<a href="https://www.mediafire.com/file/bges7ge64z5p0os/RGSS3_Scripts_%2528RMVX_Ace%2529_51-60.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/bges7ge64...0.zip/file</a>     (51-60) 387 MB<br />
<a href="https://www.mediafire.com/file/6vfqwsazbnjzli6/RGSS3_Scripts_%2528RMVX_Ace%2529_61-70.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/6vfqwsazb...0.zip/file</a>      (61-70) 347 MB<br />
<a href="https://www.mediafire.com/file/xzar7qh6lzfyfc1/RGSS3_Scripts_%2528RMVX_Ace%2529_71-80.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/xzar7qh6l...0.zip/file</a>      (71-80) 326 MB<br />
<a href="https://www.mediafire.com/file/9lgy1z26uyvvhjv/RGSS3_Scripts_%2528RMVX_Ace%2529_81-88.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/9lgy1z26u...8.zip/file</a>      (81-88) 254 MB<br />
<br />
<a href="https://www.mediafire.com/file/dscal2n6af7cov5/OZ_Overtiles.zip/file" target="_blank" rel="noopener" class="mycode_url">https://www.mediafire.com/file/dscal2n6a...s.zip/file</a>  (OZ_Overtiles) <br />
--- a file supplied by Orochii that was originally a missing dl.dropbox link he recovered for us<br />
---  OZ Overlays is a script from index Page 73<br />
<br />
<br />
<hr class="mycode_hr" /><hr class="mycode_hr" />
<br />
STRUCTURE:<br />
<br />
Every index page filled with scripts has its own folder (~1, ~2, ~8...).  And you can find those within their own master folders in groups of ten... except the very last few folders.<br />
<br />
In each numbered folder filled with plugins, you will find (on average) 20 html files and matching folders containing their webpage graphics. Sadly, the webpage graphics is what causes the filesize bloat. But removing the wrong files could cause issues with the page display. <br />
<br />
Also within each numbered folder, there will be a subfolder named ~ATTACHMENTS.  It is here where necessary graphics and files are stored, those that the poster did not supply links (such as Imgur, photobucket, etc, or Github, ItchIo). To prevent their loss, they were downloaded and all placed within this folder.  It is a bit mix-n-match, but the graphic files should have names attributed to their posts and numbered in the order they were 'attached' to their post.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ChooseFoes ACE]]></title>
			<link>https://www.save-point.org/thread-13599.html</link>
			<pubDate>Wed, 17 Jun 2026 01:04:38 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13599.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">ChooseFoes ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
This scriptlet allows you to open a simple menu where you can choose your enemy's troops based on the current map's random enemy encounter list.<br />
It will use the map's battleback picture as its backdrop. Don't worry <img src="https://www.save-point.org/images/smilies/ejlol/worried.gif" alt="Worried" title="Worried" class="smilie smilie_216" /> about this, it will cover the whole RMVX ACE game screen by default. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /><br />
You are encouraged to set a custom BGM, otherwise the scene will remain silent until you have finished picking a foe.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">AVAILABLE MODES</span><ul class="mycode_list"><li>:accessory<br />
</li>
<li>:levels<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Accessory Mode</span><br />
<br />
By the way, setting a specific "Choose Foe" accessory is mandatory here!<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Actors' Level Average Mode</span><br />
<br />
You must set a default level plus any specific map's average level.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Version 0.9.0</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * ChooseFoes ACE * #<br />
# &nbsp;&nbsp;Not Exactly a Plug-n-Play Script<br />
# &nbsp;&nbsp;Scripter : Kyonides<br />
# &nbsp;&nbsp;0.9.0 - 2026-06-16<br />
<br />
# This scriptlet allows you to open a simple menu where you can choose your<br />
# enemy's troops based on the current map's random enemy encounter list.<br />
<br />
# - AVAILABLE MODES: :accessory and :levels<br />
<br />
# * Accessory Mode * #<br />
# Setting a specific "Choose Foe" accessory is mandatory here!<br />
# * Average Level Mode * #<br />
# You must set a default level plus any specific map's average level.<br />
<br />
# * Optional Script Call * #<br />
# &#36;game_party.choose_foes_mode = :your_mode<br />
<br />
module ChooseFoes<br />
  MODE = :levels<br />
  ACCESSORY_ID = 53<br />
  MAP_ACTOR_LVL = {}<br />
  MAP_ACTOR_LVL[1] = 4<br />
  MAP_ACTOR_LVL.default = 5<br />
  TITLE = "Pick Your Foe"<br />
  @list = [] # Leave this array alone!<br />
  extend self<br />
  attr_accessor :list<br />
<br />
  class Scene<br />
    def initialize<br />
      @list = &#36;game_map.encounter_list.map(&amp;:troop_id)<br />
      @commands = @list.map {|n| &#36;data_troops[n].name }<br />
      ChooseFoes.list = @commands<br />
    end<br />
<br />
    def main<br />
      BattleManager.play_battle_bgm<br />
      @stage = true<br />
      bn1 = &#36;game_map.battleback1_name<br />
      if bn1<br />
        @backdrop = Sprite.new<br />
        @backdrop.bitmap = Cache.battleback1(bn1)<br />
      end<br />
      bn2 = &#36;game_map.battleback2_name<br />
      if bn2<br />
        @floor = Sprite.new<br />
        @floor.bitmap = Cache.battleback2(bn2)<br />
      end<br />
      @help_window = Window_Help.new(1)<br />
      @help_window.set_text(TITLE)<br />
      @command_window = TroopListWindow.new(182, 80)<br />
      Input.update<br />
      Graphics.transition(Graphics.frame_rate)<br />
      while @stage<br />
        Graphics.update<br />
        Input.update<br />
        update<br />
      end<br />
      Graphics.freeze<br />
      @command_window.dispose<br />
      @help_window.dispose<br />
      if bn2<br />
        @floor.bitmap.dispose<br />
        @floor.dispose<br />
      end<br />
      if bn1<br />
        @backdrop.bitmap.dispose<br />
        @backdrop.dispose<br />
      end<br />
    end<br />
<br />
    def update<br />
      @command_window.update<br />
      if Input.trigger?(:B) or Input.trigger?(:C)<br />
        Sound.play_battle_start<br />
        @stage = nil<br />
        n = @command_window.index<br />
        troop_id = @list[n]<br />
        ChooseFoes.list.clear<br />
        BattleManager.setup(troop_id)<br />
        BattleManager.save_bgm_and_bgs<br />
        SceneManager.goto(Scene_Battle)<br />
      end<br />
    end<br />
  end<br />
end<br />
<br />
class Game_BaseItem<br />
  attr_reader :item_id<br />
end<br />
<br />
class Game_Actor<br />
  FOES_ACCESSORY_ID = ChooseFoes::ACCESSORY_ID<br />
  def armor_ids<br />
    list = @equips.select(&amp;:is_armor?)<br />
    list.map(&amp;:item_id)<br />
  end<br />
<br />
  def can_pick_foes?<br />
    return false if FOES_ACCESSORY_ID == 0<br />
    armor_ids.include?(FOES_ACCESSORY_ID)<br />
  end<br />
end<br />
<br />
class Game_Party<br />
  alias :kyon_chs_foes_gm_pty_init :initialize<br />
  def initialize<br />
    kyon_chs_foes_gm_pty_init<br />
    @choose_foes_mode = ChooseFoes::MODE<br />
  end<br />
<br />
  def choose_foes_with_accessory?<br />
    members.find {|a| a.can_pick_foes? } != nil<br />
  end<br />
<br />
  def choose_foes_level_avg?<br />
    actors = members<br />
    avg_level = actors.inject(0) {|t, a| t + a.level }<br />
    avg_level /= actors.size<br />
    map_level = ChooseFoes::MAP_ACTOR_LVL[&#36;game_map.map_id]<br />
    avg_level &gt;= map_level<br />
  end<br />
<br />
  def choose_foes?<br />
    case @choose_foes_mode<br />
    when :accessory<br />
      return choose_foes_with_accessory?<br />
    when :levels<br />
      return choose_foes_level_avg?<br />
    end<br />
  end<br />
  attr_accessor :choose_foes_mode<br />
end<br />
<br />
class Game_Player<br />
  def encounter<br />
    return false if &#36;game_map.interpreter.running?<br />
    return false if &#36;game_system.encounter_disabled<br />
    return false if @encounter_count &gt; 0<br />
    make_encounter_count<br />
    list = &#36;game_map.encounter_list<br />
    if list.size &gt; 1 and &#36;game_party.choose_foes?<br />
      SceneManager.call(ChooseFoes::Scene)<br />
      return false<br />
    end<br />
    troop_id = make_encounter_troop_id<br />
    return false unless &#36;data_troops[troop_id]<br />
    BattleManager.setup(troop_id)<br />
    BattleManager.on_encounter<br />
    return true<br />
  end<br />
end<br />
<br />
class TroopListWindow &lt; Window_Command<br />
  def make_command_list<br />
    @list = ChooseFoes.list<br />
  end<br />
<br />
  def window_width<br />
    180<br />
  end<br />
<br />
  def process_handling<br />
    if Input.trigger?(:B) or Input.trigger?(:C)<br />
      deactivate<br />
    end<br />
  end<br />
<br />
  def draw_item(n)<br />
    change_color(normal_color, true)<br />
    draw_text(item_rect_for_text(n), @list[n], 0)<br />
  end<br />
end</code></div></div><br />
<br />
Uploaded to the <a href="https://github.com/kyonides/rpg-maker-scripts" target="_blank" rel="noopener" class="mycode_url"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">rpg-maker-scripts</span></span></a> repository!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">ChooseFoes ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
This scriptlet allows you to open a simple menu where you can choose your enemy's troops based on the current map's random enemy encounter list.<br />
It will use the map's battleback picture as its backdrop. Don't worry <img src="https://www.save-point.org/images/smilies/ejlol/worried.gif" alt="Worried" title="Worried" class="smilie smilie_216" /> about this, it will cover the whole RMVX ACE game screen by default. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /><br />
You are encouraged to set a custom BGM, otherwise the scene will remain silent until you have finished picking a foe.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">AVAILABLE MODES</span><ul class="mycode_list"><li>:accessory<br />
</li>
<li>:levels<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Accessory Mode</span><br />
<br />
By the way, setting a specific "Choose Foe" accessory is mandatory here!<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Actors' Level Average Mode</span><br />
<br />
You must set a default level plus any specific map's average level.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Version 0.9.0</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * ChooseFoes ACE * #<br />
# &nbsp;&nbsp;Not Exactly a Plug-n-Play Script<br />
# &nbsp;&nbsp;Scripter : Kyonides<br />
# &nbsp;&nbsp;0.9.0 - 2026-06-16<br />
<br />
# This scriptlet allows you to open a simple menu where you can choose your<br />
# enemy's troops based on the current map's random enemy encounter list.<br />
<br />
# - AVAILABLE MODES: :accessory and :levels<br />
<br />
# * Accessory Mode * #<br />
# Setting a specific "Choose Foe" accessory is mandatory here!<br />
# * Average Level Mode * #<br />
# You must set a default level plus any specific map's average level.<br />
<br />
# * Optional Script Call * #<br />
# &#36;game_party.choose_foes_mode = :your_mode<br />
<br />
module ChooseFoes<br />
  MODE = :levels<br />
  ACCESSORY_ID = 53<br />
  MAP_ACTOR_LVL = {}<br />
  MAP_ACTOR_LVL[1] = 4<br />
  MAP_ACTOR_LVL.default = 5<br />
  TITLE = "Pick Your Foe"<br />
  @list = [] # Leave this array alone!<br />
  extend self<br />
  attr_accessor :list<br />
<br />
  class Scene<br />
    def initialize<br />
      @list = &#36;game_map.encounter_list.map(&amp;:troop_id)<br />
      @commands = @list.map {|n| &#36;data_troops[n].name }<br />
      ChooseFoes.list = @commands<br />
    end<br />
<br />
    def main<br />
      BattleManager.play_battle_bgm<br />
      @stage = true<br />
      bn1 = &#36;game_map.battleback1_name<br />
      if bn1<br />
        @backdrop = Sprite.new<br />
        @backdrop.bitmap = Cache.battleback1(bn1)<br />
      end<br />
      bn2 = &#36;game_map.battleback2_name<br />
      if bn2<br />
        @floor = Sprite.new<br />
        @floor.bitmap = Cache.battleback2(bn2)<br />
      end<br />
      @help_window = Window_Help.new(1)<br />
      @help_window.set_text(TITLE)<br />
      @command_window = TroopListWindow.new(182, 80)<br />
      Input.update<br />
      Graphics.transition(Graphics.frame_rate)<br />
      while @stage<br />
        Graphics.update<br />
        Input.update<br />
        update<br />
      end<br />
      Graphics.freeze<br />
      @command_window.dispose<br />
      @help_window.dispose<br />
      if bn2<br />
        @floor.bitmap.dispose<br />
        @floor.dispose<br />
      end<br />
      if bn1<br />
        @backdrop.bitmap.dispose<br />
        @backdrop.dispose<br />
      end<br />
    end<br />
<br />
    def update<br />
      @command_window.update<br />
      if Input.trigger?(:B) or Input.trigger?(:C)<br />
        Sound.play_battle_start<br />
        @stage = nil<br />
        n = @command_window.index<br />
        troop_id = @list[n]<br />
        ChooseFoes.list.clear<br />
        BattleManager.setup(troop_id)<br />
        BattleManager.save_bgm_and_bgs<br />
        SceneManager.goto(Scene_Battle)<br />
      end<br />
    end<br />
  end<br />
end<br />
<br />
class Game_BaseItem<br />
  attr_reader :item_id<br />
end<br />
<br />
class Game_Actor<br />
  FOES_ACCESSORY_ID = ChooseFoes::ACCESSORY_ID<br />
  def armor_ids<br />
    list = @equips.select(&amp;:is_armor?)<br />
    list.map(&amp;:item_id)<br />
  end<br />
<br />
  def can_pick_foes?<br />
    return false if FOES_ACCESSORY_ID == 0<br />
    armor_ids.include?(FOES_ACCESSORY_ID)<br />
  end<br />
end<br />
<br />
class Game_Party<br />
  alias :kyon_chs_foes_gm_pty_init :initialize<br />
  def initialize<br />
    kyon_chs_foes_gm_pty_init<br />
    @choose_foes_mode = ChooseFoes::MODE<br />
  end<br />
<br />
  def choose_foes_with_accessory?<br />
    members.find {|a| a.can_pick_foes? } != nil<br />
  end<br />
<br />
  def choose_foes_level_avg?<br />
    actors = members<br />
    avg_level = actors.inject(0) {|t, a| t + a.level }<br />
    avg_level /= actors.size<br />
    map_level = ChooseFoes::MAP_ACTOR_LVL[&#36;game_map.map_id]<br />
    avg_level &gt;= map_level<br />
  end<br />
<br />
  def choose_foes?<br />
    case @choose_foes_mode<br />
    when :accessory<br />
      return choose_foes_with_accessory?<br />
    when :levels<br />
      return choose_foes_level_avg?<br />
    end<br />
  end<br />
  attr_accessor :choose_foes_mode<br />
end<br />
<br />
class Game_Player<br />
  def encounter<br />
    return false if &#36;game_map.interpreter.running?<br />
    return false if &#36;game_system.encounter_disabled<br />
    return false if @encounter_count &gt; 0<br />
    make_encounter_count<br />
    list = &#36;game_map.encounter_list<br />
    if list.size &gt; 1 and &#36;game_party.choose_foes?<br />
      SceneManager.call(ChooseFoes::Scene)<br />
      return false<br />
    end<br />
    troop_id = make_encounter_troop_id<br />
    return false unless &#36;data_troops[troop_id]<br />
    BattleManager.setup(troop_id)<br />
    BattleManager.on_encounter<br />
    return true<br />
  end<br />
end<br />
<br />
class TroopListWindow &lt; Window_Command<br />
  def make_command_list<br />
    @list = ChooseFoes.list<br />
  end<br />
<br />
  def window_width<br />
    180<br />
  end<br />
<br />
  def process_handling<br />
    if Input.trigger?(:B) or Input.trigger?(:C)<br />
      deactivate<br />
    end<br />
  end<br />
<br />
  def draw_item(n)<br />
    change_color(normal_color, true)<br />
    draw_text(item_rect_for_text(n), @list[n], 0)<br />
  end<br />
end</code></div></div><br />
<br />
Uploaded to the <a href="https://github.com/kyonides/rpg-maker-scripts" target="_blank" rel="noopener" class="mycode_url"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">rpg-maker-scripts</span></span></a> repository!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KEnemy Slain ACE]]></title>
			<link>https://www.save-point.org/thread-13587.html</link>
			<pubDate>Fri, 12 Jun 2026 03:54:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13587.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KEnemy Slain ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
This scriptlet allows you to set custom enemy defeated messages.<br />
<br />
Just leave a note in the DB Enemy's notebox:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;defeat&gt; cried out loud!&lt;/defeat&gt;</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">WARNING:</span> The string should always begin with an empty space.<br />
<br />
It will display the message without the &lt;defeat&gt; tags on screen.<br />
<br />
By default the scriptlet uses the Battle Log here known as :log .<br />
You can set it to :window to display the message window instead.<br />
<br />
And you can call it to change the current display mode ingame!<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>EnemySlain.message_mode = :log<br />
EnemySlain.message_mode = :window</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KEnemy Slain ACE * #<br />
#  Scripter : Kyonides<br />
#  2026-06-11<br />
<br />
# This scriptlet allows you to set custom enemy defeated messages.<br />
# Just leave a note in the DB Enemy's notebox:<br />
# WARNING: The string should always begin with an empty space.<br />
# &lt;defeat&gt; cried out loud!&lt;/defeat&gt;<br />
<br />
# By default the scriptlet uses the Battle Log here known as :log<br />
# You can set it to :window to display the message window instead.<br />
# And you can call it to change the current display mode ingame.<br />
#  EnemySlain.message_mode = :log *OR* :window<br />
<br />
module KEnemySlain<br />
  @message_mode = :log<br />
  extend self<br />
  attr_accessor :message_mode, :show_window<br />
  attr_reader :text<br />
  def log?<br />
    @message_mode == :log<br />
  end<br />
<br />
  def window?<br />
    @message_mode == :window<br />
  end<br />
<br />
  def set(string)<br />
    @show_window = true<br />
    @text = string<br />
  end<br />
<br />
  def clear<br />
    @text = @show_window = nil<br />
  end<br />
end<br />
<br />
module RPG<br />
  class Enemy<br />
    def process_collapse_note<br />
      @note[/&lt;defeat&gt;(.*)&lt;&#92;/defeat&gt;/i]<br />
      line = &#36;1 || ""<br />
    end<br />
<br />
    def collapse_note<br />
      @collapse_note ||= process_collapse_note<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Enemy<br />
  def collapse_note<br />
    enemy.collapse_note<br />
  end<br />
end<br />
<br />
class Window_BattleLog<br />
  def display_added_states(target)<br />
    target.result.added_state_objects.each do |state|<br />
      slain = nil<br />
      if target.actor?<br />
        state_msg = state.message1<br />
      else<br />
        state_msg = state.message2<br />
        is_enemy = true<br />
      end<br />
      if state.id == target.death_state_id<br />
        if is_enemy<br />
          collapsed = target.collapse_note<br />
          state_msg = collapsed unless collapsed.empty?<br />
          slain = true<br />
        end<br />
        target.perform_collapse_effect<br />
      end<br />
      next if state_msg.empty?<br />
      if slain and KEnemySlain.window?<br />
        KEnemySlain.set(target.name + state_msg)<br />
        next<br />
      else<br />
        replace_text(target.name + state_msg)<br />
        wait<br />
        wait_for_effect<br />
      end<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Battle<br />
  alias :kyon_enm_slain_scn_btl_app_itm_fx :apply_item_effects<br />
  alias :kyon_enm_slain_scn_btl_inv_cntr_atk :invoke_counter_attack<br />
  def apply_item_effects(target, item)<br />
    kyon_enm_slain_scn_btl_app_itm_fx(target, item)<br />
    return unless KEnemySlain.show_window<br />
    &#36;game_message.add(KEnemySlain.text)<br />
    KEnemySlain.clear<br />
  end<br />
<br />
  def invoke_counter_attack(target, item)<br />
    kyon_enm_slain_scn_btl_inv_cntr_atk(target, item)<br />
    return unless KEnemySlain.show_window<br />
    &#36;game_message.add(KEnemySlain.text)<br />
    KEnemySlain.clear<br />
  end<br />
end</code></div></div><br />
Uploaded to the <a href="https://github.com/kyonides/rpg-maker-scripts" target="_blank" rel="noopener" class="mycode_url"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">rpg-maker-scripts</span></span></a> repository!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KEnemy Slain ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
This scriptlet allows you to set custom enemy defeated messages.<br />
<br />
Just leave a note in the DB Enemy's notebox:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;defeat&gt; cried out loud!&lt;/defeat&gt;</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">WARNING:</span> The string should always begin with an empty space.<br />
<br />
It will display the message without the &lt;defeat&gt; tags on screen.<br />
<br />
By default the scriptlet uses the Battle Log here known as :log .<br />
You can set it to :window to display the message window instead.<br />
<br />
And you can call it to change the current display mode ingame!<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>EnemySlain.message_mode = :log<br />
EnemySlain.message_mode = :window</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KEnemy Slain ACE * #<br />
#  Scripter : Kyonides<br />
#  2026-06-11<br />
<br />
# This scriptlet allows you to set custom enemy defeated messages.<br />
# Just leave a note in the DB Enemy's notebox:<br />
# WARNING: The string should always begin with an empty space.<br />
# &lt;defeat&gt; cried out loud!&lt;/defeat&gt;<br />
<br />
# By default the scriptlet uses the Battle Log here known as :log<br />
# You can set it to :window to display the message window instead.<br />
# And you can call it to change the current display mode ingame.<br />
#  EnemySlain.message_mode = :log *OR* :window<br />
<br />
module KEnemySlain<br />
  @message_mode = :log<br />
  extend self<br />
  attr_accessor :message_mode, :show_window<br />
  attr_reader :text<br />
  def log?<br />
    @message_mode == :log<br />
  end<br />
<br />
  def window?<br />
    @message_mode == :window<br />
  end<br />
<br />
  def set(string)<br />
    @show_window = true<br />
    @text = string<br />
  end<br />
<br />
  def clear<br />
    @text = @show_window = nil<br />
  end<br />
end<br />
<br />
module RPG<br />
  class Enemy<br />
    def process_collapse_note<br />
      @note[/&lt;defeat&gt;(.*)&lt;&#92;/defeat&gt;/i]<br />
      line = &#36;1 || ""<br />
    end<br />
<br />
    def collapse_note<br />
      @collapse_note ||= process_collapse_note<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Enemy<br />
  def collapse_note<br />
    enemy.collapse_note<br />
  end<br />
end<br />
<br />
class Window_BattleLog<br />
  def display_added_states(target)<br />
    target.result.added_state_objects.each do |state|<br />
      slain = nil<br />
      if target.actor?<br />
        state_msg = state.message1<br />
      else<br />
        state_msg = state.message2<br />
        is_enemy = true<br />
      end<br />
      if state.id == target.death_state_id<br />
        if is_enemy<br />
          collapsed = target.collapse_note<br />
          state_msg = collapsed unless collapsed.empty?<br />
          slain = true<br />
        end<br />
        target.perform_collapse_effect<br />
      end<br />
      next if state_msg.empty?<br />
      if slain and KEnemySlain.window?<br />
        KEnemySlain.set(target.name + state_msg)<br />
        next<br />
      else<br />
        replace_text(target.name + state_msg)<br />
        wait<br />
        wait_for_effect<br />
      end<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Battle<br />
  alias :kyon_enm_slain_scn_btl_app_itm_fx :apply_item_effects<br />
  alias :kyon_enm_slain_scn_btl_inv_cntr_atk :invoke_counter_attack<br />
  def apply_item_effects(target, item)<br />
    kyon_enm_slain_scn_btl_app_itm_fx(target, item)<br />
    return unless KEnemySlain.show_window<br />
    &#36;game_message.add(KEnemySlain.text)<br />
    KEnemySlain.clear<br />
  end<br />
<br />
  def invoke_counter_attack(target, item)<br />
    kyon_enm_slain_scn_btl_inv_cntr_atk(target, item)<br />
    return unless KEnemySlain.show_window<br />
    &#36;game_message.add(KEnemySlain.text)<br />
    KEnemySlain.clear<br />
  end<br />
end</code></div></div><br />
Uploaded to the <a href="https://github.com/kyonides/rpg-maker-scripts" target="_blank" rel="noopener" class="mycode_url"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">rpg-maker-scripts</span></span></a> repository!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Terms &amp; Conditions</span></span><br />
<br />
MIT License.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SCREEN SIZE for RMVXAce]]></title>
			<link>https://www.save-point.org/thread-13460.html</link>
			<pubDate>Mon, 13 Apr 2026 18:41:49 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=5">DerVVulfman</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13460.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">SCREEN SIZE for RMVXAce</span></span><br />
<span style="font-size: medium;" class="mycode_size">Version: 1.0</span></div>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction</span></span><br />
I had been tinkering with the manipulation of the available gaming area for RPGMaker XP games.  And I did well with a barebones script that did not require the use of any external .DLL outside of Win32 manipulations, a script based upon the work of Selwyn (formerly Squall).<br />
<br />
This specific script is an adapation of my XP version,  but altered for use with RPGMaker VX Ace. Simpler in design due to updates made in the Viewport class and Weather system.<br />
<br />
<span style="font-style: italic;" class="mycode_i"><span style="color: #E82A1F;" class="mycode_color">The Game.Exe's Fullscreen mode reverts to a fixed 640x480 resolution so the [ALT]+[ENTER] key combination is disabled. Fullscreen mode is literally disabled by intent with this setup.</span></span><br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Screenshots</span></span><br />
None.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Script</span></span><br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Instruction/Header</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# ** SCREEN SIZE for VXACE<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Version 1.0<br />
#&nbsp;&nbsp;&nbsp;&nbsp;By DerVVulfman<br />
#&nbsp;&nbsp;&nbsp;&nbsp;04-13-2026 (MM-DD-YYYY)<br />
#&nbsp;&nbsp;&nbsp;&nbsp;RGSS3 / RPGMaker VX Ace<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;INTRODUCTION:<br />
#&nbsp;&nbsp;=============<br />
#&nbsp;&nbsp;I had been tinkering with the manipulation of the available gaming area for<br />
#&nbsp;&nbsp;RPGMaker XP games.&nbsp;&nbsp;And I did well with a barebones script that did not re-<br />
#&nbsp;&nbsp;quire the use of any external .DLL outside of Win32 manipulations, a script<br />
#&nbsp;&nbsp;based upon the work of Selwyn (formerly Squall).<br />
#<br />
#&nbsp;&nbsp;This specific script is an adapation of my XP version,&nbsp;&nbsp;but altered for use<br />
#&nbsp;&nbsp;with RPGMaker VX Ace. Simpler in design due to updates made in the Viewport<br />
#&nbsp;&nbsp;class and Weather system.<br />
#<br />
#&nbsp;&nbsp;ALERT: The Game.Exe's Fullscreen mode reverts to a fixed 640x480 resolution<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; so the [ALT]+[ENTER] key combination is disabled. Fullscreen mode is<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; literally disabled by intent with this setup.<br />
#<br />
#<br />
#&nbsp;&nbsp; ------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;INSTRUCTIONS:<br />
#&nbsp;&nbsp;=============<br />
#&nbsp;&nbsp;I would hope this is clear.&nbsp;&nbsp;It is mostly plug-and-play, only requiring you<br />
#&nbsp;&nbsp;to set some configurable values within the ScrnSize module&nbsp;&nbsp;at the very top<br />
#&nbsp;&nbsp;of the actual system code.&nbsp;&nbsp;And all the variable options have detailed des-<br />
#&nbsp;&nbsp;criptions of what is being set.<br />
#<br />
#&nbsp;&nbsp;NOTE: If you are using&nbsp;&nbsp;other scripts that perform alterations&nbsp;&nbsp;to the size<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of screen contents (YanFly's Core as an example), ensure both are set<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to the same resolution.<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;COMPATABILITY:<br />
#&nbsp;&nbsp;==============<br />
#&nbsp;&nbsp;Designed for RPGMaker VXAce.<br />
#<br />
#&nbsp;&nbsp;Alters the screen size, so other scripts that adjust viewport settings will<br />
#&nbsp;&nbsp;need to be likewise altered.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;CREDITS AND THANKS:<br />
#&nbsp;&nbsp;===================<br />
#&nbsp;&nbsp;The very basics of this system&nbsp;&nbsp;comes from the DLL-free version of Selwyn's<br />
#&nbsp;&nbsp;resolution script. <br />
#<br />
#&nbsp;&nbsp;And thanks goes to ViperDamascus&nbsp;&nbsp;who was looking for a script&nbsp;&nbsp;to increase <br />
#&nbsp;&nbsp;VXAce's screen size beyond the 640x480 maximum.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;TERMS and CONDITIONS:<br />
#&nbsp;&nbsp;=====================<br />
#&nbsp;&nbsp;Free for use, even in commercial scripts. However, I require due credit for<br />
#&nbsp;&nbsp;myself, Selwyn who crafted the basics, and ViperDamascus for the request.<br />
#<br />
#<br />
#==============================================================================<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** ScrnSize<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module handles the adjustable screen size for games that utilize<br />
#&nbsp;&nbsp;resolution scripts to alter game window dimensions.<br />
#==============================================================================<br />
<br />
module ScrnSize<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# GAME SCREEN RESOLUTION<br />
&nbsp;&nbsp;# ======================<br />
&nbsp;&nbsp;# The absolute necessity... defining the size of the visible area of your<br />
&nbsp;&nbsp;# game on the screen. You will see below some dimensions tested, and then<br />
&nbsp;&nbsp;# commented out. Even reducing the size to older RPGMaker 2000 scale exe-<br />
&nbsp;&nbsp;# cuted just fine.<br />
&nbsp;&nbsp;# &lt; -- IT IS RECOMMENDED THAT THE DEFINED VALUES BE MULTIPLES OF 32! -- &gt;<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 1280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Screen area width in pixels<br />
&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 736&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Screen area height in pixels.<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 640<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 480<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 320<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 200<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# GAME INI NAMING<br />
&nbsp;&nbsp;# ===============<br />
&nbsp;&nbsp;# A necessity if you are renaming the Game Executable (eg Game.exe). When<br />
&nbsp;&nbsp;# your game/project is run, it looks for its requisite .ini file which it<br />
&nbsp;&nbsp;# assumes to have the same name as its executable. Many leave the name of<br />
&nbsp;&nbsp;# the executable alone. But if you choose to rename Game.exe to Trek.exe,<br />
&nbsp;&nbsp;# it will search for Trek.ini. And if the assumed ini does not exist, the<br />
&nbsp;&nbsp;# game will fail.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# The resolution changing system relies upon retriving the windows handle<br />
&nbsp;&nbsp;# for the game when it executes.&nbsp;&nbsp;And for this, it needs the current name<br />
&nbsp;&nbsp;# of the Game's INI file.&nbsp;&nbsp;So if you do change the name of the executable<br />
&nbsp;&nbsp;# (and thus the name of the INI), it needs the name defined below.<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;INI_Name&nbsp;&nbsp;= 'Game.ini'<br />
<br />
<br />
&nbsp;&nbsp;# GAME EXECUTION SPEED<br />
&nbsp;&nbsp;# ====================<br />
&nbsp;&nbsp;# This is an old trick,&nbsp;&nbsp;changing the speed of the executable to make the<br />
&nbsp;&nbsp;# game itself run faster.&nbsp;&nbsp;RPGMaker XP was set to a default 40 frames per<br />
&nbsp;&nbsp;# second while RPGMaker VX and VXAce to a native 60 frames per second.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;# Changing this value affects all...&nbsp;&nbsp;script/code speed,&nbsp;&nbsp;character speed<br />
&nbsp;&nbsp;# in the fieldmap, battle animations, and the like.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# RANGE: 10-120. VXAce will not exceed 120fps nor go slower than 10.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# NOTE: Smooth mode refreshes graphics ever frame based on this value.<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normal mode only refreshes every other frame.<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;Graphics.frame_rate = 40&nbsp;&nbsp;<br />
<br />
<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ●● Resolution<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module uses the Win32API to connect to the RPGMaker XP game window and<br />
#&nbsp;&nbsp;re-sizes the window based on the game developer's preferences.<br />
#==============================================================================<br />
<br />
module Resolution<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● instance variables<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;attr_reader :state<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● initialize<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def initialize<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire desired window settings from configuration<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ==================================================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@reswidth&nbsp;&nbsp; = ScrnSize::Width<br />
&nbsp;&nbsp;&nbsp;&nbsp;@resheight&nbsp;&nbsp;= ScrnSize::Height<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Set instance variables for calling basic Win32 functions<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ========================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;ini&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L')<br />
&nbsp;&nbsp;&nbsp;&nbsp;title&nbsp;&nbsp; = "&#92;0" * 256<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Get Window Title<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;ini.call('Game', 'Title', '', title, 256, '.&#92;&#92;' + ScrnSize::INI_Name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;title.delete!("&#92;0")<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire Metrics from the Win32 API<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;@window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('user32', 'FindWindow',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PP', <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'I').call("RGSS Player", title)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long = Win32API.new('user32', 'SetWindowLong',&nbsp;&nbsp;&nbsp;&nbsp;'LIL', 'L')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos&nbsp;&nbsp;= Win32API.new('user32', 'SetWindowPos',&nbsp;&nbsp;&nbsp;&nbsp; 'LLIIIII', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gsm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gcr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'GetClientRect',&nbsp;&nbsp;&nbsp;&nbsp;'LP', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@kbe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'keybd_event',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'LLLL', '')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gaks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('user32', 'GetAsyncKeyState', 'L', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Render message and exit if size is not supported<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@default_size = self.size<br />
&nbsp;&nbsp;&nbsp;&nbsp;if size[0] &lt; @reswidth or size[1] &lt; @resheight<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print("&#92;"#{title}&#92;" requires a minimum screen resolution " +<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"of [#{@reswidth} x #{@resheight}]&#92;r&#92;n&#92;r&#92;n" +<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&#92;tYour Resolution: [#{@default_size[0]} x #{@default_size[1]}]")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Apply Resolution Change<br />
&nbsp;&nbsp;&nbsp;&nbsp;# =======================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;self.default<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● fullscreen<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def fullscreen<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;@default_size = size<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long.call(@window, -16, 0x14000000)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos.call(@window, -1, 0, 0, (@reswidth+2), (@resheight+2), 64)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "fullscreen"<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● default<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def default<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;x = @default_size[0] / 2 - ((@reswidth/2) + 3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;y = @default_size[1] / 2 - ((@resheight/2) + 8)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long.call(@window, -16, 0x14CA0000)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos.call(@window, 0, x, y, (@reswidth+8), (@resheight+27), 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● trigger?(key)<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def trigger?(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;return @gaks.call(key) &amp; 0x01 == 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● private<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;private :fullscreen<br />
&nbsp;&nbsp;private :default<br />
&nbsp;&nbsp;private :trigger?<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● size<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def size<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = @gsm.call(0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= @gsm.call(1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return width, height<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● change<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def change<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;if @state == "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.fullscreen<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.default<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● update<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def update<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;if trigger?(121) # F10<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.change<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;if Input.trigger?(Input::ALT) or Input.press?(Input::ALT)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@kbe.call(18, 0, 2, 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● module functions<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;module_function :initialize<br />
&nbsp;&nbsp;module_function :fullscreen<br />
&nbsp;&nbsp;module_function :default<br />
&nbsp;&nbsp;module_function :trigger?<br />
&nbsp;&nbsp;module_function :size<br />
&nbsp;&nbsp;module_function :change<br />
&nbsp;&nbsp;module_function :update<br />
&nbsp;&nbsp;#<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ●● Input<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;A class that handles input data from a gamepad or keyboard.<br />
#==============================================================================<br />
<br />
class &lt;&lt; Input<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● Alias Listings (with F12 Stack prevention)<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;alias res_update update unless &#36;@<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● Input.update<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def Input.update<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Perform the original call<br />
&nbsp;&nbsp;&nbsp;&nbsp;res_update<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Update the Resolution<br />
&nbsp;&nbsp;&nbsp;&nbsp;Resolution.update<br />
&nbsp;&nbsp;end<br />
end<br />
<br />
<br />
<br />
# Execute at start<br />
Resolution.initialize</code></div></div></div>
		</div>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Instructions</span></span><br />
Plenty, and in the script.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Compatibility</span></span><br />
Designed for RPGMaker XP<br />
<br />
Alters the screen size, so other scripts that adjust viewport settings will need to be likewise altered.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Credits and Thanks</span></span><br />
The very basics of this system  comes from the DLL-free version of Selwyn's resolution script. <br />
<br />
And thanks goes to ViperDamascus  who was looking for a script  to increase VXAce's screen size beyond the 640x480 maximum.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Terms and Conditions</span></span><br />
Free for use, even in commercial scripts. However, I require due credit for myself, Selwyn who crafted the basics, and ViperDamascus for the request.]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">SCREEN SIZE for RMVXAce</span></span><br />
<span style="font-size: medium;" class="mycode_size">Version: 1.0</span></div>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction</span></span><br />
I had been tinkering with the manipulation of the available gaming area for RPGMaker XP games.  And I did well with a barebones script that did not require the use of any external .DLL outside of Win32 manipulations, a script based upon the work of Selwyn (formerly Squall).<br />
<br />
This specific script is an adapation of my XP version,  but altered for use with RPGMaker VX Ace. Simpler in design due to updates made in the Viewport class and Weather system.<br />
<br />
<span style="font-style: italic;" class="mycode_i"><span style="color: #E82A1F;" class="mycode_color">The Game.Exe's Fullscreen mode reverts to a fixed 640x480 resolution so the [ALT]+[ENTER] key combination is disabled. Fullscreen mode is literally disabled by intent with this setup.</span></span><br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Screenshots</span></span><br />
None.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Script</span></span><br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Instruction/Header</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# ** SCREEN SIZE for VXACE<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Version 1.0<br />
#&nbsp;&nbsp;&nbsp;&nbsp;By DerVVulfman<br />
#&nbsp;&nbsp;&nbsp;&nbsp;04-13-2026 (MM-DD-YYYY)<br />
#&nbsp;&nbsp;&nbsp;&nbsp;RGSS3 / RPGMaker VX Ace<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;INTRODUCTION:<br />
#&nbsp;&nbsp;=============<br />
#&nbsp;&nbsp;I had been tinkering with the manipulation of the available gaming area for<br />
#&nbsp;&nbsp;RPGMaker XP games.&nbsp;&nbsp;And I did well with a barebones script that did not re-<br />
#&nbsp;&nbsp;quire the use of any external .DLL outside of Win32 manipulations, a script<br />
#&nbsp;&nbsp;based upon the work of Selwyn (formerly Squall).<br />
#<br />
#&nbsp;&nbsp;This specific script is an adapation of my XP version,&nbsp;&nbsp;but altered for use<br />
#&nbsp;&nbsp;with RPGMaker VX Ace. Simpler in design due to updates made in the Viewport<br />
#&nbsp;&nbsp;class and Weather system.<br />
#<br />
#&nbsp;&nbsp;ALERT: The Game.Exe's Fullscreen mode reverts to a fixed 640x480 resolution<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; so the [ALT]+[ENTER] key combination is disabled. Fullscreen mode is<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; literally disabled by intent with this setup.<br />
#<br />
#<br />
#&nbsp;&nbsp; ------------------------------------------------------------------------<br />
#<br />
#&nbsp;&nbsp;INSTRUCTIONS:<br />
#&nbsp;&nbsp;=============<br />
#&nbsp;&nbsp;I would hope this is clear.&nbsp;&nbsp;It is mostly plug-and-play, only requiring you<br />
#&nbsp;&nbsp;to set some configurable values within the ScrnSize module&nbsp;&nbsp;at the very top<br />
#&nbsp;&nbsp;of the actual system code.&nbsp;&nbsp;And all the variable options have detailed des-<br />
#&nbsp;&nbsp;criptions of what is being set.<br />
#<br />
#&nbsp;&nbsp;NOTE: If you are using&nbsp;&nbsp;other scripts that perform alterations&nbsp;&nbsp;to the size<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of screen contents (YanFly's Core as an example), ensure both are set<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to the same resolution.<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;COMPATABILITY:<br />
#&nbsp;&nbsp;==============<br />
#&nbsp;&nbsp;Designed for RPGMaker VXAce.<br />
#<br />
#&nbsp;&nbsp;Alters the screen size, so other scripts that adjust viewport settings will<br />
#&nbsp;&nbsp;need to be likewise altered.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;CREDITS AND THANKS:<br />
#&nbsp;&nbsp;===================<br />
#&nbsp;&nbsp;The very basics of this system&nbsp;&nbsp;comes from the DLL-free version of Selwyn's<br />
#&nbsp;&nbsp;resolution script. <br />
#<br />
#&nbsp;&nbsp;And thanks goes to ViperDamascus&nbsp;&nbsp;who was looking for a script&nbsp;&nbsp;to increase <br />
#&nbsp;&nbsp;VXAce's screen size beyond the 640x480 maximum.<br />
#<br />
#<br />
#==============================================================================<br />
#<br />
#&nbsp;&nbsp;TERMS and CONDITIONS:<br />
#&nbsp;&nbsp;=====================<br />
#&nbsp;&nbsp;Free for use, even in commercial scripts. However, I require due credit for<br />
#&nbsp;&nbsp;myself, Selwyn who crafted the basics, and ViperDamascus for the request.<br />
#<br />
#<br />
#==============================================================================<br />
<br />
<br />
<br />
#==============================================================================<br />
# ** ScrnSize<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module handles the adjustable screen size for games that utilize<br />
#&nbsp;&nbsp;resolution scripts to alter game window dimensions.<br />
#==============================================================================<br />
<br />
module ScrnSize<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# GAME SCREEN RESOLUTION<br />
&nbsp;&nbsp;# ======================<br />
&nbsp;&nbsp;# The absolute necessity... defining the size of the visible area of your<br />
&nbsp;&nbsp;# game on the screen. You will see below some dimensions tested, and then<br />
&nbsp;&nbsp;# commented out. Even reducing the size to older RPGMaker 2000 scale exe-<br />
&nbsp;&nbsp;# cuted just fine.<br />
&nbsp;&nbsp;# &lt; -- IT IS RECOMMENDED THAT THE DEFINED VALUES BE MULTIPLES OF 32! -- &gt;<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 1280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Screen area width in pixels<br />
&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 736&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Screen area height in pixels.<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 640<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 480<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;&nbsp;&nbsp;&nbsp; = 320<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;&nbsp;&nbsp;&nbsp;= 200<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# GAME INI NAMING<br />
&nbsp;&nbsp;# ===============<br />
&nbsp;&nbsp;# A necessity if you are renaming the Game Executable (eg Game.exe). When<br />
&nbsp;&nbsp;# your game/project is run, it looks for its requisite .ini file which it<br />
&nbsp;&nbsp;# assumes to have the same name as its executable. Many leave the name of<br />
&nbsp;&nbsp;# the executable alone. But if you choose to rename Game.exe to Trek.exe,<br />
&nbsp;&nbsp;# it will search for Trek.ini. And if the assumed ini does not exist, the<br />
&nbsp;&nbsp;# game will fail.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# The resolution changing system relies upon retriving the windows handle<br />
&nbsp;&nbsp;# for the game when it executes.&nbsp;&nbsp;And for this, it needs the current name<br />
&nbsp;&nbsp;# of the Game's INI file.&nbsp;&nbsp;So if you do change the name of the executable<br />
&nbsp;&nbsp;# (and thus the name of the INI), it needs the name defined below.<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;INI_Name&nbsp;&nbsp;= 'Game.ini'<br />
<br />
<br />
&nbsp;&nbsp;# GAME EXECUTION SPEED<br />
&nbsp;&nbsp;# ====================<br />
&nbsp;&nbsp;# This is an old trick,&nbsp;&nbsp;changing the speed of the executable to make the<br />
&nbsp;&nbsp;# game itself run faster.&nbsp;&nbsp;RPGMaker XP was set to a default 40 frames per<br />
&nbsp;&nbsp;# second while RPGMaker VX and VXAce to a native 60 frames per second.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;# Changing this value affects all...&nbsp;&nbsp;script/code speed,&nbsp;&nbsp;character speed<br />
&nbsp;&nbsp;# in the fieldmap, battle animations, and the like.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# RANGE: 10-120. VXAce will not exceed 120fps nor go slower than 10.<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;# NOTE: Smooth mode refreshes graphics ever frame based on this value.<br />
&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normal mode only refreshes every other frame.<br />
&nbsp;&nbsp;# -----------------------------------------------------------------------<br />
&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;Graphics.frame_rate = 40&nbsp;&nbsp;<br />
<br />
<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ●● Resolution<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;This module uses the Win32API to connect to the RPGMaker XP game window and<br />
#&nbsp;&nbsp;re-sizes the window based on the game developer's preferences.<br />
#==============================================================================<br />
<br />
module Resolution<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● instance variables<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;attr_reader :state<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● initialize<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def initialize<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire desired window settings from configuration<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ==================================================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@reswidth&nbsp;&nbsp; = ScrnSize::Width<br />
&nbsp;&nbsp;&nbsp;&nbsp;@resheight&nbsp;&nbsp;= ScrnSize::Height<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Set instance variables for calling basic Win32 functions<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ========================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;ini&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L')<br />
&nbsp;&nbsp;&nbsp;&nbsp;title&nbsp;&nbsp; = "&#92;0" * 256<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Get Window Title<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;ini.call('Game', 'Title', '', title, 256, '.&#92;&#92;' + ScrnSize::INI_Name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;title.delete!("&#92;0")<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Acquire Metrics from the Win32 API<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;@window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('user32', 'FindWindow',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PP', <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'I').call("RGSS Player", title)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long = Win32API.new('user32', 'SetWindowLong',&nbsp;&nbsp;&nbsp;&nbsp;'LIL', 'L')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos&nbsp;&nbsp;= Win32API.new('user32', 'SetWindowPos',&nbsp;&nbsp;&nbsp;&nbsp; 'LLIIIII', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gsm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gcr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'GetClientRect',&nbsp;&nbsp;&nbsp;&nbsp;'LP', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@kbe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= Win32API.new('user32', 'keybd_event',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'LLLL', '')<br />
&nbsp;&nbsp;&nbsp;&nbsp;@gaks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = Win32API.new('user32', 'GetAsyncKeyState', 'L', 'I')<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Render message and exit if size is not supported<br />
&nbsp;&nbsp;&nbsp;&nbsp;# ================================================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@default_size = self.size<br />
&nbsp;&nbsp;&nbsp;&nbsp;if size[0] &lt; @reswidth or size[1] &lt; @resheight<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print("&#92;"#{title}&#92;" requires a minimum screen resolution " +<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"of [#{@reswidth} x #{@resheight}]&#92;r&#92;n&#92;r&#92;n" +<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&#92;tYour Resolution: [#{@default_size[0]} x #{@default_size[1]}]")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Apply Resolution Change<br />
&nbsp;&nbsp;&nbsp;&nbsp;# =======================<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;self.default<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● fullscreen<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def fullscreen<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;@default_size = size<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long.call(@window, -16, 0x14000000)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos.call(@window, -1, 0, 0, (@reswidth+2), (@resheight+2), 64)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "fullscreen"<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● default<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def default<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;x = @default_size[0] / 2 - ((@reswidth/2) + 3)<br />
&nbsp;&nbsp;&nbsp;&nbsp;y = @default_size[1] / 2 - ((@resheight/2) + 8)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_long.call(@window, -16, 0x14CA0000)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@set_win_pos.call(@window, 0, x, y, (@reswidth+8), (@resheight+27), 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@state = "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● trigger?(key)<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def trigger?(key)<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;return @gaks.call(key) &amp; 0x01 == 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● private<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;private :fullscreen<br />
&nbsp;&nbsp;private :default<br />
&nbsp;&nbsp;private :trigger?<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● size<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def size<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;width&nbsp;&nbsp; = @gsm.call(0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;height&nbsp;&nbsp;= @gsm.call(1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return width, height<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● change<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def change<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;if @state == "default"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.fullscreen<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.default<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● update<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def update<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;&nbsp;&nbsp;if trigger?(121) # F10<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.change<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;if Input.trigger?(Input::ALT) or Input.press?(Input::ALT)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@kbe.call(18, 0, 2, 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;#<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● module functions<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;module_function :initialize<br />
&nbsp;&nbsp;module_function :fullscreen<br />
&nbsp;&nbsp;module_function :default<br />
&nbsp;&nbsp;module_function :trigger?<br />
&nbsp;&nbsp;module_function :size<br />
&nbsp;&nbsp;module_function :change<br />
&nbsp;&nbsp;module_function :update<br />
&nbsp;&nbsp;#<br />
end<br />
<br />
<br />
<br />
#==============================================================================<br />
# ●● Input<br />
#------------------------------------------------------------------------------<br />
#&nbsp;&nbsp;A class that handles input data from a gamepad or keyboard.<br />
#==============================================================================<br />
<br />
class &lt;&lt; Input<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● Alias Listings (with F12 Stack prevention)<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;alias res_update update unless &#36;@<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;# ● Input.update<br />
&nbsp;&nbsp;#--------------------------------------------------------------------------<br />
&nbsp;&nbsp;def Input.update<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Perform the original call<br />
&nbsp;&nbsp;&nbsp;&nbsp;res_update<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Update the Resolution<br />
&nbsp;&nbsp;&nbsp;&nbsp;Resolution.update<br />
&nbsp;&nbsp;end<br />
end<br />
<br />
<br />
<br />
# Execute at start<br />
Resolution.initialize</code></div></div></div>
		</div>
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Instructions</span></span><br />
Plenty, and in the script.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Compatibility</span></span><br />
Designed for RPGMaker XP<br />
<br />
Alters the screen size, so other scripts that adjust viewport settings will need to be likewise altered.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Credits and Thanks</span></span><br />
The very basics of this system  comes from the DLL-free version of Selwyn's resolution script. <br />
<br />
And thanks goes to ViperDamascus  who was looking for a script  to increase VXAce's screen size beyond the 640x480 maximum.<br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Terms and Conditions</span></span><br />
Free for use, even in commercial scripts. However, I require due credit for myself, Selwyn who crafted the basics, and ViperDamascus for the request.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Error reporting extension!]]></title>
			<link>https://www.save-point.org/thread-13433.html</link>
			<pubDate>Mon, 16 Mar 2026 08:59:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=9170">Kayzee</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13433.html</guid>
			<description><![CDATA[Here is a handy script I made a while ago to give more detailed error reports and print them to the console! It gives a full trace of where the error happened and the last called functions so you know what the problem might be! Has some limitations. Sometimes the report is too big for the little popup and it will be blank, but it should show the error in the console! Also doesn't properly trace errors inside events, so that might be something to add later.<br />
<br />
Oh! And you can use "Error_Handler.do_trace()" to print a backtrace to the console in scripts whenever you want for debugging too!<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# * Error handling functions.<br />
#==============================================================================<br />
<br />
module Error_Handler<br />
  <br />
  def self.script_names<br />
    unless @script_names<br />
      @script_names = load_data('Data/Scripts.rvdata2')<br />
      @script_names.collect! {|script|  script[1]  }<br />
    end<br />
    @script_names<br />
  end<br />
  <br />
  def self.do_backtrace(error)<br />
    backtrace = self.parse_trace(error.backtrace)<br />
    error_line = backtrace.first<br />
    backtrace[0] = ''<br />
    return error_line + ": " + error.message + " (#{error.class})" + backtrace.join("&#92;n&#92;tfrom ") + "&#92;n"<br />
  end<br />
  <br />
  def self.parse_trace(trace)<br />
    out = []<br />
    trace.each_with_index do |line,i|<br />
      if line =~ /{(.*)}(.*)/<br />
        out &lt;&lt; (script_names[&#36;1.to_i] + &#36;2)<br />
      elsif line.start_with?(':1:')<br />
        break<br />
      else<br />
        out &lt;&lt; line<br />
      end<br />
    end<br />
    out<br />
  end<br />
  <br />
  def trace_me<br />
    begin<br />
      raise<br />
    rescue =&gt; exception<br />
      puts trace = Error_Handler.do_backtrace(exception)<br />
    end<br />
  end<br />
  <br />
end<br />
<br />
alias rgss_main_without_rescue rgss_main<br />
<br />
def rgss_main(&amp;block)<br />
  begin<br />
    rgss_main_without_rescue do<br />
      begin<br />
        block.call<br />
      rescue SystemExit<br />
        exit<br />
      rescue Exception =&gt; error<br />
        trace = Error_Handler.do_backtrace(error)<br />
        print(trace)<br />
        raise(error.class, trace, [error.backtrace.first])<br />
      end<br />
    end<br />
  end<br />
<br />
end</code></div></div><br />
Hope it's helpful!]]></description>
			<content:encoded><![CDATA[Here is a handy script I made a while ago to give more detailed error reports and print them to the console! It gives a full trace of where the error happened and the last called functions so you know what the problem might be! Has some limitations. Sometimes the report is too big for the little popup and it will be blank, but it should show the error in the console! Also doesn't properly trace errors inside events, so that might be something to add later.<br />
<br />
Oh! And you can use "Error_Handler.do_trace()" to print a backtrace to the console in scripts whenever you want for debugging too!<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#==============================================================================<br />
# * Error handling functions.<br />
#==============================================================================<br />
<br />
module Error_Handler<br />
  <br />
  def self.script_names<br />
    unless @script_names<br />
      @script_names = load_data('Data/Scripts.rvdata2')<br />
      @script_names.collect! {|script|  script[1]  }<br />
    end<br />
    @script_names<br />
  end<br />
  <br />
  def self.do_backtrace(error)<br />
    backtrace = self.parse_trace(error.backtrace)<br />
    error_line = backtrace.first<br />
    backtrace[0] = ''<br />
    return error_line + ": " + error.message + " (#{error.class})" + backtrace.join("&#92;n&#92;tfrom ") + "&#92;n"<br />
  end<br />
  <br />
  def self.parse_trace(trace)<br />
    out = []<br />
    trace.each_with_index do |line,i|<br />
      if line =~ /{(.*)}(.*)/<br />
        out &lt;&lt; (script_names[&#36;1.to_i] + &#36;2)<br />
      elsif line.start_with?(':1:')<br />
        break<br />
      else<br />
        out &lt;&lt; line<br />
      end<br />
    end<br />
    out<br />
  end<br />
  <br />
  def trace_me<br />
    begin<br />
      raise<br />
    rescue =&gt; exception<br />
      puts trace = Error_Handler.do_backtrace(exception)<br />
    end<br />
  end<br />
  <br />
end<br />
<br />
alias rgss_main_without_rescue rgss_main<br />
<br />
def rgss_main(&amp;block)<br />
  begin<br />
    rgss_main_without_rescue do<br />
      begin<br />
        block.call<br />
      rescue SystemExit<br />
        exit<br />
      rescue Exception =&gt; error<br />
        trace = Error_Handler.do_backtrace(error)<br />
        print(trace)<br />
        raise(error.class, trace, [error.backtrace.first])<br />
      end<br />
    end<br />
  end<br />
<br />
end</code></div></div><br />
Hope it's helpful!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KReviveOnce VX]]></title>
			<link>https://www.save-point.org/thread-13347.html</link>
			<pubDate>Wed, 10 Dec 2025 17:49:13 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13347.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KReviveOnce VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Sometimes your heroes deserve a second chance to defeat that terrible mega boss. Or you might simply think that their story should not end because they were just too weak after an epic battle as to also <img src="https://www.save-point.org/images/smilies/ejlol/worried.gif" alt="Worried" title="Worried" class="smilie smilie_216" /> worry about facing a couple of slimes right away.<br />
<br />
No matter what your excuse might be, now your heroes can be automatically revived once!<br />
<br />
Just set a specific state ID and the HP percentage they will recover and that's it!<br />
<br />
<img src="https://www.save-point.org/images/smilies/ejlol/sweathappy.gif" alt="Happy with a sweat" title="Happy with a sweat" class="smilie smilie_31" /> Of course, if a given hero dies without having that state listed at that critical moment, it's <img src="https://www.save-point.org/images/smilies/ejlol/skull.gif" alt="Skull" title="Skull" class="smilie smilie_214" /> game over for him or her! <img src="https://www.save-point.org/images/smilies/ejlol/laughing.gif" alt="Laughing" title="Laughing" class="smilie smilie_23" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KReviveOnce VX * #<br />
#&nbsp;&nbsp; Scripter : Kyonides<br />
#&nbsp;&nbsp; 2025-12-10<br />
<br />
# Let your heroes revive ONCE if they got a very specific state before<br />
# they met their premature demises.<br />
<br />
module KRevive<br />
&nbsp;&nbsp;ONCE_STATE_ID = 25<br />
&nbsp;&nbsp;ONCE_STATE_PERC = 25<br />
end<br />
<br />
class Game_Battler<br />
&nbsp;&nbsp;alias :kyon_revive_once_gm_btlr_remove_state :remove_state<br />
&nbsp;&nbsp;def check_revive_once(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@can_revive = (KRevive::ONCE_STATE_ID == state_id and state?(state_id))<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;def remove_state(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;check_revive_once(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;kyon_revive_once_gm_btlr_remove_state(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;apply_revive_once<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;def apply_revive_once<br />
&nbsp;&nbsp;&nbsp;&nbsp;if @can_revive and !state?(KRevive::ONCE_STATE_ID) and @hp &lt; 2<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@states.delete(1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@hp = maxhp * KRevive::ONCE_STATE_PERC<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;@can_revive = false<br />
&nbsp;&nbsp;end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer.<br />
Include me in your game credits.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KReviveOnce VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Sometimes your heroes deserve a second chance to defeat that terrible mega boss. Or you might simply think that their story should not end because they were just too weak after an epic battle as to also <img src="https://www.save-point.org/images/smilies/ejlol/worried.gif" alt="Worried" title="Worried" class="smilie smilie_216" /> worry about facing a couple of slimes right away.<br />
<br />
No matter what your excuse might be, now your heroes can be automatically revived once!<br />
<br />
Just set a specific state ID and the HP percentage they will recover and that's it!<br />
<br />
<img src="https://www.save-point.org/images/smilies/ejlol/sweathappy.gif" alt="Happy with a sweat" title="Happy with a sweat" class="smilie smilie_31" /> Of course, if a given hero dies without having that state listed at that critical moment, it's <img src="https://www.save-point.org/images/smilies/ejlol/skull.gif" alt="Skull" title="Skull" class="smilie smilie_214" /> game over for him or her! <img src="https://www.save-point.org/images/smilies/ejlol/laughing.gif" alt="Laughing" title="Laughing" class="smilie smilie_23" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KReviveOnce VX * #<br />
#&nbsp;&nbsp; Scripter : Kyonides<br />
#&nbsp;&nbsp; 2025-12-10<br />
<br />
# Let your heroes revive ONCE if they got a very specific state before<br />
# they met their premature demises.<br />
<br />
module KRevive<br />
&nbsp;&nbsp;ONCE_STATE_ID = 25<br />
&nbsp;&nbsp;ONCE_STATE_PERC = 25<br />
end<br />
<br />
class Game_Battler<br />
&nbsp;&nbsp;alias :kyon_revive_once_gm_btlr_remove_state :remove_state<br />
&nbsp;&nbsp;def check_revive_once(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;@can_revive = (KRevive::ONCE_STATE_ID == state_id and state?(state_id))<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;def remove_state(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;check_revive_once(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;kyon_revive_once_gm_btlr_remove_state(state_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;apply_revive_once<br />
&nbsp;&nbsp;end<br />
<br />
&nbsp;&nbsp;def apply_revive_once<br />
&nbsp;&nbsp;&nbsp;&nbsp;if @can_revive and !state?(KRevive::ONCE_STATE_ID) and @hp &lt; 2<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@states.delete(1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@hp = maxhp * KRevive::ONCE_STATE_PERC<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;@can_revive = false<br />
&nbsp;&nbsp;end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer.<br />
Include me in your game credits.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Hex Colors RG]]></title>
			<link>https://www.save-point.org/thread-13316.html</link>
			<pubDate>Tue, 18 Nov 2025 07:03:31 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13316.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Hex Colors RG</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
I'm back to leave you another scriptlet that will allow you to use hex colors in your windows and sprites with ease.<br />
<br />
This code will work on RMXP, RMVX and even RMVX ACE! <img src="https://www.save-point.org/images/smilies/ejlol/shocked.gif" alt="Shocked" title="Shocked" class="smilie smilie_22" /><br />
<br />
Just use it like this:<br />
<br />
For Windows:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>self.contents.font.color = hex_color("FF00FF")</code></div></div><br />
For Sprites:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>self.bitmap.font.color = hex_color("FF00FF")</code></div></div><br />
In this particular case, your text will become purple-ish! <img src="https://www.save-point.org/images/smilies/ejlol/virus.gif" alt="Virus" title="Virus" class="smilie smilie_75" /> <br />
<br />
You can also add 2 extra characters to set the alpha value of your custom color manually.<br />
<br />
In both cases you can add the # pound sign at the beginning of the string, but it's not mandatory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Hex Colors RG * # <br />
#  Scripter : Kyonides<br />
#  2025-11-18<br />
<br />
module Hex<br />
  def hex_color(hex)<br />
    digits = hex.size<br />
    hex.sub!("#", "")<br />
    red = hex[0, 2].to_i(16)<br />
    green = hex[2, 2].to_i(16)<br />
    blue = hex[4, 2].to_i(16)<br />
    alpha = digits == 8 ? hex[6, 2] : 255<br />
    Color.new(red, green, blue, alpha)<br />
  end<br />
end<br />
<br />
class Window_Base<br />
  include Hex<br />
end<br />
<br />
class Sprite<br />
  include Hex<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
It's free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer. That's all you need to know. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Hex Colors RG</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
I'm back to leave you another scriptlet that will allow you to use hex colors in your windows and sprites with ease.<br />
<br />
This code will work on RMXP, RMVX and even RMVX ACE! <img src="https://www.save-point.org/images/smilies/ejlol/shocked.gif" alt="Shocked" title="Shocked" class="smilie smilie_22" /><br />
<br />
Just use it like this:<br />
<br />
For Windows:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>self.contents.font.color = hex_color("FF00FF")</code></div></div><br />
For Sprites:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>self.bitmap.font.color = hex_color("FF00FF")</code></div></div><br />
In this particular case, your text will become purple-ish! <img src="https://www.save-point.org/images/smilies/ejlol/virus.gif" alt="Virus" title="Virus" class="smilie smilie_75" /> <br />
<br />
You can also add 2 extra characters to set the alpha value of your custom color manually.<br />
<br />
In both cases you can add the # pound sign at the beginning of the string, but it's not mandatory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Hex Colors RG * # <br />
#  Scripter : Kyonides<br />
#  2025-11-18<br />
<br />
module Hex<br />
  def hex_color(hex)<br />
    digits = hex.size<br />
    hex.sub!("#", "")<br />
    red = hex[0, 2].to_i(16)<br />
    green = hex[2, 2].to_i(16)<br />
    blue = hex[4, 2].to_i(16)<br />
    alpha = digits == 8 ? hex[6, 2] : 255<br />
    Color.new(red, green, blue, alpha)<br />
  end<br />
end<br />
<br />
class Window_Base<br />
  include Hex<br />
end<br />
<br />
class Sprite<br />
  include Hex<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
It's free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer. That's all you need to know. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Ekuipment Points VX]]></title>
			<link>https://www.save-point.org/thread-13302.html</link>
			<pubDate>Thu, 06 Nov 2025 07:05:34 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13302.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Ekuipment Points VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Limit the type of weapons or armor pieces your heroes will be able to equip!<br />
If your heroes want to replace their equipment, they better earn enough EP first!<br />
Another way to explain it would be to call it an equipment weight script.<br />
<br />
The script lets you set the default and custom EP the actor will start with. The same is valid for weapons and pieces of armor.<br />
Actors can also gain more EP by leveling up.<br />
<br />
Inside the <span style="font-weight: bold;" class="mycode_b">EkuipPoints</span> module you can find the WEAPON_POINTS, ARMOR_POINTS, ACTOR_POINTS &amp; the ACTOR_LEVEL_POINTS constants that will let you customize the EP earned by actors and the EP costs of their equipment.<br />
<br />
You can also change the X &amp; Y coordinates of windows or EP labels at will.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">NOTES</span><br />
<br />
Actors have no note boxes. This is why you need to depend on the ACTOR_POINTS &amp; ACTOR_LEVEL_POINTS constants to set their EP accordingly.<br />
To open the equipment window in battle, during the actor's command phase, press the RM's X button. Normally, it's linked to your A key on the keyboard.<br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Screenshots</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<img src="https://i.postimg.cc/tR16yB5f/ekuipment-points-vx001.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx001.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/dQ7Cv5Bf/ekuipment-points-vx002.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx002.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/L4qPRxTw/ekuipment-points-vx003.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx003.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/QNbT8KmY/ekuipment-points-vx004.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx004.jpg]" class="mycode_img" /><br />
</div>
		</div>
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Ekuipment Points VX - No Shield Edition * #<br />
#   Scripter : Kyonides<br />
#   v1.2.6 - 2025-11-12<br />
<br />
# Limit the type of weapons or armor pieces your heroes will be able to equip!<br />
# If heroes want to replace their equipment, they better earn enough EP first!<br />
<br />
# Note Tag: &lt;ep n&gt; where n is a positive number.<br />
<br />
# * Optional Script Calls * #<br />
# Block a given actor's change equipment feature, especially useful in battle:<br />
#  boolean stands for true OR false only.<br />
#   &#36;game_actors[ActorID].block_equip_change = boolean<br />
#   &#36;game_party.members[Index].block_equip_change = boolean<br />
<br />
# Block the party's change equipment feature at once:<br />
#   &#36;game_party.block_equip_change = boolean<br />
<br />
# Increase a given actor's equipment points:<br />
#   &#36;game_actors[ActorID].ep_plus += Number<br />
#   &#36;game_party.members[Index].ep_plus += Number<br />
<br />
module EkuipPoints<br />
  LABEL = "EP"<br />
  LABEL_LENGTH = { :status =&gt; 1, :ep_stats =&gt; 1 }<br />
  LABEL_LENGTH.default = 2<br />
  EP_LABEL_COLOR = [40, 242, 254] # [R,G,B]<br />
  GAUGE_COLOR1   = [255, 180, 60] # [R,G,B]<br />
  GAUGE_COLOR2   = [180, 255, 60] # [R,G,B]<br />
  EP_COST_X = 170<br />
  EP_STATUS_XY_WH    = [192, 122, 128, 6]<br />
  ACTOR_EP_WIN_XY_WH = [0, 280, 144, 56]<br />
  BATTLE_EQUIP_WIN_XY  = [80, 288]<br />
  ACTOR_STATS_WIN_OPA  = 255<br />
  BATTLE_EQUIP_WIN_OPA = 255<br />
  ACTOR_STATS_WIN_BACK_OPA  = 255<br />
  BATTLE_EQUIP_WIN_BACK_OPA = 255<br />
  EQUIP_BASE_POINTS = 1<br />
  # Alternate Armor Types Settings - Leave Empty If Not Needed<br />
  # 1 - Shield<br />
  # 2 - Helmet<br />
  # 3 - Body Armor<br />
  # 4 - Accessory<br />
  ARMOR_TYPES = [3, 4, 4, 4]<br />
  ACTOR_POINTS = {}<br />
  ACTOR_POINTS.default = 4<br />
  # [ActorID] = BasePoints<br />
  ACTOR_POINTS[1] = 6<br />
  ACTOR_POINTS[2] = 7<br />
  ACTOR_LEVEL_POINTS = {}<br />
  ACTOR_LEVEL_POINTS.default = { :levels =&gt; 10, :ep =&gt; 1 }<br />
  # [ActorID] = { :levels =&gt; LevelsNeeded, :ep =&gt; ExtraPoints }<br />
  ACTOR_LEVEL_POINTS[1] = { :levels =&gt; 8, :ep =&gt; 2 }<br />
end<br />
<br />
module RPG<br />
  class BaseItem<br />
    BASE_EP = EkuipPoints::EQUIP_BASE_POINTS<br />
    def note_ep<br />
      @note[/&lt;ep (&#92;d+)/i]<br />
      &#36;1 ? &#36;1.to_i : BASE_EP<br />
    end<br />
<br />
    def ep_cost<br />
      @ep_cost ||= note_ep<br />
    end<br />
  end<br />
<br />
  class Equipment<br />
    def ep_cost<br />
      0<br />
    end<br />
  end<br />
end<br />
<br />
module EkuipPoints<br />
  module ItemList<br />
    def draw_item_name(item, rx, ry, enabled=true)<br />
      return unless item<br />
      super<br />
      rect = item_rect(index)<br />
      rect.x = rx<br />
      rect.y = ry<br />
      rect.width -= rx<br />
      f = contents.font<br />
      f.color = ep_color<br />
      f.color.alpha = 160 unless enabled<br />
      number = sprintf("%2d", item.ep_cost)<br />
      contents.draw_text(rect, number, 2)<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Actor<br />
  alias :kyon_ekuip_points_gm_act_stp :setup<br />
  alias :kyon_ekuip_points_gm_act_lvl_up :level_up<br />
  alias :kyon_ekuip_points_gm_act_lvl_dn :level_down<br />
  def setup(actor_id)<br />
    kyon_ekuip_points_gm_act_stp(actor_id)<br />
    @armor1_id = actor.armor3_id<br />
    @armor3_id = 0<br />
    @maxep_base = EkuipPoints::ACTOR_POINTS[actor_id]<br />
    hash = EkuipPoints::ACTOR_LEVEL_POINTS[actor_id]<br />
    @base_ep_levels = hash[:levels]<br />
    @base_level_ep = hash[:ep]<br />
    @ep_plus = 0<br />
    calc_level_ep<br />
  end<br />
<br />
  def calc_level_ep<br />
    @level_ep = @level / @base_ep_levels * @base_level_ep<br />
  end<br />
<br />
  def level_up<br />
    kyon_ekuip_points_gm_act_lvl_up<br />
    calc_level_ep<br />
  end<br />
<br />
  def level_down<br />
    kyon_ekuip_points_gm_act_lvl_dn<br />
    calc_level_ep<br />
  end<br />
<br />
  def maxep<br />
    @maxep_base + @level_ep + @ep_plus<br />
  end<br />
<br />
  def ep_used<br />
    list = equips.compact<br />
    list.inject(0) {|total, item| total + item.ep_cost }<br />
  end<br />
<br />
  def ep_left<br />
    self.maxep - self.ep_used<br />
  end<br />
<br />
  def enough_ep?(equip_type, item)<br />
    return true unless item<br />
    equipment = equips[equip_type] || RPG::Equipment.new<br />
    used = self.ep_used - equipment.ep_cost<br />
    return true if used == 0<br />
    used += item.ep_cost<br />
    self.maxep &gt;= used<br />
  end<br />
  attr_accessor :ep_plus, :block_equip_change<br />
end<br />
<br />
class Game_Party<br />
  def block_equip_change=(state)<br />
    members.each {|actor| actor.block_equip_change = state }<br />
  end<br />
end<br />
<br />
class Window_Base<br />
  def ep_color<br />
    @ep_color ||= Color.new(*EkuipPoints::EP_LABEL_COLOR)<br />
  end<br />
<br />
  def ep_gauge_color1<br />
    @ep_gauge_color1 ||= Color.new(*EkuipPoints::GAUGE_COLOR1)<br />
  end<br />
<br />
  def ep_gauge_color2<br />
    @ep_gauge_color2 ||= Color.new(*EkuipPoints::GAUGE_COLOR2)<br />
  end<br />
<br />
  def draw_ep_left(actor, lx, ly, lw, lh=4, large=nil)<br />
    left = actor.ep_left<br />
    gw = lw * left / actor.maxep<br />
    gc1 = ep_gauge_color1<br />
    gc2 = ep_gauge_color2<br />
    c = self.contents<br />
    c.fill_rect(lx, ly + WLH - lh - 2, lw, lh, gauge_back_color)<br />
    c.gradient_fill_rect(lx, ly + WLH - lh - 2, gw, lh, gc1, gc2)<br />
    c.font.color = system_color<br />
    label = EkuipPoints::LABEL<br />
    length = EkuipPoints::LABEL_LENGTH[class_type]<br />
    label = label[0, length]<br />
    c.draw_text(lx, ly, lw, WLH, label)<br />
    c.font.color = normal_color<br />
    if large<br />
      c.draw_text(lx, ly, lw / 2 + 4, WLH, left.to_s, 2)<br />
      c.draw_text(lx, ly, lw / 2 + 16, WLH, "/", 2)<br />
      c.draw_text(lx, ly, lw, WLH, actor.maxep.to_s, 2)<br />
    else<br />
      c.draw_text(lx, ly, lw, WLH, left.to_s, 2)<br />
    end<br />
  end<br />
end<br />
<br />
class Window_MenuStatus<br />
  def refresh<br />
    self.contents.clear<br />
    @item_max = &#36;game_party.members.size<br />
    &#36;game_party.members.each {|actor| draw_actor_data(actor) }<br />
  end<br />
<br />
  def draw_actor_data(actor)<br />
    draw_actor_face(actor, 2, actor.index * 96 + 2, 92)<br />
    dx = 104<br />
    dy = actor.index * 96 + WLH / 2<br />
    draw_actor_name(actor, dx, dy)<br />
    draw_actor_class(actor, dx + 120, dy)<br />
    draw_actor_level(actor, dx, dy + WLH * 1)<br />
    draw_ep_left(actor, dx + 60, dy + WLH * 1, 50)<br />
    draw_actor_state(actor, dx, dy + WLH * 2)<br />
    draw_actor_hp(actor, dx + 120, dy + WLH * 1)<br />
    draw_actor_mp(actor, dx + 120, dy + WLH * 2)<br />
  end<br />
<br />
  def class_type<br />
    :menu_status<br />
  end<br />
end<br />
<br />
class Window_Equip<br />
  include EkuipPoints::ItemList<br />
  def update<br />
    last_index = @index<br />
    super<br />
    if @index != last_index<br />
      @item_window.equip_type = @index<br />
    end<br />
  end<br />
<br />
  def refresh<br />
    self.contents.clear<br />
    @data = []<br />
    for item in @actor.equips do @data.push(item) end<br />
    @item_max = @data.size<br />
    self.contents.font.color = system_color<br />
    if @actor.two_swords_style<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon1)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.weapon2)<br />
    else<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.armor3)<br />
    end<br />
    self.contents.draw_text(4, WLH * 2, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 3, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 4, 92, WLH, Vocab.armor4)<br />
    draw_item_name(@data[0], 92, WLH * 0)<br />
    draw_item_name(@data[1], 92, WLH * 1)<br />
    draw_item_name(@data[2], 92, WLH * 2)<br />
    draw_item_name(@data[3], 92, WLH * 3)<br />
    draw_item_name(@data[4], 92, WLH * 4)<br />
  end<br />
  attr_writer :item_window<br />
end<br />
<br />
class Window_EquipMod &lt; Window_Selectable<br />
  include EkuipPoints::ItemList<br />
  def initialize(wx, wy, actor)<br />
    super(wx, wy, 336, WLH * 4 + 32)<br />
    self.z = 1000<br />
    self.opacity = EkuipPoints::BATTLE_EQUIP_WIN_OPA<br />
    self.back_opacity = EkuipPoints::BATTLE_EQUIP_WIN_BACK_OPA<br />
    @actor = actor<br />
    refresh<br />
    self.index = 0<br />
  end<br />
<br />
  def row_max<br />
    5<br />
  end<br />
<br />
  def item<br />
    @data[@index]<br />
  end<br />
<br />
  def refresh<br />
    self.contents.clear<br />
    @data = []<br />
    @actor.equips.each {|item| @data &lt;&lt; item }<br />
    @item_max = @data.size<br />
    self.contents.font.color = system_color<br />
    if @actor.two_swords_style<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon1)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.weapon2)<br />
    else<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.armor3)<br />
    end<br />
    self.contents.draw_text(4, WLH * 2, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 3, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 4, 92, WLH, Vocab.armor4)<br />
    draw_item_name(@data[0], 92, WLH * 0)<br />
    draw_item_name(@data[1], 92, WLH * 1)<br />
    draw_item_name(@data[2], 92, WLH * 2)<br />
    draw_item_name(@data[3], 92, WLH * 3)<br />
    draw_item_name(@data[4], 92, WLH * 4)<br />
  end<br />
<br />
  def update_help<br />
    @help_window.set_text(item ? item.description : "")<br />
  end<br />
end<br />
<br />
class Window_EquipItem<br />
  EQUIP_TYPES = [0] + EkuipPoints::ARMOR_TYPES<br />
  alias :kyon_ekuip_points_win_eqpitm_init :initialize<br />
  alias :kyon_ekuip_points_win_eqpitm_refr :refresh<br />
  def initialize(wx, wy, width, height, actor, equip_type)<br />
    @row_index = equip_type<br />
    kyon_ekuip_points_win_eqpitm_init(wx, wy, width, height, actor, equip_type)<br />
    self.index = -1<br />
  end<br />
<br />
  def refresh<br />
    @has_armor_types ||= EQUIP_TYPES.size &gt; 1<br />
    kyon_ekuip_points_win_eqpitm_refr<br />
  end<br />
<br />
  def reset_index<br />
    self.index = 0 if @index &lt; 0<br />
  end<br />
<br />
  def enable?(item)<br />
    @actor.enough_ep?(@row_index, item)<br />
  end<br />
<br />
  def equip_type=(type)<br />
    @row_index = type<br />
    type = 0 if @actor.two_swords_style &amp;&amp; type == 1<br />
    type = EQUIP_TYPES[type] if type &gt; 0 and EQUIP_TYPES.size &gt; 1<br />
    @equip_type = type<br />
    refresh<br />
  end<br />
<br />
  def draw_item(index)<br />
    rect = item_rect(index)<br />
    c = self.contents<br />
    c.clear_rect(rect)<br />
    item = @data[index]<br />
    return unless item<br />
    number = &#36;game_party.item_number(item)<br />
    enabled = enable?(item)<br />
    rect.width -= 4<br />
    draw_item_name(item, rect.x, rect.y, enabled)<br />
    c.draw_text(rect, sprintf(":%2d", number), 2)<br />
    f = c.font<br />
    f.color = ep_color<br />
    f.color.alpha = 160 unless enabled<br />
    rect.x += EkuipPoints::EP_COST_X<br />
    rect.width = 40<br />
    number = item.ep_cost<br />
    c.draw_text(rect, sprintf("%2d", number), 2)<br />
  end<br />
end<br />
<br />
class Window_EquipStatus<br />
  alias :kyon_ekuip_points_win_eqpstts_ref :refresh<br />
  def refresh<br />
    kyon_ekuip_points_win_eqpstts_ref<br />
    draw_ep_left(@actor, 122, 0, 50)<br />
  end<br />
<br />
  def class_type<br />
    :equip_status<br />
  end<br />
end<br />
<br />
class Window_Status<br />
  alias :kyon_ekuip_points_win_stts_drw_bsc_info :draw_basic_info<br />
  def draw_basic_info(dx, dy)<br />
    kyon_ekuip_points_win_stts_drw_bsc_info(dx, dy)<br />
    ex, ey, ew, eh = EkuipPoints::EP_STATUS_XY_WH<br />
    draw_ep_left(@actor, dx + ex, dy + ey, ew, eh, true)<br />
  end<br />
<br />
  def class_type<br />
    :status<br />
  end<br />
end<br />
<br />
module EkuipPoints<br />
  class ActorStatsWindow &lt; Window_Base<br />
    def initialize(actor)<br />
      super(*ACTOR_EP_WIN_XY_WH)<br />
      self.opacity = ACTOR_STATS_WIN_OPA<br />
      self.back_opacity = ACTOR_STATS_WIN_BACK_OPA<br />
      self.z = 2000<br />
      @actor = actor<br />
      @hw = self.contents.width / 2<br />
      refresh<br />
    end<br />
<br />
    def refresh<br />
      self.contents.clear<br />
      draw_actor_name(@actor, 0, 0)<br />
      draw_ep_left(@actor, @hw, 0, @hw, 4)<br />
    end<br />
<br />
    def class_type<br />
      :ep_stats<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Equip<br />
  alias :kyon_ekuip_points_scn_eqp_stt :start<br />
  alias :kyon_ekuip_points_scn_eqp_up_eqp_sel :update_equip_selection<br />
  def start<br />
    kyon_ekuip_points_scn_eqp_stt<br />
    @equip_window.item_window = @item_window<br />
  end<br />
<br />
  def create_item_windows<br />
    types = Window_EquipItem::EQUIP_TYPES<br />
    @item_window = Window_EquipItem.new(0, 208, 544, 208, @actor, 0)<br />
    @item_window.help_window = @help_window<br />
    @item_window.active = false<br />
    @item_window.index = -1<br />
    @item_windows = [@item_window]<br />
  end<br />
<br />
  def update<br />
    super<br />
    update_menu_background<br />
    @help_window.update<br />
    update_status_window<br />
    if @equip_window.active<br />
      update_equip_selection<br />
    elsif @item_window.active<br />
      update_item_selection<br />
    end<br />
  end<br />
<br />
  def update_equip_selection<br />
    @equip_window.update<br />
    kyon_ekuip_points_scn_eqp_up_eqp_sel<br />
  end<br />
<br />
  def update_item_selection<br />
    @item_window.update<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @equip_window.active = true<br />
      @item_window.active = false<br />
      @item_window.index = -1<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      item = @item_window.item<br />
      pos = @equip_window.index<br />
      if item and !@actor.enough_ep?(pos, item)<br />
        Sound.play_buzzer<br />
        return<br />
      end<br />
      Sound.play_equip<br />
      @actor.change_equip(pos, item)<br />
      @equip_window.active = true<br />
      @item_window.active = false<br />
      @item_window.index = -1<br />
      @item_window.refresh<br />
      @equip_window.refresh<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Battle<br />
  alias :kyon_ekuip_points_scn_btl_up :update<br />
  alias :kyon_ekuip_points_scn_btl_up_act_cmdsel :update_actor_command_selection<br />
  def create_equipment_windows<br />
    actor = @active_battler<br />
    if actor.block_equip_change<br />
      Sound.play_buzzer<br />
      return<br />
    end<br />
    Sound.play_decision<br />
    wx, wy = EkuipPoints::BATTLE_EQUIP_WIN_XY<br />
    ww = Graphics.width<br />
    wh = Graphics.height - @actor_command_window.height<br />
    @ep_window = EkuipPoints::ActorStatsWindow.new(actor)<br />
    @equip_window = Window_EquipMod.new(wx, wy, actor)<br />
    @equip_item_window = Window_EquipItem.new(0, 0, ww, wh, actor, 0)<br />
    @equip_windows = [@ep_window, @equip_window, @equip_item_window]<br />
    @actor_command_window.active = false<br />
    @equip_index = 0<br />
    @equip_item = true<br />
  end<br />
<br />
  def dispose_equipment_windows<br />
    Sound.play_cancel<br />
    @equip_windows.each {|window| window.dispose }<br />
    @actor_command_window.active = true<br />
    @equip_item = false<br />
  end<br />
<br />
  def update<br />
    if @equip_item<br />
      update_equipment<br />
    else<br />
      kyon_ekuip_points_scn_btl_up<br />
    end<br />
  end<br />
<br />
  def update_equipment<br />
    update_basic(true)<br />
    update_info_viewport<br />
    case @equip_index<br />
    when 0<br />
      update_equip_type<br />
    when 1<br />
      update_equip_list<br />
    end<br />
  end<br />
<br />
  def refresh_equip_type<br />
    type = @equip_window.index<br />
    @equip_item_window.equip_type = type<br />
    @equip_item_window.index = -1<br />
  end<br />
<br />
  def update_equip_type<br />
    @equip_window.update<br />
    if Input.trigger?(Input::B)<br />
      dispose_equipment_windows<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      @equip_item_window.active = true<br />
      @equip_window.active = false<br />
      @equip_item_window.reset_index<br />
      return @equip_index = 1<br />
    elsif Input.trigger?(Input::DOWN)<br />
      refresh_equip_type<br />
      return<br />
    elsif Input.trigger?(Input::UP)<br />
      refresh_equip_type<br />
    end<br />
  end<br />
<br />
  def back_to_main_equip<br />
    @equip_item_window.index = -1<br />
    @equip_item_window.active = false<br />
    @equip_window.active = true<br />
    @equip_index = 0<br />
  end<br />
<br />
  def update_equip_list<br />
    @equip_item_window.update<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      back_to_main_equip<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      pos = @equip_window.index<br />
      item = @equip_item_window.item<br />
      if item and !@active_battler.enough_ep?(pos, item)<br />
        Sound.play_buzzer<br />
        return<br />
      end<br />
      Sound.play_equip<br />
      @active_battler.change_equip(pos, item)<br />
      @equip_item_window.refresh<br />
      @equip_window.refresh<br />
      @ep_window.refresh<br />
      back_to_main_equip<br />
    end<br />
  end<br />
<br />
  def update_actor_command_selection<br />
    if Input.trigger?(Input::X)<br />
      create_equipment_windows<br />
      return<br />
    end<br />
    kyon_ekuip_points_scn_btl_up_act_cmdsel<br />
  end<br />
end</code></div></div><br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: x-large;" class="mycode_size"><a href="https://www.mediafire.com/folder/kh1bibfguxbll/EkuipmentPoints" target="_blank" rel="noopener" class="mycode_url">DOWNLOAD DEMO</a></span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer for non-commercial use.<br />
Include me in your game credits! <img src="https://www.save-point.org/images/smilies/ejlol/grin.gif" alt="Grinning" title="Grinning" class="smilie smilie_25" /><br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Ekuipment Points VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Limit the type of weapons or armor pieces your heroes will be able to equip!<br />
If your heroes want to replace their equipment, they better earn enough EP first!<br />
Another way to explain it would be to call it an equipment weight script.<br />
<br />
The script lets you set the default and custom EP the actor will start with. The same is valid for weapons and pieces of armor.<br />
Actors can also gain more EP by leveling up.<br />
<br />
Inside the <span style="font-weight: bold;" class="mycode_b">EkuipPoints</span> module you can find the WEAPON_POINTS, ARMOR_POINTS, ACTOR_POINTS &amp; the ACTOR_LEVEL_POINTS constants that will let you customize the EP earned by actors and the EP costs of their equipment.<br />
<br />
You can also change the X &amp; Y coordinates of windows or EP labels at will.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">NOTES</span><br />
<br />
Actors have no note boxes. This is why you need to depend on the ACTOR_POINTS &amp; ACTOR_LEVEL_POINTS constants to set their EP accordingly.<br />
To open the equipment window in battle, during the actor's command phase, press the RM's X button. Normally, it's linked to your A key on the keyboard.<br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Screenshots</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<img src="https://i.postimg.cc/tR16yB5f/ekuipment-points-vx001.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx001.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/dQ7Cv5Bf/ekuipment-points-vx002.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx002.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/L4qPRxTw/ekuipment-points-vx003.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx003.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/QNbT8KmY/ekuipment-points-vx004.jpg" loading="lazy"  alt="[Image: ekuipment-points-vx004.jpg]" class="mycode_img" /><br />
</div>
		</div>
<br />
<span style="font-weight: bold;" class="mycode_b">The Script</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Ekuipment Points VX - No Shield Edition * #<br />
#   Scripter : Kyonides<br />
#   v1.2.6 - 2025-11-12<br />
<br />
# Limit the type of weapons or armor pieces your heroes will be able to equip!<br />
# If heroes want to replace their equipment, they better earn enough EP first!<br />
<br />
# Note Tag: &lt;ep n&gt; where n is a positive number.<br />
<br />
# * Optional Script Calls * #<br />
# Block a given actor's change equipment feature, especially useful in battle:<br />
#  boolean stands for true OR false only.<br />
#   &#36;game_actors[ActorID].block_equip_change = boolean<br />
#   &#36;game_party.members[Index].block_equip_change = boolean<br />
<br />
# Block the party's change equipment feature at once:<br />
#   &#36;game_party.block_equip_change = boolean<br />
<br />
# Increase a given actor's equipment points:<br />
#   &#36;game_actors[ActorID].ep_plus += Number<br />
#   &#36;game_party.members[Index].ep_plus += Number<br />
<br />
module EkuipPoints<br />
  LABEL = "EP"<br />
  LABEL_LENGTH = { :status =&gt; 1, :ep_stats =&gt; 1 }<br />
  LABEL_LENGTH.default = 2<br />
  EP_LABEL_COLOR = [40, 242, 254] # [R,G,B]<br />
  GAUGE_COLOR1   = [255, 180, 60] # [R,G,B]<br />
  GAUGE_COLOR2   = [180, 255, 60] # [R,G,B]<br />
  EP_COST_X = 170<br />
  EP_STATUS_XY_WH    = [192, 122, 128, 6]<br />
  ACTOR_EP_WIN_XY_WH = [0, 280, 144, 56]<br />
  BATTLE_EQUIP_WIN_XY  = [80, 288]<br />
  ACTOR_STATS_WIN_OPA  = 255<br />
  BATTLE_EQUIP_WIN_OPA = 255<br />
  ACTOR_STATS_WIN_BACK_OPA  = 255<br />
  BATTLE_EQUIP_WIN_BACK_OPA = 255<br />
  EQUIP_BASE_POINTS = 1<br />
  # Alternate Armor Types Settings - Leave Empty If Not Needed<br />
  # 1 - Shield<br />
  # 2 - Helmet<br />
  # 3 - Body Armor<br />
  # 4 - Accessory<br />
  ARMOR_TYPES = [3, 4, 4, 4]<br />
  ACTOR_POINTS = {}<br />
  ACTOR_POINTS.default = 4<br />
  # [ActorID] = BasePoints<br />
  ACTOR_POINTS[1] = 6<br />
  ACTOR_POINTS[2] = 7<br />
  ACTOR_LEVEL_POINTS = {}<br />
  ACTOR_LEVEL_POINTS.default = { :levels =&gt; 10, :ep =&gt; 1 }<br />
  # [ActorID] = { :levels =&gt; LevelsNeeded, :ep =&gt; ExtraPoints }<br />
  ACTOR_LEVEL_POINTS[1] = { :levels =&gt; 8, :ep =&gt; 2 }<br />
end<br />
<br />
module RPG<br />
  class BaseItem<br />
    BASE_EP = EkuipPoints::EQUIP_BASE_POINTS<br />
    def note_ep<br />
      @note[/&lt;ep (&#92;d+)/i]<br />
      &#36;1 ? &#36;1.to_i : BASE_EP<br />
    end<br />
<br />
    def ep_cost<br />
      @ep_cost ||= note_ep<br />
    end<br />
  end<br />
<br />
  class Equipment<br />
    def ep_cost<br />
      0<br />
    end<br />
  end<br />
end<br />
<br />
module EkuipPoints<br />
  module ItemList<br />
    def draw_item_name(item, rx, ry, enabled=true)<br />
      return unless item<br />
      super<br />
      rect = item_rect(index)<br />
      rect.x = rx<br />
      rect.y = ry<br />
      rect.width -= rx<br />
      f = contents.font<br />
      f.color = ep_color<br />
      f.color.alpha = 160 unless enabled<br />
      number = sprintf("%2d", item.ep_cost)<br />
      contents.draw_text(rect, number, 2)<br />
    end<br />
  end<br />
end<br />
<br />
class Game_Actor<br />
  alias :kyon_ekuip_points_gm_act_stp :setup<br />
  alias :kyon_ekuip_points_gm_act_lvl_up :level_up<br />
  alias :kyon_ekuip_points_gm_act_lvl_dn :level_down<br />
  def setup(actor_id)<br />
    kyon_ekuip_points_gm_act_stp(actor_id)<br />
    @armor1_id = actor.armor3_id<br />
    @armor3_id = 0<br />
    @maxep_base = EkuipPoints::ACTOR_POINTS[actor_id]<br />
    hash = EkuipPoints::ACTOR_LEVEL_POINTS[actor_id]<br />
    @base_ep_levels = hash[:levels]<br />
    @base_level_ep = hash[:ep]<br />
    @ep_plus = 0<br />
    calc_level_ep<br />
  end<br />
<br />
  def calc_level_ep<br />
    @level_ep = @level / @base_ep_levels * @base_level_ep<br />
  end<br />
<br />
  def level_up<br />
    kyon_ekuip_points_gm_act_lvl_up<br />
    calc_level_ep<br />
  end<br />
<br />
  def level_down<br />
    kyon_ekuip_points_gm_act_lvl_dn<br />
    calc_level_ep<br />
  end<br />
<br />
  def maxep<br />
    @maxep_base + @level_ep + @ep_plus<br />
  end<br />
<br />
  def ep_used<br />
    list = equips.compact<br />
    list.inject(0) {|total, item| total + item.ep_cost }<br />
  end<br />
<br />
  def ep_left<br />
    self.maxep - self.ep_used<br />
  end<br />
<br />
  def enough_ep?(equip_type, item)<br />
    return true unless item<br />
    equipment = equips[equip_type] || RPG::Equipment.new<br />
    used = self.ep_used - equipment.ep_cost<br />
    return true if used == 0<br />
    used += item.ep_cost<br />
    self.maxep &gt;= used<br />
  end<br />
  attr_accessor :ep_plus, :block_equip_change<br />
end<br />
<br />
class Game_Party<br />
  def block_equip_change=(state)<br />
    members.each {|actor| actor.block_equip_change = state }<br />
  end<br />
end<br />
<br />
class Window_Base<br />
  def ep_color<br />
    @ep_color ||= Color.new(*EkuipPoints::EP_LABEL_COLOR)<br />
  end<br />
<br />
  def ep_gauge_color1<br />
    @ep_gauge_color1 ||= Color.new(*EkuipPoints::GAUGE_COLOR1)<br />
  end<br />
<br />
  def ep_gauge_color2<br />
    @ep_gauge_color2 ||= Color.new(*EkuipPoints::GAUGE_COLOR2)<br />
  end<br />
<br />
  def draw_ep_left(actor, lx, ly, lw, lh=4, large=nil)<br />
    left = actor.ep_left<br />
    gw = lw * left / actor.maxep<br />
    gc1 = ep_gauge_color1<br />
    gc2 = ep_gauge_color2<br />
    c = self.contents<br />
    c.fill_rect(lx, ly + WLH - lh - 2, lw, lh, gauge_back_color)<br />
    c.gradient_fill_rect(lx, ly + WLH - lh - 2, gw, lh, gc1, gc2)<br />
    c.font.color = system_color<br />
    label = EkuipPoints::LABEL<br />
    length = EkuipPoints::LABEL_LENGTH[class_type]<br />
    label = label[0, length]<br />
    c.draw_text(lx, ly, lw, WLH, label)<br />
    c.font.color = normal_color<br />
    if large<br />
      c.draw_text(lx, ly, lw / 2 + 4, WLH, left.to_s, 2)<br />
      c.draw_text(lx, ly, lw / 2 + 16, WLH, "/", 2)<br />
      c.draw_text(lx, ly, lw, WLH, actor.maxep.to_s, 2)<br />
    else<br />
      c.draw_text(lx, ly, lw, WLH, left.to_s, 2)<br />
    end<br />
  end<br />
end<br />
<br />
class Window_MenuStatus<br />
  def refresh<br />
    self.contents.clear<br />
    @item_max = &#36;game_party.members.size<br />
    &#36;game_party.members.each {|actor| draw_actor_data(actor) }<br />
  end<br />
<br />
  def draw_actor_data(actor)<br />
    draw_actor_face(actor, 2, actor.index * 96 + 2, 92)<br />
    dx = 104<br />
    dy = actor.index * 96 + WLH / 2<br />
    draw_actor_name(actor, dx, dy)<br />
    draw_actor_class(actor, dx + 120, dy)<br />
    draw_actor_level(actor, dx, dy + WLH * 1)<br />
    draw_ep_left(actor, dx + 60, dy + WLH * 1, 50)<br />
    draw_actor_state(actor, dx, dy + WLH * 2)<br />
    draw_actor_hp(actor, dx + 120, dy + WLH * 1)<br />
    draw_actor_mp(actor, dx + 120, dy + WLH * 2)<br />
  end<br />
<br />
  def class_type<br />
    :menu_status<br />
  end<br />
end<br />
<br />
class Window_Equip<br />
  include EkuipPoints::ItemList<br />
  def update<br />
    last_index = @index<br />
    super<br />
    if @index != last_index<br />
      @item_window.equip_type = @index<br />
    end<br />
  end<br />
<br />
  def refresh<br />
    self.contents.clear<br />
    @data = []<br />
    for item in @actor.equips do @data.push(item) end<br />
    @item_max = @data.size<br />
    self.contents.font.color = system_color<br />
    if @actor.two_swords_style<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon1)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.weapon2)<br />
    else<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.armor3)<br />
    end<br />
    self.contents.draw_text(4, WLH * 2, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 3, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 4, 92, WLH, Vocab.armor4)<br />
    draw_item_name(@data[0], 92, WLH * 0)<br />
    draw_item_name(@data[1], 92, WLH * 1)<br />
    draw_item_name(@data[2], 92, WLH * 2)<br />
    draw_item_name(@data[3], 92, WLH * 3)<br />
    draw_item_name(@data[4], 92, WLH * 4)<br />
  end<br />
  attr_writer :item_window<br />
end<br />
<br />
class Window_EquipMod &lt; Window_Selectable<br />
  include EkuipPoints::ItemList<br />
  def initialize(wx, wy, actor)<br />
    super(wx, wy, 336, WLH * 4 + 32)<br />
    self.z = 1000<br />
    self.opacity = EkuipPoints::BATTLE_EQUIP_WIN_OPA<br />
    self.back_opacity = EkuipPoints::BATTLE_EQUIP_WIN_BACK_OPA<br />
    @actor = actor<br />
    refresh<br />
    self.index = 0<br />
  end<br />
<br />
  def row_max<br />
    5<br />
  end<br />
<br />
  def item<br />
    @data[@index]<br />
  end<br />
<br />
  def refresh<br />
    self.contents.clear<br />
    @data = []<br />
    @actor.equips.each {|item| @data &lt;&lt; item }<br />
    @item_max = @data.size<br />
    self.contents.font.color = system_color<br />
    if @actor.two_swords_style<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon1)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.weapon2)<br />
    else<br />
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab.weapon)<br />
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab.armor3)<br />
    end<br />
    self.contents.draw_text(4, WLH * 2, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 3, 92, WLH, Vocab.armor4)<br />
    self.contents.draw_text(4, WLH * 4, 92, WLH, Vocab.armor4)<br />
    draw_item_name(@data[0], 92, WLH * 0)<br />
    draw_item_name(@data[1], 92, WLH * 1)<br />
    draw_item_name(@data[2], 92, WLH * 2)<br />
    draw_item_name(@data[3], 92, WLH * 3)<br />
    draw_item_name(@data[4], 92, WLH * 4)<br />
  end<br />
<br />
  def update_help<br />
    @help_window.set_text(item ? item.description : "")<br />
  end<br />
end<br />
<br />
class Window_EquipItem<br />
  EQUIP_TYPES = [0] + EkuipPoints::ARMOR_TYPES<br />
  alias :kyon_ekuip_points_win_eqpitm_init :initialize<br />
  alias :kyon_ekuip_points_win_eqpitm_refr :refresh<br />
  def initialize(wx, wy, width, height, actor, equip_type)<br />
    @row_index = equip_type<br />
    kyon_ekuip_points_win_eqpitm_init(wx, wy, width, height, actor, equip_type)<br />
    self.index = -1<br />
  end<br />
<br />
  def refresh<br />
    @has_armor_types ||= EQUIP_TYPES.size &gt; 1<br />
    kyon_ekuip_points_win_eqpitm_refr<br />
  end<br />
<br />
  def reset_index<br />
    self.index = 0 if @index &lt; 0<br />
  end<br />
<br />
  def enable?(item)<br />
    @actor.enough_ep?(@row_index, item)<br />
  end<br />
<br />
  def equip_type=(type)<br />
    @row_index = type<br />
    type = 0 if @actor.two_swords_style &amp;&amp; type == 1<br />
    type = EQUIP_TYPES[type] if type &gt; 0 and EQUIP_TYPES.size &gt; 1<br />
    @equip_type = type<br />
    refresh<br />
  end<br />
<br />
  def draw_item(index)<br />
    rect = item_rect(index)<br />
    c = self.contents<br />
    c.clear_rect(rect)<br />
    item = @data[index]<br />
    return unless item<br />
    number = &#36;game_party.item_number(item)<br />
    enabled = enable?(item)<br />
    rect.width -= 4<br />
    draw_item_name(item, rect.x, rect.y, enabled)<br />
    c.draw_text(rect, sprintf(":%2d", number), 2)<br />
    f = c.font<br />
    f.color = ep_color<br />
    f.color.alpha = 160 unless enabled<br />
    rect.x += EkuipPoints::EP_COST_X<br />
    rect.width = 40<br />
    number = item.ep_cost<br />
    c.draw_text(rect, sprintf("%2d", number), 2)<br />
  end<br />
end<br />
<br />
class Window_EquipStatus<br />
  alias :kyon_ekuip_points_win_eqpstts_ref :refresh<br />
  def refresh<br />
    kyon_ekuip_points_win_eqpstts_ref<br />
    draw_ep_left(@actor, 122, 0, 50)<br />
  end<br />
<br />
  def class_type<br />
    :equip_status<br />
  end<br />
end<br />
<br />
class Window_Status<br />
  alias :kyon_ekuip_points_win_stts_drw_bsc_info :draw_basic_info<br />
  def draw_basic_info(dx, dy)<br />
    kyon_ekuip_points_win_stts_drw_bsc_info(dx, dy)<br />
    ex, ey, ew, eh = EkuipPoints::EP_STATUS_XY_WH<br />
    draw_ep_left(@actor, dx + ex, dy + ey, ew, eh, true)<br />
  end<br />
<br />
  def class_type<br />
    :status<br />
  end<br />
end<br />
<br />
module EkuipPoints<br />
  class ActorStatsWindow &lt; Window_Base<br />
    def initialize(actor)<br />
      super(*ACTOR_EP_WIN_XY_WH)<br />
      self.opacity = ACTOR_STATS_WIN_OPA<br />
      self.back_opacity = ACTOR_STATS_WIN_BACK_OPA<br />
      self.z = 2000<br />
      @actor = actor<br />
      @hw = self.contents.width / 2<br />
      refresh<br />
    end<br />
<br />
    def refresh<br />
      self.contents.clear<br />
      draw_actor_name(@actor, 0, 0)<br />
      draw_ep_left(@actor, @hw, 0, @hw, 4)<br />
    end<br />
<br />
    def class_type<br />
      :ep_stats<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Equip<br />
  alias :kyon_ekuip_points_scn_eqp_stt :start<br />
  alias :kyon_ekuip_points_scn_eqp_up_eqp_sel :update_equip_selection<br />
  def start<br />
    kyon_ekuip_points_scn_eqp_stt<br />
    @equip_window.item_window = @item_window<br />
  end<br />
<br />
  def create_item_windows<br />
    types = Window_EquipItem::EQUIP_TYPES<br />
    @item_window = Window_EquipItem.new(0, 208, 544, 208, @actor, 0)<br />
    @item_window.help_window = @help_window<br />
    @item_window.active = false<br />
    @item_window.index = -1<br />
    @item_windows = [@item_window]<br />
  end<br />
<br />
  def update<br />
    super<br />
    update_menu_background<br />
    @help_window.update<br />
    update_status_window<br />
    if @equip_window.active<br />
      update_equip_selection<br />
    elsif @item_window.active<br />
      update_item_selection<br />
    end<br />
  end<br />
<br />
  def update_equip_selection<br />
    @equip_window.update<br />
    kyon_ekuip_points_scn_eqp_up_eqp_sel<br />
  end<br />
<br />
  def update_item_selection<br />
    @item_window.update<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @equip_window.active = true<br />
      @item_window.active = false<br />
      @item_window.index = -1<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      item = @item_window.item<br />
      pos = @equip_window.index<br />
      if item and !@actor.enough_ep?(pos, item)<br />
        Sound.play_buzzer<br />
        return<br />
      end<br />
      Sound.play_equip<br />
      @actor.change_equip(pos, item)<br />
      @equip_window.active = true<br />
      @item_window.active = false<br />
      @item_window.index = -1<br />
      @item_window.refresh<br />
      @equip_window.refresh<br />
    end<br />
  end<br />
end<br />
<br />
class Scene_Battle<br />
  alias :kyon_ekuip_points_scn_btl_up :update<br />
  alias :kyon_ekuip_points_scn_btl_up_act_cmdsel :update_actor_command_selection<br />
  def create_equipment_windows<br />
    actor = @active_battler<br />
    if actor.block_equip_change<br />
      Sound.play_buzzer<br />
      return<br />
    end<br />
    Sound.play_decision<br />
    wx, wy = EkuipPoints::BATTLE_EQUIP_WIN_XY<br />
    ww = Graphics.width<br />
    wh = Graphics.height - @actor_command_window.height<br />
    @ep_window = EkuipPoints::ActorStatsWindow.new(actor)<br />
    @equip_window = Window_EquipMod.new(wx, wy, actor)<br />
    @equip_item_window = Window_EquipItem.new(0, 0, ww, wh, actor, 0)<br />
    @equip_windows = [@ep_window, @equip_window, @equip_item_window]<br />
    @actor_command_window.active = false<br />
    @equip_index = 0<br />
    @equip_item = true<br />
  end<br />
<br />
  def dispose_equipment_windows<br />
    Sound.play_cancel<br />
    @equip_windows.each {|window| window.dispose }<br />
    @actor_command_window.active = true<br />
    @equip_item = false<br />
  end<br />
<br />
  def update<br />
    if @equip_item<br />
      update_equipment<br />
    else<br />
      kyon_ekuip_points_scn_btl_up<br />
    end<br />
  end<br />
<br />
  def update_equipment<br />
    update_basic(true)<br />
    update_info_viewport<br />
    case @equip_index<br />
    when 0<br />
      update_equip_type<br />
    when 1<br />
      update_equip_list<br />
    end<br />
  end<br />
<br />
  def refresh_equip_type<br />
    type = @equip_window.index<br />
    @equip_item_window.equip_type = type<br />
    @equip_item_window.index = -1<br />
  end<br />
<br />
  def update_equip_type<br />
    @equip_window.update<br />
    if Input.trigger?(Input::B)<br />
      dispose_equipment_windows<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      @equip_item_window.active = true<br />
      @equip_window.active = false<br />
      @equip_item_window.reset_index<br />
      return @equip_index = 1<br />
    elsif Input.trigger?(Input::DOWN)<br />
      refresh_equip_type<br />
      return<br />
    elsif Input.trigger?(Input::UP)<br />
      refresh_equip_type<br />
    end<br />
  end<br />
<br />
  def back_to_main_equip<br />
    @equip_item_window.index = -1<br />
    @equip_item_window.active = false<br />
    @equip_window.active = true<br />
    @equip_index = 0<br />
  end<br />
<br />
  def update_equip_list<br />
    @equip_item_window.update<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      back_to_main_equip<br />
      return<br />
    elsif Input.trigger?(Input::C)<br />
      pos = @equip_window.index<br />
      item = @equip_item_window.item<br />
      if item and !@active_battler.enough_ep?(pos, item)<br />
        Sound.play_buzzer<br />
        return<br />
      end<br />
      Sound.play_equip<br />
      @active_battler.change_equip(pos, item)<br />
      @equip_item_window.refresh<br />
      @equip_window.refresh<br />
      @ep_window.refresh<br />
      back_to_main_equip<br />
    end<br />
  end<br />
<br />
  def update_actor_command_selection<br />
    if Input.trigger?(Input::X)<br />
      create_equipment_windows<br />
      return<br />
    end<br />
    kyon_ekuip_points_scn_btl_up_act_cmdsel<br />
  end<br />
end</code></div></div><br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: x-large;" class="mycode_size"><a href="https://www.mediafire.com/folder/kh1bibfguxbll/EkuipmentPoints" target="_blank" rel="noopener" class="mycode_url">DOWNLOAD DEMO</a></span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer for non-commercial use.<br />
Include me in your game credits! <img src="https://www.save-point.org/images/smilies/ejlol/grin.gif" alt="Grinning" title="Grinning" class="smilie smilie_25" /><br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Scene_File FIX]]></title>
			<link>https://www.save-point.org/thread-13277.html</link>
			<pubDate>Sat, 11 Oct 2025 22:30:34 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-13277.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Scene_File FIX</span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">for VX ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Scripts like GOBJ try to catch weird stuff the RM engine does when creating visual objects or disposing of them, but I think it's a terrible approach because they simply ignore the bugs already contained in the default scripts.<br />
<br />
Yes, I know that VX ACE includes 2 bug fixes by default nowadays. Still, they're not all inclusive at all. There's one potential issue that has been ignored for quite a long time: the disposal of a Viewport object BEFORE its children have been disposed. Those children objects include Sprites and Windows. A perfect example of this is the Scene_File class, the parent class of Scene_Save and Scene_Load.<br />
<br />
In the default script you can find the terminate method that says:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>  def terminate<br />
    super<br />
    @savefile_viewport.dispose<br />
    @savefile_windows.each {|window| window.dispose }<br />
  end</code></div></div><br />
That means that the Scene_File class and its children classes are disposing of the Viewport right before it takes care of the Savefile windows. A bad choice indeed. It should always followed the opposite order.<br />
<br />
Get rid of:<br />
<br />
<ol type="1" class="mycode_list"><li>The <span style="font-weight: bold;" class="mycode_b">children objects first</span><br />
</li>
<li>Then dispose of the <span style="font-weight: bold;" class="mycode_b">parent object</span> safely.<br />
</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">How can you fix it?</span></span><br />
<br />
Well, the solution is QUITE SIMPLE: just invert the order in which those objects get disposed of, and that's it. So you'd only need to paste the following code in the bug fix section of the Script Editor and you'll be fine:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Scene_File FIX * #<br />
<br />
class Scene_File<br />
  def terminate<br />
    super<br />
    @savefile_windows.each {|window| window.dispose }<br />
    @savefile_viewport.dispose<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Why is this fix relatively important for you as a game developer?</span></span><br />
<br />
It might not look impressive or critical at all, yet, it's highly convenient to prevent the engine from trying to do stuff in the incorrect / not-so-logical order in the first place. Debugger scripts like GOBJ will try to catch all those windows or their custom contents as critical objects that need to be notified otherwise.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
None.]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Scene_File FIX</span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">for VX ACE</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b">Introduction</span><br />
<br />
Scripts like GOBJ try to catch weird stuff the RM engine does when creating visual objects or disposing of them, but I think it's a terrible approach because they simply ignore the bugs already contained in the default scripts.<br />
<br />
Yes, I know that VX ACE includes 2 bug fixes by default nowadays. Still, they're not all inclusive at all. There's one potential issue that has been ignored for quite a long time: the disposal of a Viewport object BEFORE its children have been disposed. Those children objects include Sprites and Windows. A perfect example of this is the Scene_File class, the parent class of Scene_Save and Scene_Load.<br />
<br />
In the default script you can find the terminate method that says:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>  def terminate<br />
    super<br />
    @savefile_viewport.dispose<br />
    @savefile_windows.each {|window| window.dispose }<br />
  end</code></div></div><br />
That means that the Scene_File class and its children classes are disposing of the Viewport right before it takes care of the Savefile windows. A bad choice indeed. It should always followed the opposite order.<br />
<br />
Get rid of:<br />
<br />
<ol type="1" class="mycode_list"><li>The <span style="font-weight: bold;" class="mycode_b">children objects first</span><br />
</li>
<li>Then dispose of the <span style="font-weight: bold;" class="mycode_b">parent object</span> safely.<br />
</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">How can you fix it?</span></span><br />
<br />
Well, the solution is QUITE SIMPLE: just invert the order in which those objects get disposed of, and that's it. So you'd only need to paste the following code in the bug fix section of the Script Editor and you'll be fine:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * Scene_File FIX * #<br />
<br />
class Scene_File<br />
  def terminate<br />
    super<br />
    @savefile_windows.each {|window| window.dispose }<br />
    @savefile_viewport.dispose<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Why is this fix relatively important for you as a game developer?</span></span><br />
<br />
It might not look impressive or critical at all, yet, it's highly convenient to prevent the engine from trying to do stuff in the incorrect / not-so-logical order in the first place. Debugger scripts like GOBJ will try to catch all those windows or their custom contents as critical objects that need to be notified otherwise.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
None.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KInfoMenu VX]]></title>
			<link>https://www.save-point.org/thread-12923.html</link>
			<pubDate>Wed, 17 Sep 2025 02:20:26 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://www.save-point.org/member.php?action=profile&uid=1471">kyonides</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.save-point.org/thread-12923.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KInfoMenu VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Introduction</span></span><br />
<br />
The script allows you to create some sort of tutorial menu with lots of options using a GUI similar to my other script <span style="font-weight: bold;" class="mycode_b">FancyChoices VX</span>.<br />
As the <img src="https://www.save-point.org/images/smilies/ejlol/gamer.gif" alt="Gamer" title="Gamer" class="smilie smilie_183" /> game developer you can define what texts and pictures you will display on screen. You can also play SE if deemed necessary.<br />
<br />
<div style="text-align: center;" class="mycode_align">Nope, this is <span style="font-weight: bold;" class="mycode_b"><span style="font-style: italic;" class="mycode_i">NOT a Plug &amp; Play</span></span> script at all, guys! <img src="https://www.save-point.org/images/smilies/ejlol/confused.gif" alt="Confused" title="Confused" class="smilie smilie_39" /></div>
<br />
If you want to customize it, you will have to edit several CONSTANTS in the KInfoMenu module first.<br />
<br />
All texts will be shown on top of the option boxes or on a typical message window. This also means that your typical note tags like \n[1] or \c[2] will work normally. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /> <br />
<br />
The pictures will be shown on the center of the screen right when its corresponding text message gets displayed there.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Understanding the Options Feature</span></span><br />
<br />
There are 3 different levels of options, namely the Main Choices plus the first and second subcategories. Those subcategories depend on Hashes to let you customize its contents.<br />
<br />
Option labels are simple to understand, they are just a list of texts:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>SUB_CAT1["Combat"]  = ["Allies", "Enemies", "FF Menu", "Section 4", "Section 5", "Section 6", "Section 7"]</code></div></div><br />
"Combat" is a key that can be found in the Main Choices list:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>MAIN_CHOICES    = ["Combat", "Controls", "Concepts"]</code></div></div><br />
So both subcategories should use keys that already exist on the previous subcategory or the main choices list.<br />
<br />
The text hashes sport 3 keys and their respective values. Those keys are :text, :se and :pic and that's it. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /><br />
<br />
You can leave the :pic and :se hashes empty if you need to, but you can add custom pictures or SFX at any given time. Just follow this example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>SUB_CAT1_TEXTS["Enemies"] = {<br />
  :se =&gt; { 1 =&gt; "Battle1", 2 =&gt; "Battle2" },<br />
  :pic =&gt; { 1 =&gt; "093-Monster07", 2 =&gt; "099-Monster13" },  <br />
  :text =&gt; [<br />
    "You're not given a chance to think twice.",<br />
    "All mobs definitely hate you.",<br />
    "They'll sweep the floor with your death body",<br />
    "while laughing maniacally.",<br />
    "Please don't challenge them unless you know",<br />
    "very well what you're doing.",<br />
    "You've been warned!",<br />
  ] }</code></div></div><br />
So you need to pick a CONSTANT, then call its option key, and make it contain a { Hash }.<br />
The :se and :pic keys use page indexes as their hash keys, but you can skip pages at will.<br />
The :text hash has a very interesting feature that you should know about from the very beginning. If you plan to display less than 4 lines of text on a given <img src="https://www.save-point.org/images/smilies/ejlol/book.gif" alt="Book" title="Book" class="smilie smilie_163" /> page, and you expect another page to show up next after pressing the OK button, you will have to add empty Strings "" and a comma , per empty line. And this is mandatory. <img src="https://www.save-point.org/images/smilies/ejlol/angry.gif" alt="Angry" title="Angry" class="smilie smilie_28" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">A Friendly Reminder</span></span><br />
<br />
If a key like "Section 4" does not exist either in <span style="font-weight: bold;" class="mycode_b">SUB_CAT1_TEXTS</span> or <span style="font-weight: bold;" class="mycode_b">SUB_CAT2_TEXTS</span>, the script will skip the whole enchilada to prevent it from crashing.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">NOTES</span></span><br />
<br />
The comments include an explanation that claims that calling the custom scene is optional. <img src="https://www.save-point.org/images/smilies/ejlol/sweathappy.gif" alt="Happy with a sweat" title="Happy with a sweat" class="smilie smilie_31" /> Well, that is only true if you pretend to customize your main menu to include an option to open the KInfoMenu scene. If you are planning to use any NPC as an interface for this tutorial menu, you will have to make that script call at all costs. <img src="https://www.save-point.org/images/smilies/ejlol/laughing.gif" alt="Laughing" title="Laughing" class="smilie smilie_23" /><br />
<br />
The <span style="font-weight: bold;" class="mycode_b">WINDOW_BACK_OP</span> constant will let you set the message window's back opacity.<br />
<br />
I don't care if there are other ways to achieve the same goal. I just wanted to create this special menu, and that's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Screenshots</span></span><br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Several Snapshots</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<span style="font-weight: bold;" class="mycode_b">NOTE:</span> The \i[n] note tags would get replaced by an icon in no time IF you have included a custom message script in your game project.<br />
<img src="https://i.postimg.cc/J4jDyvt7/kinfomenu-vx001.jpg" loading="lazy"  alt="[Image: kinfomenu-vx001.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/T2z53fdH/kinfomenu-vx002.jpg" loading="lazy"  alt="[Image: kinfomenu-vx002.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/mhW4fdG8/kinfomenu-vx003.jpg" loading="lazy"  alt="[Image: kinfomenu-vx003.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/jqwJTLb7/kinfomenu-vx004.jpg" loading="lazy"  alt="[Image: kinfomenu-vx004.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/Mpxc15j7/kinfomenu-vx005.jpg" loading="lazy"  alt="[Image: kinfomenu-vx005.jpg]" class="mycode_img" /><br />
</div>
		</div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KInfoMenu VX * #<br />
#   Scripter : Kyonides Arkanthes<br />
#   v1.2.3 - 2025-09-17<br />
#   Not a Plug &amp; Play Script!<br />
<br />
# This scriptlet lets you setup a simple tutorial menu.<br />
<br />
# NOTES on Message Window's Contents:<br />
<br />
# For the message window, empty lines are equally as important as normal ones.<br />
# They are used as fillers, and this matters a lot whenever you're trying to<br />
# display multiple pages on screen. If you ever skip them, you'll soon notice<br />
# that certain lines of text do appear sooner than expected.<br />
<br />
# * Optional Script Call * #<br />
# &#36;scene = KInfoMenu::Scene.new<br />
<br />
module KInfoMenu<br />
  BACKDROP         = "Title"<br />
  TITLE_FILENAME   = "title480"<br />
# BGM Options: "" for no song, "Some Name" for any specific BGM<br />
  TUTORIAL_BGM     = "Ship"<br />
  TEXT_ALIGN_X     = :center<br />
  CHOICE_ALIGN_X   = :center<br />
  CHOICE_TOP_Y     = 76<br />
  CHOICE_MARGIN_Y  = 16<br />
  CHOICE_ROW_MAX   = 6<br />
  MAIN_CHOICE_FILE = "box280"<br />
  SUB_CHOICE_FILE  = "box240"<br />
  CHOICE_CURSOR    = "cursor_shield"<br />
  MAIN_TITLE       = "Tutorial Menu"<br />
  MAIN_CHOICES     = ["Combat", "Controls", "Concepts"]<br />
  FACE_FILENAME    = "Actor1"<br />
  FACE_INDEX       = 0<br />
  WINDOW_BACKDROP  = 0 # 0, 1 or 2 only!<br />
  WINDOW_POSITION  = 2 # 0, 1 or 2 only!<br />
  WINDOW_BACK_OP   = 255<br />
  WINDOW_CONFIG = [FACE_FILENAME, FACE_INDEX, WINDOW_BACKDROP, WINDOW_POSITION]<br />
# - Message Window's Contents - #<br />
  INTRO_TEXTS = ["Welcome to the Great Hero's Tutorial!",<br />
                 "I'm your valorous host &#92;c[2]&#92;n[1]&#92;c[0].",<br />
                 "Nice to meet you!&#92;i[12]"]<br />
# - The Don't Touch These Lines Section - #<br />
  MAIN_CHO_COLS  = 1<br />
  SUB_CAT1       = {}<br />
  SUB_CAT2       = {}<br />
  SUB_CAT1_TEXTS = {}<br />
  SUB_CAT2_TEXTS = {}<br />
  SUB_CAT1.default       = []<br />
  SUB_CAT2.default       = []<br />
  SUB_CAT1_TEXTS.default = {}<br />
  SUB_CAT2_TEXTS.default = {}<br />
# - End of Section - #<br />
  SUB_CAT1["Combat"]   = ["Allies", "Enemies", "FF Menu", "Section 4",<br />
                          "Section 5", "Section 6", "Section 7"]<br />
  SUB_CAT1["Controls"] = ["Decision", "Cancel"]<br />
  SUB_CAT1["Concepts"] = ["Concepts 1", "Concepts 2", "Concepts 3"]<br />
  SUB_CAT1_TEXTS["Allies"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; {},<br />
  :text =&gt; [<br />
    "Most of the time your allies will be very useless.",<br />
    "Just keep them alive to avoid making very large",<br />
    "donations to your local priest to heal those",<br />
    "reckless companions after every single battle."<br />
  ] }<br />
  SUB_CAT1_TEXTS["Enemies"] = {<br />
  :se =&gt; { 1 =&gt; "Battle1", 2 =&gt; "Battle2" },<br />
  :pic =&gt; { 1 =&gt; "Mimic", 2 =&gt; "Assassin" },<br />
  :text =&gt; [<br />
    "You're not given a chance to think twice.",<br />
    "All mobs definitely hate you.",<br />
    "They'll sweep the floor with your death body",<br />
    "while laughing maniacally.",<br />
    "Please don't challenge them unless you know",<br />
    "very well what you're doing.&#92;|",<br />
    "You've been warned!",<br />
    ""<br />
  ] }<br />
  SUB_CAT1_TEXTS["FF Menu"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; { 1 =&gt; "FF9_MenuBar old" },<br />
  :text =&gt; [<br />
    "This tutorial uses an old fashioned FF9 menubar.",<br />
    "We don't know when it will be replaced by a",<br />
    "new one. The game developer has refused to",<br />
    "address the issue on social media."<br />
  ] }<br />
  SUB_CAT2["Concepts 1"] = ["Concept 1", "Concept 2", "Concept 3"]<br />
  SUB_CAT2_TEXTS["Concept 1"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; {},<br />
  :text =&gt; [<br />
    "You've chosen the Proof of Concept #1!&#92;|",<br />
    "Hurray..."<br />
  ] }<br />
<br />
class TextBox<br />
  def initialize(pos, total, vp=nil)<br />
    @index = pos<br />
    @max = total<br />
    @row_max = CHOICE_ROW_MAX<br />
    @col_max = (@max / @row_max) + 1<br />
    @viewport = vp<br />
    @backdrop = Sprite.new(vp)<br />
    @label = Sprite.new(vp)<br />
    @label.z = 50<br />
  end<br />
<br />
  def set_image(filename)<br />
    @filename = filename<br />
    set_bitmap<br />
    set_text_bitmap<br />
    reset_alignment<br />
  end<br />
<br />
  def set_bitmap<br />
    bitmap = Cache.picture(@filename)<br />
    @width = bitmap.width<br />
    @height = bitmap.height<br />
    @rect = bitmap.rect<br />
    @col_width = Graphics.width<br />
    @center_x = (@col_width - @width) / 2<br />
    @backdrop.bitmap = bitmap<br />
  end<br />
<br />
  def set_align_x<br />
    case TEXT_ALIGN_X<br />
    when :left<br />
      0<br />
    when :center<br />
      1<br />
    when :right<br />
      2<br />
    else<br />
      TEXT_ALIGN_X<br />
    end<br />
  end<br />
<br />
  def set_text_bitmap<br />
    @align_x = set_align_x<br />
    @label.bitmap = Bitmap.new(@width, @height)<br />
  end<br />
<br />
  def set_title_xy<br />
    @backdrop.x = @center_x<br />
    @backdrop.y = 8<br />
  end<br />
<br />
  def set_align_xy<br />
    h = @height + CHOICE_MARGIN_Y<br />
    if @max &lt; @row_max<br />
      @backdrop.x = @center_x<br />
      @backdrop.y = CHOICE_TOP_Y + @index * h<br />
    else<br />
      n = @index % @col_max<br />
      cw = @col_width / 2<br />
      @backdrop.x = n * cw + (cw - @width) / 2<br />
      @backdrop.y = CHOICE_TOP_Y + @index / @col_max * h<br />
    end<br />
  end<br />
<br />
  def reset_alignment<br />
    @index ? set_align_xy : set_title_xy<br />
    @label.x = @backdrop.x<br />
    @label.y = @backdrop.y<br />
  end<br />
<br />
  def x<br />
    @backdrop.x<br />
  end<br />
<br />
  def y<br />
    @backdrop.y<br />
  end<br />
<br />
  def set_text(text)<br />
    @text = text<br />
    bit = @label.bitmap<br />
    bit.clear<br />
    bit.draw_text(@rect, text, @align_x)<br />
  end<br />
<br />
  def dispose<br />
    @label.bitmap.dispose<br />
    @label.dispose<br />
    @backdrop.bitmap.dispose<br />
    @backdrop.dispose<br />
  end<br />
  attr_reader :height, :text<br />
end<br />
<br />
class MessageWindow &lt; Window_Message<br />
  def initialize<br />
    super<br />
    self.opacity = @background == 0 ? 255 : 0<br />
    self.back_opacity = WINDOW_BACK_OP<br />
  end<br />
<br />
  def reset_window<br />
    @background = &#36;game_message.background<br />
    @position = &#36;game_message.position<br />
    self.opacity = @background == 0 ? 255 : 0<br />
    self.back_opacity = WINDOW_BACK_OP<br />
    case @position<br />
    when 0  # Top<br />
      self.y = 0<br />
      @gold_window.y = 360<br />
    when 1  # Middle<br />
      self.y = 144<br />
      @gold_window.y = 0<br />
    when 2  # Bottom<br />
      self.y = 288<br />
      @gold_window.y = 0<br />
    end<br />
  end<br />
<br />
  def new_page?<br />
    @text and !@text.empty? and @line_count &gt;= MAX_LINE<br />
  end<br />
<br />
  def input_pause<br />
    if Input.trigger?(Input::B) or Input.trigger?(Input::C)<br />
      &#36;game_message.new_page = new_page?<br />
    end<br />
    super<br />
  end<br />
<br />
  def open_message<br />
    start_message<br />
    open<br />
    self.visible = true<br />
  end<br />
<br />
  def clear_contents<br />
    self.pause = false<br />
    self.index = -1<br />
    @gold_window.close<br />
    @number_input_window.active = false<br />
    @number_input_window.visible = false<br />
  end<br />
end<br />
<br />
class Spriteset<br />
  def initialize<br />
    create_variables<br />
    create_backdrop<br />
    create_viewports<br />
    create_title<br />
    create_picture<br />
    create_main_choices<br />
    create_cursors<br />
    update_box(0)<br />
    @sprites = @cursors + [@backdrop, @picture]<br />
  end<br />
<br />
  def create_variables<br />
    @index = 0<br />
    @section_index = 0<br />
    @subsection_index = 0<br />
    @sound = RPG::SE.new<br />
    @cursors = []<br />
    @sections = []<br />
    @subsections = []<br />
    @main_boxes = []<br />
    @section_boxes = []<br />
    @subsection_boxes = []<br />
    @section_viewports = []<br />
    @subsection_viewports = []<br />
  end<br />
<br />
  def create_backdrop<br />
    @backdrop = Sprite.new<br />
    @backdrop.bitmap = Cache.system(BACKDROP)<br />
  end<br />
<br />
  def create_viewports<br />
    @viewport_rect = [0, 0, Graphics.width, Graphics.height]<br />
    @main_viewport = Viewport.new(*@viewport_rect)<br />
    @picture_viewport = Viewport.new(*@viewport_rect)<br />
    @picture_viewport.z = 1000<br />
  end<br />
<br />
  def create_title<br />
    @title = TextBox.new(nil, 0, nil)<br />
    @title.set_image(TITLE_FILENAME)<br />
    @title.set_text(MAIN_TITLE)<br />
  end<br />
<br />
  def create_picture<br />
    @picture = Sprite.new(@picture_viewport)<br />
    @picture.y = 48<br />
    @picture.visible = false<br />
    @picture.bitmap = Bitmap.new(Graphics.width, Graphics.height - 96)<br />
  end<br />
<br />
  def create_main_choices<br />
    filename = MAIN_CHOICE_FILE<br />
    total = MAIN_CHOICES.size<br />
    MAIN_CHOICES.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @main_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @main_boxes &lt;&lt; box<br />
    end<br />
    @item_max = @main_boxes.size<br />
  end<br />
<br />
  def create_cursors<br />
    box = @main_boxes[@index]<br />
    @main_cursor = Sprite.new(@main_viewport)<br />
    @main_cursor.z = 100<br />
    @main_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @main_cursor.x = box.x + 4<br />
    @offset_y = (box.height - @main_cursor.bitmap.height) / 2<br />
    @main_cursor.y = box.y + @offset_y<br />
    @section_cursor = Sprite.new<br />
    @section_cursor.visible = false<br />
    @section_cursor.z = 100<br />
    @section_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @subsection_cursor = Sprite.new<br />
    @subsection_cursor.visible = false<br />
    @subsection_cursor.z = 100<br />
    @subsection_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @cursors &lt;&lt; @main_cursor &lt;&lt; @section_cursor &lt;&lt; @subsection_cursor<br />
  end<br />
<br />
  def update_main<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_box(1)<br />
    end<br />
  end<br />
<br />
  def update_box(n)<br />
    @index = (@index + n) % @item_max<br />
    box = @main_boxes[@index]<br />
    @section_title = box.text<br />
    @main_cursor.x = box.x + 4<br />
    @main_cursor.y = box.y + @offset_y<br />
  end<br />
<br />
  def show_main<br />
    @title.set_text(MAIN_TITLE)<br />
    @main_viewport.visible = true<br />
  end<br />
<br />
  def hide_main<br />
    @main_viewport.visible = false<br />
  end<br />
<br />
  def find_section_viewport<br />
    @section_viewports[@index] ||= Viewport.new(*@viewport_rect)<br />
  end<br />
<br />
  def find_subsections<br />
    @sections[@index] ||= SUB_CAT1[@section_title].dup<br />
  end<br />
<br />
  def find_section_boxes<br />
    @section_boxes[@index] ||= []<br />
  end<br />
<br />
  def setup_section<br />
    @section_viewport = find_section_viewport<br />
    @section_list = find_subsections<br />
    @current_boxes = find_section_boxes<br />
    create_section if @current_boxes.empty?<br />
    reset_section<br />
    update_section_box(0)<br />
    @title.set_text(@section_title)<br />
    @section_viewport.visible = true<br />
  end<br />
<br />
  def create_section<br />
    return if @section_list.empty?<br />
    filename = SUB_CHOICE_FILE<br />
    total = @section_list.size<br />
    @section_list.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @section_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @current_boxes &lt;&lt; box<br />
    end<br />
  end<br />
<br />
  def reset_section<br />
    @section_max = @current_boxes.size<br />
    @col_max = (@section_max / CHOICE_ROW_MAX) + 1<br />
    @section_index = 0<br />
    box = @current_boxes[@section_index]<br />
    @section_oy1 = (box.height - @section_cursor.bitmap.height) / 2<br />
    @section_cursor.visible = box ? true : false<br />
  end<br />
<br />
  def show_section<br />
    @title.set_text(@section_title)<br />
    @section_viewport.visible = true<br />
    @section_cursor.visible = true<br />
  end<br />
<br />
  def hide_section(clear)<br />
    @section_cursor.visible = false<br />
    @section_viewport.visible = false<br />
    return unless clear<br />
    @section_viewport = @current_boxes = nil<br />
    @section_index = 0<br />
  end<br />
<br />
  def update_section<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_section_box(-@col_max)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_section_box(@col_max)<br />
      return<br />
    end<br />
    return if @col_max == 1<br />
    if Input.trigger?(Input::LEFT)<br />
      Sound.play_cursor<br />
      update_section_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::RIGHT)<br />
      Sound.play_cursor<br />
      update_section_box(1)<br />
    end<br />
  end<br />
<br />
  def update_section_box(n)<br />
    @section_index = (@section_index + n) % @section_max<br />
    box = @current_boxes[@section_index]<br />
    @subsection_title1 = box.text<br />
    @section_cursor.x = box.x + 4<br />
    @section_cursor.y = box.y + @section_oy1<br />
  end<br />
<br />
  def set_pictures(pictures)<br />
    @page_index = 1<br />
    @pictures = pictures<br />
    show_picture<br />
  end<br />
<br />
  def show_picture<br />
    picture = @pictures[@page_index]<br />
    return unless picture<br />
    @picture.bitmap.dispose<br />
    @picture.bitmap = bit = Cache.picture(picture)<br />
    @picture.x = (Graphics.width - bit.width) / 2<br />
    @picture.y = (Graphics.height - bit.height - 128) / 2<br />
    @picture.visible = true<br />
  end<br />
<br />
  def set_sfx(sfx)<br />
    @sfx = sfx<br />
    play_sound<br />
  end<br />
<br />
  def play_sound<br />
    @sound.name = @sfx[@page_index] || ""<br />
    @sound.play<br />
  end<br />
<br />
  def find_subsection_viewport<br />
    @subsection_viewports[@section_index] ||= Viewport.new(*@viewport_rect)<br />
  end<br />
<br />
  def find_subsections_lvl2<br />
    @subsections[@section_index] ||= SUB_CAT2[@subsection_title1].dup<br />
  end<br />
<br />
  def find_subsection_boxes<br />
    @subsection_boxes[@section_index] ||= []<br />
  end<br />
<br />
  def setup_subsection<br />
    @subsection_viewport = find_subsection_viewport<br />
    @subsection_list = find_subsections_lvl2<br />
    @current_subboxes = find_subsection_boxes<br />
    create_subsection if @current_subboxes.empty?<br />
    reset_subsection<br />
    update_subsection_box(0)<br />
    box = @current_subboxes[@subsection_index]<br />
    @subsection_title2 = box ? box.text : ""<br />
    @title.set_text(@subsection_title1)<br />
    @subsection_viewport.visible = true<br />
  end<br />
<br />
  def create_subsection<br />
    return if @subsection_list.empty?<br />
    filename = SUB_CHOICE_FILE<br />
    total = @subsection_list.size<br />
    @subsection_list.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @subsection_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @current_subboxes &lt;&lt; box<br />
    end<br />
  end<br />
<br />
  def reset_subsection<br />
    @subsection_max = @current_subboxes.size<br />
    @subcol_max = (@subsection_max / CHOICE_ROW_MAX) + 1<br />
    @subsection_index = 0<br />
    box = @current_subboxes[@subsection_index]<br />
    @section_oy2 = (box.height - @subsection_cursor.bitmap.height) / 2<br />
    @subsection_cursor.visible = box ? true : false<br />
  end<br />
<br />
  def hide_subsection<br />
    @subsection_cursor.visible = false<br />
    @subsection_viewport.visible = false<br />
    @subsection_viewport = @current_subboxes = nil<br />
    @subsection_index = 0<br />
  end<br />
<br />
  def update_subsection<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_subsection_box(-@subcol_max)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_subsection_box(@subcol_max)<br />
      return<br />
    end<br />
    return if @subcol_max == 1<br />
    if Input.trigger?(Input::LEFT)<br />
      Sound.play_cursor<br />
      update_subsection_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::RIGHT)<br />
      Sound.play_cursor<br />
      update_subsection_box(1)<br />
    end<br />
  end<br />
<br />
  def update_subsection_box(n)<br />
    @subsection_index = (@subsection_index + n) % @subsection_max<br />
    box = @current_subboxes[@subsection_index]<br />
    @subsection_title2 = box.text<br />
    @subsection_cursor.x = box.x + 4<br />
    @subsection_cursor.y = box.y + @section_oy2<br />
  end<br />
<br />
  def hide_picture<br />
    @picture.bitmap.dispose<br />
    @picture.bitmap = Bitmap.new(Graphics.width, Graphics.height - 96)<br />
    @picture.visible = false<br />
  end<br />
<br />
  def update_extras<br />
    return unless &#36;game_message.new_page<br />
    &#36;game_message.new_page = nil<br />
    @page_index += 1<br />
    show_picture<br />
    play_sound<br />
  end<br />
<br />
  def dispose<br />
    @sprites.each do |sprite|<br />
      sprite.bitmap.dispose<br />
      sprite.dispose<br />
    end<br />
    @subsection_boxes.each do |boxes|<br />
      next unless boxes<br />
      boxes.each {|box| box.dispose }<br />
    end<br />
    @section_boxes.each do |boxes|<br />
      next unless boxes<br />
      boxes.each {|box| box.dispose }<br />
    end<br />
    @main_boxes.each {|box| box.dispose }<br />
    @title.dispose<br />
    @section_viewports.each {|vp| vp.dispose if vp }<br />
    @picture_viewport.dispose<br />
    @main_viewport.dispose<br />
    @section_boxes.clear<br />
    @main_boxes.clear<br />
    @section_viewports.clear<br />
  end<br />
  attr_reader :subsection_title1, :subsection_title2<br />
end<br />
<br />
class Scene<br />
  def initialize(index=nil)<br />
    @main_menu_index = index<br />
    @map_bgm = RPG::BGM.last<br />
    @bgm = RPG::BGM.new<br />
    return if TUTORIAL_BGM.empty?<br />
    @bgm.name = TUTORIAL_BGM<br />
    @bgm.play<br />
  end<br />
<br />
  def main<br />
    start<br />
    Graphics.transition<br />
    update_basic while @stage<br />
    Graphics.freeze<br />
    terminate<br />
  end<br />
<br />
  def start<br />
    @stage = :message<br />
    @next_stage = :main<br />
    @spriteset = Spriteset.new<br />
    @message_window = MessageWindow.new<br />
    &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
    &#36;game_message.set_tutorial_texts(INTRO_TEXTS)<br />
  end<br />
<br />
  def update_basic<br />
    Graphics.update<br />
    Input.update<br />
    update<br />
  end<br />
<br />
  def close_message<br />
    &#36;game_message.texts.clear<br />
    @message_window.clear_contents<br />
    @message_window.visible = false<br />
    @spriteset.hide_picture<br />
    @stage = @next_stage<br />
  end<br />
<br />
  def update<br />
    case @stage<br />
    when :message<br />
      update_message<br />
    when :main<br />
      update_main<br />
    when :section<br />
      update_section<br />
    when :subsection<br />
      update_subsection<br />
    end<br />
  end<br />
<br />
  def update_message<br />
    @message_window.update<br />
    while &#36;game_message.visible<br />
      Graphics.update<br />
      Input.update<br />
      @message_window.update<br />
      @spriteset.update_extras<br />
    end<br />
    close_message<br />
  end<br />
<br />
  def update_main<br />
    @spriteset.update_main<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      if @main_menu_index<br />
        &#36;scene = Scene_Menu.new(@main_menu_index)<br />
      else<br />
        &#36;scene = Scene_Map.new<br />
      end<br />
      return @stage = nil<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      @spriteset.hide_main<br />
      @spriteset.setup_section<br />
      @stage = :section<br />
    end<br />
  end<br />
<br />
  def update_section<br />
    @spriteset.update_section<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @spriteset.hide_section(true)<br />
      @spriteset.show_main<br />
      return @stage = :main<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      key = @spriteset.subsection_title1<br />
      if SUB_CAT2[key].any?<br />
        show_subsection<br />
      else<br />
        show_section_message(key)<br />
      end<br />
    end<br />
  end<br />
<br />
  def show_subsection<br />
    @spriteset.hide_section(nil)<br />
    @spriteset.setup_subsection<br />
    @stage = :subsection<br />
  end<br />
<br />
  def show_section_message(key)<br />
    data = SUB_CAT1_TEXTS[key].dup<br />
    return if data.empty?<br />
    pictures = data[:pic]<br />
    message = data[:text]<br />
    sfx = data[:se]<br />
    &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
    &#36;game_message.set_tutorial_texts(message)<br />
    @message_window.open_message<br />
    @spriteset.set_pictures(pictures)<br />
    @spriteset.set_sfx(sfx)<br />
    @next_stage = :section<br />
    @stage = :message<br />
  end<br />
<br />
  def update_subsection<br />
    @spriteset.update_subsection<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @spriteset.hide_subsection<br />
      @spriteset.show_section<br />
      return @stage = :section<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      key = @spriteset.subsection_title2<br />
      data = SUB_CAT2_TEXTS[key]<br />
      return if data.empty?<br />
      message = data[:text]<br />
      pictures = data[:pic]<br />
      sfx = data[:se]<br />
      &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
      &#36;game_message.set_tutorial_texts(message)<br />
      @message_window.open_message<br />
      @spriteset.set_pictures(pictures)<br />
      @spriteset.set_sfx(sfx)<br />
      @next_stage = :subsection<br />
      @stage = :message<br />
    end<br />
  end<br />
<br />
  def terminate<br />
    @message_window.dispose<br />
    @spriteset.dispose<br />
    &#36;game_message.custom_scene = nil<br />
    &#36;game_message.clear<br />
    return if TUTORIAL_BGM.empty?<br />
    if &#36;game_map.autoplay_bgm?<br />
      &#36;game_map.autoplay<br />
    elsif @map_bgm<br />
      @map_bgm.play<br />
    end<br />
  end<br />
end<br />
<br />
end<br />
<br />
class Game_Message<br />
  def setup_message(*options)<br />
    options = options.dup<br />
    @face_name = options.shift<br />
    @face_index = options.shift<br />
    @background = options.shift<br />
    @position = options.shift<br />
    @custom_scene = true<br />
  end<br />
<br />
  def set_tutorial_texts(original_texts)<br />
    @texts = original_texts.dup<br />
    @texts.each do |line|<br />
      line.gsub!("&#92;e", "&#92;&#92;c[")<br />
      line.gsub!(/(.)&#92;^/) { "#{&#36;1}&#92;&#92;^" }<br />
      line.gsub!(/([^&#92;&#92;])&#92;|/) { "#{&#36;1}&#92;&#92;|" }<br />
      line.gsub!(/(&#92;-|,|;|:|!)&#92;./) { "#{&#36;1}&#92;&#92;." }<br />
      line.gsub!(/[&#92;b]/i, "&#92;&#92;b")<br />
      line.gsub!(/([^&#92;&#92;])i&#92;[([0-9]+)&#92;]/i) { "#{&#36;1}&#92;&#92;i[#{&#36;2}]" }<br />
      line.gsub!(/&#92;n&#92;[([0-9]+)&#92;]/i) { "&#92;&#92;n[#{&#36;1}]" }<br />
    end<br />
    @visible = true<br />
  end<br />
  attr_accessor :new_page, :custom_scene<br />
end<br />
<br />
class Game_Map<br />
  def autoplay_bgm?<br />
    @map.autoplay_bgm<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer for non-commercial games. <img src="https://www.save-point.org/images/smilies/ejlol/gamer.gif" alt="Gamer" title="Gamer" class="smilie smilie_183" /><br />
Include my nickname in your game credits.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">KInfoMenu VX</span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">by Kyonides</span></span></div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Introduction</span></span><br />
<br />
The script allows you to create some sort of tutorial menu with lots of options using a GUI similar to my other script <span style="font-weight: bold;" class="mycode_b">FancyChoices VX</span>.<br />
As the <img src="https://www.save-point.org/images/smilies/ejlol/gamer.gif" alt="Gamer" title="Gamer" class="smilie smilie_183" /> game developer you can define what texts and pictures you will display on screen. You can also play SE if deemed necessary.<br />
<br />
<div style="text-align: center;" class="mycode_align">Nope, this is <span style="font-weight: bold;" class="mycode_b"><span style="font-style: italic;" class="mycode_i">NOT a Plug &amp; Play</span></span> script at all, guys! <img src="https://www.save-point.org/images/smilies/ejlol/confused.gif" alt="Confused" title="Confused" class="smilie smilie_39" /></div>
<br />
If you want to customize it, you will have to edit several CONSTANTS in the KInfoMenu module first.<br />
<br />
All texts will be shown on top of the option boxes or on a typical message window. This also means that your typical note tags like \n[1] or \c[2] will work normally. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /> <br />
<br />
The pictures will be shown on the center of the screen right when its corresponding text message gets displayed there.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Understanding the Options Feature</span></span><br />
<br />
There are 3 different levels of options, namely the Main Choices plus the first and second subcategories. Those subcategories depend on Hashes to let you customize its contents.<br />
<br />
Option labels are simple to understand, they are just a list of texts:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>SUB_CAT1["Combat"]  = ["Allies", "Enemies", "FF Menu", "Section 4", "Section 5", "Section 6", "Section 7"]</code></div></div><br />
"Combat" is a key that can be found in the Main Choices list:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>MAIN_CHOICES    = ["Combat", "Controls", "Concepts"]</code></div></div><br />
So both subcategories should use keys that already exist on the previous subcategory or the main choices list.<br />
<br />
The text hashes sport 3 keys and their respective values. Those keys are :text, :se and :pic and that's it. <img src="https://www.save-point.org/images/smilies/ejlol/wink.gif" alt="Winking" title="Winking" class="smilie smilie_33" /><br />
<br />
You can leave the :pic and :se hashes empty if you need to, but you can add custom pictures or SFX at any given time. Just follow this example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>SUB_CAT1_TEXTS["Enemies"] = {<br />
  :se =&gt; { 1 =&gt; "Battle1", 2 =&gt; "Battle2" },<br />
  :pic =&gt; { 1 =&gt; "093-Monster07", 2 =&gt; "099-Monster13" },  <br />
  :text =&gt; [<br />
    "You're not given a chance to think twice.",<br />
    "All mobs definitely hate you.",<br />
    "They'll sweep the floor with your death body",<br />
    "while laughing maniacally.",<br />
    "Please don't challenge them unless you know",<br />
    "very well what you're doing.",<br />
    "You've been warned!",<br />
  ] }</code></div></div><br />
So you need to pick a CONSTANT, then call its option key, and make it contain a { Hash }.<br />
The :se and :pic keys use page indexes as their hash keys, but you can skip pages at will.<br />
The :text hash has a very interesting feature that you should know about from the very beginning. If you plan to display less than 4 lines of text on a given <img src="https://www.save-point.org/images/smilies/ejlol/book.gif" alt="Book" title="Book" class="smilie smilie_163" /> page, and you expect another page to show up next after pressing the OK button, you will have to add empty Strings "" and a comma , per empty line. And this is mandatory. <img src="https://www.save-point.org/images/smilies/ejlol/angry.gif" alt="Angry" title="Angry" class="smilie smilie_28" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">A Friendly Reminder</span></span><br />
<br />
If a key like "Section 4" does not exist either in <span style="font-weight: bold;" class="mycode_b">SUB_CAT1_TEXTS</span> or <span style="font-weight: bold;" class="mycode_b">SUB_CAT2_TEXTS</span>, the script will skip the whole enchilada to prevent it from crashing.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">NOTES</span></span><br />
<br />
The comments include an explanation that claims that calling the custom scene is optional. <img src="https://www.save-point.org/images/smilies/ejlol/sweathappy.gif" alt="Happy with a sweat" title="Happy with a sweat" class="smilie smilie_31" /> Well, that is only true if you pretend to customize your main menu to include an option to open the KInfoMenu scene. If you are planning to use any NPC as an interface for this tutorial menu, you will have to make that script call at all costs. <img src="https://www.save-point.org/images/smilies/ejlol/laughing.gif" alt="Laughing" title="Laughing" class="smilie smilie_23" /><br />
<br />
The <span style="font-weight: bold;" class="mycode_b">WINDOW_BACK_OP</span> constant will let you set the message window's back opacity.<br />
<br />
I don't care if there are other ways to achieve the same goal. I just wanted to create this special menu, and that's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Screenshots</span></span><br />
<br />
<div class="tborder">
  			<div class="thead" style="padding:4px; margin:1px;"><input type="button" class="button" value="+" style="font-family:Monospace; padding:0px" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display=='none'){ this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='';this.value='-';} else {this.parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.value='+';}"/> Several Snapshots</div>
  			<div class="trow2" style="display:none; padding:4px; margin:1px;">
<span style="font-weight: bold;" class="mycode_b">NOTE:</span> The \i[n] note tags would get replaced by an icon in no time IF you have included a custom message script in your game project.<br />
<img src="https://i.postimg.cc/J4jDyvt7/kinfomenu-vx001.jpg" loading="lazy"  alt="[Image: kinfomenu-vx001.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/T2z53fdH/kinfomenu-vx002.jpg" loading="lazy"  alt="[Image: kinfomenu-vx002.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/mhW4fdG8/kinfomenu-vx003.jpg" loading="lazy"  alt="[Image: kinfomenu-vx003.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/jqwJTLb7/kinfomenu-vx004.jpg" loading="lazy"  alt="[Image: kinfomenu-vx004.jpg]" class="mycode_img" /><br />
<img src="https://i.postimg.cc/Mpxc15j7/kinfomenu-vx005.jpg" loading="lazy"  alt="[Image: kinfomenu-vx005.jpg]" class="mycode_img" /><br />
</div>
		</div>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">The Script</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># * KInfoMenu VX * #<br />
#   Scripter : Kyonides Arkanthes<br />
#   v1.2.3 - 2025-09-17<br />
#   Not a Plug &amp; Play Script!<br />
<br />
# This scriptlet lets you setup a simple tutorial menu.<br />
<br />
# NOTES on Message Window's Contents:<br />
<br />
# For the message window, empty lines are equally as important as normal ones.<br />
# They are used as fillers, and this matters a lot whenever you're trying to<br />
# display multiple pages on screen. If you ever skip them, you'll soon notice<br />
# that certain lines of text do appear sooner than expected.<br />
<br />
# * Optional Script Call * #<br />
# &#36;scene = KInfoMenu::Scene.new<br />
<br />
module KInfoMenu<br />
  BACKDROP         = "Title"<br />
  TITLE_FILENAME   = "title480"<br />
# BGM Options: "" for no song, "Some Name" for any specific BGM<br />
  TUTORIAL_BGM     = "Ship"<br />
  TEXT_ALIGN_X     = :center<br />
  CHOICE_ALIGN_X   = :center<br />
  CHOICE_TOP_Y     = 76<br />
  CHOICE_MARGIN_Y  = 16<br />
  CHOICE_ROW_MAX   = 6<br />
  MAIN_CHOICE_FILE = "box280"<br />
  SUB_CHOICE_FILE  = "box240"<br />
  CHOICE_CURSOR    = "cursor_shield"<br />
  MAIN_TITLE       = "Tutorial Menu"<br />
  MAIN_CHOICES     = ["Combat", "Controls", "Concepts"]<br />
  FACE_FILENAME    = "Actor1"<br />
  FACE_INDEX       = 0<br />
  WINDOW_BACKDROP  = 0 # 0, 1 or 2 only!<br />
  WINDOW_POSITION  = 2 # 0, 1 or 2 only!<br />
  WINDOW_BACK_OP   = 255<br />
  WINDOW_CONFIG = [FACE_FILENAME, FACE_INDEX, WINDOW_BACKDROP, WINDOW_POSITION]<br />
# - Message Window's Contents - #<br />
  INTRO_TEXTS = ["Welcome to the Great Hero's Tutorial!",<br />
                 "I'm your valorous host &#92;c[2]&#92;n[1]&#92;c[0].",<br />
                 "Nice to meet you!&#92;i[12]"]<br />
# - The Don't Touch These Lines Section - #<br />
  MAIN_CHO_COLS  = 1<br />
  SUB_CAT1       = {}<br />
  SUB_CAT2       = {}<br />
  SUB_CAT1_TEXTS = {}<br />
  SUB_CAT2_TEXTS = {}<br />
  SUB_CAT1.default       = []<br />
  SUB_CAT2.default       = []<br />
  SUB_CAT1_TEXTS.default = {}<br />
  SUB_CAT2_TEXTS.default = {}<br />
# - End of Section - #<br />
  SUB_CAT1["Combat"]   = ["Allies", "Enemies", "FF Menu", "Section 4",<br />
                          "Section 5", "Section 6", "Section 7"]<br />
  SUB_CAT1["Controls"] = ["Decision", "Cancel"]<br />
  SUB_CAT1["Concepts"] = ["Concepts 1", "Concepts 2", "Concepts 3"]<br />
  SUB_CAT1_TEXTS["Allies"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; {},<br />
  :text =&gt; [<br />
    "Most of the time your allies will be very useless.",<br />
    "Just keep them alive to avoid making very large",<br />
    "donations to your local priest to heal those",<br />
    "reckless companions after every single battle."<br />
  ] }<br />
  SUB_CAT1_TEXTS["Enemies"] = {<br />
  :se =&gt; { 1 =&gt; "Battle1", 2 =&gt; "Battle2" },<br />
  :pic =&gt; { 1 =&gt; "Mimic", 2 =&gt; "Assassin" },<br />
  :text =&gt; [<br />
    "You're not given a chance to think twice.",<br />
    "All mobs definitely hate you.",<br />
    "They'll sweep the floor with your death body",<br />
    "while laughing maniacally.",<br />
    "Please don't challenge them unless you know",<br />
    "very well what you're doing.&#92;|",<br />
    "You've been warned!",<br />
    ""<br />
  ] }<br />
  SUB_CAT1_TEXTS["FF Menu"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; { 1 =&gt; "FF9_MenuBar old" },<br />
  :text =&gt; [<br />
    "This tutorial uses an old fashioned FF9 menubar.",<br />
    "We don't know when it will be replaced by a",<br />
    "new one. The game developer has refused to",<br />
    "address the issue on social media."<br />
  ] }<br />
  SUB_CAT2["Concepts 1"] = ["Concept 1", "Concept 2", "Concept 3"]<br />
  SUB_CAT2_TEXTS["Concept 1"] = {<br />
  :se =&gt; {},<br />
  :pic =&gt; {},<br />
  :text =&gt; [<br />
    "You've chosen the Proof of Concept #1!&#92;|",<br />
    "Hurray..."<br />
  ] }<br />
<br />
class TextBox<br />
  def initialize(pos, total, vp=nil)<br />
    @index = pos<br />
    @max = total<br />
    @row_max = CHOICE_ROW_MAX<br />
    @col_max = (@max / @row_max) + 1<br />
    @viewport = vp<br />
    @backdrop = Sprite.new(vp)<br />
    @label = Sprite.new(vp)<br />
    @label.z = 50<br />
  end<br />
<br />
  def set_image(filename)<br />
    @filename = filename<br />
    set_bitmap<br />
    set_text_bitmap<br />
    reset_alignment<br />
  end<br />
<br />
  def set_bitmap<br />
    bitmap = Cache.picture(@filename)<br />
    @width = bitmap.width<br />
    @height = bitmap.height<br />
    @rect = bitmap.rect<br />
    @col_width = Graphics.width<br />
    @center_x = (@col_width - @width) / 2<br />
    @backdrop.bitmap = bitmap<br />
  end<br />
<br />
  def set_align_x<br />
    case TEXT_ALIGN_X<br />
    when :left<br />
      0<br />
    when :center<br />
      1<br />
    when :right<br />
      2<br />
    else<br />
      TEXT_ALIGN_X<br />
    end<br />
  end<br />
<br />
  def set_text_bitmap<br />
    @align_x = set_align_x<br />
    @label.bitmap = Bitmap.new(@width, @height)<br />
  end<br />
<br />
  def set_title_xy<br />
    @backdrop.x = @center_x<br />
    @backdrop.y = 8<br />
  end<br />
<br />
  def set_align_xy<br />
    h = @height + CHOICE_MARGIN_Y<br />
    if @max &lt; @row_max<br />
      @backdrop.x = @center_x<br />
      @backdrop.y = CHOICE_TOP_Y + @index * h<br />
    else<br />
      n = @index % @col_max<br />
      cw = @col_width / 2<br />
      @backdrop.x = n * cw + (cw - @width) / 2<br />
      @backdrop.y = CHOICE_TOP_Y + @index / @col_max * h<br />
    end<br />
  end<br />
<br />
  def reset_alignment<br />
    @index ? set_align_xy : set_title_xy<br />
    @label.x = @backdrop.x<br />
    @label.y = @backdrop.y<br />
  end<br />
<br />
  def x<br />
    @backdrop.x<br />
  end<br />
<br />
  def y<br />
    @backdrop.y<br />
  end<br />
<br />
  def set_text(text)<br />
    @text = text<br />
    bit = @label.bitmap<br />
    bit.clear<br />
    bit.draw_text(@rect, text, @align_x)<br />
  end<br />
<br />
  def dispose<br />
    @label.bitmap.dispose<br />
    @label.dispose<br />
    @backdrop.bitmap.dispose<br />
    @backdrop.dispose<br />
  end<br />
  attr_reader :height, :text<br />
end<br />
<br />
class MessageWindow &lt; Window_Message<br />
  def initialize<br />
    super<br />
    self.opacity = @background == 0 ? 255 : 0<br />
    self.back_opacity = WINDOW_BACK_OP<br />
  end<br />
<br />
  def reset_window<br />
    @background = &#36;game_message.background<br />
    @position = &#36;game_message.position<br />
    self.opacity = @background == 0 ? 255 : 0<br />
    self.back_opacity = WINDOW_BACK_OP<br />
    case @position<br />
    when 0  # Top<br />
      self.y = 0<br />
      @gold_window.y = 360<br />
    when 1  # Middle<br />
      self.y = 144<br />
      @gold_window.y = 0<br />
    when 2  # Bottom<br />
      self.y = 288<br />
      @gold_window.y = 0<br />
    end<br />
  end<br />
<br />
  def new_page?<br />
    @text and !@text.empty? and @line_count &gt;= MAX_LINE<br />
  end<br />
<br />
  def input_pause<br />
    if Input.trigger?(Input::B) or Input.trigger?(Input::C)<br />
      &#36;game_message.new_page = new_page?<br />
    end<br />
    super<br />
  end<br />
<br />
  def open_message<br />
    start_message<br />
    open<br />
    self.visible = true<br />
  end<br />
<br />
  def clear_contents<br />
    self.pause = false<br />
    self.index = -1<br />
    @gold_window.close<br />
    @number_input_window.active = false<br />
    @number_input_window.visible = false<br />
  end<br />
end<br />
<br />
class Spriteset<br />
  def initialize<br />
    create_variables<br />
    create_backdrop<br />
    create_viewports<br />
    create_title<br />
    create_picture<br />
    create_main_choices<br />
    create_cursors<br />
    update_box(0)<br />
    @sprites = @cursors + [@backdrop, @picture]<br />
  end<br />
<br />
  def create_variables<br />
    @index = 0<br />
    @section_index = 0<br />
    @subsection_index = 0<br />
    @sound = RPG::SE.new<br />
    @cursors = []<br />
    @sections = []<br />
    @subsections = []<br />
    @main_boxes = []<br />
    @section_boxes = []<br />
    @subsection_boxes = []<br />
    @section_viewports = []<br />
    @subsection_viewports = []<br />
  end<br />
<br />
  def create_backdrop<br />
    @backdrop = Sprite.new<br />
    @backdrop.bitmap = Cache.system(BACKDROP)<br />
  end<br />
<br />
  def create_viewports<br />
    @viewport_rect = [0, 0, Graphics.width, Graphics.height]<br />
    @main_viewport = Viewport.new(*@viewport_rect)<br />
    @picture_viewport = Viewport.new(*@viewport_rect)<br />
    @picture_viewport.z = 1000<br />
  end<br />
<br />
  def create_title<br />
    @title = TextBox.new(nil, 0, nil)<br />
    @title.set_image(TITLE_FILENAME)<br />
    @title.set_text(MAIN_TITLE)<br />
  end<br />
<br />
  def create_picture<br />
    @picture = Sprite.new(@picture_viewport)<br />
    @picture.y = 48<br />
    @picture.visible = false<br />
    @picture.bitmap = Bitmap.new(Graphics.width, Graphics.height - 96)<br />
  end<br />
<br />
  def create_main_choices<br />
    filename = MAIN_CHOICE_FILE<br />
    total = MAIN_CHOICES.size<br />
    MAIN_CHOICES.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @main_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @main_boxes &lt;&lt; box<br />
    end<br />
    @item_max = @main_boxes.size<br />
  end<br />
<br />
  def create_cursors<br />
    box = @main_boxes[@index]<br />
    @main_cursor = Sprite.new(@main_viewport)<br />
    @main_cursor.z = 100<br />
    @main_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @main_cursor.x = box.x + 4<br />
    @offset_y = (box.height - @main_cursor.bitmap.height) / 2<br />
    @main_cursor.y = box.y + @offset_y<br />
    @section_cursor = Sprite.new<br />
    @section_cursor.visible = false<br />
    @section_cursor.z = 100<br />
    @section_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @subsection_cursor = Sprite.new<br />
    @subsection_cursor.visible = false<br />
    @subsection_cursor.z = 100<br />
    @subsection_cursor.bitmap = Cache.system(CHOICE_CURSOR)<br />
    @cursors &lt;&lt; @main_cursor &lt;&lt; @section_cursor &lt;&lt; @subsection_cursor<br />
  end<br />
<br />
  def update_main<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_box(1)<br />
    end<br />
  end<br />
<br />
  def update_box(n)<br />
    @index = (@index + n) % @item_max<br />
    box = @main_boxes[@index]<br />
    @section_title = box.text<br />
    @main_cursor.x = box.x + 4<br />
    @main_cursor.y = box.y + @offset_y<br />
  end<br />
<br />
  def show_main<br />
    @title.set_text(MAIN_TITLE)<br />
    @main_viewport.visible = true<br />
  end<br />
<br />
  def hide_main<br />
    @main_viewport.visible = false<br />
  end<br />
<br />
  def find_section_viewport<br />
    @section_viewports[@index] ||= Viewport.new(*@viewport_rect)<br />
  end<br />
<br />
  def find_subsections<br />
    @sections[@index] ||= SUB_CAT1[@section_title].dup<br />
  end<br />
<br />
  def find_section_boxes<br />
    @section_boxes[@index] ||= []<br />
  end<br />
<br />
  def setup_section<br />
    @section_viewport = find_section_viewport<br />
    @section_list = find_subsections<br />
    @current_boxes = find_section_boxes<br />
    create_section if @current_boxes.empty?<br />
    reset_section<br />
    update_section_box(0)<br />
    @title.set_text(@section_title)<br />
    @section_viewport.visible = true<br />
  end<br />
<br />
  def create_section<br />
    return if @section_list.empty?<br />
    filename = SUB_CHOICE_FILE<br />
    total = @section_list.size<br />
    @section_list.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @section_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @current_boxes &lt;&lt; box<br />
    end<br />
  end<br />
<br />
  def reset_section<br />
    @section_max = @current_boxes.size<br />
    @col_max = (@section_max / CHOICE_ROW_MAX) + 1<br />
    @section_index = 0<br />
    box = @current_boxes[@section_index]<br />
    @section_oy1 = (box.height - @section_cursor.bitmap.height) / 2<br />
    @section_cursor.visible = box ? true : false<br />
  end<br />
<br />
  def show_section<br />
    @title.set_text(@section_title)<br />
    @section_viewport.visible = true<br />
    @section_cursor.visible = true<br />
  end<br />
<br />
  def hide_section(clear)<br />
    @section_cursor.visible = false<br />
    @section_viewport.visible = false<br />
    return unless clear<br />
    @section_viewport = @current_boxes = nil<br />
    @section_index = 0<br />
  end<br />
<br />
  def update_section<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_section_box(-@col_max)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_section_box(@col_max)<br />
      return<br />
    end<br />
    return if @col_max == 1<br />
    if Input.trigger?(Input::LEFT)<br />
      Sound.play_cursor<br />
      update_section_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::RIGHT)<br />
      Sound.play_cursor<br />
      update_section_box(1)<br />
    end<br />
  end<br />
<br />
  def update_section_box(n)<br />
    @section_index = (@section_index + n) % @section_max<br />
    box = @current_boxes[@section_index]<br />
    @subsection_title1 = box.text<br />
    @section_cursor.x = box.x + 4<br />
    @section_cursor.y = box.y + @section_oy1<br />
  end<br />
<br />
  def set_pictures(pictures)<br />
    @page_index = 1<br />
    @pictures = pictures<br />
    show_picture<br />
  end<br />
<br />
  def show_picture<br />
    picture = @pictures[@page_index]<br />
    return unless picture<br />
    @picture.bitmap.dispose<br />
    @picture.bitmap = bit = Cache.picture(picture)<br />
    @picture.x = (Graphics.width - bit.width) / 2<br />
    @picture.y = (Graphics.height - bit.height - 128) / 2<br />
    @picture.visible = true<br />
  end<br />
<br />
  def set_sfx(sfx)<br />
    @sfx = sfx<br />
    play_sound<br />
  end<br />
<br />
  def play_sound<br />
    @sound.name = @sfx[@page_index] || ""<br />
    @sound.play<br />
  end<br />
<br />
  def find_subsection_viewport<br />
    @subsection_viewports[@section_index] ||= Viewport.new(*@viewport_rect)<br />
  end<br />
<br />
  def find_subsections_lvl2<br />
    @subsections[@section_index] ||= SUB_CAT2[@subsection_title1].dup<br />
  end<br />
<br />
  def find_subsection_boxes<br />
    @subsection_boxes[@section_index] ||= []<br />
  end<br />
<br />
  def setup_subsection<br />
    @subsection_viewport = find_subsection_viewport<br />
    @subsection_list = find_subsections_lvl2<br />
    @current_subboxes = find_subsection_boxes<br />
    create_subsection if @current_subboxes.empty?<br />
    reset_subsection<br />
    update_subsection_box(0)<br />
    box = @current_subboxes[@subsection_index]<br />
    @subsection_title2 = box ? box.text : ""<br />
    @title.set_text(@subsection_title1)<br />
    @subsection_viewport.visible = true<br />
  end<br />
<br />
  def create_subsection<br />
    return if @subsection_list.empty?<br />
    filename = SUB_CHOICE_FILE<br />
    total = @subsection_list.size<br />
    @subsection_list.each_with_index do |choice, n|<br />
      box = TextBox.new(n, total, @subsection_viewport)<br />
      box.set_image(filename)<br />
      box.set_text(choice)<br />
      @current_subboxes &lt;&lt; box<br />
    end<br />
  end<br />
<br />
  def reset_subsection<br />
    @subsection_max = @current_subboxes.size<br />
    @subcol_max = (@subsection_max / CHOICE_ROW_MAX) + 1<br />
    @subsection_index = 0<br />
    box = @current_subboxes[@subsection_index]<br />
    @section_oy2 = (box.height - @subsection_cursor.bitmap.height) / 2<br />
    @subsection_cursor.visible = box ? true : false<br />
  end<br />
<br />
  def hide_subsection<br />
    @subsection_cursor.visible = false<br />
    @subsection_viewport.visible = false<br />
    @subsection_viewport = @current_subboxes = nil<br />
    @subsection_index = 0<br />
  end<br />
<br />
  def update_subsection<br />
    if Input.trigger?(Input::UP)<br />
      Sound.play_cursor<br />
      update_subsection_box(-@subcol_max)<br />
      return<br />
    elsif Input.trigger?(Input::DOWN)<br />
      Sound.play_cursor<br />
      update_subsection_box(@subcol_max)<br />
      return<br />
    end<br />
    return if @subcol_max == 1<br />
    if Input.trigger?(Input::LEFT)<br />
      Sound.play_cursor<br />
      update_subsection_box(-1)<br />
      return<br />
    elsif Input.trigger?(Input::RIGHT)<br />
      Sound.play_cursor<br />
      update_subsection_box(1)<br />
    end<br />
  end<br />
<br />
  def update_subsection_box(n)<br />
    @subsection_index = (@subsection_index + n) % @subsection_max<br />
    box = @current_subboxes[@subsection_index]<br />
    @subsection_title2 = box.text<br />
    @subsection_cursor.x = box.x + 4<br />
    @subsection_cursor.y = box.y + @section_oy2<br />
  end<br />
<br />
  def hide_picture<br />
    @picture.bitmap.dispose<br />
    @picture.bitmap = Bitmap.new(Graphics.width, Graphics.height - 96)<br />
    @picture.visible = false<br />
  end<br />
<br />
  def update_extras<br />
    return unless &#36;game_message.new_page<br />
    &#36;game_message.new_page = nil<br />
    @page_index += 1<br />
    show_picture<br />
    play_sound<br />
  end<br />
<br />
  def dispose<br />
    @sprites.each do |sprite|<br />
      sprite.bitmap.dispose<br />
      sprite.dispose<br />
    end<br />
    @subsection_boxes.each do |boxes|<br />
      next unless boxes<br />
      boxes.each {|box| box.dispose }<br />
    end<br />
    @section_boxes.each do |boxes|<br />
      next unless boxes<br />
      boxes.each {|box| box.dispose }<br />
    end<br />
    @main_boxes.each {|box| box.dispose }<br />
    @title.dispose<br />
    @section_viewports.each {|vp| vp.dispose if vp }<br />
    @picture_viewport.dispose<br />
    @main_viewport.dispose<br />
    @section_boxes.clear<br />
    @main_boxes.clear<br />
    @section_viewports.clear<br />
  end<br />
  attr_reader :subsection_title1, :subsection_title2<br />
end<br />
<br />
class Scene<br />
  def initialize(index=nil)<br />
    @main_menu_index = index<br />
    @map_bgm = RPG::BGM.last<br />
    @bgm = RPG::BGM.new<br />
    return if TUTORIAL_BGM.empty?<br />
    @bgm.name = TUTORIAL_BGM<br />
    @bgm.play<br />
  end<br />
<br />
  def main<br />
    start<br />
    Graphics.transition<br />
    update_basic while @stage<br />
    Graphics.freeze<br />
    terminate<br />
  end<br />
<br />
  def start<br />
    @stage = :message<br />
    @next_stage = :main<br />
    @spriteset = Spriteset.new<br />
    @message_window = MessageWindow.new<br />
    &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
    &#36;game_message.set_tutorial_texts(INTRO_TEXTS)<br />
  end<br />
<br />
  def update_basic<br />
    Graphics.update<br />
    Input.update<br />
    update<br />
  end<br />
<br />
  def close_message<br />
    &#36;game_message.texts.clear<br />
    @message_window.clear_contents<br />
    @message_window.visible = false<br />
    @spriteset.hide_picture<br />
    @stage = @next_stage<br />
  end<br />
<br />
  def update<br />
    case @stage<br />
    when :message<br />
      update_message<br />
    when :main<br />
      update_main<br />
    when :section<br />
      update_section<br />
    when :subsection<br />
      update_subsection<br />
    end<br />
  end<br />
<br />
  def update_message<br />
    @message_window.update<br />
    while &#36;game_message.visible<br />
      Graphics.update<br />
      Input.update<br />
      @message_window.update<br />
      @spriteset.update_extras<br />
    end<br />
    close_message<br />
  end<br />
<br />
  def update_main<br />
    @spriteset.update_main<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      if @main_menu_index<br />
        &#36;scene = Scene_Menu.new(@main_menu_index)<br />
      else<br />
        &#36;scene = Scene_Map.new<br />
      end<br />
      return @stage = nil<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      @spriteset.hide_main<br />
      @spriteset.setup_section<br />
      @stage = :section<br />
    end<br />
  end<br />
<br />
  def update_section<br />
    @spriteset.update_section<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @spriteset.hide_section(true)<br />
      @spriteset.show_main<br />
      return @stage = :main<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      key = @spriteset.subsection_title1<br />
      if SUB_CAT2[key].any?<br />
        show_subsection<br />
      else<br />
        show_section_message(key)<br />
      end<br />
    end<br />
  end<br />
<br />
  def show_subsection<br />
    @spriteset.hide_section(nil)<br />
    @spriteset.setup_subsection<br />
    @stage = :subsection<br />
  end<br />
<br />
  def show_section_message(key)<br />
    data = SUB_CAT1_TEXTS[key].dup<br />
    return if data.empty?<br />
    pictures = data[:pic]<br />
    message = data[:text]<br />
    sfx = data[:se]<br />
    &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
    &#36;game_message.set_tutorial_texts(message)<br />
    @message_window.open_message<br />
    @spriteset.set_pictures(pictures)<br />
    @spriteset.set_sfx(sfx)<br />
    @next_stage = :section<br />
    @stage = :message<br />
  end<br />
<br />
  def update_subsection<br />
    @spriteset.update_subsection<br />
    if Input.trigger?(Input::B)<br />
      Sound.play_cancel<br />
      @spriteset.hide_subsection<br />
      @spriteset.show_section<br />
      return @stage = :section<br />
    elsif Input.trigger?(Input::C)<br />
      Sound.play_decision<br />
      key = @spriteset.subsection_title2<br />
      data = SUB_CAT2_TEXTS[key]<br />
      return if data.empty?<br />
      message = data[:text]<br />
      pictures = data[:pic]<br />
      sfx = data[:se]<br />
      &#36;game_message.setup_message(*WINDOW_CONFIG)<br />
      &#36;game_message.set_tutorial_texts(message)<br />
      @message_window.open_message<br />
      @spriteset.set_pictures(pictures)<br />
      @spriteset.set_sfx(sfx)<br />
      @next_stage = :subsection<br />
      @stage = :message<br />
    end<br />
  end<br />
<br />
  def terminate<br />
    @message_window.dispose<br />
    @spriteset.dispose<br />
    &#36;game_message.custom_scene = nil<br />
    &#36;game_message.clear<br />
    return if TUTORIAL_BGM.empty?<br />
    if &#36;game_map.autoplay_bgm?<br />
      &#36;game_map.autoplay<br />
    elsif @map_bgm<br />
      @map_bgm.play<br />
    end<br />
  end<br />
end<br />
<br />
end<br />
<br />
class Game_Message<br />
  def setup_message(*options)<br />
    options = options.dup<br />
    @face_name = options.shift<br />
    @face_index = options.shift<br />
    @background = options.shift<br />
    @position = options.shift<br />
    @custom_scene = true<br />
  end<br />
<br />
  def set_tutorial_texts(original_texts)<br />
    @texts = original_texts.dup<br />
    @texts.each do |line|<br />
      line.gsub!("&#92;e", "&#92;&#92;c[")<br />
      line.gsub!(/(.)&#92;^/) { "#{&#36;1}&#92;&#92;^" }<br />
      line.gsub!(/([^&#92;&#92;])&#92;|/) { "#{&#36;1}&#92;&#92;|" }<br />
      line.gsub!(/(&#92;-|,|;|:|!)&#92;./) { "#{&#36;1}&#92;&#92;." }<br />
      line.gsub!(/[&#92;b]/i, "&#92;&#92;b")<br />
      line.gsub!(/([^&#92;&#92;])i&#92;[([0-9]+)&#92;]/i) { "#{&#36;1}&#92;&#92;i[#{&#36;2}]" }<br />
      line.gsub!(/&#92;n&#92;[([0-9]+)&#92;]/i) { "&#92;&#92;n[#{&#36;1}]" }<br />
    end<br />
    @visible = true<br />
  end<br />
  attr_accessor :new_page, :custom_scene<br />
end<br />
<br />
class Game_Map<br />
  def autoplay_bgm?<br />
    @map.autoplay_bgm<br />
  end<br />
end</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Terms &amp; Conditions</span><br />
<br />
Free as in <img src="https://www.save-point.org/images/smilies/ejlol/beer.gif" alt="Beer" title="Beer" class="smilie smilie_189" /> beer for non-commercial games. <img src="https://www.save-point.org/images/smilies/ejlol/gamer.gif" alt="Gamer" title="Gamer" class="smilie smilie_183" /><br />
Include my nickname in your game credits.<br />
That's it! <img src="https://www.save-point.org/images/smilies/ejlol/tongue.gif" alt="Tongue sticking out" title="Tongue sticking out" class="smilie smilie_24" />]]></content:encoded>
		</item>
	</channel>
</rss>