<?xml version="1.0"?>
<rss version="2.0"><channel><title>Tutorials Latest Topics</title><link>https://www.rpgmakercentral.com/forum/247-tutorials/</link><description>Tutorials Latest Topics</description><language>en</language><item><title>Basic knowledge to the default RMMZ TPBS battle flow implementations</title><link>https://www.rpgmakercentral.com/topic/43080-basic-knowledge-to-the-default-rmmz-tpbs-battle-flow-implementations/</link><description><![CDATA[
<p>
	This topic aims to share the basic knowledge on what the default RMMZ TPBS battle flow implementations do in general, but you're still assumed to have at least:
</p>

<p>
	1. Some plugin development proficiency(having written several easy, simple and small battle-related plugins up to 1k <a href="https://en.wikipedia.org/wiki/Source_lines_of_code" rel="external nofollow">LoC</a> scale)
</p>

<p>
	2. <a href="https://www.rpgmakercentral.com/topic/43077-basic-knowledge-to-the-default-rmmz-turn-based-battle-flow-implementations/" rel="">Basic knowledge on what the default RMMZ turn based battle flow implementations do in general</a>
</p>

<p>
	3. Basic knowledge on what the default RMMZ TPBS battle flow does in general on the user level(At least you need to know what's going on on the surface when playing it as a player)
</p>

<p>
	<br />
	<strong>Simplified Flowchart</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="default-rmmz-tpbs-battle-flow-png.217970" class="ipsImage" height="750" src="https://forums.rpgmakerweb.com/index.php?attachments/default-rmmz-tpbs-battle-flow-png.217970/" width="639" />
		</p>
	</div>
</div>

<p>
	Please note that this flowchart only includes the most important elements of the battle flow, to avoid making it too complicated and convoluted for the intended targeting audience <img alt=";)" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_wink.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/wink@2x.png 2x" title=";)" width="20" />
</p>

<p>
	 
</p>

<p>
	<strong>Battle Start</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			It's almost exactly the same as that in the turn based counterpart, so <strong>the phase will change to "start" after finished starting the battle</strong>.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Input Action Slots</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			It's actually quite similar to that in the turn based counterpart, except that:
		</p>

		<p>
			 
		</p>

		<p>
			1. As nothing other than inputting action slots can happen during the "input" phase in the turn based counterpart, the exact input sequence is always fixed there, whereas <strong>in the TPBS some party members can become inputable or uninputable at anytime, especially when it comes to active TPBS</strong>.
		</p>

		<p>
			 
		</p>

		<p>
			2. At any given frame in TPBS, players are still supposed to start from inputting the 1st action slot of the 1st inputable party member to inputting the last action slot of the last party member.
		</p>

		<p>
			 
		</p>

		<p>
			3. If players are inputting the action slots of a party member, and then they cancel inputting all those action slots of of that party member, among all the other inputable party members, <strong>those whose party member indices are greater rather than less than the previously inputting one will be selected first, and the party command window will be setup in case no other inputable party member exists</strong>.
		</p>

		<p>
			This is because BattleManager.selectPreviousCommand will call BattleManager.selectPreviousActor, which will still call BattleManager.changeCurrentActor with argument forward as true, which is the same as what BattleManager.selectNextActor, which is called by BattleManager.selectNextCommand, does:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">selectPreviousCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">.</span><span class="pln">selectPreviousCommand</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">cancelActorInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectPreviousActor</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			4. Also, unlike the turn based counterpart, if another inputable party member is selected for inputting actions due to cancelling inputs of another inputable party member, <strong>the newly selected one will still input his/her/its 1st action slot first</strong>, then proceed the same sequence until the last action slot is inputted.
		</p>

		<p>
			 
		</p>

		<p>
			5. As a corollary, once an inputable party member has inputted all his/her/its action slots, <strong>there's no way to cancel those input</strong> because he/she/it'll proceed to casting and then executing those actions, and this is unlike the turn based counterpart, where players can cancel party members who've inputted all their action slots, as long as the phase is still "input".
		</p>

		<p>
			 
		</p>

		<p>
			6. In the turn based counterpart, the only way to activate or deactivate any input window is by the ok and cancel commands issued by players, whereas <strong>in TPBS this can also be affected by whether the currently inputting party member becomes not inputable</strong>, due to Scene_Battle.prototype.changeInputWindow, which will only be called if some input windows need to be activated/deactivated:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">changeInputWindow </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">hideSubInputWindows</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">isInputting</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">actor</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startActorCommandSelection</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startPartyCommandSelection</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endCommandSelection</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			In short, other than hiding the skill, item, actor and enemy windows:
		</p>

		<p>
			- If there are inputable party members and 1 of them becomes selected to input action slots, the actor command window will be setup with the status window selecting that actor
		</p>

		<p>
			- If there are inputable party members and all of them become not selected to input action slots, the party command window will be setup with the status window deselected
		</p>

		<p>
			- If there are no more inputable party members, all the input windows will be closed and the status window will be deselected
		</p>

		<p>
			 
		</p>

		<p>
			Bear in mind that how the above points work in details are too advanced to be covered here.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Thinking In Frames</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			Unlike the default turn based battle system, <strong>thinking in frames are vital even in just trying to have a basic knowledge on what the default RMMZ TPBS battle flow implementations do in general</strong>, especially when it comes to active TPBS, so the flowchart is drawn quite differently from the turn based counterpart.
		</p>

		<p>
			To be able to think in frames, <strong>one first need to know the starting point of a frame and all the possible ending points of that frame</strong>, then one can sequentially grasp the summary of each path, until a vague impression of a frame can be formed.
		</p>

		<p>
			To make the task even easier, simpler and smaller,<strong> one can first try to briefly read the codes without thinking about active TPBS</strong>, which is more complicated and convoluted, especially when it comes to edge cases that are hard but still possible to reach.
		</p>

		<p>
			When one becomes familiar with thinking in frames, he/she should be able to at least partially simulate what a frame does in general in his/her mind, and eventually roughly visualize the TPBS battle flow implementations mentally.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Frame Start</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>A frame starts from Scene_Battle.prototype.update</strong>, which is a vital part of the scene life cycle(too advanced to be covered here):
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">update </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> active </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isActive</span><span class="pun">();</span><span class="pln">
    $gameTimer</span><span class="pun">.</span><span class="pln">update</span><span class="pun">(</span><span class="pln">active</span><span class="pun">);</span><span class="pln">
    $gameScreen</span><span class="pun">.</span><span class="pln">update</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateVisibility</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">active </span><span class="pun">&amp;&amp;</span><span class="pln"> </span><span class="pun">!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isBusy</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateBattleProcess</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span>Scene_Message</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">update</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			Then Scene_Battle.prototype.updateBattleProcess will be called to use the result of Scene_Battle.prototype.isTimeActive as the argument of BattleManager.update, which is being called immediately afterwards:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">updateBattleProcess </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>BattleManager</span><span class="pun">.</span><span class="pln">update</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTimeActive</span><span class="pun">());</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">isTimeActive </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">isActiveTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="pun">!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_skillWindow</span><span class="pun">.</span><span class="pln">active </span><span class="pun">&amp;&amp;</span><span class="pln"> </span><span class="pun">!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_itemWindow</span><span class="pun">.</span><span class="pln">active</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="pun">!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isAnyInputWindowActive</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">update </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isBusy</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&amp;&amp;</span><span class="pln"> </span><span class="pun">!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateEvent</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updatePhase</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpbInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Because of Scene_Battle.prototype.isTimeActive, <strong>the active TPBS will keep the TPB running unless the skill or item window's active, while the non-active TPBS will only keep the TPB running when there are no active input windows(party or actor command, or skill, item, actor or enemy window), meaning that there are no inputable party members</strong>.
		</p>

		<p>
			(On a side note: Strictly speaking, the way the TPBS battle flow's implemented won't let plugin developers change the active TPBS to keep the TPB running even when battlers are executing actions, unless those plugin developers rewrite the whole TPBS from scratch, but these details are way, way too advanced and complex to be elaborated here)
		</p>

		<p>
			 
		</p>

		<p>
			BattleManager.isBusy and BattleManager.updateEvent will be called to only call BattleManager.updatePhase when the TPB can technically keep running(the details of these underlying technical limitations are way, way too advanced and complex to be elaborated here):
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">isBusy </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">return</span><span class="pln"> </span><span class="pun">(</span><span class="pln">
        $gameMessage</span><span class="pun">.</span><span class="pln">isBusy</span><span class="pun">()</span><span class="pln"> </span><span class="pun">||</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_spriteset</span><span class="pun">.</span><span class="pln">isBusy</span><span class="pun">()</span><span class="pln"> </span><span class="pun">||</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">isBusy</span><span class="pun">()</span><span class="pln">
    </span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateEvent </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">switch</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"start"</span><span class="pun">:</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"turn"</span><span class="pun">:</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"turnEnd"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isActionForced</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">processForcedAction</span><span class="pun">();</span><span class="pln">
                </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
            </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateEventMain</span><span class="pun">();</span><span class="pln">
            </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">checkAbort</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updatePhase </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">switch</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"start"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateStart</span><span class="pun">();</span><span class="pln">
            </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"turn"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTurn</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">);</span><span class="pln">
            </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"action"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateAction</span><span class="pun">();</span><span class="pln">
            </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"turnEnd"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTurnEnd</span><span class="pun">();</span><span class="pln">
            </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">case</span><span class="pln"> </span><span class="str">"battleEnd"</span><span class="pun">:</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateBattleEnd</span><span class="pun">();</span><span class="pln">
            </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			While Game_Message.prototype.isBusy and Spriteset_Battle.prototype.isBusy are self-explanatory enough, Window_BattleLog.prototype.isBusy is a lot more complicated and convoluted(too advanced to be covered here), but <strong>it's still about whether the TPB needs to stop to let the visual coordination running, like the battle log, animations, battler sprites, etc</strong>.
		</p>

		<p>
			The main function of interest inside BattleManager.updateEvent is BattleManager.updateEventMain(too advanced to be covered here), and what makes it interesting here is that <strong>it'll check whether the battle needs to end by checking whether it's aborted, victorious or defeated, and will change the phase to "battleEnd" if any of those conditions are met</strong>.
		</p>

		<p>
			As for BattleManager.updatePhase, it's mainly about picking the function to call according to the current phase of the battle, while the argument timeActive is the result of Scene_Battle.prototype.isTimeActive.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Start Phase</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			There's not much in this phase, as all BattleManager.updateStart does in TPBS is to <strong>change to phase to "turn"</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateStart </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"turn"</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Turn Phase</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>The "turn" phase is the majority of the difference between the TPBS battle flow and the turn based counterpart.</strong>
		</p>

		<p>
			First, BattleManager.updateTurn will be called to use the argument timeActive as the result of Scene_Battle.prototype.isTimeActive to determine if BattleManager.updateTpb should be called as well:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">requestMotionRefresh</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&amp;&amp;</span><span class="pln"> timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpb</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">getNextSubject</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">processTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTpb </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">updateTpb</span><span class="pun">();</span><span class="pln">
    $gameTroop</span><span class="pun">.</span><span class="pln">updateTpb</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateAllTpbBattlers</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">checkTpbTurnEnd</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Assuming that timeActive is true -
		</p>

		<p>
			 
		</p>

		<p>
			Now, Game_Unit.prototype.updateTpb will be called to call Game_Battler.prototype.updateTpb for all battlers:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Battler</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">updateTpb </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">canMove</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpbChargeTime</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpbCastTime</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpbAutoBattle</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isAlive</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpbIdleTime</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			So, if a battler can move, he/she/it'll update the TPB and action casting bars, as well as start casting all the autobattle actions that are just made in case he/she/it's in Auto Battle.
		</p>

		<p>
			If he/she/it's alive, he/she/it'll update the idle TPB bar as well.
		</p>

		<p>
			<strong>If his/her/its TPB becomes fully charged, he/she/it'll become available for inputting action slots.</strong>
		</p>

		<p>
			<strong>If his/her/its action casting bar becomes full, he/she/it'll become available for executing valid actions.</strong>
		</p>

		<p>
			 
		</p>

		<p>
			BattleManager.updateAllTpbBattlers will call BattleManager.updateTpbBattler for all battle members:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTpbBattler </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">battler</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">battler</span><span class="pun">.</span><span class="pln">isTpbTurnEnd</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battler</span><span class="pun">.</span><span class="pln">onTurnEnd</span><span class="pun">();</span><span class="pln">
        battler</span><span class="pun">.</span><span class="pln">startTpbTurn</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">displayBattlerStatus</span><span class="pun">(</span><span class="pln">battler</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">battler</span><span class="pun">.</span><span class="pln">isTpbReady</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battler</span><span class="pun">.</span><span class="pln">startTpbAction</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionBattlers</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span class="pln">battler</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">battler</span><span class="pun">.</span><span class="pln">isTpbTimeout</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battler</span><span class="pun">.</span><span class="pln">onTpbTimeout</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">displayBattlerStatus</span><span class="pun">(</span><span class="pln">battler</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			First, if the turn of the battler involved becomes ended, the old turn will be ended and the new one will be started here, with the latest battler status displayed on the battle log window.
		</p>

		<p>
			<strong>Second, if the battler involved becomes available for executing actions, that battler will be pushed into the back of the action execution subject queue, so later BattleManager.updateTurn can call BattleManager.getNextSubject to pickup that battler to be the action execution subject.</strong>
		</p>

		<p>
			Third, if the battler involved has become idled for so long that a turn has passed, that battler will be in the new battler turn, with the latest battler status displayed on the battle log window.
		</p>

		<p>
			 
		</p>

		<p>
			BattleManager.checkTpbTurnEnd will be covered in "Turn End Phase".
		</p>

		<p>
			 
		</p>

		<p>
			Regardless of whether BattleManager.updateTpb is called, <strong>the rest of BattleManager.updateTurn is exactly the same as the turn based counterpart</strong>.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Action Phase</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>It's almost the same as the turn based counterpart, as least when only the battle flow is concerned.</strong>
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Turn End Phase</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			It's quite similar to the "turn" phase in TPBS, except that, after calling BattleManager.checkTpbTurnEnd, if Game_Troop.prototype.isTpbTurnEnd returns true, BattleManager.endTurn will be called to <strong>change the phase to "turnEnd"</strong> as well:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">checkTpbTurnEnd </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">$gameTroop</span><span class="pun">.</span><span class="pln">isTpbTurnEnd</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Troop</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">isTpbTurnEnd </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> members </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">members</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> turnMax </span><span class="pun">=</span><span class="pln"> </span><span>Math</span><span class="pun">.</span><span class="pln">max</span><span class="pun">(...</span><span class="pln">members</span><span class="pun">.</span><span class="pln">map</span><span class="pun">(</span><span class="pln">member </span><span class="pun">=&gt;</span><span class="pln"> member</span><span class="pun">.</span><span class="pln">turnCount</span><span class="pun">()));</span><span class="pln">
    </span><span class="kwd">return</span><span class="pln"> turnMax </span><span class="pun">&gt;</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_turnCount</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">endTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"turnEnd"</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_preemptive </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Note that this doesn't always mean that the phase at the next frame will be "turnEnd", because as shown in the flowchart, <strong>it's still possible that BattleManager.startAction will be called to change the phase to "action" before proceeding to the next frame</strong>(the proof of this possibility is too advanced to be covered here), meaning that <strong>the battle turn count can trigger later than expected, and thus potentially surprising effects on the subsequent action executions before all the queued action execution subjects have executed all their valid actions</strong>.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Battle End Phase</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>It's exactly the same as the turn based counterpart as well, since BattleManager.updateBattleEnd is the absolute last stop of both of the battle flows:</strong>
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateBattleEnd </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isBattleTest</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span>AudioManager</span><span class="pun">.</span><span class="pln">stopBgm</span><span class="pun">();</span><span class="pln">
        </span><span>SceneManager</span><span class="pun">.</span><span class="pln">exit</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_escaped </span><span class="pun">&amp;&amp;</span><span class="pln"> $gameParty</span><span class="pun">.</span><span class="pln">isAllDead</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_canLose</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            $gameParty</span><span class="pun">.</span><span class="pln">reviveBattleMembers</span><span class="pun">();</span><span class="pln">
            </span><span>SceneManager</span><span class="pun">.</span><span class="pln">pop</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span>SceneManager</span><span class="pun">.</span><span class="kwd">goto</span><span class="pun">(</span><span>Scene_Gameover</span><span class="pun">);</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span>SceneManager</span><span class="pun">.</span><span class="pln">pop</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Note that SceneManager here is to change the scene from Scene_Battle to something else:
		</p>

		<p>
			1. <strong>Exits the game in the case of battle test</strong>
		</p>

		<p>
			2. <strong>Goes to the last scene(the one before this battle) if it's not a game over</strong>
		</p>

		<p>
			3. <strong>Goes to the game over scene</strong>(Scene_GameOver)
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Update TPB Input</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>It's always run at the end of a frame in TPBS, regardless of what the current phase of the battle is.</strong>
		</p>

		<p>
			Basically, if there's at least 1 inputable party members, BattleManager.updateTpbInput will call BattleManager.checkTpbInputClose, otherwise it'll call BattleManager.checkTpbInputOpen:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTpbInput </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">checkTpbInputClose</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">checkTpbInputOpen</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">checkTpbInputClose </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isPartyTpbInputtable</span><span class="pun">()</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">needsActorInputCancel</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">cancelActorInput</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">checkTpbInputOpen </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isPartyTpbInputtable</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_tpbNeedsPartyCommand</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_tpbNeedsPartyCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectNextCommand</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			In the case of running BattleManager.checkTpbInputClose, it's to <strong>void the currently inputting party member(the one whose action slots are being inputted by players) and the party inputability flag if the currently inputting party member becomes not inputable</strong>(BattleManager.isPartyTpbInputtable is mainly for handling edge cases here).
		</p>

		<p>
			 
		</p>

		<p>
			In the case of BattleManager.checkTpbInputOpen, the gist is that(the details are too advanced to be covered here), <strong>when at least 1 of the party members become inputable, the party inputability flag will be raised if it's the 1st time the party becomes inputable(to show the party command window instead of the actor command window)</strong>, otherwise BattleManager.selectNextCommand will be called:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">selectNextCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">.</span><span class="pln">selectNextCommand</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">finishActorInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectNextActor</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			While the exact mechanism of raising the inputability flag and setting up the actor command window are too advanced to be covered here, the point is that BattleManager.selectNextActor will call BattleManager.changeCurrentActor, which will call BattleManager.startActorInput, and thus <strong>raise the inputability flag if the players are already inputting the action slots of an inputable party member</strong>.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Summary</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			First, the battle will start, and the phase will change to "start" upon fully starting the battle, with the catch that this phase will only trigger once, which is at the start of the battle.
		</p>

		<p>
			Then, the phase will quickly change to "turn".
		</p>

		<p>
			 
		</p>

		<p>
			After that, all battlers will charge their TPB, and will become inputable when theirs become full.
		</p>

		<p>
			In the case of actors, the party command window will be setup for the 1st time such event triggers in this battle, otherwise the actor command window corresponding to the inputable party member with the smallest party index at that frame will be setup.
		</p>

		<p>
			Whenever a battler becomes restricted, his/her/its TPB and cast bars will be cleared.
		</p>

		<p>
			Players will input from the 1st action slot of the 1st inputable party member to the last action slot of the last inputable party member at any given frame.
		</p>

		<p>
			Whenever the party becomes to have at least 1 inputable party member, the actor command window will be setup if an actor's selected for inputting action slots, otherwise the party command window will be setup.
		</p>

		<p>
			Whenever the party becomes to have no inputable party members, all the input windows will be closed.
		</p>

		<p>
			 
		</p>

		<p>
			When battlers finish inputting all their action slots, they'll start casting those actions, until they're fully cast, and this will cause those battlers to be pushed at the back of the action execution subject queue.
		</p>

		<p>
			As long as no actions are already executing, the most up front battler in that queue will be picked up as the action execution subject to execute will be cast valid actions, and the phase will be changed to "action".
		</p>

		<p>
			 
		</p>

		<p>
			When that action execution subject has executed all those cast valid actions, that battler will have the TPB and cast bars emptied, and the above process of picking up new action execution subject will be repeated, until there are no more battlers available as action execution subjects, in which the phase will be changed to "turn".
		</p>

		<p>
			 
		</p>

		<p>
			If a battle turn's supposed to be ended, the phase will be changed to "turnEnd", but it'll be immediately changed to "action" at the same frame if there are still action execution subjects to execute actions.
		</p>

		<p>
			 
		</p>

		<p>
			If a battle's supposed to be ended, the phase will be changed to "battleEnd", and the scene will be changed from the battle scene to something else, followed by changing the phase to empty.
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	That's all for now. I hope this can help you grasp these basic knowledge. For those thoroughly comprehending the essence of the default RMMZ TPBS battle flow implementations, feel free to correct me if there's anything wrong <span><img alt=":)" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_smile.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/smile@2x.png 2x" title=":)" width="20" /></span>
</p>

<p>
	For those wanting to have a solid understanding to the default RMMZ TPBS battle flow implementations, I might open a more advanced topic for that later <img alt=":D" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_biggrin.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/biggrin@2x.png 2x" title=":D" width="20" />
</p>
]]></description><guid isPermaLink="false">43080</guid><pubDate>Sat, 05 Mar 2022 06:23:49 +0000</pubDate></item><item><title>Basic knowledge to the default RMMZ turn based battle flow implementations</title><link>https://www.rpgmakercentral.com/topic/43077-basic-knowledge-to-the-default-rmmz-turn-based-battle-flow-implementations/</link><description><![CDATA[
<p>
	This topic aims to share the basic knowledge on what the default RMMZ turn based battle flow implementations do in general, but you're still assumed to have at least:
</p>

<p>
	1. Little javascript coding proficiency(barely okay with writing rudimentary Javascript codes up to 300 <a href="https://en.wikipedia.org/wiki/Source_lines_of_code" rel="external nofollow">LoC</a> scale)
</p>

<p>
	2. Basic knowledge on what the default RMMZ turn based battle flow does on the user level(At least you need to know what's going on on the surface when playing it as a player)
</p>

<p>
	 
</p>

<p>
	<strong>Simplified Flowchart</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="&amp;hash=41502d9035e5d2633ce34a0fe946d2b3" src="https://forums.rpgmakerweb.com/index.php?attachments/default-rmmz-turn-based-battle-flow-png.217791/&amp;hash=41502d9035e5d2633ce34a0fe946d2b3" />
		</p>
	</div>
</div>

<p>
	Please note that this flowchart only includes the most important elements of the battle flow, to avoid making it too complicated and convoluted for the intended targeting audience <img alt=":)" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_smile.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/smile@2x.png 2x" title=":)" width="20" />
</p>

<p>
	 
</p>

<p>
	<strong>Start Battle</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>This is the phase handling the start of the battle(with the empty phase only being run once), until BattleManager.startInput will be called to change the phase to "input".</strong>
		</p>

		<p>
			To keep things simple here, only the parts that are common to all the 3 different ways(<strong>battle tests, normal encounters and event encounters</strong>) of starting battles will be covered.
		</p>

		<p>
			<br />
			The common parts start from BattleManager.setup, which <strong>initializes the battle phase as empty</strong> in BattleManager.initMembers:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">initMembers </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">""</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_canEscape </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_canLose </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_battleTest </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_eventCallback </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_preemptive </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionForcedBattler </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_mapBgm </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_mapBgs </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionBattlers </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_action </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_targets </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_spriteset </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_escapeRatio </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_escaped </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_rewards </span><span class="pun">=</span><span class="pln"> </span><span class="pun">{};</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_tpbNeedsPartyCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Then, regardless of how the battles are started, either of the following will be called to <strong>start the battle scene</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>SceneManager</span><span class="pun">.</span><span class="kwd">goto</span><span class="pun">(</span><span>Scene_Battle</span><span class="pun">);</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>SceneManager</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span>Scene_Battle</span><span class="pun">);</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<br />
			At the beginning of the scene life cycle(too advanced to be covered here), Scene_Battle.prototype.create will be called to call Scene_Battle.prototype.createDisplayObjects as well, which calls Scene_Battle.prototype.createAllWindows:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">createAllWindows </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createLogWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createStatusWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createPartyCommandWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createActorCommandWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createHelpWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createSkillWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createItemWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createActorWindow</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">createEnemyWindow</span><span class="pun">();</span><span class="pln">
    </span><span>Scene_Message</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">createAllWindows</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Here, Scene_Battle.prototype.createPartyCommandWindow and Scene_Battle.prototype.createActorCommandWindow are methods creating the party and actor command windows respectively, and <strong>these 2 are the windows that are parts of the battle flow</strong>.
		</p>

		<p>
			<br />
			As the scene life cycle reaches Scene_Battle.prototype.start, BattleManager.startBattle will be called to <strong>change the phase to "start"</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">startBattle </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"start"</span><span class="pun">;</span><span class="pln">
    $gameSystem</span><span class="pun">.</span><span class="pln">onBattleStart</span><span class="pun">();</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">onBattleStart</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_preemptive</span><span class="pun">);</span><span class="pln">
    $gameTroop</span><span class="pun">.</span><span class="pln">onBattleStart</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">displayStartMessages</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<br />
			When <strong>the events that are supposed to be run upon battle start are finished</strong>(how this is exactly done is too advanced to be covered here), Scene_Battle.prototype.update will call Scene_Battle.prototype.updateBattleProcess, which will call BattleManager.update, causing BattleManager.updatePhase to be called as well(frame updates in battle flow are too advanced to be covered here), and so BattleManager.updateStart will be called to call BattleManager.startInput, in order to <strong>change the phase to "input"</strong>, meaning that the battle is finally fully started:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">startInput </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"input"</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">makeActions</span><span class="pun">();</span><span class="pln">
    $gameTroop</span><span class="pun">.</span><span class="pln">makeActions</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise </span><span class="pun">||</span><span class="pln"> </span><span class="pun">!</span><span class="pln">$gameParty</span><span class="pun">.</span><span class="pln">canInput</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Input Actions</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>This phase starts from BattleManager.startInput and ends with BattleManager.startTurn, and it's the phase where players can either try to escape the battle, or input all actions for all inputable party members, until BattleManager.startTurn is called to change the phase to "turn", or BattleManager.processAbort is called to abort the battle.</strong>
		</p>

		<p>
			<br />
			First, Game_Unit.prototype.makeActions will be called, causing Game_Battler.prototype.makeActions to be called to <strong>make all battlers have their respective number of action slots determined by their respective Action Times+ at that moment</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Battler</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">makeActions </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">clearActions</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">canMove</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">const</span><span class="pln"> actionTimes </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">makeActionTimes</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actions </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
        </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">let</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> actionTimes</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actions</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span class="kwd">new</span><span class="pln"> </span><span>Game_Action</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">));</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Note that Auto Battle and/or confused actors will automatically input all their action slots without player inputs because of Game_Actor.prototype.makeActions:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Actor</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">makeActions </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>Game_Battler</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">makeActions</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">numActions</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&gt;</span><span class="pln"> </span><span class="lit">0</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">setActionState</span><span class="pun">(</span><span class="str">"undecided"</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">setActionState</span><span class="pun">(</span><span class="str">"waiting"</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isAutoBattle</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">makeAutoBattleActions</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isConfused</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">makeConfusionActions</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Whereas all enemies will always automatically input all their action slots:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Enemy</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">makeActions </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>Game_Battler</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">makeActions</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">numActions</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&gt;</span><span class="pln"> </span><span class="lit">0</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">const</span><span class="pln"> actionList </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">enemy</span><span class="pun">().</span><span class="pln">actions</span><span class="pun">.</span><span class="pln">filter</span><span class="pun">(</span><span class="pln">a </span><span class="pun">=&gt;</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isActionValid</span><span class="pun">(</span><span class="pln">a</span><span class="pun">)</span><span class="pln">
        </span><span class="pun">);</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">actionList</span><span class="pun">.</span><span class="pln">length </span><span class="pun">&gt;</span><span class="pln"> </span><span class="lit">0</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectAllActions</span><span class="pun">(</span><span class="pln">actionList</span><span class="pun">);</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">setActionState</span><span class="pun">(</span><span class="str">"waiting"</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			As for inputability, <strong>an actor's inputable if he/she/it's alive, in battle and has no Restrictions enforced by states and no special flag Auto Battle</strong>.
		</p>

		<p>
			As long as the party can input actions in the current turn(determined by <strong>whether it's the 1st turn with a surprise battle start and whether any party member can input actions</strong>), this phase will proceed as follows:
		</p>

		<p>
			<br />
			1. Scene_Battle.prototype.changeInputWindow will call Scene_Battle.prototype.startPartyCommandSelection(its reasons are too advanced to be covered here), which <strong>setups the party command window</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">changeInputWindow </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">hideSubInputWindows</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">isInputting</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">actor</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startActorCommandSelection</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startPartyCommandSelection</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endCommandSelection</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">startPartyCommandSelection </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_statusWindow</span><span class="pun">.</span><span class="pln">deselect</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_statusWindow</span><span class="pun">.</span><span class="pln">show</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_statusWindow</span><span class="pun">.</span><span class="pln">open</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actorCommandWindow</span><span class="pun">.</span><span class="pln">setup</span><span class="pun">(</span><span class="kwd">null</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actorCommandWindow</span><span class="pun">.</span><span class="pln">close</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_partyCommandWindow</span><span class="pun">.</span><span class="pln">setup</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			2a. If those players choose to escape, then Scene_Battle.prototype.commandEscape as the corresponding handler of the party command window(handlers are too advanced to be covered here) will be called to call BattleManager.processEscape.
		</p>

		<p>
			The escape attempt will always succeed upon the 1st turn if the battle starts with preemptive, otherwise its probability of success is determined by the escape ratio at that moment, which is initially set as 0.5 * the average of agi of all party members in battle / the average of agi of all enemies in battle, and will increase by 0.1 per failed attempt.2a(i). If the escape attempt succeeded, then BattleManager.onEscapeSucces will be called to call BattleManager.processAbort, which calls BattleManager.endBattle which the result argument as 1 to <strong>abort the battle</strong>(how battles are ended are too advanced to be covered here):
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">processAbort </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">removeBattleStates</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">clear</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">replayBgmAndBgs</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endBattle</span><span class="pun">(</span><span class="lit">1</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			2a(ii). If the escape attempt failed, then BattleManager.onEscapeFailure will be called to call BattleManager.startTurn, which <strong>starts the current turn</strong> and will be covered in the later parts of this post:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">onEscapeFailure </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">onEscapeFailure</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">displayEscapeFailureMessage</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_escapeRatio </span><span class="pun">+=</span><span class="pln"> </span><span class="lit">0.1</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			Note that Game_Party.prototype.onEscapeFailure will call Game_Actor.prototype.onEscapeFailure for all party members, and so Game_Actor.prototype.clearActions will be called to <strong>void all action slots</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Actor</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">onEscapeFailure </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>BattleManager</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">applyTpbPenalty</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">clearActions</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">requestMotionRefresh</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Actor</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">clearActions </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>Game_Battler</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">clearActions</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionInputIndex </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			2b. If those players choose to fight, then Scene_Battle.prototype.commandFight use select next command(covered in the later parts of this post) to <strong>let those players input all actions of all inputable party members sequentially</strong>.
		</p>

		<p>
			 
		</p>

		<p>
			3. Those players will first <strong>input the 1st action slot of the 1st inputable party member</strong>, then the 2nd, 3rd, and finally the last action slot of that member, and those players will proceed with the same sequence for the 2nd inputable party member, finally those players will <strong>repeat this sequence until the last action slot of the last inputable party member is inputted</strong>, with the restriction that <strong>those players can never break nor escape this sequence without inputting all action slots of all inputable party members</strong>.
		</p>

		<p>
			 
		</p>

		<p>
			4. When inputting actions for inputable party members, players can use the ok command to proceed to the next action slot of the current member, or from the last action slot of that member to the 1st action slot of the next member(or start the current turn upon finish inputting the last action slot of the last member).The ok command is handled by the actor command window(how it's setup is too advanced to be covered here) using the handler Scene_Battle.prototype.selectNextCommand, which calls BattleManager.selectNextCommand to call Game_Actor.prototype.selectNextCommand:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">selectNextCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>BattleManager</span><span class="pun">.</span><span class="pln">selectNextCommand</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">changeInputWindow</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">selectNextCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">.</span><span class="pln">selectNextCommand</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">finishActorInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectNextActor</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Actor</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">selectNextCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionInputIndex </span><span class="pun">&lt;</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">numActions</span><span class="pun">()</span><span class="pln"> </span><span class="pun">-</span><span class="pln"> </span><span class="lit">1</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionInputIndex</span><span class="pun">++;</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			5. Similarly, players can use the cancel command to proceed to the previous action slot of the current member, or from the 1st action slot of that member to the last action slot of the previous member(or setup the party command window upon cancelling the input of the 1st action slot of the 1st member).<br />
			The cancel command is handled by the actor command window using the handler Scene_Battle.prototype.selectPreviousCommand, which calls BattleManager.selectPreviousCommand to call Game_Actor.prototype.selectPreviousCommand:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Scene_Battle</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">selectPreviousCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span>BattleManager</span><span class="pun">.</span><span class="pln">selectPreviousCommand</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">changeInputWindow</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">selectPreviousCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_currentActor</span><span class="pun">.</span><span class="pln">selectPreviousCommand</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">cancelActorInput</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">selectPreviousActor</span><span class="pun">();</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>Game_Actor</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">selectPreviousCommand </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionInputIndex </span><span class="pun">&gt;</span><span class="pln"> </span><span class="lit">0</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionInputIndex</span><span class="pun">--;</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>

		<p>
			6. <strong>While the exact traversals of this <a href="https://en.wikipedia.org/wiki/Doubly_linked_list" rel="external nofollow">doubly linked list</a> are too advanced to be covered here, the party command window(head <a href="https://en.wikipedia.org/wiki/Sentinel_node" rel="external nofollow"><strong>sentinel node</strong></a>) and the turn start(tail </strong><a href="https://en.wikipedia.org/wiki/Sentinel_node" rel="external nofollow"><strong>sentinel node</strong></a><strong>) are the start and end of this sequence respectively, while the ok and cancel commands are single steps for moving forward(</strong><a href="https://en.wikipedia.org/wiki/Doubly_linked_list#Traversing_the_list" rel="external nofollow"><strong>next pointer</strong></a><strong>) and backward(</strong><a href="https://en.wikipedia.org/wiki/Doubly_linked_list#Traversing_the_list" rel="external nofollow"><strong>previous pointer</strong></a><strong>) respectively.</strong>
		</p>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Process Turns</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>To be precise, there are 2 phases in this part, which are "turn" and "turnEnd".</strong>
		</p>

		<p>
			<br />
			<strong>The "turn" phase starts from having BattleManager.startTurn called upon inputting the last action slot of the last inputable party member, and ends with calling BattleManager.startAction to change the phase to "action", or BattleManager.endTurn to change the phase to "turnEnd":</strong>
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">startTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"turn"</span><span class="pun">;</span><span class="pln">
    $gameTroop</span><span class="pun">.</span><span class="pln">increaseTurn</span><span class="pun">();</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">requestMotionRefresh</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">makeActionOrders</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">startTurn</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_inputting </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<strong>This changes the phase to "turn" and increases the battle turn count by 1.</strong>
		</p>

		<p>
			<br />
			Then, by calling BattleManager.makeActionOrders, <strong>the action order queue descendingly sorted by the speed of all battlers(the faster the battlers are the more up front they're on this <a href="https://en.wikipedia.org/wiki/Queue_(abstract_data_type)" rel="external nofollow">queue</a>) at this moment will have all the inputted actions of all those battlers, with the ordering of all actions among the same battler unchanged from his/her/its action slot input sequence</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">makeActionOrders </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> battlers </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battlers</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(...</span><span class="pln">$gameParty</span><span class="pun">.</span><span class="pln">battleMembers</span><span class="pun">());</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_preemptive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battlers</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(...</span><span class="pln">$gameTroop</span><span class="pun">.</span><span class="pln">members</span><span class="pun">());</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">const</span><span class="pln"> battler </span><span class="kwd">of</span><span class="pln"> battlers</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        battler</span><span class="pun">.</span><span class="pln">makeSpeed</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    battlers</span><span class="pun">.</span><span class="pln">sort</span><span class="pun">((</span><span class="pln">a</span><span class="pun">,</span><span class="pln"> b</span><span class="pun">)</span><span class="pln"> </span><span class="pun">=&gt;</span><span class="pln"> b</span><span class="pun">.</span><span class="pln">speed</span><span class="pun">()</span><span class="pln"> </span><span class="pun">-</span><span class="pln"> a</span><span class="pun">.</span><span class="pln">speed</span><span class="pun">());</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionBattlers </span><span class="pun">=</span><span class="pln"> battlers</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<strong>Note that the speed of a battler is determined by the fastest action slot inputted by that battler(the skill/item with the lowest Speed).</strong><br />
			After that, <strong>all battle events which should be run upon turn start will be run</strong>(how this is exactly done is too advanced to be covered here), and then BattleManager.updatePhase will call BattleManager.updateTurn:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $gameParty</span><span class="pun">.</span><span class="pln">requestMotionRefresh</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&amp;&amp;</span><span class="pln"> timeActive</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">updateTpb</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">getNextSubject</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">processTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<strong>If there's no action execution subject, BattleManager.getNextSubject will be used as a try to find the most up front alive battler in the action order queue at that moment, with all the dead ones removed from the queue before an alive one is found, and having found such a battler means that battler will be removed from the queue as well:</strong>
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">getNextSubject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(;;)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">const</span><span class="pln"> battler </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_actionBattlers</span><span class="pun">.</span><span class="pln">shift</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="pln">battler</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">battler</span><span class="pun">.</span><span class="pln">isBattleMember</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&amp;&amp;</span><span class="pln"> battler</span><span class="pun">.</span><span class="pln">isAlive</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">return</span><span class="pln"> battler</span><span class="pun">;</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			If no such battler's found, then <strong>the phase will change to "turnEnd"</strong> by calling BattleManager.endTurn(which will be covered in the later parts of this post).
		</p>

		<p>
			<br />
			If such a battler's found, he/she/it'll be the new action subject, and BattleManager.processTurn will be called to <strong>try to execute inputted actions of that battler</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">processTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> action </span><span class="pun">=</span><span class="pln"> subject</span><span class="pun">.</span><span class="pln">currentAction</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">action</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        action</span><span class="pun">.</span><span class="pln">prepare</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">action</span><span class="pun">.</span><span class="pln">isValid</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startAction</span><span class="pun">();</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
        subject</span><span class="pun">.</span><span class="pln">removeCurrentAction</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endAction</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<strong>An action is said to be valid upon execution if it's forced or its user meets all the conditions of the corresponding skill/item upon execution.</strong>
		</p>

		<p>
			 
		</p>

		<p>
			If the action execution subject has no valid actions to execute, then BattleManager.endAction will be called(this will be covered in the later parts of this post), which will cause BattleManager.updateTurn to be called again later, meaning that <strong>another action execution subject has to be found, or the turn will just end</strong>.If the action execution subject has valid actions to execute, then <strong>all the invalid ones will be discarded and the valid ones will be executed sequentially</strong>, by calling BattleManager.startAction, which <strong>makes the target queue of the current action to be executed and changes the phase to "action"</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">startAction </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> action </span><span class="pun">=</span><span class="pln"> subject</span><span class="pun">.</span><span class="pln">currentAction</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> targets </span><span class="pun">=</span><span class="pln"> action</span><span class="pun">.</span><span class="pln">makeTargets</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"action"</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_action </span><span class="pun">=</span><span class="pln"> action</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_targets </span><span class="pun">=</span><span class="pln"> targets</span><span class="pun">;</span><span class="pln">
    subject</span><span class="pun">.</span><span class="pln">cancelMotionRefresh</span><span class="pun">();</span><span class="pln">
    subject</span><span class="pun">.</span><span class="pln">useItem</span><span class="pun">(</span><span class="pln">action</span><span class="pun">.</span><span class="pln">item</span><span class="pun">());</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_action</span><span class="pun">.</span><span class="pln">applyGlobal</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">startAction</span><span class="pun">(</span><span class="pln">subject</span><span class="pun">,</span><span class="pln"> action</span><span class="pun">,</span><span class="pln"> targets</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			<br />
			<strong>The "turnEnd" phase starts from having BattleManager.endTurn called upon having no more action execution subject to be found nor execute valid actions not yet executed, and ends with later calling BattleManager.updatePhase, which calls BattleManager.updateTurnEnd to change the phase to "start":</strong>
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">endTurn </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"turnEnd"</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_preemptive </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_surprise </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
</span><span class="pun">};</span></pre>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateTurnEnd </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">isTpb</span><span class="pun">())</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">startTurn</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endAllBattlersTurn</span><span class="pun">();</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"start"</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Execute Actions</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<strong>It basically starts from BattleManager.startAction and ends with BattleManager.endAction to change the phase to "turn".</strong>
		</p>

		<p>
			<strong>It's the phase where the current action execution subject will, after discarding all the invalid actions, execute all the valid ones sequentially, which the ordering unchanged from the action slot input sequence of that subject.</strong>
		</p>

		<p>
			As far as only the current action execution subject is concerned, this phase will proceed as follows:
		</p>

		<p>
			 
		</p>

		<p>
			1. The 1st valid action that aren't executed yet will be executed after showing its start using the battle log window(how Window_BattleLog works is too advanced to be covered here).
		</p>

		<p>
			<br />
			2. Upon the start of the execution, BattleManager.updatePhase will call BattleManager.updateAction, which <strong>tries to find the 1st target in the target queue of the action to be executed</strong>:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">updateAction </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">const</span><span class="pln"> target </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_targets</span><span class="pun">.</span><span class="pln">shift</span><span class="pun">();</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">target</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">invokeAction</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">,</span><span class="pln"> target</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endAction</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			If such target's found, that target will be removed from the queue and BattleManager.invokeAction will be called:
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">invokeAction </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">subject</span><span class="pun">,</span><span class="pln"> target</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span class="str">"pushBaseLine"</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>Math</span><span class="pun">.</span><span class="pln">random</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_action</span><span class="pun">.</span><span class="pln">itemCnt</span><span class="pun">(</span><span class="pln">target</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">invokeCounterAttack</span><span class="pun">(</span><span class="pln">subject</span><span class="pun">,</span><span class="pln"> target</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span>Math</span><span class="pun">.</span><span class="pln">random</span><span class="pun">()</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_action</span><span class="pun">.</span><span class="pln">itemMrf</span><span class="pun">(</span><span class="pln">target</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">invokeMagicReflection</span><span class="pun">(</span><span class="pln">subject</span><span class="pun">,</span><span class="pln"> target</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">invokeNormalAction</span><span class="pun">(</span><span class="pln">subject</span><span class="pun">,</span><span class="pln"> target</span><span class="pun">);</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    subject</span><span class="pun">.</span><span class="pln">setLastTarget</span><span class="pun">(</span><span class="pln">target</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span class="str">"popBaseLine"</span><span class="pun">);</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			For now, you just need to know that <strong>Window_BattleLog is way more than just a battle log window, as it actually coordinates all the visual display sequences in the battle flow</strong>(also too advanced to be covered here).<br />
			If no such target's found, then BattleManager.endAction will be called to change the phase to "turn":
		</p>

		<div class="ipsSpoiler" data-ipsspoiler="">
			<div class="ipsSpoiler_header">
				<span>Spoiler</span>
			</div>

			<div class="ipsSpoiler_contents">
				<p>
					 
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">


<span>BattleManager</span><span class="pun">.</span><span class="pln">endAction </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_logWindow</span><span class="pun">.</span><span class="pln">endAction</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">);</span><span class="pln">
    </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_phase </span><span class="pun">=</span><span class="pln"> </span><span class="str">"turn"</span><span class="pun">;</span><span class="pln">
    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">.</span><span class="pln">numActions</span><span class="pun">()</span><span class="pln"> </span><span class="pun">===</span><span class="pln"> </span><span class="lit">0</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">endBattlerActions</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject</span><span class="pun">);</span><span class="pln">
        </span><span class="kwd">this</span><span class="pun">.</span><span class="pln">_subject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">};</span></pre>

				<p>
					 
				</p>

				<p>
					 
				</p>
			</div>
		</div>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Summary</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			The battle first starts with the empty phase.
		</p>

		<p>
			The empty phase will always change to "start" after finished preparing to start the battle.
		</p>

		<p>
			The "start" phase will always change to "input" after finished starting the battle to try to let players input actions for all inputable party members.
		</p>

		<p>
			 
		</p>

		<p>
			All battlers will use their respective Action Times+ at that moment to determine their respectively number of action slots they can have in the current turn.
		</p>

		<p>
			If there's no such member or the battle starts with surprise, the battle phase will immediately change to "turn".
		</p>

		<p>
			Otherwise players will either try to escape the battle, or sequentially input from the 1st action slot of the 1st inputable party member to the last one of the last such member.
		</p>

		<p>
			A sucess escape attempt will abort the battle while a failed one will change the phase to "turn" without inputting any action slot of any inputable party member.
		</p>

		<p>
			The battle phase will change to "turn" when all actions slots of all inputable party members are inputted.
		</p>

		<p>
			 
		</p>

		<p>
			The "turn" phase will try to sequentially execute actions from the 1st inputted valid ones of the fastest alive battler at that moment to the last inputted valid ones of the slowest alive battler at that moment.
		</p>

		<p>
			Whenever the 1st inputted valid action not executed yet by the current action execution subject is to be executed now, the phase will change to "action".
		</p>

		<p>
			When there are no more alive battlers left to execute valid actions that aren't executed yet, the phase will change to "turnEnd", which will soon change to "start".
		</p>

		<p>
			 
		</p>

		<p>
			The "action" phase will try to sequentially invoke the currently valid action to be executed into each of its targets and remove that target from the action target queue.
		</p>

		<p>
			When that action target queue has no more targets, the phase will change to "turn".
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	That's all for now. I hope this can help you grasp these basic knowledge. For those thoroughly comprehending the essence of the default RMMZ turn based battle flow implementations, feel free to correct me if there's anything wrong <span><img alt=":D" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_biggrin.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/biggrin@2x.png 2x" title=":D" width="20" /></span>
</p>

<p>
	For those wanting to have a solid understanding to the default RMMZ turn based battle flow implementations, I might open a more advanced topic for that later <img alt=";)" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_wink.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/wink@2x.png 2x" title=";)" width="20" />
</p>
]]></description><guid isPermaLink="false">43077</guid><pubDate>Mon, 28 Feb 2022 14:50:15 +0000</pubDate></item><item><title>Evented Shapeshifting System</title><link>https://www.rpgmakercentral.com/topic/33543-evented-shapeshifting-system/</link><description><![CDATA[
<p>I am Vectra. Today, i will be talking about how to make an evented shape shifting. The idea has came from this: <a href="http://www.rpgmakervxace.net/topic/33541-shapeshifting-in-battle/#entry227802" rel="external nofollow">http://www.rpgmakervxace.net/topic/33541-shapeshifting-in-battle/#entry227802</a></p>
<p><span style="color:#800080;">Note: I'm going to use a wolf as an example and Imma show two ways to do this.</span></p>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><u><b>Here's what you need</b></u></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">At least 2 Actors</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">1 common event</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">1 Switch</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">2 Variable</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">1 Condition Branch</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><u><b>Let's say Billy wants to be a wolf.</b></u></div>
<ol><li>You need a actor who is a wolf and one who is Billy.</li>	<li>You need 1 variable that equals to Billy's EXP</li>	<li>You need 1 variable that equals to Wolf's EXP</li>	<li>Go to <span style="color:rgb(128,0,255);">Control Variable</span>	</li>
<li>Go to game data &lt;= <span style="color:rgb(128,0,255);">If you have VX, skip this step and go to step 6</span>
</li>	<li>Go to actor</li>	<li>Go to the right, you should see level</li>	<li>Change it to EXP</li>	<li>It should look like this:<span style="color:rgb(128,0,255);"> Control Variables: [Var ID: Billy's EXP] = [billy]'s EXP</span>
</li>
</ol><div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(0,0,0);">Vx Ace</span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(0,0,0);"><img src="http://i.imgur.com/sT6XfSB.png" alt="sT6XfSB.png" /></span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(0,0,0);">Vx</span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(0,0,0);"><img src="http://i.imgur.com/aYNUTsZ.png" alt="aYNUTsZ.png" /></span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(128,0,255);"><b>Conditional Branch: Switch [0051:Wolf] == ON</b></span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,0,0);">Control Switches: [0051:Wolf] == OFF</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change EXP: [billy], - Variable [0002: Billy's EXP]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change EXP: [Wolf], + Variable [0002: Billy's EXP]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change Party Member: Add [Wolf]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change Party Member: Remove [billy]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> :   <span style="color:rgb(128,0,255);"><b>Else</b></span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,0,0);">Control Switches: [0051: Wolf] == ON</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change level: [Wolf], - Variable [0003: Wolf's EX]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change EXP: [billy], + Variable [0003: Wolf's EXP]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change Party Member: Remove [Wolf]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">     @&gt;<span style="color:rgb(255,128,0);">Change Party Member: Add [billy]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> :   <span style="color:rgb(128,0,255);"><b>Branch End</b></span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">The switch tells whether you are a wolf or not. You subtract the EXP because you want it to be 0 so when they come back, you'll just add the EXP + gained EXP rather than having to find the difference of EXP and gained EXP and all that extra work.</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">Adding one member and removing the other is the "transformation." You are replacing Billy with his wolf self and vise versa.</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">Once you do the above, you make a skill call the common event. If you are on Vx, in the skills' tab, common event is next to "animation." If Vx Ace, go to the "effects" section, double-click, go to the 4th tab, and you should see this...</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><img src="http://i.imgur.com/lJwhTEh.png" alt="lJwhTEh.png" /></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">Pick the correct common event and BAM! You're done.  <img src="https://www.rpgmakercentral.com/uploads/emoticons/default_cool.png" alt="B)" /></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(128,0,255);">Here's another way to do this...(2nd method)</span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><span style="color:rgb(128,0,255);">This is only used if you don't wish to create another actor, but it is highly recommended as this requires much more work.</span></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><u><b>Here's what you need</b></u></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">1 Actor</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">2 Common Events</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">1 States</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">2 Skills</div>
<ol><li>Create a skill called "Wolf Transformation" (or anything you like)</li>	<li>Create a skill called "Wolf Transformation OFF"(or anything you like)</li>
</ol><div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><u><b>This is how the common event for "Wolf Transformation" should look...</b></u></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,0,255);">Change Actor Graphic: [billy], 'Faceset name', index#, 'Charset Name', index#</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Actor Name: [billy], 'Wolf'</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Parameters: [billy], stat name -/+ #</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, + [Wolf Transformation OFF]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, - [Wolf Transformation]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, + [skill Name](Encase you wanted to add any additional skills)</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"><u><b>This is how the common event for "Wolf Transformation OFF" should look...</b></u></div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,0,255);">Change Actor Graphic: [Wolf], 'Faceset name', index#, 'Charset Name', index#</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Actor Name: [Wolf], 'Billy'</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Parameters: [Wolf], stat name -/+ #</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, - [Wolf Transformation OFF]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, + [Wolf Transformation]</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;<span style="color:rgb(255,128,0);">Change Skills, + [skill Name](Encase you wanted to add any additional skills)</span>
</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">@&gt;</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">Change parameter is if you want to give the wolf extra HP or extra ATK. You add the OFF skill to the Wolf to change to Billy. You use the "Wolf Transformation" skill to get from Billy to Wolf. It's so Wolf doesn't have the transformation skill and Billy won't have the OFF skill.</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">Add (or subtract) any extra skills that you don't want the wolf(or Billy) to know.</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">To make the skills call them, you do the exact same thing you do for the first method.</div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;"> </div>
<div style="margin:0px;color:rgb(20,20,20);font-family:Roboto, 'Segoe UI', Arial, sans-serif;font-size:16px;">
<span style="color:rgb(0,0,0);"><u><b>Any Questions?</b></u> </span> <img src="https://www.rpgmakercentral.com/uploads/emoticons/default_cool.png" alt="B)" /></div>
]]></description><guid isPermaLink="false">33543</guid><pubDate>Mon, 20 Jul 2015 10:12:36 +0000</pubDate></item><item><title>How to show credits during gameplay</title><link>https://www.rpgmakercentral.com/topic/42942-how-to-show-credits-during-gameplay/</link><description><![CDATA[
<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong>Tutorial topic:  </strong>How to show credits during gameplay.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong><strong>Brief description:</strong><span> </span> </strong>Have you ever watched a movie and seen how the credits pop up as the opening action scene plays out?  People are talking, fighting, doing all the movie things, but the credits appear and vanish along the way without disturbing the flow of action.  It's become such a common thing that movie critics actually criticize films that don't do their opening credits in this way.  This method will allow you to have that in your game without scripts or even a lot of special skill!
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong><strong>Requirements:</strong><span> </span> </strong>Obviously, you will need RPGMaker VX Ace (this should also work with everything but MZ as it only requires that you have access to the built in battle animations tab). Beyond that, you will need a simple photo editing software like Photoshop. I use<span> </span><a href="https://www.gimp.org/" style="background-color:transparent;color:#0088bb;" rel="external nofollow">GIMP</a><span> </span>because it's free and relatively simple to use.  You can technically do this with paint, but if you do, you will need to use another service to make the background transparent.  Before I discovered GIMP, I used<span> </span><a href="https://www10.lunapic.com/editor/?action=transparent" style="background-color:transparent;color:#0088bb;" rel="external nofollow">lunapic</a><span> </span>as it's free and all online.  This is inferior to GIMP in my opinion, but it has the advantage of not requiring the download of a frankly massive program.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	TL;DR:  You need an RPGMaker that has the animation tab (so any except for MZ) and you need a way to edit pictures while keeping them transparent.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong>Step 1; The Credit:</strong>
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	To begin, we need to take a random base from the animations folder of the RTP.  We're not actually going to change it, but rather, we're going to use it as a template.  I used Thunder4 because it's one of the larger bases with room for 25 animation panels.  I advise making a copy and pasting it into another folder, then working on the copy so that you don't accidentally overwrite the base picture.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	Once you have it loaded up in your editor, erase everything so that the only thing left is the transparent background, As shown here:
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_2021_08/erased.JPG.bbc48bc1736a970219bd225c2663480e.JPG" data-fileid="21024" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="21024" src="https://www.rpgmakercentral.com/uploads/monthly_2021_08/erased.thumb.JPG.85c037e48d18f3f661007c56fbe03d66.JPG" alt="erased.thumb.JPG.85c037e48d18f3f661007c56fbe03d66.JPG" /></a>
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	Choose a small corner of the template then, and insert the text you want!  Don't worry about it being more than one animation panel.  It probably will be larger than one, depending on how much you have to type.  For my test case, I used a simple "A Game By Aslanemperor"
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<img class="ipsImage ipsImage_thumbnailed" data-fileid="21023" src="https://www.rpgmakercentral.com/uploads/monthly_2021_08/creditexample.JPG.91474baced71d216105ba68311d0ba4e.JPG" alt="creditexample.JPG.91474baced71d216105ba68311d0ba4e.JPG" />
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	Save, export, or whatever you need to do.  Take any extra steps you may need to make the image transparent.  This is standard with GIMP, and I hear that Photoshop makes this pretty easy as well.  Once this is done, simply import this into your game using the built in Resource manager in RPGMaker.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong>Step Two; The Animation:</strong>
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	This part can get a little time consuming, but is still VERY simple.  My example took up two panels worth of room on the template (out of a max of 25).  As such, I took those two panels, and set them side by side over where I wanted them to go.  The animation system makes this very easy as everything is designed to lock neatly into place, so as long as you pay attention, it will be a simple matter to make everything look good.  Now we figure how long you want your credit to show itself, and where you want it on the screen.  For this example, I placed mine directly in the center.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	When you're putting together your frames, keep timing in mind.  1 second is equal to roughly 30 animation frames.  Because of this, I set up the fade in to last through the first 26 frames, then had it hold solid for another 45, followed by a more rapid 15 frame fade out.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	I did this by right clicking each individual panel and adjusting the "Opacity" number.  Because I wanted this to be close to a full second of fade in, I added 10 points to the value on every frame, making it go fully Opaque at frame 26, with a value of 255.  This is why it can be a bit time consuming.  Once you know what you're doing, however, it doesn't take long to put these together.  It took me just over 5 minutes to put everything for this animation together.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	You'll notice that there's a box for the animation beyond just the scope of the target.  That box represents your screen.  Depending on where you want this to show up on the screen, that's where you'll place your animation box.  For instance, if you align it with the top left of that box, it will show up on the top left corner of the screen.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong>Step Three; Implementation:</strong>
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	So, you've made your "Credits" animation, and you're ready to place it.  The way I did it, was to have an event along the path the player has to follow, and when they walk over that area, it triggers the credit animation.  I set the animation to be centered on the player.  This way, it keeps on showing in the area I want as he walks:
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<img class="ipsImage ipsImage_thumbnailed" data-fileid="21022" src="https://www.rpgmakercentral.com/uploads/monthly_2021_08/crdtexample.JPG.1a13788490f4df862469391fca701807.JPG" alt="crdtexample.JPG.1a13788490f4df862469391fca701807.JPG" />
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	Don't forget when making your event that you want to set it to end after the player has walked past it.  Also, DO NOT click for it to wait if you want your character to continue doing things while this shows.
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	 
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	<strong>Conclusion:</strong>
</p>

<p style="background-color:#fcfcff;color:#141414;font-size:15px;text-align:left;">
	So, I found this entire process to be extremely easy, and can be done with things that anyone has access to (you can even manage this with just paint and a web browser).  It's a unique way to put your credits into your game without a clunky opening video (which usually requires some sort of video editing software).  If you have any questions, or you know an easier way to pull this off, I'm happy to hear it.  I hope this helps someone!
</p>
]]></description><guid isPermaLink="false">42942</guid><pubDate>Mon, 02 Aug 2021 20:45:59 +0000</pubDate></item><item><title>RMMZ - Easy text font switching</title><link>https://www.rpgmakercentral.com/topic/42927-rmmz-easy-text-font-switching/</link><description><![CDATA[
<p>
	In RMMZ the font is loaded in a different way than RMMV, probably because we have two types of fonts:
</p>

<ul>
	<li>
		One for texts like dialogs and terms in menus
	</li>
	<li>
		And another for numbers like HP, MP, time, money, etc
	</li>
</ul>

<p>
	<br />
	First you must copy the font files to your project's fonts folder.
</p>

<p>
	To change the font of text before or after a dialog box, execute this code via the Script (Last Page) event command:
</p>

<pre class="ipsCode prettyprint lang-javascript prettyprinted">
<span>FontManager</span><span class="pun">.</span><span class="pln">_urls</span><span class="pun">[</span><span class="str">"rmmz-mainfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">_states</span><span class="pun">[</span><span class="str">"rmmz-mainfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">load</span><span class="pun">(</span><span class="str">"rmmz-mainfont"</span><span class="pun">,</span><span class="str">"MyPersonalizedFont.ttf"</span><span class="pun">);</span></pre>

<p>
	<br />
	Replace MyPersonalizedFont.ttf with the name of the copied font in the folder, enclosed in quotation marks.
</p>

<p>
	To restore the font of the texts to the one defined in the database, use the following command without changing anything:
</p>

<pre class="ipsCode prettyprint lang-javascript prettyprinted">
<span>FontManager</span><span class="pun">.</span><span class="pln">_urls</span><span class="pun">[</span><span class="str">"rmmz-mainfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">_states</span><span class="pun">[</span><span class="str">"rmmz-mainfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">load</span><span class="pun">(</span><span class="str">"rmmz-mainfont"</span><span class="pun">,</span><span class="pln">$dataSystem</span><span class="pun">.</span><span class="pln">advanced</span><span class="pun">.</span><span class="pln">mainFontFilename</span><span class="pun">);</span></pre>

<p>
	<br />
	To change the font of the numbers, which are likely to be less used, the command is similar:
</p>

<pre class="ipsCode prettyprint lang-javascript prettyprinted">
<span>FontManager</span><span class="pun">.</span><span class="pln">_urls</span><span class="pun">[</span><span class="str">"rmmz-numberfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">_states</span><span class="pun">[</span><span class="str">"rmmz-numberfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">load</span><span class="pun">(</span><span class="str">"rmmz-numberfont"</span><span class="pun">,</span><span class="str">"MyPersonalizedFont.ttf"</span><span class="pun">);</span></pre>

<p>
	<br />
	To restore the font of the texts to the one defined in the database, use the following command without changing anything:
</p>

<pre class="ipsCode prettyprint lang-javascript prettyprinted">
<span>FontManager</span><span class="pun">.</span><span class="pln">_urls</span><span class="pun">[</span><span class="str">"rmmz-numberfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">_states</span><span class="pun">[</span><span class="str">"rmmz-numberfont"</span><span class="pun">]=</span><span class="str">""</span><span class="pun">;</span><span class="pln">
</span><span>FontManager</span><span class="pun">.</span><span class="pln">load</span><span class="pun">(</span><span class="str">"rmmz-numberfont"</span><span class="pun">,</span><span class="pln">$dataSystem</span><span class="pun">.</span><span class="pln">advanced</span><span class="pun">.</span><span class="pln">numberFontFilename</span><span class="pun">);</span></pre>

<p>
	<br />
	To understand, the _urls and _states objects serve to memorize the loaded fonts, so it is necessary to delete them to reload the new fonts.
</p>

<p>
	If you prefer a simple plugin ready to work follow this link:
</p>

<p>
	<a href="https://github.com/BossRpg/RMMZ-SimpleFontManager" rel="external nofollow">https://github.com/BossRpg/RMMZ-SimpleFontManager</a>
</p>
]]></description><guid isPermaLink="false">42927</guid><pubDate>Thu, 08 Jul 2021 02:33:20 +0000</pubDate></item><item><title>RM2K - Windowed Mode</title><link>https://www.rpgmakercentral.com/topic/42918-rm2k-windowed-mode/</link><description><![CDATA[
<p>
	This is a method using a helper program, see working in this video:
</p>

<div class="ipsEmbeddedVideo">
	<div>
		<iframe allowfullscreen="true" frameborder="0" height="113" src="https://www.youtube.com/embed/FW2GsVFls0k?feature=oembed" width="200"></iframe>
	</div>
</div>

<p>
	 
</p>

<p>
	First download the program through this link:
</p>

<div>
	<div>
		<div>
			<h3>
				<a href="https://www.mediafire.com/file/9ktb9r8azje8elr/Rm2k-Game-Windowed.zip/file" rel="external nofollow">Rm2k-Game-Windowed </a>
			</h3>

			<div>
				MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
			</div>

			<div>
				 
			</div>
		</div>
	</div>
</div>

<div>
	<br />
	I have tested on Windows 8/8.1 and Windows 10, still plan to test on Windows 7 and Windows XP.<br />
	<br />
	If there is a virus alert or any problem, please don't run the program, take a screenshot of the error, delete the program and let me know here.<br />
	<br />
	Now follows a brief tutorial of the options you can use with this program.<br />
	You should put this program inside your game folder, and instead of starting <b>RPG_RT.exe</b>, you should start <b>Game.exe</b>.<br />
	<br />
	You can change the program name to the title of your game.<br />
	<br />
	Through this program the game will run in windowed mode with a resolution of 640x480 and you cannot switch to full screen with F4 or 320x240 with the F5 key.<br />
	<br />
	To enable any of the keys, customize the settings in RPG_RT.ini.<br />
	 
	<h3>
		Enable Function-Keys:
	</h3>
	Enable F4 Key (Toggle fullscreen/windowed):

	<div>
		<div dir="ltr">
			<pre class="ipsCode">
F4Enabled=1</pre>

			<p>
				 
			</p>
		</div>
	</div>
	<br />
	Enable F5 Key (Window size 1x/2x):
	<div>
		<div dir="ltr">
			<pre class="ipsCode">
F5Enabled=1</pre>

			<p>
				 
			</p>
		</div>
	</div>
	<br />
	Enable F12 Key (Restart Game/Goto TitleScreen):
	<div>
		<pre class="ipsCode">
F12Enabled=1
</pre>

		<p dir="ltr">
			 
		</p>
	</div>

	<h3>
		Fullscreen Mode:
	</h3>
	To enable full screen, if you want the player to never switch to windowed mode, just include this in the RPG_RT.ini:

	<div>
		<div dir="ltr">
			<pre class="ipsCode">
Fullscreen=1</pre>

			<p>
				 
			</p>
		</div>
	</div>
	 

	<h3>
		Dynamic Change Icon:
	</h3>
	The Game.exe will dynamically replace the icon in the window and taskbar without affecting RPG_RT.exe. If you prefer to place a custom icon, just copy your own icon into the game folder and rename it to RPG_RT.ico.<br />
	<br />
	If you prefer the game to have the default icon, enable in RPG_RT.ini:
	<div>
		<div dir="ltr">
			<pre class="ipsCode">
Icondefault=1</pre>

			<p>
				 
			</p>
		</div>
	</div>
	 

	<h3>
		Splash Image:
	</h3>
	To make a splash image appear before starting the game place a PNG format image in the folder and rename it <i>Splash.png</i>. The image doesn't need to be transparent, just include the <strong>#000</strong> color in all the points that the executable itself will make transparent.
</div>
]]></description><guid isPermaLink="false">42918</guid><pubDate>Mon, 28 Jun 2021 04:55:56 +0000</pubDate></item><item><title>Tutorial: Parallax mapping</title><link>https://www.rpgmakercentral.com/topic/42897-tutorial-parallax-mapping/</link><description><![CDATA[
<p>
	Hello!<br />
	<br />
	Here, i want to share some of my videotutorials for RPG maker 2003
</p>

<p>
	 
</p>

<p>
	Hope it can help pepople using this engine <span>:)<br />
	<br />
	<a href="https://youtu.be/lx_sG-UNrfg" rel="external nofollow">Parallax Mapping Videotutorial</a></span>
</p>
]]></description><guid isPermaLink="false">42897</guid><pubDate>Sun, 30 May 2021 03:52:41 +0000</pubDate></item><item><title>Damage Formulas 101 (MV Edition)</title><link>https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/</link><description><![CDATA[
<div style="text-align:center;"><span style="font-size:24px;">Damage Formulas 101</span></div>
<br /><div style="text-align:center;"><span style="font-size:10px;">MV Edition</span></div>
<br /><div> </div>
<br /><div>You probably wondered how to make a skill do more damage against enemies with a state, or heal more if player has a state, or deal exactly half of enemy's HP. And so on.</div>
<br /><div> </div>
<br /><div>All of that and more can be done through custom damage formula.</div>
<br /><div><img src="http://puu.sh/lWusu/692ef73ebc.png" alt="692ef73ebc.png" /></div>
<br /><div> </div>
<br /><div> </div>
<br /><div><span style="font-size:18px;"><strong>Basics:</strong></span></div>
<br /><div> </div>
<br /><div>
<strong>Type </strong>- sets what does the formula damage or heal.</div>
<br /><div>None - Nothing, no damage will be dealt.</div>
<br /><div>HP Damage - HP will be damaged</div>
<br /><div>MP Damage - MP will be damaged</div>
<br /><div>HP Recover - HP will be restored</div>
<br /><div>MP Recover - MP will be restored</div>
<br /><div>HP Drain - Deals damage to enemy HP and restores that much HP for attacker</div>
<br /><div>MP Drain - Deals damage to enemy MP and restores that much MP for attacker</div>
<br /><div> </div>
<br /><div>
<strong>Element </strong>- Sets which element to use. Normal attack - means will use same element as weapon.</div>
<br /><div> </div>
<br /><div>
<strong>Variance </strong>- How will damage fluctuate. E.g. If skill formula says it deals 100 damage and variance is 20%, the skill will deal between 80 and 120 damage.</div>
<br /><div> </div>
<br /><div>
<strong>Critical </strong>- Can skill critically hit, dealing increased damage by 300%.</div>
<br /><div> </div>
<br /><div>And now, the actual fun part - formulas!</div>
<br /><div>It decides how much damage will opponent take or ally will heal.</div>
<br /><div> </div>
<br /><div>Let's dissect one of basic formulas that come with RPG Maker MV - Fire</div>
<br /><div>100 + a.mat * 2 - b.mdf * 2</div>
<br /><div> </div>
<br /><div><strong>What do things like <em>a</em> and <em>b</em> mean?</strong></div>
<br /><div>a - attacker</div>
<br /><div>b - defender</div>
<br /><div><em>So if Actor Glasses were to cast Fire on a Slime. a would be Glasses and b would be Slime.</em></div>
<br /><div> </div>
<br /><div>Meaning the takes double of Glasses mat (Magic Attack) parameter and subtracts double of Slime's mdf (Magic Defense) parameter and adds that to the 100 in the beginning ofthe formula.</div>
<br /><div>E.g. Glasses has 100 mat and Slime has 20 mdf. If we were to convert fomula using those numbers, we'd have - 100 + 100*2 - 20*2, after calculation we see with those parameters Fire would deal 260 damage if there were no variance.</div>
<br /><div> </div>
<br /><div>But <strong>only last number in the formula deals damage.</strong> If you had 2 lines of formula. (semicolon ; tells where line ends for the program)</div>
<br /><div>E.g. a.atk; a.atk*2</div>
<br /><div>Only a.atk*2 would be calculated for damage.</div>
<br /><div> </div>
<br /><div><strong>Are there more letters other than a and b for the formulas? </strong></div>
<br /><div>Yes. There are variables. Which are used like this: v[iD]. ID - index of the variable.</div>
<br /><div>So you could have a skill that gets stronger the higher variable is.</div>
<br /><div>E.g. v[10] * 2 - b.def * 3</div>
<br /><div> </div>
<br /><div>
<strong>Is there a way to make skill even more complex</strong>, e.g. if some variable is over 100, deal extra damage?</div>
<br /><div>Yes, in that case we can use if else statements.</div>
<br /><div>How if else statement looks:</div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
if (statement)<br />
{<br />
   formula1;<br />
}<br />
else<br />
{<br />
   formula2;<br />
}</pre>
<br /></div>
<br /><div> </div>
<br /><div>
<strong>But how to write it to the damage formula?</strong> It only has 1 line!</div>
<br /><div>Just write everything together~</div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
if (statement) { formula1; } else { formula2; }</pre>
<br /></div>
<br /><div>E.g.: </div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
if (v[10] &gt; 100) { a.atk*4 - b.def*2 } else { a.atk*2 - b.def*2 }</pre>
<br /></div>
<br /><div><strong>Which can be shortened to this if you're using only 1 line of formula.</strong></div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
if (statement)<br />
   formula1;<br />
else<br />
   formula2;<br /></pre>
<br /></div>
<br /><div>E.g.: </div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
if (v[10] &gt; 100) a.atk*4 - b.def*2; else a.atk*2 - b.def*2;</pre>
<br /></div>
<br /><div> </div>
<br /><div>
<strong>And you can shorten it even further using ternary operator</strong> (my favorite one):</div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
statement ? formula1 : formula2;</pre>
<br /></div>
<br /><div>E.g.:</div>
<br /><div>
<br /><pre class="ipsCode prettyprint"><br />
 v[10] &gt; 100 ? a.atk*4 - b.def*2 : a.atk*2 - b.def*2;</pre>
<br /></div>
<br /><div> </div>
<br /><div><strong>Symbols for statements:</strong></div>
<br /><div>&gt; - more than</div>
<br /><div>&lt; - less than</div>
<br /><div>&gt;= more than or equal to</div>
<br /><div>&lt;= less than or equal to</div>
<br /><div>=== equal to</div>
<br /><div>&amp;&amp; and</div>
<br /><div>|| or</div>
<br /><div>!== not equal</div>
<br /><div>! not</div>
<br /><div> </div>
<br /><div><strong>Examples:</strong></div>
<br /><div>v[10] &gt; 100 ? 1000 : 100; (If variable 10 is more than 100, it'll deal 1000 damage, else it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] &lt; 100 ? 1000 : 100; (If variable 10 is less than 100, it'll deal 1000 damage, else, it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] &gt;== 100 ? 1000 : 100; (If variable is 100 or more, it'll deal 1000 damage, else it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] &lt;== 100 ? 1000 : 100; (If variable is 100 or less, it'll deal 1000 damage, else it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] === 100 ? 1000: 100; (If variable is equal to 100, it'll deal 1000 damage, else it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] &gt; 50 &amp;&amp; v[11] &gt;== 25 ? 1000 : 100; (If variable 10 is more than 50 and variable 11 is 25 or more, it'll deal 1000 damage, else it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] &gt; 50 || v[11] &gt; 50 ? 1000 : 100; (If variable 10 is more than 50 or variable 11 is more than 50 then it'll deal 1000 damage, it'll only deal 100)</div>
<br /><div> </div>
<br /><div>v[10] !== 100 ? 1000 : 100; (If variable 10 is not equal to 100, it'll deal 1000 damage else it'll only deal 100)</div>
<br /><div> </div>
<br /><div><strong>What about parameters to use for a and b?</strong></div>
<br /><div>Here's a whole list of them:</div>
<br /><div> </div>
<br /><div>
<strong>Current</strong>: (All flat numbers, e.g.: 900, 999, 11)</div>
<br /><div>level - current level <em>(Actor only by default)</em>
</div>
<br /><div>hp - current hp</div>
<br /><div>mp - current mp</div>
<br /><div>tp - current tp</div>
<br /><div> </div>
<br /><div>
<strong>Params</strong>: (All flat numbers, e.g.: 1337, 7331, 156)</div>
<br /><div>mhp - max hp</div>
<br /><div>mmp - max MP</div>
<br /><div>atk - attack</div>
<br /><div>def - defence</div>
<br /><div>mat - magic attack</div>
<br /><div>mdf - magic defence</div>
<br /><div>agi - agility</div>
<br /><div>luk - luck</div>
<br /><div> </div>
<br /><div>
<strong>XParams</strong>: (All decimal numbers symbolizing percent, e.g. 1.0, 0.5, 0.75, 2.44 would be 100%, 50%, 75%, 244%)</div>
<br /><div>hit - Hit rate</div>
<br /><div>eva - Evasion rate</div>
<br /><div>cri - Critical rate</div>
<br /><div>cev - Critical evasion rate</div>
<br /><div>mev - Magic evasion rate</div>
<br /><div>mrf - Magic reflection rate</div>
<br /><div>cnt - Counter attack rate</div>
<br /><div>hrg - HP regeneration rate</div>
<br /><div>mrg - MP regeneration rate</div>
<br /><div>trg - TP regeneration rate</div>
<br /><div> </div>
<br /><div>
<strong>SParams</strong>:(All decimal numbers symbolizing percent, e.g. 1.0, 0.5, 0.75, 2.44 would be 100%, 50%, 75%, 244%)</div>
<br /><div>tgr - Target Rate</div>
<br /><div>grd - Guard effect rate</div>
<br /><div>rec - Recovery effect rate</div>
<br /><div>pha - Pharmacology</div>
<br /><div>mcr - MP Cost rate</div>
<br /><div>tcr - TP Charge rate</div>
<br /><div>pdr - Physical damage rate</div>
<br /><div>mdr - Magical damage rate</div>
<br /><div>fdr - Floor damage rate</div>
<br /><div>exr - Experience rate</div>
<br /><div> </div>
<br /><div><strong>How about changing HP/MP/TP?</strong></div>
<br /><div>gainHp(value) - restores HP by value</div>
<br /><div>gainMp(value) - restores MP by value</div>
<br /><div>gainTp(value) - restores TP by value</div>
<br /><div> </div>
<br /><div>setHp(hp) - sets HP to value</div>
<br /><div>setMp(mp) - sets MP to value</div>
<br /><div>setTp(tp) - sets TP to value</div>
<br /><div>E.g. a.setHp(a.mhp)</div>
<br /><div>E.g. a.setHp(a.hp + 100)</div>
<br /><div> </div>
<br /><div>clearTp() - sets TP to 0</div>
<br /><div> </div>
<br /><div> </div>
<br /><div><strong>What about advanced stuff where you can influence formulas with states?</strong></div>
<br /><div>We got all that!</div>
<br /><div>isStateAffected(stateId) - checks if battler has state inflicted to them.</div>
<br /><div>E.g. b.isStateAffected(10) ? 10000 : 1;</div>
<br /><div> </div>
<br /><div>isDeathStateAffected() - checks if battler has death state inflicted to them.</div>
<br /><div>E.g. b.isDeathStateAffected() ? 10000 : 1;</div>
<br /><div> </div>
<br /><div>resetStateCounts(stateId) - refreshes how long state will last for the battler</div>
<br /><div>if (b.isStateAffected(10)) b.resetStateCounts(10); 100</div>
<br /><div> </div>
<br /><div>updateStateTurns() - shortens all states on battler by 1 turn</div>
<br /><div>b.updateStateTurns(); 100</div>
<br /><div> </div>
<br /><div>addState(stateId) - adds state to the battler</div>
<br /><div>if (!b.isStateAffected(10)) b.addState(10); 100</div>
<br /><div> </div>
<br /><div>isStateAddable(stateId) - checks if state can be added to the battler</div>
<br /><div>c=100; if (b.isStateAddable(10)) b.addState(10); else c=4000; c</div>
<br /><div> </div>
<br /><div>removeState(stateId) - removes state from the battler</div>
<br /><div>if (a.isStateAffected(10)) a.removeState(10); 0</div>
<br /><div> </div>
<br /><div>
<br /><div> </div>
<br /><div> </div>
<br /></div>
<br /><div><strong>What about buffs? Can we buff and debuff battlers?</strong></div>
<br /><div>Yes!</div>
<br /><div>addBuff(paramId, turns) - adds a buff for a parameter</div>
<br /><div>a.addBuff(0, 3); b.def*10</div>
<br /><div> </div>
<br /><div>addDebuff(paramId, turns) - adds a debuff for a parameter</div>
<br /><div>b.addDebuff(2, 10); 9999</div>
<br /><div> </div>
<br /><div>removeBuff(paramId) - removes a buff or debuff from a battler</div>
<br /><div>removeAllBuffs() - removes all buffs and debuffs from a battler</div>
<br /><div> </div>
<br /><div>
<br /><div><strong>Parameter IDs</strong></div>
<br /><div>0 - Max HP</div>
<br /><div>1 - Max MP</div>
<br /><div>2 - Attack</div>
<br /><div>3 - Defence</div>
<br /><div>4 - Magic Attack</div>
<br /><div>5 - Magic Defence</div>
<br /><div>6 - Agility</div>
<br /><div>7 - Luck</div>
<br /></div>
<br /><div> </div>
<br /><div><strong>General Battler Stuff</strong></div>
<br /><div>die() - kills the battler</div>
<br /><div>b.die(); 0</div>
<br /><div> </div>
<br /><div>revive() - revives the battler</div>
<br /><div>a.revive(); 1000</div>
<br /><div> </div>
<br /><div>paramBase(paramId) - gets base parameter</div>
<br /><div>a.paramBase(3)*10 - b.def*2</div>
<br /><div> </div>
<br /><div>paramPlus(paramId) - gets the bonus of parameter</div>
<br /><div>a.paramPlus(3)*2 - b.def*2</div>
<br /><div> </div>
<br /><div>paramMax(paramId) - gets max possible value of parameter</div>
<br /><div>b.paramMax(0)</div>
<br /><div> </div>
<br /><div>elementRate(elementId) - checks element rate of the battler (rate being decimal numbers representing %)</div>
<br /><div>b.elementRate(10) &gt;== 0.5 ? 10000 : a.mat*4;</div>
<br /><div> </div>
<br /><div>isStateResist(stateId) - checks whether the battler resists state</div>
<br /><div>c=0; b.isStateResist(10) ? c+=2000 : b.addState(10); c</div>
<br /><div> </div>
<br /><div>isSkillTypeSealed(stypeId) - checks if battler's skill type is sealed</div>
<br /><div>isSkillSealed(skillId) - checks if battler's skill is sealed</div>
<br /><div>isEquipTypeSealed(etypeId) - checks if battler's equip type is sealed</div>
<br /><div>isDualWield() - checks if battler can dual wield</div>
<br /><div>isGuard() - checks if battler is guarding</div>
<br /><div>recoverAll() - removes all states, restores HP and MP to max</div>
<br /><div> </div>
<br /><div>hpRate() - checks HP rate of battler</div>
<br /><div>mpRate() - checks MP rate of battler</div>
<br /><div>tpRate() - checks TP rate of battler</div>
<br /><div>b.hpRate() &lt; 0.5 ? b.hp-1 : 100;</div>
<br /><div> </div>
<br /><div>isActor() - checks if battler is actor</div>
<br /><div>isEnemy() - checks if battler is enemy</div>
<br /><div>escape() - escapes from battle</div>
<br /><div>b.escape() (makes enemy run away)</div>
<br /><div> </div>
<br /><div>consumeItem(item) - eat up an item</div>
<br /><div>a.consumeItem($dataItems[15]); 100</div>
<br /><div> </div>
<br /><div> </div>
<br /><div> </div>
<br /><div><strong>For actor only:</strong></div>
<br /><div>currentExp() - current EXP</div>
<br /><div>currentLevelExp() - EXP needed for current level</div>
<br /><div>nextLevelExp() - EXP needed for next level</div>
<br /><div>nextRequiredExp() - EXP left until next level</div>
<br /><div>maxLevel() - max level of actor</div>
<br /><div>isMaxlevel() - is actor max level (true/false)</div>
<br /><div>hasWeapon() - is actor wielding a weapon (true/false)</div>
<br /><div>hasArmor() - is actor wearing any armor (true/false)</div>
<br /><div>clearEquipments() - unequip everything actor is wearing</div>
<br /><div>isClass(gameClass) - checks if actor is of a class (gameClass - $dataClasses[iD])</div>
<br /><div>hasNoWeapons() - checks if actor doesn't have any weapons</div>
<br /><div>levelUp() - levels actor up</div>
<br /><div>levelDown() - level actor down</div>
<br /><div>gainExp(exp) - gives actor exp</div>
<br /><div>learnSkill(skillId) - makes actor learn a skill</div>
<br /><div>forgetSkill(skillId) - makes actor forget a skill</div>
<br /><div>isLearnedSkill(skillId) - checks if actor has a skill learned</div>
<br /><div>actorId() - returns Actor's ID</div>
<br /><div> </div>
<br /><div>
<br /><div> </div>
<br /><div><span style="font-weight:bold;">For enemy only:</span></div>
<br /><div>enemyId() - returns Enemy's ID</div>
<br /><div> </div>
<br /><div><strong>What about Math? Can we use Math methods inside the formula?</strong></div>
<br /><div>Yup, you totally can.</div>
<br /><div> </div>
<br /><div>Math.random() - returns a random number between 0 and 1 (0 &lt;= n &lt; 1)</div>
<br /><div>Math.min(<em>numbers</em>) - returns a minimum number from provided numbers.</div>
<br /><div>E.g. Math.min(10, 50, 40, 200) - would return 10.</div>
<br /><div> </div>
<br /><div>Math.max(<em>numbers</em>) - returns a maximum number from provided numbers.</div>
<br /><div>E.g. Math.max(10, 50, 40, 200) - would return 200.</div>
<br /><div> </div>
<br /><div>Math.round(<em>number</em>) - rounds a number to nearest integer.</div>
<br /><div>Math.ceil(<em>number</em>) - rounds the number up to nearest integer.</div>
<br /><div>Math.floor(<em>number</em>) - rounds the number down to nearest integer.</div>
<br /><div> </div>
<br /><div><b>Math.rand() returns a number between 0 and 1, but can we get a random number between 1 and 100? Or 5 and 200?</b></div>
<br /><div>No problem:</div>
<br /><div> </div>
<br /><div>
<br /><div>Math.floor(Math.random()*100)+1</div>
<br /><div>^ That would return a number between 1 and 100. If we didn't add 1 at the end, it'd only return a number between 0 and 99.</div>
<br /><div> </div>
<br /><div><strong>But that's a lot of text? Could we simplify somehow?</strong></div>
<br /><div>Thankfully, there's a method in rpg_core.js that adds Math.randomInt(max);</div>
<br /><div>So we can write the same using:</div>
<br /><div>Math.randomInt(100)+1</div>
<br /></div>
<br /></div>
<br /><div> </div>
<br /><div><strong>If you have any questions, feel free to ask or discuss various ways to make specific skills.</strong></div>
<br />]]></description><guid isPermaLink="false">36290</guid><pubDate>Tue, 15 Dec 2015 16:54:24 +0000</pubDate></item><item><title>Script Call Master List</title><link>https://www.rpgmakercentral.com/topic/41283-script-call-master-list/</link><description><![CDATA[
<p>
	First things first.<u><strong> I did not compile the following list. </strong></u>  I don't remember who did, its not the same one Archeia posted previously. If the original poster has some issue with this being reposted pm me or report the thread and I'll remove it.
</p>

<p>
	Anyways, I'm just reposting this as I had a local copy and I remembered that a lot of the previous links to 'script call master lists' were broken when this site and the Degica one upgraded software. So, here it is: (I'm too lazy to reformat it <img alt=":P" data-emoticon="" height="20" src="https://www.rpgmakercentral.com/uploads/emoticons/default_tongue.png" srcset="https://www.rpgmakercentral.com/uploads/emoticons/tongue@2x.png 2x" title=":P" width="20" /> )
</p>

<p>
	 
</p>

<p>
	Variables<br />
	$game_variables[n]<br />
	Switches<br />
	$game_switches[n]<br />
	Conditional Branch<br />
	if #something<br />
	#something<br />
	else<br />
	#something<br />
	end<br />
	Show Picture<br />
	screen.pictures[index].show(file_name, upperleft/center, x, y, x zoom, y zoom, opacity, blend type)<br />
	Move Picture<br />
	screen.pictures[n].move(0/1 (top left or center), x, y, zoom1, zoom2, opacity, blend type (0,1, 2), wait)<br />
	Picture Tone<br />
	screen.pictures[n].start_tone_change(Tone.new(0, 0, 0, 0), wait)<br />
	Looping<br />
	For<br />
	#something<br />
	end<br />
	Move Event<br />
	move_route = RPG::MoveRoute.new<br />
	move_route.repeat = false<br />
	move_route.skippable = true<br />
	m = RPG::MoveCommand.new<br />
	m.code = 45 #The List of M Code can be found over Game_Character, this current m.code is call script<br />
	m.parameters = ["script call here"]<br />
	move_route.list.insert(0,m.clone)<br />
	$game_player.force_move_route(move_route)<br />
	Transfer Event Location<br />
	$game_map.events[id].moveto(new_x, new_y)<br />
	Transfer Player<br />
	$game_player.reserve_transfer(map_id, x, y, direction)<br />
	Screen Tint<br />
	t = Tone.new(red,green,blue, gray)<br />
	screen.start_tone_change(t, duration)<br />
	Shake Screen<br />
	@params = []<br />
	@params[0] = power or $game_variables[x]<br />
	@params[1] = speed or $game_variables[y]<br />
	@params[2] = duration or $game_variables[z]<br />
	Note: (Neonblack and Fomar0153 found this glitch!)<br />
	The shake screen has an option in the editor where you can add a "wait" or not. But the glitch involves that it will wait no matter what. But it will only wait a number of frames equal to whatever the speed is set to the default option. For example, the setting is 5 power, 5 speed, 60 frames, and wait. It will wait for 5 frames, no matter what.<br />
	 <br />
	Call Common Event:<br />
	 <br />
	$game_temp.reserve_common_event(id)<br />
	Play SE/ME/BGS/BGM:<br />
	 <br />
	RPG::SE.new("SE Name", volume, pitch).play<br />
	RPG::ME.new("ME Name", volume, pitch).play<br />
	RPG::BGS.new("BGS Name", volume, pitch).play<br />
	RPG::BGM.new("BGM Name", volume, pitch).play<br />
	Show Text:<br />
	 <br />
	$game_message.add("Text")<br />
	Gain/lose Item:<br />
	 <br />
	$game_party.gain_item($data_items[id], amount)<br />
	$game_party.lose_item($data_items[id], amount)<br />
	(For weapons/armor use $data_weapons or $data_armors in place of $data_items.)
</p>

<p>
	Gather Followers:<br />
	 <br />
	$game_player.followers.gather<br />
	Change Player Followers:<br />
	 <br />
	$game_player.followers.visible = true or false<br />
	Erase Event:<br />
	 <br />
	$game_map.events[event_id].erase<br />
	Some conditional script calls to add to Celianna's:<br />
	Button pressing<br />
	 <br />
	Input.repeat?:)A)<br />
	Input.press?:)A)<br />
	Movement<br />
	 <br />
	$game_player.dash?<br />
	$game_player.jumping?<br />
	$game_map.events[event_id].moving?<br />
	$game_map.events[event_id].jumping?<br />
	Location<br />
	 <br />
	$game_map.events[event_id].x<br />
	$game_map.events[event_id].y<br />
	$game_player.x<br />
	$game_player.y<br />
	Remove Actor<br />
	 <br />
	$game_party.remove_actor(actor_id)<br />
	Add Actor<br />
	 <br />
	$game_party.add_actor(actor_id)<br />
	Remove Party Member from position (where x = party position. 0 = 1st member, 1 = 2nd member, etc.)<br />
	 <br />
	m = $game_party.members<br />
	$game_party.remove_actor(m[x].id)<br />
	If you ever wanted to add every item/skills/weapons for debugging purpose (or something else?) it can be kind of tedious to add them all if you have alot. This small script call will help immensely:<br />
	 <br />
	$data_items.each { |i|<br />
	next if i.nil? or i.name == ""<br />
	$game_party.gain_item(i, 99)<br />
	}<br />
	Of course, if you want you can change $data_items to $data_weapons or something else and the amount you want.
</p>

<p>
	When checking for input triggers/pressing you can actually shorten that a bit:<br />
	 <br />
	Input.trigger?:)CTRL)<br />
	There is no need to write Input::CTRL anymore.
</p>

<p>
	To get the leader of the party you can do this:<br />
	 <br />
	$game_party.leader<br />
	Gain/lose gold:<br />
	 <br />
	$game_party.gain_gold(amount)<br />
	$game_party.lose_gold(amount)<br />
	Check for current max gold:<br />
	 <br />
	$game_party.max_gold<br />
	Get map id and name:<br />
	 <br />
	$game_map.map_id<br />
	$game_map.name<br />
	To correct the screen shake bug thing do the following at Game_Interpreter:<br />
	 <br />
	def command_225<br />
	screen.start_shake(@params[0], @params[1], @params[2])<br />
	wait(@params[2]) if @params[2]<br />
	end<br />
	Now it will wait the right amount of frames and not 5.<br />
	 <br />
	$game_player.region_id == n<br />
	$game_map.events[event_id].region_id == n<br />
	Show Choices<br />
	 <br />
	params = []<br />
	choices = []<br />
	choices.push("choice 1")<br />
	choices.push("choice 2")<br />
	params.push(choices)<br />
	params.push(0/1/2 this part is where you press cancel and which choice to default)<br />
	setup_choices(params)<br />
	It is pretty easy to fake the When [**] command (402).<br />
	The definition is just
</p>

<p>
	 <br />
	command_skip if @branch[@indent] != @params[0]<br />
	Where @params stores the choice number for that specific branch (0, 1, 2, ... )
</p>

<p>
	So all you have to do is replace @params[0] with an integer
</p>

<p>
	 <br />
	if @branch[@indent] == 0<br />
	# branch for first choice<br />
	elsif @branch[@indent] == 1<br />
	# branch for second choice<br />
	end<br />
	Editor line continuation<br />
	$game_variables[12] = ($game_variables[6] ==<br />
	$game_variables[10]) &amp;&amp; ($game_variables[7] == $game_variables[11]) &amp;&amp;<br />
	($game_variables[8] == $game_variables[10]) &amp;&amp;<br />
	($game_variables[9] == $game_variables[11])<br />
	change the text dialog background:<br />
	$game_message.background = 1 #0 = default blue, 1 = dim, 2 = transparent<br />
	 <br />
	Equip weapon<br />
	$game_actors[1].change_equip(0,$data_weapons[1])<br />
	the 0 value in the above code snippet can have the following values:<br />
	0 = weapon<br />
	1 = shield<br />
	2 = headgear<br />
	3 = body-gear (armor)<br />
	4 = accessory<br />
	 <br />
	 <br />
	Transfer player<br />
	$game_player.reserve_transfer(map_id, x, y, $game_player.direction)<br />
	$game_player.followers.visible = true or false<br />
	Audio.se_play(name, volume, pitch)<br />
	Is Weapon Equipped?<br />
	$game_actors[actor id].weapons.include?($data_weapons[weapon id])<br />
	Access self switches<br />
	$game_self_switches[[mapid, eventid, 'A']] = true
</p>

<p>
	Make sure you use [[...]] and not just [...]<br />
	Get Currency Unit<br />
	$data_system.currency_unit<br />
	For any equipment, you can use this:<br />
	  right_hand = $game_actors[actor_id].equips[0]<br />
	  left_hand = $game_actors[actor_id].equips[1]<br />
	To get the items. Replace the index in equips for the item you're looking for (0 = right hand, 1 = left hand, 2 = head, 3 = body, 4 = accessory, provided you're not using any scripts that change that).<br />
	 <br />
	You can check their types with:<br />
	  if right_hand.is_a?(RPG::Weapon)<br />
	    # do something<br />
	  elsif right_hand.is_a?(RPG::Armor)<br />
	   # do something else<br />
	  end<br />
	Or get their properties with with<br />
	  right_hand.id<br />
	  right_hand.name<br />
	  right_hand.icon_index<br />
	  right_hand.description<br />
	  # etc..<br />
	 i.e. if you want to check if you have a Prinny Gun equipped on your first weapon slot:<br />
	  right_hand = $game_actors[actor_id].equips[0]<br />
	  if !right_hand.nil? &amp;&amp; right_hand.name.eql?("Prinny Gun")<br />
	    # Do something<br />
	  end<br />
	You don't even need to keep track of the IDs, really (unless you want to, for some reason). If there's no way to not have a weapon equipped in your game, you can also take out the ".nil?" check.<br />
	 <br />
	Showing a text box with pure script<br />
	 <br />
	$game_message.position = X<br />
	0 -Top<br />
	1- Middle<br />
	2- Bottom
</p>

<p>
	<br />
	$game_message.background = X<br />
	0 - Normal<br />
	1 - Faded<br />
	2 - Transparent<br />
	 <br />
	$game_message.face_name = 'Actor1' &lt;- Name of the graphic plate<br />
	$game_message.face_index = 0 &lt;- Position in the plate of the face you are using.<br />
	 <br />
	$game_message.face_name = 'Actor1'<br />
	$game_message.face_index = 0<br />
	$game_message.background = 2<br />
	$game_message.position = 0<br />
	$game_message.add("Text")<br />
	$game_player.passable?(x, y, d) and $game_map.events[event_id].passable?(x, y, d)
</p>

<p>
	are extensions to this that do a little more detailed checking.
</p>

<p>
	$game_map.passable? only tells you whether you can leave one tile in the direction of the other. The player and event versions take it further and tell you if you can leave that tile in the direction of the other AND if you can enter the other tile from the tile you're on now (for example, if you are facing right and the tile in front of you is the edge of a cliff that is higher than you - $game_map.passable? would tell you that you CAN step right from the current tile. But $game_player.passable? would tell you that you could not move onto the next tile from the left). It also looks to see if there is an event on your target tile which would stop you going there, but $game_map.passable? would not tell you that.<br />
	Check HP<br />
	You can check an actor's current hp with:<br />
	 <br />
	$game_actors[x].hp<br />
	Or the leader's current hp:<br />
	 <br />
	$game_party.leader.hp<br />
	Or a member of the party:<br />
	 <br />
	$game_party.members[x].hp<br />
	Check Items<br />
	Here's the script from Game_Interpreter that places the quantity of an item into a variable:<br />
	 <br />
	$game_party.item_number($data_items[param1])<br />
	So you'd just change param1 to the item id you're interested in, and add your condition around it:<br />
	 <br />
	if $game_party.item_number($data_items[32]) == 15<br />
	Checking how many of a particular type of weapon or armor is very similar:<br />
	 <br />
	$game_party.item_number($data_weapons[param1])<br />
	$game_party.item_number($data_armors[param1])<br />
	Access Event by Name<br />
	# Code by Filip H.F. "FiXato" Slagter<br />
	# Place this under Materials and above Main Process and before any scripts that would make use of it.<br />
	# Allows you to also use Game Switch *names* instead of just IDs in $game_switches[] calls.<br />
	class Game_Switches<br />
	# Overload the [] method so we can also call switches by their name, for instance:<br />
	# $game_switches['my switch']<br />
	alias_method :find_by_name, :[]<br />
	def [](switch)<br />
	switch_id = (switch.kind_of?(String) ? $data_system.switches.find_index(switch) : switch)<br />
	find_by_name(switch_id)<br />
	end<br />
	 <br />
	# Overload the []= method so we can also set switches by their name, for instance<br />
	# $game_switches['my switch'] = true<br />
	alias_method :set_by_name, :[]=<br />
	def []=(switch,value)<br />
	switch_id = (switch.kind_of?(String) ? $data_system.switches.find_index(switch) : switch)<br />
	set_by_name(switch_id, value)<br />
	end<br />
	end
</p>

<p>
	    Recover All for your entire party:
</p>

<p>
	@params = [0, 0]<br />
	command_314<br />
	 <br />
	 <br />
	 <br />
	 <br />
	Show a named animation (in this case 'Sleep') for the player and wait for it to end:<br />
	animation_name = 'Sleep'<br />
	animation_id = $data_animations.find_index{|ani|ani &amp;&amp; ani.name == animation_name}<br />
	@params = [-1, animation_id, true]<br />
	command_212<br />
	Move_Route_Turn<br />
	$game_map.events[eventid].set_direction(#)<br />
	2 = down, 4 = left, 6 = right, 8 = up.<br />
	 <br />
	Event Ballon<br />
	$game_map.events[eventid].balloon_id = # where # is the row of the balloon spritesheet you want to show (I think the top row is 1, not 0), and eventid is the id of the event<br />
	Player Facing<br />
	$game_player.direction
</p>

<p>
	2 = down<br />
	4 = left<br />
	6 = right<br />
	8 = up<br />
	If ActorX or ActorY is in party<br />
	$game_party.members.include?($game_actors[X]) or $game_party.members.include?($game_actors[Y])<br />
	Or<br />
	$game_party.members.any? {|a| [X,Y].include?(a.id)}<br />
	Change Actor Graphic<br />
	actor.set_graphic(character_name, character_index, face_name, face_index)<br />
	Use Item<br />
	$game_actors[id].use_item($data_items[x])<br />
	$game_party.leader.use_item($data_items[x])<br />
	$game_party.members[index].use_item($data_items[x])<br />
	Show Battle Animation<br />
	Show Battle Animation:
</p>

<p>
	    @enemy_index = 0<br />
	    @animation_id = 1<br />
	     <br />
	    iterate_enemy_index(@enemy_index) do |e|<br />
	    e.animation_id = @animation_id if e.alive?<br />
	    end
</p>

<p>
	That will show a battle animation.<br />
	 <br />
	Shop Processing<br />
	# goods = [[type, id, price_override_flag(, price)]] Ex:<br />
	goods = [[0,1,1,25],[0,2,0]]<br />
	SceneManager.call(Scene_Shop)<br />
	SceneManager.scene.prepare(goods, true)<br />
	Or<br />
	goods = []<br />
	for id in 1..20<br />
	goods.push([0, id, 0])<br />
	end<br />
	SceneManager.call(Scene_Shop)<br />
	SceneManager.scene.prepare(goods, true)<br />
	 <br />
	Store Actor Level<br />
	$game_variables[x] = $game_actors[id].level<br />
	Control Weather<br />
	$game_map.screen.change_weather(type, power, duration)<br />
	where type is :none, :rain, :storm, or :snow, and power and duration are what you would have set the sliders to on the box.
</p>

<p>
	followed by Wait X Frames if you want it to halt processing until the weather is set.<br />
	Move Set Route -&gt; Change Graphic<br />
	$game_map.events[id].set_graphic("character_name", character_index)<br />
	id is the id of the event you want to change.<br />
	"character_name" is the name of the graphic file you want to change to (make sure to keep the quotation marks).<br />
	character_index is the index on the character sheet (it starts counting at 0).
</p>
]]></description><guid isPermaLink="false">41283</guid><pubDate>Tue, 19 Dec 2017 19:56:26 +0000</pubDate></item><item><title>Making a Balanced Game</title><link>https://www.rpgmakercentral.com/topic/4933-making-a-balanced-game/</link><description><![CDATA[
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><strong>Note:</strong></span></span><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"> First off, this will be my first tutorial! Not to mention my first post! Also, I created this tutorial for two reasons, one, I was tired of not seeing a tutorial on balancing the game yet, and second, the guide I've been using is for RPG Maker VX. </span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">This guide was inspired, and re-written from an old guide I use, or used to use. I'm re-writing it as it doesn't fit in with all the new features of Ace. If you would like to check it out, here it is! </span></span><a href="http://www.rpgmakervx.net/index.php?showtopic=47252" rel="external nofollow"><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">http://www.rpgmakerv...showtopic=47252</span></span></a></p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">Now that that has been said, I bring you...</span></span></p></div>
<p></p>
<p></p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:36px;"><span style="font-family:arial, helvetica, sans-serif;"><strong>A guide to making a balanced game</strong></span></span></p></div>
<p></p>
<p></p>
<p> </p>
<p><strong>Table of Contents</strong></p>
<p> </p>
<p>1. EXP Curve			  </p>
<p>2. Parameter Curves			  </p>
<p>3. Creating Enemies</p>
<p>- Basic Enemies</p>
<p>- Bosses</p>
<p>4. Skills</p>
<p>5. Weapons, Armor, and Items</p>
<p>6. Money</p>
<p>7. Last Words</p>
<p> </p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>EXP Curve</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>This is pretty simple, what it does is change how fast, or slow you want your class to level up. What I normally do is leave this alone, but feel free to change it how you want! I'll do a little walk through of what each slider does.</p>
<p> </p>
<p>Base Value: It does what it says! It is the "base" number of EXP it will take to level up. Say you slide everything else down, and leave this one at 30. It will take 30 EXP to level up.</p>
<p> </p>
<p>Extra Value:This is basically just like the base value. What it does is just add on to what you have for your base value. Say again, we set the base value at 30, and the extra value at 10, it would then take 40 EXP to level up. It just adds it up.</p>
<p> </p>
<p>Acceleration A: This speeds up or slows down how much EXP it will take to level up.</p>
<p> </p>
<p>Acceleration B: Does the same thing as Acceleration A.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Parameter Curves</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>All these really do is change how much of a certain parameter to will have at a certain level. There are two main ways to change these. The first one is to just drag a line or curve you think is good, I don't recommend doing this. The second one is clicking on Generate Curve. Here is one rule I always use. For health, add two zeros on for level 99. For the rest only add one. I will walk you though all of them.</p>
<p> </p>
<p><strong>MHP:</strong> <em>(Max Health Points)</em> This is how much health you will have in total at a certain level. Say you set your level one health to 57, set your level 99 to 5700. For this one you add two zeros.</p>
<p> </p>
<p><strong>MMP:</strong> <em>(Max Magic Points)</em> This is how much magic you will have in total at a certain level. If you set your magic to 36 at level one, set your level 99 to 360. From here and the rest you add one zero.</p>
<p> </p>
<p><strong>ATK:</strong> <em>(Attack) </em>This is how much physical damage you can do at a certain level.</p>
<p> </p>
<p><strong>DEF:</strong> <em>(Defense)</em> This is how much physical damage you can take at a certain level.</p>
<p> </p>
<p><strong>MAT:</strong> <em>(Magic Attack)</em> This is how much magical damage you can do at a certain level.</p>
<p> </p>
<p><strong>MDF:</strong> <em>(Magic Defence)</em> This is how much magical damage you can take at a certain level.</p>
<p> </p>
<p><strong>AGI:</strong> <em>(Agility) </em>This is how fast you are. It controls if you miss or not, and if you have certain scripts installed, how fast you attack.</p>
<p> </p>
<p><strong>LUK:</strong> <em>(Luck)</em> This controls if you will contract a state or not. The higher your luck, the lower chance you have of getting a certain state, such as poison.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Creating Enemies</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>When making enemies, it's kind of hard to figure out how much health they will need so they won't be too easy or too hard to kill. It goes the same way for the rest of the stats. I'll give a quick walk through of what you can do to solve that problem! It is also hard to tell what level you are when you will need to kill them. So play every once in a while to tell. Remember to always check if the enemy is too strong with the Battle Test after. Also, when I make enemies, I don't just make them. I make them as I go in my game! If you make them right from the start, you don't know if they will be too strong, also you might not use most of them.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:18px;"><strong>Basic Enemies</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p><strong>Normal Enemy</strong></p>
<p> </p>
<p>MHP: Double the player's health.</p>
<p>MMP: Depends on the skills the enemy has. If it's a magic user, like a mage, give the same amount or double the enemies health. If it isn't a magic user, I recommend either none, or half of the enemies health.</p>
<p>ATK: Around 30% less than the player's attack if you are using low health and such as I am. (Using 15 health at level one.) If you are using stuff like 250 health at level one, keep it the same as the player's. If it is a magic user, I recommend half the player's attack.</p>
<p>DEF: Same as the player.</p>
<p>MAT: If it's a magic user, Around 30% less than the player's attack, or magic attack. (Which one is higher.) If it isn't, either none or half of the player's.</p>
<p>MDF: Same as the player.</p>
<p>AGI: I would recommend around one or two points higher than the player's agility.</p>
<p>LUK: Same as players.</p>
<p> </p>
<p><strong>Dungeon Enemy</strong></p>
<p> </p>
<p>MHP: Triple the player's Health.</p>
<p>MMP: Depends on the skills the enemy has. If it's a magic user, like a mage, give the same amount or double the enemies health. If it isn't a magic user, I recommend either none, or half of the enemies health.</p>
<p>ATK: Same as the player, or one point higher. If it is a magic user, around 30% higher than the player's attack.</p>
<p>DEF: Around 10% higher.</p>
<p>MAT: If it's a magic user, the same as the player's attack, or magic attack. (Which one is higher.) If it isn't, either none or half of the player's.</p>
<p>MDF: Around 10% higher.</p>
<p>AGI: Same as the player's or one point less if you use certain scripts.</p>
<p>LUK: Same or two points higher than the player's.</p>
<p> </p>
<p>Now, for making the experience they give you is kind of difficult. What I did was keep changing it until I found a decent amount. It depends on your EXP curve you set. I left mine how it was, so the first enemy I encountered has the EXP of 8. Then for the next enemy, you have to see what level you encounter it. Say I encounter the next enemy at a level of 3. I sat that enemies EXP to 14. For the gold, I use half the amount of the EXP. So for 14 EXP, I give 7 gold.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Bosses</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>For bosses it is pretty much the same as basic enemies, but with higher stats. For the experience, I give them a lot. Use the same technique as the one for basic enemies, but double the value of the experience. Then for the gold, give half of the amount from the experience.</p>
<p> </p>
<p>MHP: 5 times higher than the player's.</p>
<p>For All the Rest: Times it by 1.5 higher (Or 150%) than the player's.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Skills</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>The skills are always one thing I've hated doing. Even after finding a clever way of doing the skills, I stikk hate doing it, but that is my opinion. You could love doing it! But either way, I'll share my technic of how to make the skills.</p>
<p> </p>
<p>The first thing you want to do, is decide how much Magic (Or Technical) Points you need it to be. To do that, decide how many skills you want the class to have. Say you want to have 20 skills. Use that, and divide it by 100, then you get 5. So that means, every 5 levels, that class will get a skill. So say your first skill will be at level 5. Go to the class and find out how many MMP you will have at level 5. Once you find out, divide it by 5. That is how much MP the skill will cost!</p>
<p> </p>
<p>Now we move on to the damage, the rest is pretty self explanatory.</p>
<p> </p>
<p>Type: Pretty easy, what does the spell do?</p>
<p> </p>
<p>Element: What element is it?</p>
<p> </p>
<p>Formula: This is wear the magic happens. Click on quick, for Base Value, set that as double of your ATK or MAT. (Depending on if it's a magic user or not.) Then for Physical and Magical it's pretty simple. If it is a physical skill, set the Physical to 100, if it is a magical skill, set the Magical at 100.</p>
<p> </p>
<p>Variance: This is the range of damage. Say you leave it at 20. It will do between 20% higher or lower of what you set as your formula.</p>
<p> </p>
<p>Critical: Does the skill have a chance to land a critical?</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Weapons, Armor, and Items</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>Alright, we've came a long way haven't we? Well we are almost done!</p>
<p> </p>
<p>Let's move on, first to weapons. If it is a one handed weapon, it should be half of the player's attack. So if a player has an attack of 18, the weapon should be 9. If it is a two handed weapon, it should be 75% of the player's attack. If it is a dual wield weapon, it should be around 30% of the player's attack.</p>
<p> </p>
<p>For armor, we have three parts. The body, head, and shield. All three pieces should offer a total of 50% defense. If your player doesn't want to use a shield, then take that off and have it offer a total of 35% defense to balance it out. The body armor should offer 25% defense, the head should offer 10%, and the shield should offer 15%.</p>
<p> </p>
<p>Now for items, for now, I will just explain a healing potion. Potions for HP, it is a good idea to have the potion heal a little more than what the player actually has, for other classes as well. You should also make a potion for around every ten levels. Now, lets say you were making a potion for a level 10 player, with the HP of 198. You want the potion to heal 20% more than what you have. So for that, 39.6 is 198 of 20%. So you use 198, and round that up to 40. Then you add it, to get a total of 238. That would be how much it would heal.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><span style="font-size:24px;"><strong>Money</strong></span></p></div>
<p></p>
<p></p>
<p> </p>
<p>Now we are moving on to money, how much will it cost to buy certain items? Will you have enough money at the time of the game?</p>
<p> </p>
<p>This is pretty simple. For weapons and armor, the price should be around 10 to 15 times the amount of stats they have. Say you have a sword with 16 ATK, 6 AGI, and 2 LUK. add that up to 24, and times it around 10 to 15. I will use 10, so the price would be 240. For weapons/armor that have states or resit elements and such, they amount of the item should increase by around 25%.</p>
<p> </p>
<p>For Inns, the should make the price of it fit in with the theme of the town/city. If it is a broken up town who just came out of a war, the price should be cheap. If it is the richest kingdom in the world, it should cost a lot.</p>
<p> </p>
<p>For items, I'll again use a HP potion for example. The price should be half of what the potion does. If you have a HP potion that heals 500 HP, it should cost 250. As for other items, such as those that remove poison, or stun, they should cost around how important the state is. Something that cures poison should be cheaper than something that cures stone, while something that cures stone, should be cheaper than something that revives a character from death.</p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><strong><span style="font-size:24px;">Last Words</span></strong></p></div>
<p></p>
<p></p>
<p> </p>
<p>Now it is over! I really hope that this guide has helped. If you see any errors, or something that doesn't seem to be balanced to you let me know! I thank MrE for making the guide I used for more than a year now, and inspiring me to write an up-to-date one! Good luck on balancing your game, and have fun!</p>
]]></description><guid isPermaLink="false">4933</guid><pubDate>Mon, 25 Jun 2012 12:53:55 +0000</pubDate></item><item><title>How to Create your own MV Tool</title><link>https://www.rpgmakercentral.com/topic/42495-how-to-create-your-own-mv-tool/</link><description><![CDATA[
<p>
	This article was <a href="https://himeworks.com/2020/07/creating-mv-tools/" rel="external nofollow">originally posted on HimeWorks</a> and may not be completely up-to-date. For more articles or plugins, consider visiting my website. You can also follow me on <a href="https://twitter.com/himeworks" rel="external nofollow">Twitter @HimeWorks</a> for the latest updates.
</p>

<p>
	 
</p>

<p>
	In the previous article, I went over the <a href="http://himeworks.com/2020/07/using-mv-tools/" rel="external nofollow">basics of MV tools</a>. In this article, I’ll be going over the process of creating your own MV Tools.
</p>

<p>
	 
</p>

<p>
	<img alt="mvtools009-1024x379.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools009-1024x379.jpg" />
</p>

<p>
	 
</p>

<p>
	<span><strong>Why Create Your Own?</strong></span>
</p>

<p>
	 
</p>

<p>
	MV Tools add extra shortcuts to the editor, and will pass the current project's path to the application that the user launches. The application could be a GUI application, or it could be a console-based application that simply performs some data processing using the current project's information.
</p>

<p>
	It's mostly for user convenience, but it also makes your tool feel more official since it actually appears in the editor! Anyways, let's go through the process to creating your own MV Tool.
</p>

<p>
	 
</p>

<p>
	<span><strong>MV Tool Anatomy</strong></span>
</p>

<p>
	 
</p>

<p>
	MV Tools are actually quite simple:
</p>

<ul>
	<li>
		There’s an exe file
	</li>
	<li>
		There’s an “identification” folder.
	</li>
</ul>

<p>
	<br />
	And that’s really all there is to it.
</p>

<p>
	<img alt="mvtools010-1024x435.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools010-1024x435.jpg" /><span><strong>Executable </strong></span>
</p>

<p>
	 
</p>

<p>
	<span><strong>Application</strong></span>
</p>

<p>
	 
</p>

<p>
	This is the executable that will be launched when you press the icon in the editor. It can’t be any name though; it must be one of the following:
</p>

<p>
	 
</p>

<ul>
	<li>
		WindowBuilder.exe
	</li>
	<li>
		TilesetBuilder.exe
	</li>
	<li>
		SceneBuilder.exe
	</li>
</ul>

<p>
	<br />
	This is hardcoded into the editor, so it only expects one of these filenames. You can see it in the RPGMV.exe
</p>

<p>
	 
</p>

<p>
	<img alt="mvtools011-1024x599.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools011-1024x599.jpg" />
</p>

<p>
	 
</p>

<p>
	Anyways for testing purposes, simply create a blank text file and rename it “WindowBuilder.exe”.
</p>

<p>
	 
</p>

<p>
	<span><strong>Identification</strong></span>
</p>

<p>
	 
</p>

<p>
	This what the editor uses to get information about your MV Tool. In this folder, there’s a file called “app” (no extension) and a folder called “toolbar” which basically holds a 32×32 pixel icon that will be displayed in the editor. The “app” file is just a text file that has three lines of text:
</p>

<p>
	 
</p>

<p>
	NAME<br />
	VERSION<br />
	DESCRIPTION
</p>

<p>
	 
</p>

<p>
	Anyways so let’s set up a sample “app” file and add an icon to the toolbar folder. You can just use notepad to create the “app” file, but make sure you have file extensions enabled in your file explorer.
</p>

<p>
	<img alt="mvtools012-1024x599.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools012-1024x599.jpg" /><br />
	Now, when you go and add it to the editor, it’ll find your tool with the details you entered
</p>

<p>
	 
</p>

<p>
	<img alt="mvtools013.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools013.jpg" />
</p>

<p>
	 
</p>

<p>
	And finally, once you confirm, it will appear in your editor, like the official MV tools!
</p>

<p>
	 
</p>

<p>
	<img alt="mvtools014.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools014.jpg" />
</p>

<p>
	 
</p>

<p>
	The hime app itself does nothing because it’s just an empty file called “WindowBuilder.exe”, but you can actually add any executable app to RPG Maker MV as long as it has the identification folder, and the exe is a valid name
</p>

<p>
	 
</p>

<p>
	For example, I went and added <a href="https://notepad-plus-plus.org/" rel="external nofollow">notepad++</a> to it, which is my text editor of choice that I use for all my MV plugin development and other programming
</p>

<p>
	<img alt="mvtools015-1024x618.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools015-1024x618.jpg" />
</p>

<p>
	 
</p>

<p>
	When you click on the notepad++ icon, the editor will launch notepad++, and it will actually open something
</p>

<p>
	 
</p>

<p>
	<img alt="mvtools016.jpg" class="ipsImage" src="http://himeworks.com/blog/wp-content/uploads/2020/07/mvtools016.jpg" />
</p>

<p>
	 
</p>

<p>
	This is the Game.rpgproject file which sits in the base directory of your project folder! So basically RPG Maker MV sends the path to your project file to the application, which you can use to automatically load some data in the project for example.
</p>

<p>
	 
</p>

<p>
	<span><strong>Some Thoughts</strong></span>
</p>

<p>
	<br />
	So now you’ve learned how to create your own MV Tools. What can you do with it? Anything really. It’s just a regular application, so you can do whatever you can think of.
</p>

<p>
	Of course, your application ideally should be able to run externally, but integrating it with the editor means that users who may not be as tech-savvy will be able to run your tool on their current project without having to go and open it from outside of the editor, which might not seem like that big of a deal but could be useful.
</p>
]]></description><guid isPermaLink="false">42495</guid><pubDate>Wed, 29 Jul 2020 04:26:47 +0000</pubDate></item><item><title>How To Make An Open World RPG</title><link>https://www.rpgmakercentral.com/topic/42329-how-to-make-an-open-world-rpg/</link><description><![CDATA[
<p align="center" style="text-align:center;">
	 
</p>

<p align="center" style="text-align:center;">
	<span><span style="font-size:36pt;">How To Make An Open-World RPG</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:10px;"><span style="color:#c0392b;">*Required items* rpg maker MV | Alpha ABS| Everything else is optional and will be linked when used in the videos</span></span>
</p>

<p align="center" style="text-align:center;">
	 
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:22px;"><span style="color:#c0392b;">THE GAME WE WILL BE MAKING</span></span>
</p>

<p align="center" style="text-align:center;">
	<span><span style="font-size:36pt;">Welcome To The Island Of Hearth</span></span>
</p>

<div class="ipsEmbeddedVideo">
	<div>
		<iframe allowfullscreen="true" frameborder="0" height="270" src="https://www.youtube.com/embed/sp5s0fSlNdo?feature=oembed" width="480"></iframe>
	</div>
</div>

<p align="center" style="text-align:center;">
	<span style="color:#3498db;"><span><b><span style="font-size:36pt;">Story</span></b></span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">It was 10 decades ago when the portal opened and from</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">it evil so old, that only old and ancient magic</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">forgotten to the world can defeat It. Many have fallen</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">to this great new threat. Adventures from all over</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">the world have come to hearth looking for fame and glory.</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">But in the end. Only them who has protected Hearth for a</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">1000 years can protect it yet again. From evil old or</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">new they shall fall by their blades.</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">Your family has protected all of hearth for centuries</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">Now is no acceptation. Defeat the evil.</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">This new evil can only be defeated with the Eye of Gore</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">find and retrieve it. Then free the land once again.</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">But do not fear for even if you fall, your Ancestor</span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12px;"><span style="color:#000000;">will take your place.</span></span>
</p>

<p align="center" style="text-align:center;">
	 
</p>

<p align="center" style="text-align:center;">
	<span style="color:#3498db;"><span><b><span style="font-size:36pt;">About</span></b></span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Open-world dungeon-crawling Zelda like Skyrim type RPG.</span>
</p>

<p align="center" style="text-align:center;">
	<span style="color:#3498db;"><span><b><span style="font-size:36pt;">Classes</span></b></span></span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Noob -Starting off like everyone else</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Adventure – You’ve earned the right to venture through the dungeons.</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Warrior -You fancy a strong fighter</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;"><span>·<span>        </span></span></span><span style="font-size:12pt;">WarKnight – A warrior like no other in battle and war</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Magi – You dabble in the Arcane arts</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;"><span>·<span>        </span></span></span><span style="font-size:12pt;">WarMage – You use your learning to devastate any battlefield</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Thief – You don’t fight like the others but you get it done.</span>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;"><span>·<span>        </span></span></span><span style="font-size:12pt;">WarNinja – Using the shadows now one can see you coming in battle</span>
</p>

<p>
	<span style="font-size:12pt;"> </span>
</p>

<p align="center" style="text-align:center;">
	<span style="color:#3498db;"><span><b><span style="font-size:36pt;">features</span></b></span></span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:12pt;">Open-world </span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Explore the exciting Island of Hearth, discover the hidden mystery of the dungeons and the ancient evil.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Crafting</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Craft potions, armor, and weapons. The best gears can only be crafted.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">RPG Progression!</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">The more you use an action the better it comes. You can train different weapon types, armor, and skills. You can also add stat points as you level up!</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Action Battle system</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">No waiting for turns, plunge yourself straight into the heat of battle.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:12pt;">Visible Gear</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">See what your character is wearing.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Endless loot!</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Tones of loot from weapons to potions, spells, and other valuable items.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Mini-Games</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Enjoy many mini-games from the casino in town to the other random game across the map.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Guilds</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Four guilds to join, and rank up in with exclusive gear and benefits for joining.</span>
</p>

<p align="center" style="text-align:center;">
	<b><span style="font-size:13pt;">Time Progression</span></b>
</p>

<p align="center" style="text-align:center;">
	<span style="font-size:12pt;">Things happen as time pass.</span>
</p>

<p align="center" style="text-align:center;">
	 
</p>

<ul>
	<li>
		SETTING UP THE WORLD
		<ul>
			<li>
				<a href="https://youtu.be/FCaTBqMUXM0" rel="external nofollow">LETS MAKE AN OPEN WORLD RPG DEARHEART EP 0</a>
			</li>
			<li>
				<a href="https://youtu.be/F8RHprjEMLo" rel="external nofollow">LETS MAKE AN OPEN WORLD RPG DEARHEART EP 1</a>
			</li>
			<li>
				<a href="https://youtu.be/Mpvndz3YzNI" rel="external nofollow">LETS MAKE AN OPEN WORLD RPG DEARHEART EP 2</a>
			</li>
			<li>
				<a href="https://www.youtube.com/watch?v=fUMELwX6fZI" rel="external nofollow">LETS MAKE AN OPEN WORLD RPG DEARHEART EP</a>3
			</li>
		</ul>
	</li>
</ul>

<p>
	<span style="font-size:48px;"><a href="https://www.youtube.com/watch?v=FCaTBqMUXM0&amp;list=PLjzqi-Uj6saWrAjENfeLibsRwBEJF6tsL" rel="external nofollow">WATCH ME MAKE THE GAME</a><span style="color:#c0392b;">!</span></span>
</p>
]]></description><guid isPermaLink="false">42329</guid><pubDate>Tue, 11 Feb 2020 20:06:31 +0000</pubDate></item><item><title>How to Make an Animated Title Screen Scripting Tutorial</title><link>https://www.rpgmakercentral.com/topic/22885-how-to-make-an-animated-title-screen-scripting-tutorial/</link><description><![CDATA[
<p style="text-align:center;"><strong>How to Make an Animated Title Screen Scripting Tutorial</strong></p>
<p style="text-align:center;">Tutorial Made by: Soulpour777</p>
<p style="text-align:center;">Graphics: Moghunter's Master Demo</p>
<p style="text-align:center;"> </p>
<p><strong>Q: I wanted to make my own simple animated title screen, but I don't have the knowledge to do so. I want to make my own way of making a Title Screen just like Moghunter's scripts, can you teach me?</strong></p>
<p> </p>
<p>This is basically the goal of this tutorial. Today, we're going to make our own Animated Title Screen! Awesome, right? Yayy! Before we start, we will need the following materials! Remember that I may add new materials as we go on to the tutorial.</p>
<p> </p>
<p> </p>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents">
<p> </p>
<p>Save this with the name as <strong>Background</strong>.</p>
<p><img src="http://i.imgur.com/GdDgNhE.jpg" alt="GdDgNhE.jpg" /></p>
<p> </p>
<p>Save them with the name as <strong>Fog0</strong>.</p>
<p><img src="http://i.imgur.com/ruEreb1.png" alt="ruEreb1.png" /></p>
<p> </p>
<p>Save this with the name as <strong>Fog1</strong>.</p>
<p><img src="http://i.imgur.com/vhwI2pc.png" alt="vhwI2pc.png" /></p>
<p> </p>
<p>And lastly, save this with the name as <strong>Game_Title</strong>.</p>
<p> </p>
<p><img src="http://i.imgur.com/z1fv2gz.png" alt="z1fv2gz.png" /></p>
<p> </p>
<p> </p>
</div>
</div>
<p> </p>
<p> </p>
<p>Save them under your Titles1 folder. That is where we will all be putting our graphics in. Now that we have the necessary graphics needed, let's jump right into the scripting. Open your RPG Maker VX Ace and start a new project. I recommend making this in a fresh project so it won't cause any disruption on your project. Just to be safe <img src="https://www.rpgmakercentral.com/uploads/emoticons/default_wink.png" alt=";)" srcset="https://www.rpgmakercentral.com/uploads/emoticons/wink@2x.png 2x" width="20" height="20" /></p>
<p> </p>
<p>Now, once you created a new project, press F11 to go the Script Section. You can also click the Script Section Icon on your Ace's tool ribbon. Go to the Materials part on your script and create a new section below. This is where we are going to start our scripting. </p>
<p> </p>
<p>The things we need to do on our Title Screen are the following:</p>
<ul><li>Use our Game_Title as the title instead of the Default Game Title</li>
<li>Make our background</li>
<li>Make some images move</li>
</ul><p>To begin with, start with this on your script:</p>
<p> </p>
<p> </p>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents">
<p> </p>
<pre class="ipsCode prettyprint">
class Scene_Title &lt; Scene_Base
  alias :soul_animated_titlescreen_simple :start
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    soul_animated_titlescreen_simple
    create_grass_fog
    create_trees
  end
end </pre>
<p> </p>
</div>
</div>
<p> </p>
<p> </p>
<p>What we did here was to create a class called Scene_Title inheriting its functions from Scene_Base. Instead of rewriting Scene_Title's method start, we created an alias. What is an alias? Alias simply means a new name for our method. We need to call the alias on that method as well, it is called Calling the Original Method. If you are wondering why there is a : sign on the alias, that is because : signed things are considered methods. You can also alias it this way if you want:</p>
<pre class="ipsCode prettyprint">
alias soul_animated_titlescreen_simple start
</pre>
<p>Does the alias need to be like that? Can't we make our own alias?</p>
<p> </p>
<p>No. It is not necessary. You can alias it with any name you want.</p>
<p> </p>
<p>If you are wondering what create_grass_fog and create_trees are, that is what we will define next.</p>
<p> </p>
<p>We need to overwrite our create_background from the original Scene_Title, so do this:</p>
<p> </p>
<p> </p>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents">
<p> </p>
<pre class="ipsCode prettyprint">
  #--------------------------------------------------------------------------
  # * Create Background
  #--------------------------------------------------------------------------
  def create_background
      @background = Plane.new
      @background.bitmap = Cache.title1("Background")
      @background.z = 0
  end </pre>
<p> </p>
</div>
</div>
<p> </p>
<p> </p>
<p>This time, we changed the original things inside the create_background method. We created a new Plane object and made a bitmap whose name is the "Background" which we just had saved awhile ago. Now, let me explain a few things here (also from the help file to be more accurate of what they actually mean):</p>
<p> </p>
<p><strong>Planes</strong></p>
<div>Planes are special sprites that tile bitmap patterns across the entire screen and are used to display parallax backgrounds and so on.</div>
<div> </div>
<div><strong>Bitmap</strong></div>
<div>The bitmap class. It represents images.</div>
<div> </div>
<div>Now that we got those done, when we created our instance variable named background, which is a plane and holds a bitmap named "Background" from our game folder Titles1, we set up its <strong>z </strong>attribute. What does the z do?</div>
<div> </div>
<div><strong>z</strong></div>
<div>
<div>The plane's z-coordinate. The larger the value, the closer to the player the plane will be displayed.</div>
<div>If multiple objects share the same z-coordinate, the more recently created object will be displayed closest to the player.</div>
<div> </div>
<div>Basically what it means is the higher the value of the z, the closer the plane would be displayed. Treat it like a layer in Photoshop. For example, if you created a new layer from Layer 1, Layer 2 is displayed before Layer 1.</div>
<div> </div>
<div>Now, we need to do that for the Fog0 and Fog1 too, so on your script, add this:</div>
<div> </div>
<div>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents"><p></p></div>
<div><pre class="ipsCode prettyprint">
  #--------------------------------------------------------------------------
  # * Create Grass
  #--------------------------------------------------------------------------  
  def create_grass_fog
    @grass_fog = Plane.new
    @grass_fog.bitmap = Cache.title1("Fog0")
    @grass_fog.z = 3
  end
  #--------------------------------------------------------------------------
  # * Create Trees
  #--------------------------------------------------------------------------  
  def create_trees
    @trees = Plane.new
    @trees.bitmap = Cache.title1("Fog1")
    @trees.z = 2
  end</pre></div>
<div></div>
</div>
<p></p>
</div>
<div> </div>
<div>So on this part, we defined our create_grass_fog and create_trees that we just called on our start method.</div>
<div> </div>
<div>This is the interesting part. Well first off, as you noticed, we inherited methods from Scene_Base, right? That means everything from the Scene_Base also works in Scene_Title. We need to borrow the update_basic method from Scene_Base and call it on Scene_Title. If you search your Scene_Base, you can see there the update_basic method. So, on our script, we need to make something like this:</div>
<div> </div>
<div>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents"><p></p></div>
<div><pre class="ipsCode prettyprint">
  #--------------------------------------------------------------------------
  # * Update Frame (Basic)
  #--------------------------------------------------------------------------
  def update_basic
    Graphics.update
    Input.update
    update_all_windows
    @grass_fog.ox += 3
    @trees.ox += 1
  end   </pre></div>
<div></div>
</div>
<p></p>
</div>
<div> </div>
<div>Oops! Let's explain what happened here. We retained the Graphics.update, Input.update and update_all_methods from update_basic. That is because they are important on making the Scene_Title work. Now, what does @grass_fog.ox += 3 and @trees.ox += 1 mean? What is ox?</div>
<div> </div>
<div><strong>ox</strong></div>
<div>The x-coordinate of the plane's starting point. Change this value to scroll the plane.</div>
</div>
<div> </div>
<p><strong>Q: I advance read the Sprite Class and it says it also has ox. Can't we just use sprites instead?</strong></p>
<p> </p>
<p>A: Good question, isn't it? Well the reason for that is because the Sprite won't replicate itself or rather does not work like a Parallax. When you use Planes, it works like a parallax and repeats itself, unlike sprites, they don't when they scroll.</p>
<p> </p>
<p>So what we did here is: we made the Fog0 scroll horizontally by 3 and the trees by 1. We created it in update_basic because it works every frame.</p>
<p> </p>
<p>Moving on, we need to draw our Game's Title, so we need to overwrite the draw_game_title. On your script, do this:</p>
<p> </p>
<p> </p>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents">
<p> </p>
<pre class="ipsCode prettyprint">
  #--------------------------------------------------------------------------
  # * Draw Game Title
  #--------------------------------------------------------------------------
  def draw_game_title
    @game_title = Sprite.new
    @game_title.bitmap = Cache.title1("Game_Title")
    @game_title.z = 4
    center_sprite(@game_title)
    @game_title.y = Graphics.height / 2
  end </pre>
<p> </p>
</div>
</div>
<p> </p>
<p> </p>
<p>And lastly, we need to dispose every image that we made here. So, on your script, do this:</p>
<p> </p>
<p> </p>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents">
<p> </p>
<pre class="ipsCode prettyprint">
</pre>
<div>  #--------------------------------------------------------------------------</div>
<div>  # * Free All Graphics</div>
<div>  #--------------------------------------------------------------------------</div>
<div>  def dispose_all_used_graphics</div>
<div>    @background.bitmap.dispose</div>
<div>    @background.dispose</div>
<div>    @grass_fog.bitmap.dispose</div>
<div>    @grass_fog.dispose</div>
<div>    @trees.bitmap.dispose</div>
<div>    @trees.dispose</div>
<div>    @game_title.bitmap.dispose</div>
<div>    @game_title.dispose</div>
<div>  end</div>
<p> </p>
</div>
</div>
<p> </p>
<p> </p>
<p>Let me explain what we did here on the dispose method.</p>
<p> </p>
<div><strong>dispose </strong></div>
<div>Frees the plane. If the plane has already been freed, does nothing.</div>
<div> </div>
<div>We freed the bitmap first and freed the object. So we disposed the image and disposed the Plane object we just created. It works the same if you created a <strong>Plane </strong>or a <strong>Sprite</strong>. The bitmap we just disposed there is the bitmap object we used on the plane.</div>
<div> </div>
<div>Since we did not overwrite the dispose_background method, we need to do this on our script:</div>
<div> </div>
<div>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents"><p></p></div>
<div><pre class="ipsCode prettyprint">
  #--------------------------------------------------------------------------
  # * Free Background
  #--------------------------------------------------------------------------
  def dispose_background; end  </pre></div>
<div></div>
</div>
<p></p>
</div>
<div> </div>
<div>What we did there is just removing the things its doing on dispose_background. You can also put the things on dispose_all_used_graphics on dispose_background if you like.</div>
<div> </div>
<div>That's basically it!</div>
<div> </div>
<div>This should be the final product of your code:</div>
<div> </div>
<div>
<div class="ipsSpoiler" data-ipsspoiler="">
<div class="ipsSpoiler_header"><span></span></div>
<div class="ipsSpoiler_contents"><p></p></div>
<div><pre class="ipsCode prettyprint">
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title &lt; Scene_Base
  alias :soul_animated_titlescreen_simple :start
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    soul_animated_titlescreen_simple
    create_grass_fog
    create_trees
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_background
    dispose_all_used_graphics
  end  
  #--------------------------------------------------------------------------
  # * Create Background
  #--------------------------------------------------------------------------
  def create_background
      @background = Plane.new
      @background.bitmap = Cache.title1("Background")
      @background.z = 0
  end
  #--------------------------------------------------------------------------
  # * Create Grass
  #--------------------------------------------------------------------------  
  def create_grass_fog
    @grass_fog = Plane.new
    @grass_fog.bitmap = Cache.title1("Fog0")
    @grass_fog.z = 3
  end
  #--------------------------------------------------------------------------
  # * Create Trees
  #--------------------------------------------------------------------------  
  def create_trees
    @trees = Plane.new
    @trees.bitmap = Cache.title1("Fog1")
    @trees.z = 2
  end
  #--------------------------------------------------------------------------
  # * Update Frame (Basic)
  #--------------------------------------------------------------------------
  def update_basic
    Graphics.update
    Input.update
    update_all_windows
    @grass_fog.ox += 3
    @trees.ox += 1
  end    
  #--------------------------------------------------------------------------
  # * Draw Game Title
  #--------------------------------------------------------------------------
  def draw_game_title
    @game_title = Sprite.new
    @game_title.bitmap = Cache.title1("Game_Title")
    @game_title.z = 4
    center_sprite(@game_title)
    @game_title.y = Graphics.height / 2
  end
  #--------------------------------------------------------------------------
  # * Free Background
  #--------------------------------------------------------------------------
  def dispose_background; end  
  #--------------------------------------------------------------------------
  # * Free All Graphics
  #--------------------------------------------------------------------------
  def dispose_all_used_graphics
    @background.bitmap.dispose
    @background.dispose
    @grass_fog.bitmap.dispose
    @grass_fog.dispose
    @trees.bitmap.dispose
    @trees.dispose
    @game_title.bitmap.dispose
    @game_title.dispose
  end
end
</pre></div>
<div></div>
</div>
<p></p>
</div>
<div> </div>
<div>Go ahead and test it! <img src="https://www.rpgmakercentral.com/uploads/emoticons/default_smile.png" alt=":)" srcset="https://www.rpgmakercentral.com/uploads/emoticons/smile@2x.png 2x" width="20" height="20" /></div>
<div> </div>
<div><strong>Q: Can we add more images and create more animations into it like scrolling upwards too?</strong></div>
<div> </div>
<div>A: Definitely yes! Make sure to create them in a method, call them from the start method. Make sure they're instance variables too! Also, don't forget to dispose them <img src="https://www.rpgmakercentral.com/uploads/emoticons/default_smile.png" alt=":)" srcset="https://www.rpgmakercentral.com/uploads/emoticons/smile@2x.png 2x" width="20" height="20" /> Organize your Plane's <strong>z </strong>well too.</div>
<div> </div>
<div>Q: If its possible to do an upward motion for the plane, how would I do that?</div>
<div> </div>
<div>
<div><strong>oy </strong></div>
<div>The y-coordinate of the plane's starting point. Change this value to scroll the plane.</div>
<div> </div>
<div>You can do something like this:</div>
<div> </div>
<div>
<pre class="ipsCode prettyprint">
@image_i_like_to_scroll.oy += value
</pre>
<p>where value is the number of scroll speed you want to deal with the image. Add that in update_basic.</p>
<p> </p>
<p>That's all folks! I added a <a href="https://dl.dropboxusercontent.com/u/36246420/Simple%20Animated%20Title.exe" rel="external nofollow">DEMO</a> of this tutorial as well, so you can get to see it in action!</p>
<p> </p>
<p> </p>
</div>
</div>
]]></description><guid isPermaLink="false">22885</guid><pubDate>Thu, 27 Mar 2014 05:32:09 +0000</pubDate></item><item><title><![CDATA[Mon's Guide to Better & Badder Bosses]]></title><link>https://www.rpgmakercentral.com/topic/985-mons-guide-to-better-badder-bosses/</link><description><![CDATA[
<p><span style="font-size:24px;"><span style="text-decoration:underline;"><strong>Introduction</strong></span></span></p>
<p>Welcome to the wonderful guide of bosses! You must be wondering what bosses are, right?</p>
<p>Bosses are special types of enemies that spice up any types of games whether it's rpg, shooting, action, etc.</p>
<p>What you want are bosses for an rpg, am I right? Let me give you a guide to better and badder bosses.</p>
<p>I will update this guide when I find more stuff to add to this list.</p>
<p> </p>
<p> </p>
<p> </p>
<p><span style="text-decoration:underline;"><span style="font-size:18px;">Section A: Types of Bosses</span></span></p>
<p>There a many types of bosses in the story that act according to the situation. Take for example the "Final Fantasy" series repetitive and well known boss, <strong>Gilgamesh</strong>. <strong>Gilgamesh</strong> is a boss that appears as a goofy, stupid, prideful, but yet one of the most interesting bosses except for <strong>Kefka</strong>. Anyways <strong>Gilgamesh </strong>appears in Final Fantasy I, V, VI, and XII as bosses while in the other series as summonings. <strong>Gilgamesh</strong> always tries to make the scenes comical or serious and fighting him is very challenging except in FFV of course.</p>
<p> </p>
<p>Another repetitive boss would be the <strong>Omega Weapon</strong>, another type of boss in the FF series that appears as a secret boss. Secret bosses are bosses that are way beyond harder than the final bosses. They consist of powerful moves that can KO characters in a single hit or constantly hit them with status attacks. In the end when you defeat the secret boss, the rewards are little or always worth it.</p>
<p> </p>
<p>There are the normal bosses, who in-game are to challenge characters every time they near a part of the story or close to finishing a dungeon. These types of bosses are to halt the player from progressing any further into the story. These types of bosses act like a log in front of a gold flower that you manage to find in the woods and you have only a chisel to cut your way past it.</p>
<p> </p>
<p>Then there are the <strong>Final Bosses</strong> which are the bosses at the end of the story when the main character is close to completing his/her objective in the story. <strong>Exdeath </strong>in FFV was the final boss when Bartz and the party enter the void and which their objective was to beat him to save the world as in almost every FF game. <strong>Final Bosses</strong> are to be tough end game bosses and not a boss that gets killed in one shot (Sega CD Zelda). <strong>Final Bosses </strong>are to be the cliche and tell the player that it is time to meet their match or be ffed in the balls for punishment. They give the player a sense of accomplishment when they face the tough boss as they complete the game.</p>
<p> </p>
<p>Finally, there are the joke bosses. Literally they are a joke to the game like <strong>Seigfried, </strong>in FFVI who you fight on the Phantom Train that only dealt one damage and had 100 HP. These types of bosses are for entertainment purposes only and are to be beaten into a pulp instantly.</p>
<p> </p>
<p> </p>
<p><span style="text-decoration:underline;"><span style="font-size:18px;">Section B: The Many Types of Bosses</span></span></p>
<p>Every boss must be different or the game will be considerably meaningless in every way. How bosses should act to how they look like it would be boring to fight a boss named "Soldier" and have him look like a soldier who looks frail and thin like "Angelina Jolie" (lulz). Bosses have to have their own name like "Dawnshredder" or "Barnum's Ultimate Grill Cat Titan" something like that and actually make them look dangerous and awesome.</p>
<p> </p>
<p>Bosses also must have personalities and not act like a robot unless they are actually are a robot type boss which I will find acceptable. If bosses have no emotion then it is not unique, it's just another Sephiroth wanna be just waiting in the shadows to be trolling everyone in the game. Take for example <strong>Kefka</strong> from FFVI and the <strong>Prinny Overlord</strong> from Disagaea, both are unique because one is barking mad and almost became a god while the other is a giant penguin with knives and bombs that is a walking bomb. These bosses have emotions that are unique from the stereotypical serious, momma-boy bosses and do actions that are not at all robotic.</p>
<p> </p>
<p>Religious Bosses or myth-type bosses are also great additions to any game. These bosses represent a religion or a story within the world that the characters fight in like "God". These bosses are to give reason to why something is in the game or a cause to a curse to a town.</p>
<p> </p>
<p> </p>
<p><span style="text-decoration:underline;"><span style="font-size:18px;">Section C: Boss Battles</span></span></p>
<p>Boss battles as I explained are to be challenging and a stop gape for players when they go through the game. Bosses have high hp, mp, attack, defense, etc. Their stats are triple of the the players and his/her party also they are difficult to beat because of the array of attacks the bosses have. Bosses must <strong>BE</strong> difficult to be difficult to beat and not one hit death unless they are joke bosses. A good example of that is of course Sega CD's Zelda.</p>
<p> </p>
<p>Bosses must have special attacks that characters and other monsters don't have to make the battle hard, also they must be a constant nuisance to the parties stats as well like applying poison, blind, confusion, etc. <strong>Omega Weapon</strong> from the FF series had an attack that could kill, petrify, blind, etc. if it hit one of your characters. Also in a boss battle, bosses have minions that they have with them in battle that can prove an annoyance. When implementing a battle, try having the enemies come back from the dead some turns later or have the boss call reinforcements when he/she reaches a certain hp level.</p>
<p> </p>
<p>Final Boss battles are a big one because these battles are a test of one's meddle of what the player has gone through in the entire game. In the FF series V and VI, both final bosses had multiple bodies or battles within the final battle. Body parts that are connected to the boss that have it's own attacks and also high hp can be challenging to a player. Also add something to the boss when it dies like a suicide move or a move that can deal damage to the players party when it dies.</p>
<p> </p>
<p>Also sometimes you want to add flair or difficulty to boss battles, for example the dragon Shinryuu in FFV in the rift can change elements in battle, but the downside was it's type was always dragon making it susceptible to the Jump attack. By giving bosses elements can asses what the player does to the boss in battle. Also have a time and point when the boss is invincible for a certain period of time and you must defeat his minions to make the boss vunerable again.</p>
<p> </p>
<p>Also add some dialog during the fight as well to make the battle more energetic or sad either way to change the flow of battle. Also I suggest for some bosses to use transformations to throw off the player completely. One more thing is to try to limit player moves and actions in battle like banning their magic or skills so the player would have a hard time dealing with the boss, don't make it permanent though or it would be just a chore to beat the boss with only attack. Buffing up the boss is a good idea too so the player can focus on healing and buffing up their characters as well.</p>
<p> </p>
<p> </p>
<p><span style="text-decoration:underline;"><span style="font-size:18px;">Section D: Lewt!</span></span></p>
<p>Bosses all have loot and good loot as well. Play WoW and you'll see that bosses drop gear, weapons, or items unattainable anywhere else. Some bosses drop keys or an item that allows the player to go further into the story and allow them to see beyond the stuck point where the player is at. If you don't create loot for the player then the player will be disappointed that they got no lewt! (Not really lulz.)</p>
<p> </p>
<p> </p>
<p><span style="text-decoration:underline;"><span style="font-size:18px;">Section E: Example</span></span></p>
<p>Here are some examples of some G-R-E-A-T Boss Battles from different RPG games:</p>
<p> </p>
<p>Seymour FFX (Badass music and boss fight :3:</p>
<p></p>
<p>
</p>
<div class="ipsEmbeddedVideo"><div><iframe width="459" height="344" src="https://www.youtube.com/embed/1jwJCs7ogKA?feature=oembed" frameborder="0" allowfullscreen="true"></iframe></div></div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>I hope all of you enjoyed this guide and take into consideration into making a kick-ass boss battle!</p>
]]></description><guid isPermaLink="false">985</guid><pubDate>Wed, 18 Jan 2012 21:56:51 +0000</pubDate></item><item><title>RPG Maker MV Video Tutorial series by ChigooX</title><link>https://www.rpgmakercentral.com/topic/41980-rpg-maker-mv-video-tutorial-series-by-chigoox/</link><description><![CDATA[
<p>
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">This New Series Will Go Over The Basic/Advanced Functions Of RPG Maker MV!</span><br style="background-color:#ffffff;color:#353c41;font-size:14px;" />
	<br style="background-color:#ffffff;color:#353c41;font-size:14px;" />
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">Today I will be starting my new video tutorial series on MV, well you might ask yourself, or me why I'm I doing this where there are other tutorials around. Well it's simple most of those tutorials are not for, ACE, VX, XP etc... These tutorials will focus on both old and new features of MV. </span><br style="background-color:#ffffff;color:#353c41;font-size:14px;" />
	<br style="background-color:#ffffff;color:#353c41;font-size:14px;" />
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">The other reason for these videos is, that I'v noticed ever since MV came out a lot of new makers have been showing up with no prior knowledge of RPG Makers, so this tutorial will mainly be for those group of Individuals.</span>
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	After this tutorial you should be ready to make your first game and beyond.
</p>

<p>
	 
</p>

<p>
	After we cover the basics and advance stuff we will be moving on to plugins. Stay tuned.
</p>

<p>
	 
</p>

<div class="ipsEmbeddedVideo">
	<div>
		<iframe allowfullscreen="true" frameborder="0" height="270" src="https://www.youtube.com/embed/_Tk9POY4CAI?feature=oembed" width="480"></iframe>
	</div>
</div>

<p>
	 
</p>

<p>
	 
</p>

<p>
	<a href="https://www.youtube.com/watch?v=_Tk9POY4CAI&amp;list=PLjzqi-Uj6saX-0Xe2V2qHoIHF-aplglAC" rel="external nofollow">Tutorial Playlist</a> - RPG Maker MV
</p>

<p>
	<a href="https://www.youtube.com/watch?v=_Tk9POY4CAI" rel="external nofollow">RPG Maker MV Video Tutorial EP 1: Introduction</a>
</p>

<p>
	<a href="https://youtu.be/SHDyiXNqz_w" rel="external nofollow">RPG Maker MV Video Tutorial EP 2: Interface</a>
</p>

<p>
	<a href="https://www.youtube.com/watch?v=YoHHI0ljKdo" rel="external nofollow">RPG Maker MV Video Tutorial EP 3: Maps and Regions</a>
</p>

<p>
	<a href="https://www.youtube.com/watch?v=P24OnsgD_Qs" rel="external nofollow">RPG Maker MV Video Tutorial EP 4: Events PT 1</a>
</p>

<p>
	 
</p>

<p>
	<a href="https://www.youtube.com/watch?v=aO_WpqI6Kc4&amp;list=PLjzqi-Uj6saXSg16yFptL366sq_IXQTjn" rel="external nofollow">Alpha ABS Tutorial Playlist</a> - Alpha ABS Tutorials
</p>

<p>
	<a href="https://www.youtube.com/watch?v=aO_WpqI6Kc4&amp;list=PLjzqi-Uj6saXSg16yFptL366sq_IXQTjn" rel="external nofollow">RPG Maker MV Alpha ABS Tutorial EP1: Installation and configuration</a><br />
	<a href="https://youtu.be/sic5gtdmFI0" rel="external nofollow">RPG Maker MV Alpha ABS Tutorial EP2:Skills Items and Weapon Overview</a>
</p>

<p>
	<a href="https://youtu.be/P620-ZNTQDw" rel="external nofollow">RPG Maker MV Alpha ABS Tutorial EP3: Skill Setup</a>
</p>

<p>
	<a href="https://youtu.be/2EtpVz_oxpU" rel="external nofollow">RPG Maker MV Alpha ABS Tutorial EP4: Weapon Setup</a>
</p>

<p>
	<a href="https://youtu.be/RSeAmd0fwQQ" rel="external nofollow">RPG Maker MV Alpha ABS Tutorial EP5: Item Setup</a>
</p>

<p>
	 
</p>

<p>
	<a href="https://youtu.be/-FJk_f2HAMQ" rel="external nofollow">RPG Maker MV Housing system Tutorial snippet</a> - Snippets
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">So far i will be covering all these topics, but i know there's a lot missing from the list ,</span><br style="background-color:#ffffff;color:#353c41;font-size:14px;" />
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">that's where you guys come in, if you want me to do a tutorial on something, post it here, pm me, or leave me a message on YouTube and I'll add it to the list.</span>
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">41980</guid><pubDate>Thu, 28 Feb 2019 16:10:17 +0000</pubDate></item><item><title>A bunch of Tutorials</title><link>https://www.rpgmakercentral.com/topic/41915-a-bunch-of-tutorials/</link><description><![CDATA[
<p>
	Hey i made a bunch of video tutorials for the RPG Maker MV and wanted to share them. Since I don't want to spam this Community I decided to just link my YouTube channel, where I uploaded them. I literally earn nothing from it and do it for fun and to help people so I hope it's ok the way I did now.<br />
	<br />
	<b>Topics: </b><br />
	- Define borders with coordinates<br />
	- Push a stone onto a button to reveal a hidden door<br />
	- Turn events to the direction of the player (like someone is watching you)<br />
	- A horse race minigame<br />
	- An alternate Action Battle System<br />
	- A Lufia style approach from enemies, with the function to let them step on a button to open a door and to shoot them to freeze them on the current position for a few seconds<br />
	<br />
	<b>Brief Description:</b><br />
	- Learn to store informations about events in variables and use them<br />
	<br />
	<b>Requierements:</b><br />
	- RPG-Maker MV (Also should work for older versions)<br />
	<br />
	<b>Tutorial Links:<br />
	<a href="https://www.youtube.com/channel/UCm6MsX2M03QGScOqj_SIkSg" rel="external nofollow">https://www.youtube.com/channel/UCm6MsX2M03QGScOqj_SIkSg</a></b><br />
	<br />
	Thank you for reading.
</p>
]]></description><guid isPermaLink="false">41915</guid><pubDate>Fri, 11 Jan 2019 13:33:57 +0000</pubDate></item><item><title>Calestian's Multiple Currencies in YF Ace Menu</title><link>https://www.rpgmakercentral.com/topic/41871-calestians-multiple-currencies-in-yf-ace-menu/</link><description><![CDATA[
<p>
	I came up with a way to have <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.rpgmakercentral.com/profile/49805-calestian/?do=hovercard" data-mentionid="49805" href="https://www.rpgmakercentral.com/profile/49805-calestian/" rel="">@Calestian</a>'s Multiple Currencies show up in Yanfly's Ace Menu Engine.
</p>

<p>
	<a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.rpgmakercentral.com/profile/77619-cristorcushelix/?do=hovercard" data-mentionid="77619" href="https://www.rpgmakercentral.com/profile/77619-cristorcushelix/" rel="">@CristorcusHelix</a>, no, the Class System script does not interfere.
</p>

<p>
	 
</p>

<p>
	Now, for simplicity's sake, I won't throw my entire script in the fray, just the pieces needed to get this working.
</p>

<p>
	 
</p>

<p>
	Below is the command that goes under COMMANDS:
</p>

<pre class="ipsCode prettyprint lang-ruby prettyprinted">
<span class="pln">    COMMANDS </span><span class="pun">=[</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">currencies</span><span class="pun">,</span><span class="pln">   </span><span class="com"># Opens the currency window.</span><span class="pln">
    </span><span class="pun">]</span><span class="pln"> </span><span class="com"># Do not remove this.</span></pre>

<p>
	 
</p>

<p>
	Below is the hash for all custom commands, which is what Currencies will be. Note that you can change what the menu command appears text wise by changing the Display Name (be sure to keep the quotes and comma there!), but don't change the command or the handler method.
</p>

<pre class="ipsCode prettyprint lang-ruby prettyprinted">
<span class="pln">CUSTOM_COMMANDS </span><span class="pun">={</span><span class="pln">
    </span><span class="com"># :command =&gt; ["Display Name",  ShowSwitch, EnableSwitch,  Handler Method],</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">currencies </span><span class="pun">=&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">  </span><span class="str">"Currencies"</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="pun">:</span><span class="pln">command_currencies</span><span class="pun">],</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">debug      </span><span class="pun">=&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">       </span><span class="str">"Debug"</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">      </span><span class="pun">:</span><span class="pln">command_debug</span><span class="pun">],</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">shop       </span><span class="pun">=&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">        </span><span class="str">"Shop"</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">       </span><span class="pun">:</span><span class="pln">command_shop</span><span class="pun">],</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">gogototori </span><span class="pun">=&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">   </span><span class="str">"Synthesis"</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">     </span><span class="pun">:</span><span class="pln">command_totori</span><span class="pun">],</span><span class="pln">
      </span><span class="pun">:</span><span class="pln">grathnode  </span><span class="pun">=&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">   </span><span class="str">"Grathnode"</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">        </span><span class="lit">0</span><span class="pun">,</span><span class="pln">    </span><span class="pun">:</span><span class="pln">command_install</span><span class="pun">],</span><span class="pln">
    </span><span class="pun">}</span><span class="pln"> </span><span class="com"># Do not remove this.</span><span class="pln">
    
  </span><span class="kwd">end</span><span class="pln"> </span><span class="com"># MENU</span><span class="pln">
</span><span class="kwd">end</span><span class="pln"> </span><span class="com"># YEA</span></pre>

<p>
	 
</p>

<p>
	The handler method will go below the Scene_Menu portion at the bottom of the script. Be careful to copy and paste the code correctly.
</p>

<pre class="ipsCode prettyprint lang-ruby prettyprinted">
<span class="pln">
  
  </span><span class="com">#--------------------------------------------------------------------------</span><span class="pln">
  </span><span class="com"># new method: currencies</span><span class="pln">
  </span><span class="com">#--------------------------------------------------------------------------</span><span class="pln">
  </span><span class="kwd">def</span><span class="pln"> command_currencies
    </span><span class="kwd">return</span><span class="pln"> </span><span class="kwd">unless</span><span class="pln"> $imported</span><span class="pun">[</span><span class="str">'Clstn_Currencies'</span><span class="pun">]</span><span class="pln">    
    </span><span>SceneManager</span><span class="pun">.</span><span class="pln">call</span><span class="pun">(</span><span>Scene_Currencies</span><span class="pun">)</span><span class="pln">
  </span><span class="kwd">end</span><span class="pln">
  </span></pre>

<p>
	 
</p>

<p>
	And that should do it. If there's any issue, give me a ring.
</p>
]]></description><guid isPermaLink="false">41871</guid><pubDate>Sun, 16 Dec 2018 17:43:20 +0000</pubDate></item><item><title>Pick a random number for item collecting ?</title><link>https://www.rpgmakercentral.com/topic/41805-pick-a-random-number-for-item-collecting/</link><description><![CDATA[
<p>
	Hello so in my game in making it so that you can collect garlic and I want you to be able to collect a random number of garlic pieces, how would you do that?
</p>

<p>
	 
</p>

<p>
	i have no idea how to use variables either, it that’s important.
</p>
]]></description><guid isPermaLink="false">41805</guid><pubDate>Sun, 28 Oct 2018 17:25:05 +0000</pubDate></item><item><title>Some Optimisation to consider for your game</title><link>https://www.rpgmakercentral.com/topic/41759-some-optimisation-to-consider-for-your-game/</link><description><![CDATA[
<div style="background-color:#ffffff;color:#141414;font-size:16px;padding:0px;">
	<b>Tutorial description:</b><span> </span>Hey guys, the following is copied over from my blog and it goes over lowering the overall size of your game files from image compression to getting rid of useless data in your files. 
</div>

<div style="background-color:#ffffff;color:#141414;font-size:16px;padding:0px;">
	 
</div>

<div style="background-color:#ffffff;color:#141414;font-size:16px;padding:0px;">
	<b>Requirements:</b> Obviously you'll need RPG maker. Photoshop isn't required but it does help and Audacity. 
</div>

<div style="background-color:#ffffff;color:#141414;font-size:16px;padding:0px;">
	 
</div>

<div style="background-color:#ffffff;color:#141414;font-size:16px;padding:0px;">
	<div style="padding:0px;">
		<font size="6" style="font-size:22px;"><b>RPG Maker Optimisation you should know about</b></font>
	</div>

	<div style="padding:0px;">
		Hey guys, another week and another blog, this week I’ll be going over a few things you should know about optimising your RPG maker build. Information that is important but never really important enough for the YouTube tutorials. (On that note I might later on make a video about the contents of this blog)
	</div>

	<div style="padding:0px;">
		 
	</div>

	<div style="padding:0px;">
		<font size="4" style="font-size:15px;"><b>Lowering the size of your game file</b></font>
	</div>

	
		<div style="padding:0px;">
			 
		</div>

		<div style="padding:0px;">
			<img src="https://cdn-images-1.medium.com/max/800/1*WhTWYAbpiKjIVKE2E8tJAg.png" style="border:none;" alt="1*WhTWYAbpiKjIVKE2E8tJAg.png" />
		</div>
	

	<div style="padding:0px;">
		When you create a new project you’ll be greeted with this lovely window telling you all of the assets that are being imported into your project, if you’re like me then you will be using next to none of these assets in your final build. These assets add up to around a whopping 380MB. Start by deleting any assets from your game folder that you know you won’t be using. Any of the other assets should be renamed in order to represent that they are to be deleted later, “If you are using them for prototypes an what not.” e.g. (!prototypeActors1)
	</div>

	<div style="padding:0px;">
		 
	</div>

	<div style="padding:0px;">
		Another thing you can do is look at your file extensions. For example if your audio tracks are in .mp3 consider converting them to .ogg for the smaller file size. as you can see in the image below, the size of the .mp3 is reduced a large amount after being converted to .ogg (which my computer wishes to label as a VCL media file as if that’s some sort of extension.)
	</div>

	<div style="padding:0px;">
		 
	</div>

	
		<div style="padding:0px;">
			 
		</div>

		<div style="padding:0px;">
			<img src="https://cdn-images-1.medium.com/max/800/1*QbySXigT0WZmuP8eDkGTXA.png" style="border:none;" alt="1*QbySXigT0WZmuP8eDkGTXA.png" />
		</div>
	

	<div style="padding:0px;">
		If you have 100 different audio files then that is 100MB that you have saved in space for the game file. If you have a retro game, then you could convert it all to MIDI for an audio aesthetic as well as a vastly reduced file size too.
	</div>

	<div style="padding:0px;">
		 
	</div>

	<div style="padding:0px;">
		The same can also be said for image file size. The following image shows how I took the file size from 400Kbs down to 100Kbs.
	</div>

	<div style="padding:0px;">
		 
	</div>

	
		<div style="padding:0px;">
			 
		</div>

		<div style="padding:0px;">
			<img src="https://cdn-images-1.medium.com/max/800/1*KperXULsvAi9QqicpFoVYw.png" style="border:none;" alt="1*KperXULsvAi9QqicpFoVYw.png" />
		</div>
	

	<div style="padding:0px;">
		This is a software called TinyPNG and is free for up to 5MBS and they have a very cheap yearly subscription for images over that size as well as extension options. How it works is that it reduces the amount of colours being used in an image while still retaining any transparency it has and the detailed sacrificed is near on invisible, only noticeable if you were to go into the file and analyse the pixels. They have a Photoshop plugin that allows you to export your images directly as a reduced sized PNG instead of uploading them to the site every time. For example sake, lets say you have 1000 images in your game worth 400KBs. By using TinyPNG to reduce the size, you save roughly 300MBs of file size. 
	</div>

	<div style="padding:0px;">
		 
	</div>

	<div style="padding:0px;">
		   You can try it out for free with this link.
	</div>

	<div style="padding:0px;">
		         bit.ly/lvlupdesigntinypng
	</div>

	<div style="padding:0px;">
		 
	</div>

	<div style="padding:0px;">
		Those are some of the ways that you can majorly reduce the file size in the final build of your game. Why do you want to reduce your file size? It can help with loading times and lag issues and download times. Overall having clean and small file sizes are what we should be aiming for as Indie devs. 
	</div>
</div>
]]></description><guid isPermaLink="false">41759</guid><pubDate>Tue, 25 Sep 2018 11:03:51 +0000</pubDate></item><item><title>RGSS3 Scripting Tutorial Videos</title><link>https://www.rpgmakercentral.com/topic/9287-rgss3-scripting-tutorial-videos/</link><description><![CDATA[
<p>Only a week and a half into my holidays and I'm up to the point where I'm trying to find more productive ways to procrastinate.</p>
<p>
So here is my latest scheme. It is my hope to start from the very beginning and go all the way up to RegEXP (as that was my ultimate goal when I started scripting).</p>
<p>
Edit: Not on holidays anymore, but still continue when I can...</p>
<p> </p>
<p> </p>
<p>
Tut 01 ~ <a href="https://www.youtube.com/watch?v=8gMjdiQInvc" rel="external nofollow">Variables</a></p>
<p>
Tut 02 ~ <a href="https://www.youtube.com/watch?v=nsLzD-XECbo" rel="external nofollow">Variable Types and IF Statements</a></p>
<p>
Tut 03 ~ <a href="https://www.youtube.com/watch?v=xnC51BH1dtE" rel="external nofollow">Methods &amp; Functions</a></p>
<p>
Tut 04 ~ <a href="https://www.youtube.com/watch?v=JCzMsWTN5xI" rel="external nofollow">Method Arguments</a></p>
<p>
Tut 05 ~ <a href="https://www.youtube.com/watch?v=XkB_aAFrsUI" rel="external nofollow">Boolean Operators</a></p>
<p>
Tut 06 ~ <a href="https://www.youtube.com/watch?v=cPA-O5sGGwk" rel="external nofollow">The 'Return' Keyword</a></p>
<p>
Tut 07 ~ <a href="https://www.youtube.com/watch?v=2cufc1ARpTw" rel="external nofollow">Playing Audio (BGM, BGS, ME, SE)</a></p>
<p>
Tut 08 ~ <a href="https://www.youtube.com/watch?v=6tYdB6bqFno" rel="external nofollow">Arrays</a></p>
<p>
Tut 09 ~ <a href="https://www.youtube.com/watch?v=vCjV5kuEVU0" rel="external nofollow">Classes</a></p>
<p>
Tut 10 ~ <a href="https://www.youtube.com/watch?v=w1VxfH1jRd4" rel="external nofollow">The 'New' Keyword</a></p>
<p>
Tut 11 ~ <a href="https://www.youtube.com/watch?v=lxLw57LQlU4" rel="external nofollow">A little on Instance Variables and some more on 'New'</a></p>
<p>
Tut 12 ~ <a href="https://www.youtube.com/watch?v=6XOqLyWBJL8" rel="external nofollow">Class Inheritance</a></p>
<p>
Tut 13 ~ <a href="https://www.youtube.com/watch?v=wJyfy_rZGUI" rel="external nofollow">More on Class Inheritance</a></p>
<p>
Tut 14 ~ <a href="https://www.youtube.com/watch?v=CtqWI9PloMw" rel="external nofollow">The 'Super' Keyword</a></p>
<p>
Tut 15 ~ <a href="https://www.youtube.com/watch?v=11JiaFwT_ts" rel="external nofollow">Hierachy of Classes and Methods</a></p>
<p>
Tut 16 ~ <a href="https://www.youtube.com/watch?v=j-juXqbnn1E" rel="external nofollow">Aliasing Methods</a></p>
<p>
Tut 17 ~ <a href="https://www.youtube.com/watch?v=dSJyHg-l_Sk" rel="external nofollow">First Script: Collision Sound</a></p>
<p>
Tut 18 ~ <a href="http://www.youtube.com/watch?v=qxjIcfuCTKI" rel="external nofollow">'If', 'Unless', and the 'Case' keyword</a></p>
<p>
Tut 19 ~ <a href="http://www.youtube.com/watch?v=R9Fuz0eokfQ" rel="external nofollow">Loops</a></p>
<p>
Tut 20 ~ <a href="http://www.youtube.com/watch?v=Fe_844nVnmI" rel="external nofollow">More Loops and the 'Break' Keyword</a></p>
<p>
Tut 21 ~ <a href="http://www.youtube.com/watch?v=9td37_kAJKo" rel="external nofollow">Concatenating Strings</a></p>
<p>
Tut 22 ~ <a href="http://www.youtube.com/watch?v=kwSQ5edNgRQ" rel="external nofollow">Gsub (Replacing Text)</a></p>
<p>
Tut 23 ~ <a href="http://www.youtube.com/watch?v=ZO3w3pVTHac" rel="external nofollow">Modules</a></p>
<p>
Tut 24 ~ <a href="http://www.youtube.com/watch?v=peumpYrCFwE" rel="external nofollow">Module Methods</a></p>
<p>
Tut 25 ~ <a href="http://www.youtube.com/watch?v=M96p_bHXeFQ" rel="external nofollow">Some Altenate 'If' Statement Code and .is_a?</a></p>
<p>
Tut 26 ~ <a href="http://www.youtube.com/watch?v=Pbt8Shv8vXY" rel="external nofollow">Going Through the Workings of the Default Scripts</a></p>
<p>
Tut 27 ~ <a href="http://www.youtube.com/watch?v=R-pquZRlxkM" rel="external nofollow">Ternary Operators</a></p>
<p>
Tut 28 ~ <a href="http://www.youtube.com/watch?v=dcIRuhfB4cc" rel="external nofollow">Second Script: Play SE on Balloon Pop-Up</a></p>
<p>
Tut 29 ~ <a href="http://www.youtube.com/watch?v=Hqg_ooJHUAc" rel="external nofollow">Aliasing Module Methods</a></p>
<p>
Tut 30 ~ <a href="http://www.youtube.com/watch?v=Owu-o_absVc" rel="external nofollow">Creating Command Window Options</a></p>
<p>
Tut 31 ~ <a href="http://www.youtube.com/watch?v=jSYu7d5ecHU" rel="external nofollow">Creating a Window and Drawing Text</a></p>
<p>
Tut 32 ~ <a href="http://www.youtube.com/watch?v=pkkipMxGpvo" rel="external nofollow">Using Script Calls in Events</a></p>
<p>
Tut 33 ~ <a href="http://www.youtube.com/watch?v=sdbApeiqrqk" rel="external nofollow">Creating a Custom Scene</a></p>
<p>
Tut 34 ~ <a href="http://www.youtube.com/watch?v=csvP8DfHu9g" rel="external nofollow">Using Sprites and Textures</a></p>
<p>
Tut 35 ~ <a href="http://www.youtube.com/watch?v=Rouk_XcutvA" rel="external nofollow">attr_reader, attr_writer, attr_accessor and Saving Variables in a Save File</a></p>
<p>
Tut 36 ~ <a href="http://www.youtube.com/watch?v=dZhnkm_GKeY" rel="external nofollow">Writing a Basic Word-Wrapper</a></p>
<p>
Tut 37 ~ <a href="http://www.youtube.com/watch?v=wZhOGSgsuTo" rel="external nofollow">Finishing the Synopsis Scene</a></p>
<p>
Tut 38 ~ <a href="http://www.youtube.com/watch?v=2AkX7bFGNC8" rel="external nofollow">Writing Script Instructions</a></p>
<p>
Tut 39 ~ <a href="http://www.youtube.com/watch?v=jVVsQgdHwtI" rel="external nofollow">Accessing Pre-Made/Internal Data</a></p>
<p>
Tut 40 ~ <a href="http://www.youtube.com/watch?v=0FwdVcX8IdQ" rel="external nofollow">2D|3D Arrays</a></p>
<p>
Tut 41 ~ <a href="http://www.youtube.com/watch?v=aVxCXX21jKo" rel="external nofollow">Hash</a></p>
<p>
Tut 42 ~ <a href="http://www.youtube.com/watch?v=G0eM5nYhUuc" rel="external nofollow">Horizontal Commands, Animated Sprites, Window Entrances</a></p>
<p>
Tut 43 ~ <a href="http://www.youtube.com/watch?v=XCY6eh0qUlM" rel="external nofollow">Scrolling Text in a Window</a></p>
<p>
Tut 44 ~ <a href="http://www.youtube.com/watch?v=zX3VsLz1ypQ" rel="external nofollow">Third Script: Sound Test Scene (Part One)</a></p>
<p>
Tut 45 ~ <a href="http://www.youtube.com/watch?v=CyBvXZLmlak" rel="external nofollow">Third Script: Sound Test Scene (Part Two)</a></p>
<p>
Tut 46 ~ <a href="http://www.youtube.com/watch?v=WThh1KgI0cg" rel="external nofollow">Third Script: Sound Test Scene (Part Three)</a></p>
<p>
Tut 47 ~ <a href="http://www.youtube.com/watch?v=NIHaKWutSyA" rel="external nofollow">Third Script: Sound Test Scene (Part Four)</a></p>
<p>
Tut 48 ~ <a href="http://www.youtube.com/watch?v=UJIyEZcWaSU" rel="external nofollow">Third Script: Sound Test Scene (Final)</a></p>
<p>
Tut 49 ~ <a href="http://www.youtube.com/watch?v=KYZ16SMUk1A" rel="external nofollow">Structs</a></p>
<p>
Tut 50 ~ <a href="http://www.youtube.com/watch?v=8FSQNTHmcAc" rel="external nofollow">Getting Access to the Contents of Noteboxes</a></p>
<p>
Tut 51 ~ <a href="http://www.youtube.com/watch?v=v4J36lKcI_g" rel="external nofollow">Regular Expressions</a></p>
<p>
Tut 52 ~ <a href="http://www.youtube.com/watch?v=CmnNmm365rs" rel="external nofollow">Getting Multiple Regex Matches</a></p>
<p>
Tut 53 ~ <a href="http://www.youtube.com/watch?v=qvyHm2pqo8I" rel="external nofollow">Event Commands and Comment Tags</a></p>
<p>
Tut 54 ~ <a href="http://www.youtube.com/watch?v=PaMhyPljaGg" rel="external nofollow">Creating a Core Script</a></p>
<p>
Tut 55 ~ <a href="http://www.youtube.com/watch?v=RCLZz91grn0" rel="external nofollow">Fiber.new { explain_me() }</a></p>
]]></description><guid isPermaLink="false">9287</guid><pubDate>Wed, 19 Dec 2012 19:57:47 +0000</pubDate></item><item><title>Getting the price value of an item and storing it in a variable! (Got it!)</title><link>https://www.rpgmakercentral.com/topic/41527-getting-the-price-value-of-an-item-and-storing-it-in-a-variable-got-it/</link><description><![CDATA[
<p>
	Alright.
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			 
		</p>

		<p>
			I don't know how to do this. It seems simple, but I've looked and my level of skill with RGSS is not that great so a lot of the code is incomprehensible to me.
		</p>

		<p>
			 
		</p>

		<p>
			But really, all I need is to know how to get the price value of an item, and store that in a variable.
		</p>

		<p>
			 
		</p>

		<p>
			Like, the price of a Potion, by default, is 50. But, what if that gets changed? It would be far less of a PITA to have it stored in a variable by an automated check, versus changing the values manually. I looked in the common script calls, and squat-zo. I've asked in two different servers, now I inquire here.
		</p>

		<p>
			 
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	So, I figured this out, with some contextual aid, but for those of you looking to simplify messages, or however this may be useful to you, here's how to store the price of any item in a variable.
</p>

<p>
	 
</p>

<p>
	Event Command Set Variable
</p>

<p>
	Script
</p>

<pre class="ipsCode prettyprint lang-ruby prettyprinted">
<span class="pln">$data_items</span><span class="pun">[</span><span class="lit">00</span><span class="pun">].</span><span class="pln">price</span></pre>

<p>
	Replace 00 with the item ID (like Potion is ID 1 by default), and when the variable is set, it will be set with the price as defined in the DB (by default a potion's price is 50).
</p>

<p>
	You can also do this with $data_armors and $data_weapons to get the prices of those.
</p>

<p>
	 
</p>

<p>
	One example of this being useful is in messages.
</p>

<p>
	 
</p>

<p>
	"A Potion costs \v[1]\G."
</p>

<p>
	This way, if the DB changes, you don't have to alter potentially hundreds of messages to match the DB change.
</p>

<p>
	 
</p>

<p>
	Yup, that's really all there is to it.
</p>
]]></description><guid isPermaLink="false">41527</guid><pubDate>Mon, 14 May 2018 00:29:06 +0000</pubDate></item><item><title>Play test an MV game with BrowserSync</title><link>https://www.rpgmakercentral.com/topic/41401-play-test-an-mv-game-with-browsersync/</link><description><![CDATA[
<p>
	Sometimes, you need to play-test an MV game in a browser. However, trying to run the game through the index.html file will result in crashes. Using BrowserSync (a Node.js module), we can set up a local server in seconds and test it, without having to set up server software (unless you need to work on an ASP.NET or PHP website).
</p>

<p>
	 
</p>

<p>
	Requirements:
</p>

<p>
	-Node.js
</p>

<p>
	-BrowserSync
</p>

<p>
	-An RPG Maker MV project.
</p>

<p>
	 
</p>

<p>
	Video version:
</p>

<div class="ipsEmbeddedVideo">
	<div>
		<iframe allowfullscreen="true" frameborder="0" height="270" src="https://www.youtube.com/embed/lPamMNagfmY?feature=oembed" width="480"></iframe>
	</div>
</div>

<p>
	 
</p>

<p>
	Text Version:
</p>

<p>
	 
</p>

<p>
	Here’s how to start using it:
</p>

<p>
	1. Download Node.js from <a href="https://nodejs.org" rel="external nofollow">https://nodejs.org</a> (or from your repository, if you are using a Linux distro). You can use either the LTS or the Current version.
</p>

<p>
	2. After installing, run the node command line, then type “npm install -g browser-sync” (without the quotes. This will take a while.
</p>

<p>
	3. Once installed, switch to the game’s folder in the command line (usually, cd &lt;folder&gt;).
</p>

<p>
	4. Type “browser-sync start --server” (without the quotes). This will set up the server and open the game in the default browser.
</p>

<p>
	 
</p>

<p>
	If everything went right, you’ll see the “Connected to BrowserSync” badge and the game should work as it should.
</p>

<p>
	If you need the game to refresh the browser every time you edit the game, you’ll need to tell BrowserSync to monitor the files.
</p>

<p>
	 
</p>

<p>
	To do that, type:
</p>

<p>
	browser-sync start --server --files “&lt;folder&gt;/&lt;file or filetype&gt;”
</p>

<p>
	 
</p>

<p>
	Examples:
</p>

<p>
	browser-sync start --server --files “data/*.json”
</p>

<p>
	browser-sync start --server --files “*”
</p>

<p>
	 
</p>

<p>
	After that, just edit the game. The browser will refresh automatically.
</p>
]]></description><guid isPermaLink="false">41401</guid><pubDate>Fri, 16 Feb 2018 21:36:42 +0000</pubDate></item><item><title>Evented Graphical First Person Battle</title><link>https://www.rpgmakercentral.com/topic/35804-evented-graphical-first-person-battle/</link><description><![CDATA[
<p>This is part 1 of a two part tutorial on how to make Graphical First Person Battles using events.</p>
<p>Part 2 will come when I figure out the best way to animate the attacks.</p>
<p>So if anyone has any idea how to check if an actor is attacking for the purpose of a conditional branch condition, let me know.</p>
<p> </p>
<p>I love the default combat system. Side view is all right, but its been done by 34956875602 different games.</p>
<p>I like the first person aspect. To me it just feels more personal.</p>
<p>Sadly it is a little lacking in the flair department, and so I set out to fix this. </p>
<p>Keep in mind, what I am about to show you isn't for the faint of heart or those allergic to chocolate.</p>
<p>And it might give you a quick glimpse of how certain events can be used differently and more creatively.</p>
<p> </p>
<p><span style="font-size:24px;">Evented <em>True </em>First person battles.</span></p>
<p><span style="font-size:24px;"><span style="font-size:18px;">(Disclaimer, this is not animated. It simply shows hands, and weapons/gauntlets/shields if you set them up.</span></span></p>
<p><span style="font-size:24px;"><span style="font-size:18px;">See opening comments about the system being animated)</span></span></p>
<p><span style="font-size:24px;"><span style="font-size:18px;">(Disclaimer 2, this only checks for the equipment of the first actor, or whoever you set up the common event for)</span></span></p>
<p> </p>
<p><span style="font-size:24px;"><span style="font-size:18px;"><span style="color:#00ffff;">Step 1.</span></span></span></p>
<p><u><span style="font-size:18px;">Creating the Resources</span></u></p>
<p><span style="font-size:14px;">In this evented combat system, we will be using pictures to show the player and weapons instead of sprites.</span></p>
<p>In this tutorial, they will be referred to as the "Frame" or "Frames".</p>
<p>All frames will go in your "Picture" folder, in the img folder at the root of your Project Folder.</p>
<p>I HIGHLY recommend using gimp to modify/create pictures. I use it for all of my sprite art.</p>
<p>You can find it at <a href="http://www.gimp.org/downloads/" rel="external nofollow">http://www.gimp.org/downloads/</a></p>
<p>All frames must be the native resolution of the game you are creating.</p>
<p>Meaning that if you are using the default resolution, the frames must be <span style="font-size:14px;"><span style="color:#ff0000;">816x624</span>.</span></p>
<p>I started with a basic empty picture, sized 816x624. Make sure that it is transparent.</p>
<p>If you dont know how to do that, well, google works wonders when learning to use a program like Gimp.</p>
<p>I then cropped and modified some of the SV actors hands to create a kind of Elder scrolls esque view.</p>
<p>For the Spriting illiterate, here is a basic image to use/build off of.</p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-56037900-1447873775.png" data-fileid="15209" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-56037900-1447873775_thumb.png" data-fileid="15209" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-56037900-1447873775_thumb.png"></a></p>
<p>I then modified some of the weapons sprites in the same way.</p>
<p>You may also use/build off of these.<a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-25448700-1447873926.png" data-fileid="15210" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-25448700-1447873926_thumb.png" data-fileid="15210" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-25448700-1447873926_thumb.png"></a><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-40090700-1447873930.png" data-fileid="15211" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-40090700-1447873930_thumb.png" data-fileid="15211" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-40090700-1447873930_thumb.png"></a><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-83311700-1447873934.png" data-fileid="15212" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-83311700-1447873934_thumb.png" data-fileid="15212" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-83311700-1447873934_thumb.png"></a><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-60654800-1447873944.png" data-fileid="15213" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-60654800-1447873944_thumb.png" data-fileid="15213" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-60654800-1447873944_thumb.png"></a><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-08606200-1447873949.png" data-fileid="15214" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-08606200-1447873949_thumb.png" data-fileid="15214" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-08606200-1447873949_thumb.png"></a><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-01832900-1447873958.png" data-fileid="15215" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-01832900-1447873958_thumb.png" data-fileid="15215" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-01832900-1447873958_thumb.png"></a></p>
<p>After you have these resources, you are ready for the eventing!</p>
<p> </p>
<p><span style="font-size:18px;"><span style="color:#00ffff;">Step 2.</span></span></p>
<p><span style="font-size:18px;"><u>Creating the Event</u></span></p>
<p>First and foremost, we will be using a common event at the beginning of each battle to show the equipment.</p>
<p>So name a common event something like FPB or something, idk.</p>
<p>Within that common event, we are going to be using conditional branches to check for equipment at the start of battle.</p>
<p>The first event will be Show Picture. This is located on the second tab under <strong>Picture</strong>.</p>
<p>The frame we will be using is "Holding.png"</p>
<p>Set that frame to be picture number 3.</p>
<p>The reason this is set first, and not in a condition, is so that even if we dont have a weapon equipped,</p>
<p>it will still show the fists. So barehand fighting is a thing.</p>
<p>From there the flow of adding items is rather simple.</p>
<p>Condtional Branch&gt; Actor&gt; Weapon&gt;the weapon you want to check for</p>
<p>Make sure to leave "create else branch?" unticked.</p>
<p>Then within that conditional branch we set the corresponding weapon frame.</p>
<p>Show Picture&gt; "name of weapon frame you wish to use"</p>
<p>Set that to picture number 1</p>
<p>E.g </p>
<p>Conditional Branch&gt;Actor 1&gt;Weapon&gt; Longsword</p>
<p>the conditional branch will show up as</p>
<p><span style="color:#0000ff;">*If: Actor 1 has equipped Longsword</span></p>
<p>     <span style="color:#ee82ee;">Show Picture : #1, Longsword, Upper Left (0,0), (100%,100%), 255, Normal</span></p>
<p>The picture number indicates in what order it will be drawn, 1 being the first and lowest frame.</p>
<p>Therefore when we use the "Holding" frame as picture two, and the weapon frame as picture 1,</p>
<p>the holding frame will overlap the weapon giving the appearance of being held.</p>
<p>Do the same for each weapon in your database.</p>
<p>By the time you are finished it should look something like this;</p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-34224200-1447876026.png" data-fileid="15216" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-34224200-1447876026_thumb.png" data-fileid="15216" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-34224200-1447876026_thumb.png"></a></p>
<p> </p>
<p><span style="font-size:18px;"><span style="color:#00ffff;">Step 3.</span></span></p>
<p><span style="font-size:18px;">Calling the system for battle</span></p>
<p><span style="font-size:18px;"><span style="font-size:14px;">The very last step in this process is to run the common event from the troop tab.</span></span></p>
<p><span style="font-size:18px;"><span style="font-size:14px;">Go to troops, and in the battle event, run the common event we just created.</span></span></p>
<p><span style="font-size:18px;"><span style="font-size:14px;">Set the conditions for Turn number 0 and the span as Battle.</span></span></p>
<p><span style="font-size:18px;"><span style="font-size:14px;">It should look like this</span></span></p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-49070700-1447876306.png" data-fileid="15217" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-49070700-1447876306_thumb.png" data-fileid="15217" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-49070700-1447876306_thumb.png"></a></p>
<p>If you don't fell like setting up EVERY troop event I highly recommend Yanfly's</p>
<p>Base Troop Events.</p>
<p>It will allow you to use the first troop's event as a general event that ALL troops use.</p>
<p>You can find it here</p>
<p><a href="http://yanfly.moe/yep/" rel="external nofollow">http://yanfly.moe/yep/</a></p>
<p> </p>
<p><span style="font-size:18px;"><span style="color:#00ffff;">Step 4.</span></span></p>
<p><span style="font-size:18px;"><span style="font-size:14px;"><span style="font-size:18px;">Prepare for BATTLE!</span></span></span></p>
<p><span style="font-size:14px;">With any luck I have described this well enough for you to have the event set up perfectly.</span></p>
<p><span style="font-size:14px;">Go in to battle young one, and draw thee pixel sword!</span></p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-12459800-1447877205.png" data-fileid="15220" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-12459800-1447877205_thumb.png" data-fileid="15220" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-12459800-1447877205_thumb.png"></a></p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-77349300-1447877209.png" data-fileid="15221" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-77349300-1447877209_thumb.png" data-fileid="15221" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-77349300-1447877209_thumb.png"></a></p>
<p><a class="ipsAttachLink ipsAttachLink_image" href="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-37028300-1447877214.png" data-fileid="15222" rel=""><img src="https://www.rpgmakercentral.com/uploads/monthly_11_2015/post-19252-0-37028300-1447877214_thumb.png" data-fileid="15222" class="ipsImage ipsImage_thumbnailed" alt="post-19252-0-37028300-1447877214_thumb.png"></a></p>
<p> </p>
<p> </p>
]]></description><guid isPermaLink="false">35804</guid><pubDate>Wed, 18 Nov 2015 20:08:02 +0000</pubDate></item><item><title><![CDATA[[RMVX & A] Day-Night Transition without the scripting]]></title><link>https://www.rpgmakercentral.com/topic/5386-rmvx-a-day-night-transition-without-the-scripting/</link><description><![CDATA[
<p><em><span style="color:#808080;">Hey everyone</span></em><em>, I finaly decided to join the community because I thought I could help people out in the hardships of making games.</em></p>
<p><em> </em></p>
<p><em>(Of course I'm still a noob myself, And this is my very first post so don't ding me to bad XD)</em></p>
<p><em> </em></p>
<p><em>Now I've been playing around with RMVXA a lot lately and while i was randomly making a BS test run of a enemy attack system.</em></p>
<p><em>I came to the conclusion that I wanted to actualy try to make a back story. So I ended up making a back story and then I ended up</em></p>
<p><em>deciding I wanted to make a game! So I pondered for a while and wanted to add all kinds of crazy features and nick nacks and what not. The only problem is that I know no codeing of any sort at all (You know, with the scripting tab) However I noticed I was decent at comeing up with events on the event editor.</em></p>
<p><em> </em></p>
<p><em>Well I wanted to add a bit of demention to my game and add that little touch I don't think a lot of people have. I wanted to make a day and night transition system. Now at first I was thinking "Holy crap, this is going to be very complicated. There will be thousands of variables, a hundred triggers and pages and pages of scripting!" But fortunatly, through some crafty thinking and my ability to over analize things, my transition system was born. (Also note that, from what I understand, RMVX works just like RMVXA so this can be implemented into that program as well, though I've never tried to do it myself.</em>)</p>
<p> </p>
<p></p>
<div style="text-align:center;"><img src="http://i296.photobucket.com/albums/mm171/Zingboy12/Untitled.jpg" alt="Untitled.jpg" /></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><em>Now that's just a glance at how the map looks. It gets right to the point. The man at the bottom turns the cycle on.</em></p></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><img src="http://i296.photobucket.com/albums/mm171/Zingboy12/Goingintonight.png" alt="Goingintonight.png" /></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><em>After a certain amount of time the cycle will then tell you that it's going to be night.</em></p></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><img src="http://i296.photobucket.com/albums/mm171/Zingboy12/Night.jpg" alt="Night.jpg" /></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><p><em>And finaly, this picture shows how it looks after the transition is made. (After a fade in and out transistion.)</em></p></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p> </p>
<p><em>The tutorial comes with full step by step instructions that tell you just about everything you need to know and hopefuly eases the frustration you could of have had if they weren't there. XD If you have any questions, tips, experiences, or comments please post it here or send me a private message. I'll check daily (if not hourly) and hopefully I can reply to you as soon as possible.</em></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:center;"><a href="http://www.mediafire.com/?sd5sgmvofwuam" rel="external nofollow">http://www.mediafire.../?sd5sgmvofwuam</a></div>
<p></p>
<p></p>
<p> </p>
<p></p>
<div style="text-align:center;"><p>(Ya, it's a mediafire, hopefuly you dont have much trouble working with that. If you do I can send you the file myself.)</p></div>
<p></p>
<p></p>
<p> </p>
<p> </p>
<p></p>
<div style="text-align:right;"><p><span style="color:#d3d3d3;"><em>Thank you</em></span><span style="color:#d3d3d3;">.</span></p></div>
<p></p>
<p></p>
]]></description><guid isPermaLink="false">5386</guid><pubDate>Thu, 12 Jul 2012 17:21:14 +0000</pubDate></item><item><title>Vehicle Interiors With Events</title><link>https://www.rpgmakercentral.com/topic/40927-vehicle-interiors-with-events/</link><description><![CDATA[
<p>
	I think someone else might have posted about this earlier, but I'm not sure if their way was the same as mine.
</p>

<p>
	After an error with a script, I tried using events to create a transfer between driving a vehicle and an interior. With some help from other members, I was able to create a way to do it.
</p>

<p>
	<strong>In-Game Screencaps:</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		 
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="34ioc90.jpg" class="ipsImage" src="http://i67.tinypic.com/34ioc90.jpg" /></p>

		<p>
			<img alt="1z2zxhg.jpg" class="ipsImage" src="http://i63.tinypic.com/1z2zxhg.jpg" /></p>

		<p>
			 
		</p>

		<p>
			 
		</p>
	</div>
</div>

<p>
	<strong>How It Works:</strong>
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		 
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			This is the event to place in your world map (or any other map where the vehicle is used). The "Play BGM" commands make sure that the correct BGM plays while the vehicle is driven, otherwise, when you switch from the interior, the regular BGM for just walking around without the vehicle will play. Also, for those who don't know, the "A" button means the shift key. The "change player followers" command will be explained later.
		</p>

		<p>
			The variables record the player's location on the map so that the vehicle will go back to the same location when the players switch to the exterior.
		</p>

		<p>
			<img alt="1hteo4.jpg" class="ipsImage" src="http://i67.tinypic.com/1hteo4.jpg" /></p>

		<p>
			 
		</p>

		<p>
			Next, you will need a map with passable tiles where your characters will exit the vehicle. For mine, I used a different field/world tileset than my usual with passable water tiles. It has to be different because boats and ships cannot move on tiles marked "passable," but that doesn't matter for this map because the characters are only leaving or boarding the vehicle.
		</p>

		<p>
			This is the map:
		</p>

		<p>
			<img alt="2lue1b6.jpg" class="ipsImage" src="http://i65.tinypic.com/2lue1b6.jpg" /></p>

		<p>
			 
		</p>

		<p>
			You will need an event like this in that map so the player characters may board or disembark the vehicle. After leaving the vehicle, the characters are transported to the interior. I have for switching back to the exterior player followers set to "OFF" because in my game, three or more party members visible while doing this would cause my ship to disappear. This is why in the first event followers are set back to "ON."
		</p>

		<p>
			<img alt="2552fbo.jpg" class="ipsImage" src="http://i64.tinypic.com/2552fbo.jpg" /></p>

		<p>
			 
		</p>

		<p>
			Here's the event to switch back to the exterior. It's pretty straightforward, but make sure you transfer your player right next to and facing your vehicle, or the player will transfer back to the initial map without the vehicle, and for boats and ships this will make them stuck.
		</p>

		<p>
			<img alt="2r2ulpf.jpg" class="ipsImage" src="http://i64.tinypic.com/2r2ulpf.jpg" /></p>

		<p>
			 
		</p>

		<p>
			 
		</p>
	</div>
</div>

<p>
	I hope this is helpful to some people! If there's anything anyone needs clarified, please say so here.
</p>
]]></description><guid isPermaLink="false">40927</guid><pubDate>Mon, 17 Jul 2017 18:30:54 +0000</pubDate></item></channel></rss>
