Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
DoubleX

DoubleX_RMMZ_Plugin_Query

Recommended Posts

Purpose

Lets you use plugin queries in conditional branch and control variables

 

Introduction

 *      1. The RMMZ plugin commands are supposed to make side effects but not
 *         return end results
 *      2. With this plugin, other plugins can declare plugin queries that
 *         behave like RMMV plugin commands but return end results instead of
 *         making side effects
 *      3. Plugin queries can replace skill/item damage formulae
 *      4. Plugin queries can also replace script calls in conditional branch
 *         and control variables event commands

 

Video

 

Games using this plugin

None so far

 

Parameters

Spoiler

* @param newDamageFormulaPluginQueries
* @type struct<NewPluginQuery>[]
* @desc Sets the list of new damage formula plugin queries
* This list shouldn't include those already added by other plugins
* @default []
*
* @param newEventCmdPluginQueries
* @type struct<NewPluginQuery>[]
* @desc Sets the list of new event command plugin queries
* This list shouldn't include those already added by other plugins
* @default []

 

 

Plugin Query Info

Spoiler

*    1. General form
*       queryName argName1 argName2 argName3 argNameI argNameN
*       E.g.:
*       - If the plugin query has its query name as abcdefg and arguments
*         as h, i, j and k, then the plugin query is abcdefg h i j k
*    2. (Plugin Developers Only)Registration
*       PluginManager.damageFormulaPluginQueries.set(name, func);
*       - Registers a plugin query with the name being name and function
*         returning the result being func
*       - The first 5 arguments of the function must be the following:
*         i. item - The skill/item having the damage formula
*         ii. a - The subject executing the skill/item
*         iii. b - The target having the damage formula applied to
*         iv. v - The raw data list of the game variables
*         v. sign - 1(damage)/-1(recovery)
*       - The registered plugin query can be used in skill/item damage
*         formulae
*       E.g.:
*       - PluginManager.damageFormulaPluginQueries.set("matDmg", (item, a, b, v, sign, baseDmg) => {
*             return +baseDmg + a.mat * 2 - b.mdf * 2;
*         });
*         Will define the plugin query atkDmg in the skill/item damage
*         formulae as baseDmg + a.mat * 2 - b.mdf * 2
*         Where baseDmg must be a Number
*       PluginManager.eventCmdPluginQueries.set(name, func);
*       - Registers a plugin query with the name being name and function
*         returning the result being func
*       - The registered plugin query can be used in conditional branch and
*         control variables event commands
*       E.g.:
*       - PluginManager.eventCmdPluginQueries.set("isActorAnyStateAffected", (actorId, paramIds) => {
*             return $gameActors.actor(+actorId).isAnyStateAffected(paramIds.split("_").map(Number));
*         });
*         Will define the plugin query
*         isActorAnyStateAffected actorId paramIds
*         in the conditional branch/control variables event commands as
*         $gameActors.actor(actorId).isAnyStateAffected(paramIds);
*         If paramIds is written in the form of
*         paramId1_paramId2_paramId3_paramIdI_paramIdN

 

 

Author Notes

Spoiler

*      1. The plugin command name collision issues in RMMV applies to
*         plugin queries registed to this RMMZ plugin as well, and in this
*         case, the last registered plugin query having the same name will be
*         used
*      2. DON'T MAKE SIDE EFFECTS IN THE SKILL/ITEM DAMAGE FORMULA PLUGIN
*         QUERIES UNLESS YOU REALLY KNOW WHAT YOU'RE TRULY DOING

 

 

Prerequisites

Spoiler

Plugins:

1. DoubleX RMMZ Enhanced Codebase

Abilities(Plugin Users):

1. Nothing special

Abilities(Plugin Developers):

1. Little RMMZ plugin development proficiency to fully utilize this

   (Elementary Javascript exposures being able to write beginner codes up to 300LoC scale)

 

Instructions

Spoiler

*      1. The default plugin parameters file name is
*         DoubleX_RMMZ_Plugin_Query
*         If you want to change that, you must edit the value of
*         DoubleX_RMMZ.Plugin_Query.PLUGIN_NAME, which must be done
*         via opening this plugin js file directly

 

 

Terms Of Use

Spoiler

*      1. Commercial use's always allowed and crediting me's always optional.
*      2. You shall keep this plugin's Plugin Info part's contents intact.
*      3. You shalln't claim that this plugin's written by anyone other than
*         DoubleX or my aliases. I always reserve the right to deny you from
*         using any of my plugins anymore if you've violated this.
*      4. If you repost this plugin directly(rather than just linking back),
*         you shall inform me of these direct repostings. I always reserve
*         the right to request you to edit those direct repostings.
*      5. CC BY 4.0, except those conflicting with any of the above, applies
*         to this plugin, unless you've my permissions not needing follow so.
*      6. I always reserve the right to deny you from using this plugin
*         anymore if you've violated any of the above.

 

 

Contributors

Spoiler

*      Authors:
*      1. DoubleX
*      Plugin Development Collaborators:
*      - None So Far
*      Bug Reporters:
*      - None So Far
*      Compatibility Issue Raisers:
*      - None So Far
*      Feature Requesters:
*      - None So Far

 

 

Changelog

Spoiler

*      { codebase: "1.0.2", plugin: "v1.00a" }(2020 Oct 6 GMT 1600):
*      1. 1st version of this plugin finished

 

 

Download Link

Demo Link

Edited by DoubleX

Share this post


Link to post
Share on other sites

Updates

 *      { codebase: "1.1.0", plugin: "v1.00b" }(2020 Dec 2 GMT 0700):
 *      1. You no longer have to edit the value of
 *         DoubleX_RMMZ.Plugin_Query.PLUGIN_NAME when changing this plugin
 *         file name

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DoubleX
      Purpose
      Lets you directly edit various built-in global formulae
       
      Video
       
      Games using this plugin
      None so far
       
      Parameters
       
      Script Calls
       
      Plugin Command
       
      Prerequisites
       
      Terms Of Use
       
      Contributors
       
      Changelog
       
      Download Link
      Demo Link
    • By DoubleX
      Note
      This plugin works for both RMMV and RMMZ
       
      Purpose
      Lets you extract texts in events/common events/battle events to txt file
       
      Video
       
      Games using this plugin
      None so far
       
      Parameters
       
      Prerequisites
       
      Terms Of Use
       
      Contributors
       
      Changelog
       
      Download Link
      Demo Link
    • By DoubleX
      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:
      1. Some plugin development proficiency(having written several easy, simple and small battle-related plugins up to 1k LoC scale)
      2. Basic knowledge on what the default RMMZ turn based battle flow implementations do in general
      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)

      Simplified Flowchart
      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
       
      Battle Start
       
      Input Action Slots
       
      Thinking In Frames
       
      Frame Start
       
      Start Phase
       
      Turn Phase
       
      Action Phase
       
      Turn End Phase
       
      Battle End Phase
       
      Update TPB Input
       
      Summary
       
      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
      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
    • By DoubleX
      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:
      1. Little javascript coding proficiency(barely okay with writing rudimentary Javascript codes up to 300 LoC scale)
      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)
       
      Simplified Flowchart
      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
       
      Start Battle
       
      Input Actions
       
      Process Turns
       
      Execute Actions
       
      Summary
       
      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
      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
×
×
  • Create New...