DoubleX RMMZ Unit Filters

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
Purpose
Lets you use script calls to filter unit members with less codes and eventing

Introduction
Code:
*      1. Without any plugin, getting a member with specific conditions
*         relative to the belonging unit, like finding the party member with
*         the highest amount of hp, demands relatively heavy event setups,
*         even with the aid of common events, which boost event reusability.
*      2. With this plugin, the same can be done using several easy, simple
*         and small script calls instead of writing several common events
*         from scratch, thus further improving effectiveness and efficiency.
Video(v1.02a+)
(You'll have to use DoubleX_RMMZ_Plugin_Query to use the plugin queries of this plugin)

Games using this plugin
None so far

Code:
*    # Battler manipulations
*      1. isAnyStateAffected(stateIds)
*         - Returns whether the battler involved has any state included by
*           stateIds, which is a list of id of states
*         - stateIds must be an Array of natural numbers
*         - E.g.:
*           $gameParty.members()[0].isAnyStateAffected([1, 2]) returns
*           whether the 1st party member has any state with id 1 or 2
*      2. isAllStatesAffected(stateIds)
*         - Returns whether the battler involved has all states included by
*           stateIds, which is a list of id of states
*         - stateIds must be an Array of natural numbers
*         - E.g.:
*           $gameActors.actor(1).isAllStatesAffected([1, 2]) returns whether
*           the actor with id 1 has all states with id 1 or 2
*      3. isAnyBuffAffected(paramIds)
*         - Returns whether the battler involved has any buff included by
*           paramIds, which is a list of id of corresponding parameters
*         - paramIds must be an Array of non negative numbers
*         - E.g.:
*           $gameParty.members()[0].isAnyBuffAffected([0, 1]) returns
*           whether the 1st party member has any mhp or mmp buff
*      4. isAllBuffsAffected(paramIds)
*         - Returns whether the battler involved has all buffs included by
*           paramIds, which is a list of id of corresponding parameters
*         - paramIds must be an Array of non negative numbers
*         - E.g.:
*           $gameActors.actor(1).isAllBuffsAffected([0, 1]) returns whether
*           the actor with id 1 has all mhp and mmp buffs
*      5. isAnyDebuffAffected(paramIds)
*         - Returns whether the battler involved has any debuff included by
*           paramIds, which is a list of id of corresponding parameters
*         - paramIds must be an Array of non negative numbers
*         - E.g.:
*           $gameParty.members()[0].isAnyDebuffAffected([0, 1]) returns
*           whether the 1st party member has any mhp or mmp debuff
*      6. isAllDebuffsAffected(paramIds)
*         - Returns whether the battler involved has all debuffs included by
*           paramIds, which is a list of id of corresponding parameters
*         - paramIds must be an Array of non negative numbers
*         - E.g.:
*           $gameActors.actor(1).isAllDebuffsAffected([0, 1]) returns whether
*           the actor with id 1 has all mhp and mmp debuffs
*      7. hasAnySkill(skillIds)
*         - Returns whether the battler involved has any skill included by
*           skillIds, which is a list of id of corresponding skills
*         - paramIds must be an Array of natural numbers
*         - E.g.:
*           $gameParty.members()[0].hasAnySkill([1, 2]) returns whether the
*           1st party member has skill with id 1 or 2
*      8. hasAllSkills(skillIds)
*         - Returns whether the battler involved has all skills included by
*           skillIds, which is a list of id of corresponding skills
*         - paramIds must be an Array of natural numbers
*         - E.g.:
*           $gameActors.actor(1).hasAllSkills([1, 2]) returns whether the
*           actor with id 1 has all skills with id 1 and 2
*      (v1.01a+)9. hasAnyUsableSkill(skillIds)
*         - Returns whether the battler involved has any usable skill
*           included by skillIds, which is a list of id of corresponding
*           skills
*         - paramIds must be an Array of natural numbers
*         - E.g.:
*           $gameParty.members()[0].hasAnyUsableSkill([1, 2]) returns whether
*           the 1st party member has usable skill with id 1 or 2
*      (v1.01a+)10. hasAllUsableSkills(skillIds)
*          - Returns whether the battler involved has all usable skills
*            included by skillIds, which is a list of id of corresponding
*            skills
*          - paramIds must be an Array of natural numbers
*          - E.g.:
*            $gameActors.actor(1).hasAllUsableSkills([1, 2]) returns whether
*            the actor with id 1 has all usable skills with id 1 and 2
*    # Unit manipulations
*      1. memWithAnyState(stateIds, mems)
*         - Returns the list of members with any state included by stateIds,
*           which is a list of id of states, among all battlers included by
*           mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stateIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithAnyState([1, 2]) returns the list of party
*           members with any state with id 1 or 2
*      2. memWithAllStates(stateIds, mems)
*         - Returns the list of members with all states included by
*           stateIds, which is a list of id of states, among all battlers
*           included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stateIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithAllStates([1, 2], $gameTroop.memWithAnyState([3, 4]))
*           returns the list of troop members with all states with id 1 or 2
*           among those with any state with id 3 or 4
*      3. memWithoutAnyState(stateIds, mems)
*         - Returns the list of members without any state included by
*           stateIds, which is a list of id of states, among all battlers
*           included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stateIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithoutAnyState([1, 2]) returns the list of party
*           members without any state with id 1 or 2
*      4. memWithoutAllStates(stateIds, mems)
*         - Returns the list of members without all states included by
*           stateIds, which is a list of id of states, among all battlers
*           included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stateIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithoutAllStates([1, 2], $gameTroop.memWithoutAnyState([3, 4]))
*           returns the list of troop members without all states with id 1 or
*           2 among those without any state with id 1 or 2
*      5. memWithAnyBuff(paramIds, mems)
*         - Returns the list of members with any buff included by paramIds,
*           which is a list of id of corresponding parameters, among all
*           battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithAnyBuff([0, 1]) returns the list of party
*           members with any mhp or mmp buff
*      6. memWithAllBuffs(paramIds, mems)
*         - Returns the list of members with all buffs included by paramIds,
*           which is a list of id of corresponding parameters, among all
*           battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithAllBuffs([0, 1], $gameTroop.memWithAnyBuff([2, 3]))
*           returns the list of troop members with all mhp and mmp buffs
*           among those with any atk or def buff
*      7. memWithoutAnyBuff(paramIds, mems)
*         - Returns the list of members without any buff included by
*           paramIds, which is a list of id of corresponding parameters,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithoutAnyBuff([0, 1]) returns the list of party
*           members without any mhp or mmp buff
*      8. memWithoutAllBuffs(paramIds, mems)
*         - Returns the list of members without all buffs included by
*           paramIds, which is a list of id of corresponding parameters,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithoutAllBuffs([0, 1], $gameTroop.memWithoutAnyBuff([2, 3]))
*           returns the list of troop members without all mhp and mmp buffs
*           among those without any atk or def buff
*      9. memWithAnyDebuff(paramIds, mems)
*         - Returns the list of members with any debuff included by paramIds,
*           which is a list of id of corresponding parameters, among all
*           battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithAnyDebuff([0, 1]) returns the list of party
*           members with any mhp or mmp debuff
*      10. memWithAllDebuffs(paramIds, mems)
*         - Returns the list of members with all debuffs included by
*           paramIds, which is a list of id of corresponding parameters,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithAllDebuffs([0, 1], $gameTroop.memWithAnyDebuff([2, 3]))
*           returns the list of troop members with all mhp and mmp debuffs
*           among those with any atk or def debuff
*      11. memWithoutAnyDebuff(paramIds, mems)
*         - Returns the list of members without any debuff included by
*           paramIds, which is a list of id of corresponding parameters,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithoutAnyDebuff([0, 1]) returns the list of party
*           members without any mhp or mmp debuff
*      12. memWithoutAllDebuffs(paramIds, mems)
*         - Returns the list of members without all debuffs included by
*           paramIds, which is a list of id of corresponding parameters,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - paramIds must be an Array of non negative numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithoutAllDebuffs([0, 1], $gameTroop.memWithoutAnyDebuff([2, 3]))
*           returns the list of troop members without all mhp and mmp debuffs
*           among those without any atk or def debuff
*      13. memWithAnySkill(skillIds, mems)
*         - Returns the list of members with any skill included by skillIds,
*           which is a list of id of corresponding skills, among all battlers
*           included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithAnySkill([1, 2]) returns the list of party
*           members with skill having id 1 or 2
*      14. memWithAllSkills(skillIds, mems)
*         - Returns the list of members with all skills included by skillIds,
*           which is a list of id of corresponding skills, among all battlers
*           included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithAllSkills([1, 2], $gameParty.memWithAnySkill([3, 4]))
*           returns the list of troop members with skills having id 1 and 2
*           among those with skill having id 3 or 4
*      15. memWithoutAnySkill(skillIds, mems)
*         - Returns the list of members without any skill included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithoutAnySkill([1, 2]) returns the list of party
*           members without skills having id 1 nor 2
*      16. memWithoutAllSkills(skillIds, mems)
*         - Returns the list of members without all skills included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithoutAllSkills([1, 2], $gameParty.memWithoutAnySkill([3, 4]))
*           returns the list of troop members without skills having id 1 and
*           2 among those without skill having id 3 or 4
*      17. anyHighestStatMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, include those being the
*           highest among the caller, among all battlers included by mems,
*           which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.anyHighestStatMem(["hp", "mp"]) returns the list of
*           party members with the highest amount of hp or mp among the party
*      18. allHighestStatsMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, are all the highest among
*           the caller, among all battlers included by mems, which is a list
*           of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.allHighestStatsMem(["hp", "mp"], $gameTroop.anyHighestStatMem(["mhp", "mmp"]))
*           returns the list of troop members with the highest amount of hp
*           and mp among those with the highest amount of mhp or mmp among
*           the troop
*      19. notAnyHighestStatMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, don't include those being
*           the highest among the caller, among all battlers included by
*           mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.notAnyHighestStatMem(["hp", "mp"]) returns the list of
*           party members with neither the highest amount of hp nor mp among
*           the party
*      20. notAllHighestStatsMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, aren't all the highest
*           among the caller, among all battlers included by mems, which is
*           a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.notAllHighestStatsMem(["hp", "mp"], $gameTroop.notAnyHighestStatMem(["mhp", "mmp"]))
*           returns the list of troop members without the highest amount of
*           both hp and mp among those with neither the highest amount of mhp
*           nor mmp among the troop
*      21. anyLowestStatMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, include those being the
*           lowest among the caller, among all battlers included by mems,
*           which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.anyLowestStatMem(["hp", "mp"]) returns the list of
*           party members with the lowest amount of hp or mp among the party
*      22. allLowestStatsMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, are all the lowest among
*           the caller, among all battlers included by mems, which is a list
*           of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.allLowestStatsMem(["hp", "mp"], $gameTroop.anyLowestStatMem(["mhp", "mmp"]))
*           returns the list of troop members with the lowest amount of hp
*           and mp among those with the lowest amount of mhp or mmp among the
*           troop
*      23. notAnyLowestStatMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, don't include those being
*           the lowest among the caller, among all battlers included by mems,
*           which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.notAnyLowestStatMem(["hp", "mp"]) returns the list of
*           party members with neither the lowest amount of hp nor mp among
*           the party
*      24. notAllLowestStatsMem(stats, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, aren't all the lowest
*           among the caller, among all battlers included by mems, which is a
*           list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.notAllLowestStatsMem(["hp", "mp"], $gameParty.notAnyLowestStatMem(["mhp", "mmp"]))
*           returns the list of troop members without the lowest amount of
*           both hp and mp among those with neither the lowest amount of mhp
*           nor mmp among the troop
*      25. anyAboveStatMem(stats, val, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, include those above val,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - val must be a number
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.anyAboveStatMem(["hp", "mp"], 100) returns the list of
*           party members with the value of hp or mp above 100
*      26. allAboveStatMem(stats, val, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, are all above val, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - val must be a number
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.allAboveStatMem(["hp", "mp"], 100, $gameTroop.anyAboveStatMem(["mhp", "mmp"], 1000))
*           returns the list of troop members with the value of hp and mp
*           above 100 among those with the value of mhp or mmp above 1000
*      27. anyBelowStatMem(stats, val, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, include those below val,
*           among all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - val must be a number
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.anyBelowStatMem(["hp", "mp"], 100) returns the list of
*           party members with the value of hp or mp below 100
*      28. allBelowStatMem(stats, val, mems)
*         - Returns the list of members whose values of
*           parameters/ex-parameters/sp-parameters included by stats, which
*           is a list of names of corresponding
*           parameters/ex-parameters/sp-parameters, are all below val, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - stats must be an Array of strings as names of Game_Battler
*           properties with the get function
*         - val must be a number
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.allBelowStatMem(["hp", "mp"], 100, $gameTroop.anyBelowStatMem(["mhp", "mmp"], 1000))
*           returns the list of troop members with the value of hp and mp
*           below 100 among those with the value of mhp or mmp below 1000
*      (v1.01a+)29. memWithAnyUsableSkill(skillIds, mems)
*         - Returns the list of members with any usable skill included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithAnyUsableSkill([1, 2]) returns the list of
*           party members with usable skill having id 1 or 2
*      (v1.01a+)30. memWithAllUsableSkills(skillIds, mems)
*         - Returns the list of members with all usable skills included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithAllUsableSkills([1, 2], $gameParty.memWithAnyUsableSkill([3, 4]))
*           returns the list of troop members with usable skills having id 1
*           and 2 among those with usable skill having id 3 or 4
*      (v1.01a+)31. memWithoutAnyUsableSkill(skillIds, mems)
*         - Returns the list of members without any usable skill included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameParty.memWithoutAnyUsableSkill([1, 2]) returns the list of
*           party members without usable skills having id 1 nor 2
*      (v1.01a+)32. memWithoutAllUsableSkills(skillIds, mems)
*         - Returns the list of members without all usable skills included by
*           skillIds, which is a list of id of corresponding skills, among
*           all battlers included by mems, which is a list of battlers
*         - The return value should be an Array of Game_Battler
*         - skillIds must be an Array of natural numbers
*         - mems must be an Array of Game_Battler
*         - If mems isn't specified, it'll be default to all unit members
*           outside battles and battle members inside battles respectively
*         - E.g.:
*           $gameTroop.memWithoutAllUsableSkills([1, 2], $gameParty.memWithoutAnyUsableSkill([3, 4]))
*           returns the list of troop members without usable skills having id
*           1 and 2 among those without usable skill having id 3 or 4

Code:
*      1. This plugin's meant to be a convenience tool to facilitate the use
*         of some unit filters that aren't already available from the default
*         RMMZ codebase, so you're still supposed to write some Javascript
*         codes with the aid of the new script calls provided by this plugin.

Code:
*      Abilities:
*      1. Nothing special for most ordinary cases
*      2. Little RMMZ plugin development proficiency to fully utilize this
*         (Elementary Javascript exposures being able to write beginner codes
*         up to 300LoC scale )

Code:
*      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.

Code:
*      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

Code:
*      { codebase: "1.0.2", plugin: "v1.02a" }(2020 Oct 6 GMT 1600):
*      1. Added the plugin query and command counterparts for the script
*         calls of this plugin
*      { codebase: "1.0.0", plugin: "v1.01a" }(2020 Aug 28 GMT 0000):
*      1. Added the following battler manipulation script calls  -
*         - hasAnyUsableSkill(skillIds)
*         - hasAllUsableSkills(skillIds)
*      2. Added the following unit manipulation script calls  -
*         - memWithAnyUsableSkill(skillIds, mems)
*         - memWithAllUsableSkills(skillIds, mems)
*         - memWithoutAnyUsableSkill(skillIds, mems)
*         - memWithoutAllUsableSkills(skillIds, mems)
*      { codebase: "1.0.0", plugin: "v1.00a" }(2020 Aug 23 GMT 0400):
*      1. 1st version of this plugin finished

Download Link
Demo Link
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,503
First Language
Indonesian
Primarily Uses
RMVXA
Just letting you know that having a regular text marked as a javascript code would turn them into this weird syntax highlight, and it looks horrible in dark mode.
Screenshot_174.jpg
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
@TheoAllen Thanks for your reminder, and I've just changed them to text code :)
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
Updates
Code:
 *      { codebase: "1.0.0", plugin: "v1.01a" }(2020 Aug 28 GMT 0000):
 *      1. Added the following battler manipulation script calls  -
 *         - hasAnyUsableSkill(skillIds)
 *         - hasAllUsableSkills(skillIds)
 *      2. Added the following unit manipulation script calls  -
 *         - memWithAnyUsableSkill(skillIds, mems)
 *         - memWithAllUsableSkills(skillIds, mems)
 *         - memWithoutAnyUsableSkill(skillIds, mems)
 *         - memWithoutAllUsableSkills(skillIds, mems)
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,293
Reaction score
518
First Language
indonesian
nice plugin :D.
this could also be a great tool for 'non coder' with a little bit of tweaking...
'non coder' could use this as conditional branch [script]...

suggestion: just need to simplify the usage for the 'non coder' user maybe by assigning some 'word shortcut' local variable in game interpreter when calling the script call... for something that might be confusing for the non coder.

ex:
Code:
var party= $gameParty.members();
var actors = $gameActors._data;
so they can use
Code:
party[1] and actors[2]
instead of confusing
Code:
$gameParty.members()[1] and $gameActors._data[2];
the concept is like the damage formula box which substitute
a => user
b => target
v => variables

another way to simplify this for 'non coder' is by using plugin command that store the result in a variable. execute that plugin command... use the variable in conditional branch.
for example in your example:
Code:
$gameActors.actor(1).isAllDebuffsAffected([0, 1])
you can change it to plugin command that has parameter
1. parameter to choose actor (there's @type actor so user can select the actor easier)
2. parameter for the state check array (ex: [1,2])
(you could also make the @type as a number[] so the user can use it easier by adding entry method);

then store the result plugin command result in a variable (you can use plugin parameter to choose which variable to store the result). variable can actually store other than numbers... :D.

This is only suggestion btw :D
 
Last edited:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
@estriole In that case, I'd rather ask the users to use my custom script calls plugin, because the real need here is to replace script calls that are more confusing to non-coders to less confusing counterparts, and I'd prefer a general solution that users can use it for their own needs.
So, in the case of this plugin, $gameActors.actor(1).isAllDebuffsAffected([0, 1]) can be replaced by has1stActorMhpMmpDebuffs():
Code:
newScriptCallFullName: has1stActorMhpMhpDebuffs
origScriptCallFullName: $gameActors.actor(1).isAllDebuffsAffected
origScriptCallContext:
scriptCallArgVals: [{ 0: [0, 1] }]
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,293
Reaction score
518
First Language
indonesian
@estriole In that case, I'd rather ask the users to use my custom script calls plugin, because the real need here is to replace script calls that are more confusing to non-coders to less confusing counterparts, and I'd prefer a general solution that users can use it for their own needs.
So, in the case of this plugin, $gameActors.actor(1).isAllDebuffsAffected([0, 1]) can be replaced by has1stActorMhpMmpDebuffs():
Code:
newScriptCallFullName: has1stActorMhpMhpDebuffs
origScriptCallFullName: $gameActors.actor(1).isAllDebuffsAffected
origScriptCallContext:
scriptCallArgVals: [{ 0: [0, 1] }]
lol did not know you have that plugins :D... nice plugin btw...

but it's not what i mean though... using that plugin you require the user itself to define the new script call in plugin parameter (i did not try it btw... only reading the plugins intro and parameters. correct me if i'm wrong)... so the one using it must know coding instead of not...
what i mean is to make this plugin user did not require the coding knowledge or at least simplify it so it's easier to use by non coder in eventing... :D.

just like in damage formula box (a, b, v)
and also maybe using plugin command so the user have better UI to select the actor or set all the state affected they want to check.
something like this:
Code:
@command isAllDebuffsAffected
@text Actor have certain debuff?
@desc blablabla

@arg ActorAffected
@text Actor to Check
@type actor
@desc blablabla

@arg stateToCheck
@text States to Check
@type number[]
@desc blablabla
 
Last edited:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
@estriole I've just made a point in what I find missing in the editor, specifically for cases like this.
Because, using the damage formula approach, you'll have to think of all the common enough cases, like:
1. pm = $gameParty.members()
2. tam = $gameTroop.aliveMembers()
3. abm = BattleManager.allBattleMembers()
4. ai = $gameActors.actor(i)
Even if I were to make this, I won't make this in this plugin, but as a completely separate plugin to provide a general solution that can be applied to any plugin having similar issues :p

As for plugin commands, they're supposed to make side effects rather than returning end results, meaning that making plugin commands for this plugin would end up something like this:
isActorAllDebuffsAffected actorId, paramIds, switchId
Where switchId is the id of the game switch storing the returned end result(boolean) of $gameActors.actor(actorId).isAllDebuffsAffected(paramIds).
Then, the conditional branch needs to immediately get the state of that switch, and I don't think it'd be effective nor efficient enough for non-coders ;)
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,293
Reaction score
518
First Language
indonesian
@estriole I've just made a point in what I find missing in the editor, specifically for cases like this.
Because, using the damage formula approach, you'll have to think of all the common enough cases, like:
1. pm = $gameParty.members()
2. tam = $gameTroop.aliveMembers()
3. abm = BattleManager.allBattleMembers()
4. ai = $gameActors.actor(i)
Even if I were to make this, I won't make this in this plugin, but as a completely separate plugin to provide a general solution that can be applied to any plugin having similar issues :p

As for plugin commands, they're supposed to make side effects rather than returning end results, meaning that making plugin commands for this plugin would end up something like this:
isActorAllDebuffsAffected actorId, paramIds, switchId
Where switchId is the id of the game switch storing the returned end result(boolean) of $gameActors.actor(actorId).isAllDebuffsAffected(paramIds).
Then, the conditional branch needs to immediately get the state of that switch, and I don't think it'd be effective nor efficient enough for non-coders ;)
yes that could be seperate plugins (for the a b v). actually i have seen some script like this back in ACE... forgot the name but basically adding those shortcuts local variable in game interpreter... :D... i think even yanfly use that kind of local variable in his notetags (if i remember correctly)

plugin command with 3 parameter like that also better... since the third parameter is for the 'result'.
each plugin command could be set differently though... true or false as switch is okay for the isActorAllDebuffsAffected example above... but for the game unit method the result is not true of false but array of members... that's why in my example earlier i use variables to store the result :D...

for example if in your another example.
Code:
$gameParty.memWithAnyState([1, 2])
for effectiveness or efficiency factor for non coders... i think using plugin command UI will be whole lots better for non coder user :D...
ex:
plugin command ex.jpg
and after that user could just run conditional using that switch...

instead of using conditional branch with script command.
it would be harder for non coder. :D.

because basically the new MZ plugin command is kinda like making our own new 'editor event command'. and most non coder will blend easily because of the similarity with eventing... (actually that's the only good thing i found in MZ update for now :D).
but it's my own opinion though... people might think differently :D.
 

Attachments

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,776
Reaction score
938
First Language
Chinese
Primarily Uses
N/A
Updates
Code:
*      { codebase: "1.0.2", plugin: "v1.02a" }(2020 Oct 6 GMT 1600):
*      1. Added the plugin query and command counterparts for the script
*         calls of this plugin
You'll have to use DoubleX_RMMZ_Plugin_Query to use the plugin queries of this plugin:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......
i love my game very much
Uh, I'm probably overthinking this, but I think that some of my music sounds kinda...bad?
The melodies are just sort of awkward, and don't flow.
I'm really not sure what to do. Why am I even worrying about this? I don't even have a battle system yet!
And the Lord said, let there be lighting effects! And there were lighting effects! And it was good...ish? Might tweak this some more.
Today was a day of good things! Thank you fate! I pray to the darkness that those that read this will enjoy a good day as well! Power to the gam mak.

Forum statistics

Threads
105,723
Messages
1,015,909
Members
137,401
Latest member
Rubbun
Top