- Joined
- May 30, 2015
- Messages
- 816
- Reaction score
- 826
- First Language
- English
- Primarily Uses
DreamX's Victory Aftermath Extension
By DreamX
Introduction/Features
This is an extension for Yanfly's Victory Aftermath. It also extends Aftermath Level Up. The overall goal was to allow for victory quotes to be displayed during Victory Aftermath like the VX Ace version. But since you can use custom script calls, you can do other things too.
Here's a video example of what can be done with the plugin.
Script
Patch Notes
1.3a - In victory action effects for level up, you can now reference the actor by using the "actor" variable, i.e.
console.log(actor.actorId());
1.3 - Adds compatibility with Yanfly's Job Points. You can define actions specific to the job point window during the victory aftermath.
1.1 - Adds parameters for window opacity. Adds compatibility with my Choice Help plugin. Adds random victory themes. Simply put multiple bgm file names in the parameter in Yanfly's Victory Aftermath separated by a space. Example: Town1 Theme2
How to Use
Place under Yanfly plugins.
Right click the script link and select save link as a .js file.
Requires Yanfly's Victory Aftermath and Aftermath Level Up (if you are going to do level up actions).
/*:
* @plugindesc v1.3 Perform actions like messages during Victory Aftermath
* @author DreamX
*
* @param Always Use VX-Ace Style EXP Window
* @desc Always use the VX-Ace style exp window even if there is no message to display. Default: false
* @default false
*
* @param VX-Ace Style EXP Text
* @desc When VX-Ace Style EXP window is used, this is used for the exp gained label. Default: EXP
* @default EXP
*
* @param Victory EXP Opacity
* @desc The opacity of the Victory EXP window. Default: 255
* @default 255
*
* @param Victory Drop Opacity
* @desc The opacity of the Victory Drop window. Default: 255
* @default 255
*
* @param Victory Level Up Opacity
* @desc The opacity of the Victory Level Up window. Default: 255
* @default 255
*
* @param Victory Title Opacity
* @desc The opacity of the Victory Title window that appears at the top. Default: 255
* @default 255
*
* @help
* //===========================================================================
* // Notetags
* //===========================================================================
* You must use notetags in order to have actions during the victory aftermath
* windows. Victory actions for the exp and drop windows may be put in any
* actor's notebox, but actions for the level up windows (that Yanfly's
* Aftermath Level Up extension provides) must be put into the notebox of the
* actor associated. For example, if you want an action to occur when Harold
* levels up, you must put that action in his notebox.
*
* <VICTORY ACTION TYPE: x>
* This notetag is required. Replace x with the type of window where this action
* will be performed. There are three options: exp, level, and drop. You can
* also use jp if you are using Yanfly's Job Points plugin.
* Example:
* <VICTORY ACTION TYPE: drop>
*
* <VICTORY ACTION CONDITION>
* x
* </VICTORY ACTION CONDITION>
* This notetag set is optional, but you need it if you want to set special
* conditions for an action to occur. Replace x with a script condition.
* Example:
* <VICTORY ACTION CONDITION>
* $gameSwitches.value(1)
* </VICTORY ACTION CONDITION>
* The condition in this example is that the switch 1 is on.
*
* <VICTORY ACTION PRIORITY>
* x
* </VICTORY ACTION PRIORITY>
* This notetag set is optional. Replace x with a script. This is the priority
* for the action. If there is more than one action that passes its condition,
* this plugin will test the action's priority and choose the one with the
* highest priority if possible. If there is more than one action with the
* highest condition, a random one of those actions will be selected. By
* default, every action's priority is 0, but you can override it with this
* notetag set.
* Example:
* <VICTORY ACTION PRIORITY>
* $gameVariables.value(1)
* </VICTORY ACTION PRIORITY>
* This script will set the priority of the action to be the value of variable
* 1.
*
* <VICTORY ACTION NO MESSAGE>
* This notetag is optional. If you use this for an action, it will not shorten
* the Victory Aftermath windows in order to accomodate a message window. This
* is useful for any action that does not cause a message to appear. Note that
* if at least one level up action that will occur during the level up window
* is not set with this notetag, the level up window will still be shortened to
* accomodate for a message.
*
* <VICTORY ACTION EFFECT>
* x
* </VICTORY ACTION EFFECT>
* This notetag set is required. Replace x with a script. This is the effect
* performed when the action occurs. This notetag set also closes parsing for
* this action, meaning this needs to be the last notetag for the action. After
* this, you can start defining more actions in the same notebox.
* Example:
* <VICTORY ACTION EFFECT>
* console.log("Hello World");
* </VICTORY ACTION EFFECT>
*
* //===========================================================================
* // Script calls provided by this plugin
* //===========================================================================
* To assist people in creating conditions or effects for an action, a couple
* functions are provided by this plugin for that purpose. This should be
* especially useful for people without much javascript experience.
*
* this.DXVACommonEvent("x") - Replace x with a common event id(s). This will
* cause a common event to occur. You can use commas (for separate ids) or
* dashes (for ranges) for multiple ids. A random common event of the ones
* passed to this function will be chosen.
* Example:
* this.DXVACommonEvent("1-3, 7");
* In this example, common event 1, 2, 3 or 7 will be chosen to occur.
*
* this.DXVADropsHasTag("x") - Replace with a notetag name. This function
* returns whether one of the battle drops has a notetag. In other words, it
* can be used as a condition.
* Example:
* this.DXVADropsHasTag("IsPotion");
* In this example, the condition is that one of the battle drops has a notetag
* named IsPotion, for example, <IsPotion:1>
*
* this.DXVAEnemiesHasTag("x") - Replace with a notetag name. This function
* returns whether one of the enemies had a notetag. In other words, it
* can be used as a condition.
* Example:
* this.DXVAEnemiesHasTag("IsImp");
* In this example, the condition is that one of the battle drops has a notetag
* named IsImp, for example, <IsImp:1>
*
* If you require javascript assistance, I recommend either asking in the
* thread for this plugin or in the javascript help section.
* ===========================================================================
* Terms Of Use
* ===========================================================================
* Free to use and modify for commercial and noncommercial games, with credit.
* ===========================================================================
* Compatibility
* ===========================================================================
* Set under Yanfly plugins.
* ===========================================================================
* Credits
* ===========================================================================
* DreamX
* Thanks to Yanfly for the original plugin which this is an extension of.
*/
Here is an example of notetags.
By DreamX
Introduction/Features
This is an extension for Yanfly's Victory Aftermath. It also extends Aftermath Level Up. The overall goal was to allow for victory quotes to be displayed during Victory Aftermath like the VX Ace version. But since you can use custom script calls, you can do other things too.
Here's a video example of what can be done with the plugin.
Script
Patch Notes
1.3a - In victory action effects for level up, you can now reference the actor by using the "actor" variable, i.e.
console.log(actor.actorId());
1.3 - Adds compatibility with Yanfly's Job Points. You can define actions specific to the job point window during the victory aftermath.
1.1 - Adds parameters for window opacity. Adds compatibility with my Choice Help plugin. Adds random victory themes. Simply put multiple bgm file names in the parameter in Yanfly's Victory Aftermath separated by a space. Example: Town1 Theme2
How to Use
Place under Yanfly plugins.
Right click the script link and select save link as a .js file.
Requires Yanfly's Victory Aftermath and Aftermath Level Up (if you are going to do level up actions).
/*:
* @plugindesc v1.3 Perform actions like messages during Victory Aftermath
* @author DreamX
*
* @param Always Use VX-Ace Style EXP Window
* @desc Always use the VX-Ace style exp window even if there is no message to display. Default: false
* @default false
*
* @param VX-Ace Style EXP Text
* @desc When VX-Ace Style EXP window is used, this is used for the exp gained label. Default: EXP
* @default EXP
*
* @param Victory EXP Opacity
* @desc The opacity of the Victory EXP window. Default: 255
* @default 255
*
* @param Victory Drop Opacity
* @desc The opacity of the Victory Drop window. Default: 255
* @default 255
*
* @param Victory Level Up Opacity
* @desc The opacity of the Victory Level Up window. Default: 255
* @default 255
*
* @param Victory Title Opacity
* @desc The opacity of the Victory Title window that appears at the top. Default: 255
* @default 255
*
* @help
* //===========================================================================
* // Notetags
* //===========================================================================
* You must use notetags in order to have actions during the victory aftermath
* windows. Victory actions for the exp and drop windows may be put in any
* actor's notebox, but actions for the level up windows (that Yanfly's
* Aftermath Level Up extension provides) must be put into the notebox of the
* actor associated. For example, if you want an action to occur when Harold
* levels up, you must put that action in his notebox.
*
* <VICTORY ACTION TYPE: x>
* This notetag is required. Replace x with the type of window where this action
* will be performed. There are three options: exp, level, and drop. You can
* also use jp if you are using Yanfly's Job Points plugin.
* Example:
* <VICTORY ACTION TYPE: drop>
*
* <VICTORY ACTION CONDITION>
* x
* </VICTORY ACTION CONDITION>
* This notetag set is optional, but you need it if you want to set special
* conditions for an action to occur. Replace x with a script condition.
* Example:
* <VICTORY ACTION CONDITION>
* $gameSwitches.value(1)
* </VICTORY ACTION CONDITION>
* The condition in this example is that the switch 1 is on.
*
* <VICTORY ACTION PRIORITY>
* x
* </VICTORY ACTION PRIORITY>
* This notetag set is optional. Replace x with a script. This is the priority
* for the action. If there is more than one action that passes its condition,
* this plugin will test the action's priority and choose the one with the
* highest priority if possible. If there is more than one action with the
* highest condition, a random one of those actions will be selected. By
* default, every action's priority is 0, but you can override it with this
* notetag set.
* Example:
* <VICTORY ACTION PRIORITY>
* $gameVariables.value(1)
* </VICTORY ACTION PRIORITY>
* This script will set the priority of the action to be the value of variable
* 1.
*
* <VICTORY ACTION NO MESSAGE>
* This notetag is optional. If you use this for an action, it will not shorten
* the Victory Aftermath windows in order to accomodate a message window. This
* is useful for any action that does not cause a message to appear. Note that
* if at least one level up action that will occur during the level up window
* is not set with this notetag, the level up window will still be shortened to
* accomodate for a message.
*
* <VICTORY ACTION EFFECT>
* x
* </VICTORY ACTION EFFECT>
* This notetag set is required. Replace x with a script. This is the effect
* performed when the action occurs. This notetag set also closes parsing for
* this action, meaning this needs to be the last notetag for the action. After
* this, you can start defining more actions in the same notebox.
* Example:
* <VICTORY ACTION EFFECT>
* console.log("Hello World");
* </VICTORY ACTION EFFECT>
*
* //===========================================================================
* // Script calls provided by this plugin
* //===========================================================================
* To assist people in creating conditions or effects for an action, a couple
* functions are provided by this plugin for that purpose. This should be
* especially useful for people without much javascript experience.
*
* this.DXVACommonEvent("x") - Replace x with a common event id(s). This will
* cause a common event to occur. You can use commas (for separate ids) or
* dashes (for ranges) for multiple ids. A random common event of the ones
* passed to this function will be chosen.
* Example:
* this.DXVACommonEvent("1-3, 7");
* In this example, common event 1, 2, 3 or 7 will be chosen to occur.
*
* this.DXVADropsHasTag("x") - Replace with a notetag name. This function
* returns whether one of the battle drops has a notetag. In other words, it
* can be used as a condition.
* Example:
* this.DXVADropsHasTag("IsPotion");
* In this example, the condition is that one of the battle drops has a notetag
* named IsPotion, for example, <IsPotion:1>
*
* this.DXVAEnemiesHasTag("x") - Replace with a notetag name. This function
* returns whether one of the enemies had a notetag. In other words, it
* can be used as a condition.
* Example:
* this.DXVAEnemiesHasTag("IsImp");
* In this example, the condition is that one of the battle drops has a notetag
* named IsImp, for example, <IsImp:1>
*
* If you require javascript assistance, I recommend either asking in the
* thread for this plugin or in the javascript help section.
* ===========================================================================
* Terms Of Use
* ===========================================================================
* Free to use and modify for commercial and noncommercial games, with credit.
* ===========================================================================
* Compatibility
* ===========================================================================
* Set under Yanfly plugins.
* ===========================================================================
* Credits
* ===========================================================================
* DreamX
* Thanks to Yanfly for the original plugin which this is an extension of.
*/
Here is an example of notetags.
Code:
// when the exp window appears, execute
// common event 1
-----
<VICTORY ACTION TYPE: exp>
<VICTORY ACTION EFFECT>
this.DXVACommonEvent("1");
</VICTORY ACTION EFFECT>
// when the exp window appears, execute
// common event 11 if one of the enemies
// had a notetag name IsImp
-----
<VICTORY ACTION TYPE: exp>
<VICTORY ACTION CONDITION>
this.DXVAEnemiesHasTag("IsImp");
</VICTORY ACTION CONDITION>
<VICTORY ACTION PRIORITY>
1
</VICTORY ACTION PRIORITY>
<VICTORY ACTION EFFECT>
this.DXVACommonEvent("11");
</VICTORY ACTION EFFECT>
// when a potion is dropped, execute
// common event 8
-------------------
<VICTORY ACTION TYPE: drop>
<VICTORY ACTION CONDITION>
this.DXVADropsHasTag("IsPotion");
</VICTORY ACTION CONDITION>
<VICTORY ACTION EFFECT>
this.DXVACommonEvent("8");
</VICTORY ACTION EFFECT>
// When Harold levels up, execute common
// event 12
-------------------
<VICTORY ACTION TYPE: level>
<VICTORY ACTION EFFECT>
this.DXVACommonEvent("12");
</VICTORY ACTION EFFECT>
// if there was 3 or more unique items
// dropped execute common event 10
-----------
<VICTORY ACTION TYPE: drop>
<VICTORY ACTION CONDITION>
BattleManager._rewards.items.length >= 3
</VICTORY ACTION CONDITION>
<VICTORY ACTION EFFECT>
this.DXVACommonEvent("10");
</VICTORY ACTION EFFECT>
Last edited by a moderator:
