设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 63|回复: 0

[转载发布] DoubleX RMMV Unit Filters

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8281

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30569
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39744

    灌水之王

    发表于 6 天前 | 显示全部楼层 |阅读模式
    Note
    This plugin's available for commercial use

    Purpose
    Lets you use plugin calls to use new unit filters in order to write much, much less codes to perform much, much more tasks

    Introduction
    Spoiler: Introduction
                    Code:       
    1. *      1. Without any plugin, getting a member with specific conditions     
    2. *         relative to the belonging unit, like finding the party member with
    3. *         the highest amount of hp, demands relatively heavy event setups,   
    4. *         even with the aid of common events, which boost event reusability.
    5. *      2. With this plugin, the same can be done using several easy, simple  
    6. *         and small plugin calls instead of writing several common events   
    7. *         from scratch, thus further improving effectiveness and efficiency.
    复制代码


    Games using this plugin

    None so far

    Plugin Calls
    Spoiler: Plugin Calls
                    Code:       
    1. *    # Battler manipulations                                                
    2. *      1. isAnyStateAffected(stateIds)                                       
    3. *         - Returns whether the battler involved has any state included by   
    4. *           stateIds, which is a list of id of states                       
    5. *         - stateIds must be an Array of positive Number                     
    6. *         - E.g.:                                                           
    7. *           $gameParty.members()[0].isAnyStateAffected([1, 2]) returns      
    8. *           whether the 1st party member has any state with id 1 or 2      
    9. *      2. isAllStatesAffected(stateIds)                                    
    10. *         - Returns whether the battler involved has all states included by  
    11. *           stateIds, which is a list of id of states                       
    12. *         - stateIds must be an Array of positive Number                     
    13. *         - E.g.:                                                           
    14. *           $gameActors.actor(1).isAllStatesAffected([1, 2]) returns whether
    15. *           the actor with id 1 has all states with id 1 or 2               
    16. *      3. isAnyBuffAffected(stateIds)                                       
    17. *         - Returns whether the battler involved has any buff included by   
    18. *           paramIds, which is a list of id of corresponding parameters     
    19. *         - paramIds must be an Array of non negative Number                 
    20. *         - E.g.:                                                           
    21. *           $gameParty.members()[0].isAnyBuffAffected([0, 1]) returns      
    22. *           whether the 1st party member has any hp or mp buff               
    23. *      4. isAllBuffsAffected(stateIds)                                       
    24. *         - Returns whether the battler involved has all buffs included by   
    25. *           paramIds, which is a list of id of corresponding parameters     
    26. *         - paramIds must be an Array of non negative Number                 
    27. *         - E.g.:                                                           
    28. *           $gameActors.actor(1).isAllBuffsAffected([0, 1]) returns whether  
    29. *           the actor with id 1 has all hp and mp buffs                     
    30. *      5. isAnyDebuffAffected(stateIds)                                    
    31. *         - Returns whether the battler involved has any debuff included by  
    32. *           paramIds, which is a list of id of corresponding parameters     
    33. *         - paramIds must be an Array of non negative Number                 
    34. *         - E.g.:                                                           
    35. *           $gameParty.members()[0].isAnyDebuffAffected([0, 1]) returns      
    36. *           whether the 1st party member has any hp or mp debuff            
    37. *      6. isAllDebuffsAffected(stateIds)                                       
    38. *         - Returns whether the battler involved has all debuffs included by
    39. *           paramIds, which is a list of id of corresponding parameters     
    40. *         - paramIds must be an Array of non negative Number                 
    41. *         - E.g.:                                                           
    42. *           $gameActors.actor(1).isAllDebuffsAffected([0, 1]) returns whether  
    43. *           the actor with id 1 has all hp and mp debuffs                  
    44. *      7. hasAnySkill(skillIds)                                             
    45. *         - Returns whether the battler involved has any skill included by   
    46. *           skillIds, which is a list of id of corresponding skills         
    47. *         - paramIds must be an Array of positive Number                     
    48. *         - E.g.:                                                           
    49. *           $gameParty.members()[0].hasAnySkill([1, 2]) returns whether the  
    50. *           1st party member has skill with id 1 or 2                       
    51. *      8. hasAllSkills(skillIds)                                             
    52. *         - Returns whether the battler involved has all skills included by  
    53. *           skillIds, which is a list of id of corresponding skills         
    54. *         - paramIds must be an Array of positive Number                     
    55. *         - E.g.:                                                           
    56. *           $gameActors.actor(1).hasAllSkills([1, 2]) returns whether the   
    57. *           actor with id 1 has all skills with id 1 and 2                  
    58. *    # Unit manipulations                                                   
    59. *      1. memWithAnyState(stateIds)                                         
    60. *         - Returns the list of members with any state included by stateIds,
    61. *           which is a list of id of states                                 
    62. *         - The return value should be an Array of Game_Battler            
    63. *         - stateIds must be an Array of positive Number                     
    64. *         - E.g.:                                                           
    65. *           $gameParty.memWithAnyState([1, 2]) returns the list of party     
    66. *           members with any state with id 1 or 2                           
    67. *      2. memWithAllStates(stateIds)                                         
    68. *         - Returns the list of members with all states included by         
    69. *           stateIds, which is a list of id of states                       
    70. *         - The return value should be an Array of Game_Battler            
    71. *         - stateIds must be an Array of positive Number                     
    72. *         - E.g.:                                                           
    73. *           $gameTroop.memWithAllStates([1, 2]) returns the list of troop   
    74. *           members with all states with id 1 or 2                           
    75. *      3. memWithoutAnyState(stateIds)                                       
    76. *         - Returns the list of members without any state included by      
    77. *           stateIds, which is a list of id of states                       
    78. *         - The return value should be an Array of Game_Battler            
    79. *         - stateIds must be an Array of positive Number                     
    80. *         - E.g.:                                                           
    81. *           $gameParty.memWithoutAnyState([1, 2]) returns the list of party  
    82. *           members without any state with id 1 or 2                        
    83. *      4. memWithoutAllStates(stateIds)                                    
    84. *         - Returns the list of members without all states included by      
    85. *           stateIds, which is a list of id of states                       
    86. *         - The return value should be an Array of Game_Battler            
    87. *         - stateIds must be an Array of positive Number                     
    88. *         - E.g.:                                                           
    89. *           $gameTroop.memWithoutAllStates([1, 2]) returns the list of troop
    90. *           members without all states with id 1 or 2                       
    91. *      5. memWithAnyBuff(paramIds)                                          
    92. *         - Returns the list of members with any buff included by paramIds,  
    93. *           which is a list of id of corresponding parameters               
    94. *         - The return value should be an Array of Game_Battler            
    95. *         - paramIds must be an Array of non negative Number                 
    96. *         - E.g.:                                                           
    97. *           $gameParty.memWithAnyBuff([0, 1]) returns the list of party     
    98. *           members with any hp or mp buff                                   
    99. *      6. memWithAllBuffs(paramIds)                                         
    100. *         - Returns the list of members with all buffs included by paramIds,
    101. *           which is a list of id of corresponding parameters               
    102. *         - The return value should be an Array of Game_Battler            
    103. *         - paramIds must be an Array of non negative Number                 
    104. *         - E.g.:                                                           
    105. *           $gameTroop.memWithAllBuffs([0, 1]) returns the list of troop     
    106. *           members with all hp and mp buffs                                 
    107. *      7. memWithoutAnyBuff(paramIds)                                       
    108. *         - Returns the list of members without any buff included by         
    109. *           paramIds, which is a list of id of corresponding parameters     
    110. *         - The return value should be an Array of Game_Battler            
    111. *         - paramIds must be an Array of non negative Number                 
    112. *         - E.g.:                                                           
    113. *           $gameParty.memWithoutAnyBuff([0, 1]) returns the list of party   
    114. *           members without any hp or mp buff                              
    115. *      8. memWithoutAllBuffs(paramIds)                                       
    116. *         - Returns the list of members without all buffs included by      
    117. *           paramIds, which is a list of id of corresponding parameters     
    118. *         - The return value should be an Array of Game_Battler            
    119. *         - paramIds must be an Array of non negative Number                 
    120. *         - E.g.:                                                           
    121. *           $gameTroop.memWithoutAllBuffs([0, 1]) returns the list of troop  
    122. *           members without all hp and mp buffs                             
    123. *      9. memWithAnyDebuff(paramIds)                                         
    124. *         - Returns the list of members with any debuff included by paramIds,
    125. *           which is a list of id of corresponding parameters               
    126. *         - The return value should be an Array of Game_Battler            
    127. *         - paramIds must be an Array of non negative Number                 
    128. *         - E.g.:                                                           
    129. *           $gameParty.memWithAnyDebuff([0, 1]) returns the list of party   
    130. *           members with any hp or mp debuff                                 
    131. *      10. memWithAllDebuffs(paramIds)                                       
    132. *         - Returns the list of members with all debuffs included by         
    133. *           paramIds, which is a list of id of corresponding parameters     
    134. *         - The return value should be an Array of Game_Battler            
    135. *         - paramIds must be an Array of non negative Number                 
    136. *         - E.g.:                                                           
    137. *           $gameTroop.memWithAllDebuffs([0, 1]) returns the list of troop   
    138. *           members with all hp and mp debuffs                              
    139. *      11. memWithoutAnyDebuff(paramIds)                                    
    140. *         - Returns the list of members without any debuff included by      
    141. *           paramIds, which is a list of id of corresponding parameters     
    142. *         - The return value should be an Array of Game_Battler            
    143. *         - paramIds must be an Array of non negative Number                 
    144. *         - E.g.:                                                           
    145. *           $gameParty.memWithoutAnyDebuff([0, 1]) returns the list of party
    146. *           members without any hp or mp debuff                             
    147. *      12. memWithoutAllDebuffs(paramIds)                                   
    148. *         - Returns the list of members without all debuffs included by     
    149. *           paramIds, which is a list of id of corresponding parameters     
    150. *         - The return value should be an Array of Game_Battler            
    151. *         - paramIds must be an Array of non negative Number                 
    152. *         - E.g.:                                                           
    153. *           $gameTroop.memWithoutAllDebuffs([0, 1]) returns the list of troop
    154. *           members without all hp and mp debuffs                           
    155. *      13. memWithAnySkill(skillIds)                                         
    156. *         - Returns the list of members with any skill included by skillIds,
    157. *           which is a list of id of corresponding skills                  
    158. *         - The return value should be an Array of Game_Battler            
    159. *         - skillIds must be an Array of positive Number                     
    160. *         - E.g.:                                                           
    161. *           $gameParty.memWithAnySkill([1, 2]) returns the list of party     
    162. *           members with skill having id 1 or 2                             
    163. *      14. memWithAllSkills(skillIds)                                       
    164. *         - Returns the list of members with all skills included by skillIds,
    165. *           which is a list of id of corresponding skills                  
    166. *         - The return value should be an Array of Game_Battler            
    167. *         - skillIds must be an Array of positive Number                     
    168. *         - E.g.:                                                           
    169. *           $gameTroop.memWithAllSkills([1, 2]) returns the list of troop   
    170. *           members with skills having id 1 and 2                           
    171. *      15. memWithoutAnySkill(skillIds)                                    
    172. *         - Returns the list of members without any skill included by      
    173. *           skillIds, which is a list of id of corresponding skills         
    174. *         - The return value should be an Array of Game_Battler            
    175. *         - skillIds must be an Array of positive Number                     
    176. *         - E.g.:                                                           
    177. *           $gameParty.memWithoutAnySkill([1, 2]) returns the list of party  
    178. *           members without skills having id 1 nor 2                        
    179. *      16. memWithoutAllSkills(skillIds)                                    
    180. *         - Returns the list of members without all skills included by      
    181. *           skillIds, which is a list of id of corresponding skills         
    182. *         - The return value should be an Array of Game_Battler            
    183. *         - skillIds must be an Array of positive Number                     
    184. *         - E.g.:                                                           
    185. *           $gameTroop.memWithoutAllSkills([1, 2]) returns the list of troop
    186. *           members without skills having id 1 and 2                        
    187. *      17. anyHighestStatMem(stats)                                         
    188. *         - Returns the list of members whose values of                     
    189. *           parameters/ex-parameters/sp-parameters included by stats, which  
    190. *           is a list of names of corresponding                             
    191. *           parameters/ex-parameters/sp-parameters, include those being the  
    192. *           highest among the caller                                         
    193. *         - The return value should be an Array of Game_Battler            
    194. *         - stats must be an Array of String as names of Game_Battler      
    195. *           properties with the get function                                 
    196. *         - E.g.:                                                           
    197. *           $gameParty.anyHighestStatMem(["hp", "mp"]) returns the list of   
    198. *           party members with the highest amount of hp or mp among the party
    199. *      18. allHighestStatsMem(stats)                                         
    200. *         - Returns the list of members whose values of                     
    201. *           parameters/ex-parameters/sp-parameters included by stats, which  
    202. *           is a list of names of corresponding                             
    203. *           parameters/ex-parameters/sp-parameters, are all the highest among
    204. *           the caller                                                      
    205. *         - The return value should be an Array of Game_Battler            
    206. *         - stats must be an Array of String as names of Game_Battler      
    207. *           properties with the get function                                 
    208. *         - E.g.:                                                           
    209. *           $gameTroop.allHighestStatsMem(["hp", "mp"]) returns the list of  
    210. *           troop members with the highest amount of hp and mp among the     
    211. *           troop                                                           
    212. *      19. notAnyHighestStatMem(stats)                                       
    213. *         - Returns the list of members whose values of                     
    214. *           parameters/ex-parameters/sp-parameters included by stats, which  
    215. *           is a list of names of corresponding                             
    216. *           parameters/ex-parameters/sp-parameters, don't include those being
    217. *           the highest among the caller                                    
    218. *         - The return value should be an Array of Game_Battler            
    219. *         - stats must be an Array of String as names of Game_Battler      
    220. *           properties with the get function                                 
    221. *         - E.g.:                                                           
    222. *           $gameParty.notAnyHighestStatMem(["hp", "mp"]) returns the list of
    223. *           party members with neither the highest amount of hp nor mp among
    224. *           the party                                                      
    225. *      20. notAllHighestStatsMem(stats)                                    
    226. *         - Returns the list of members whose values of                     
    227. *           parameters/ex-parameters/sp-parameters included by stats, which  
    228. *           is a list of names of corresponding                             
    229. *           parameters/ex-parameters/sp-parameters, aren't all the highest   
    230. *           among the caller                                                
    231. *         - The return value should be an Array of Game_Battler            
    232. *         - stats must be an Array of String as names of Game_Battler      
    233. *           properties with the get function                                 
    234. *         - E.g.:                                                           
    235. *           $gameTroop.notAllHighestStatsMem(["hp", "mp"]) returns the list  
    236. *           of troop members without the highest amount of both hp and mp   
    237. *           among the troop                                                
    238. *      21. anyLowestStatMem(stats)                                          
    239. *         - Returns the list of members whose values of                     
    240. *           parameters/ex-parameters/sp-parameters included by stats, which  
    241. *           is a list of names of corresponding                             
    242. *           parameters/ex-parameters/sp-parameters, include those being the  
    243. *           lowest among the caller                                         
    244. *         - The return value should be an Array of Game_Battler            
    245. *         - stats must be an Array of String as names of Game_Battler      
    246. *           properties with the get function                                 
    247. *         - E.g.:                                                           
    248. *           $gameParty.anyLowestStatMem(["hp", "mp"]) returns the list of   
    249. *           party members with the lowest amount of hp or mp among the party
    250. *      22. allLowestStatsMem(stats)                                         
    251. *         - Returns the list of members whose values of                     
    252. *           parameters/ex-parameters/sp-parameters included by stats, which  
    253. *           is a list of names of corresponding                             
    254. *           parameters/ex-parameters/sp-parameters, are all the lowest among
    255. *           the caller                                                      
    256. *         - The return value should be an Array of Game_Battler            
    257. *         - stats must be an Array of String as names of Game_Battler      
    258. *           properties with the get function                                 
    259. *         - E.g.:                                                           
    260. *           $gameTroop.allLowestStatsMem(["hp", "mp"]) returns the list of   
    261. *           troop members with the lowest amount of hp and mp among the party
    262. *      23. notAnyLowestStatMem(stats)                                       
    263. *         - Returns the list of members whose values of                     
    264. *           parameters/ex-parameters/sp-parameters included by stats, which  
    265. *           is a list of names of corresponding                             
    266. *           parameters/ex-parameters/sp-parameters, don't include those being
    267. *           the lowest among the caller                                    
    268. *         - The return value should be an Array of Game_Battler            
    269. *         - stats must be an Array of String as names of Game_Battler      
    270. *           properties with the get function                                 
    271. *         - E.g.:                                                           
    272. *           $gameParty.notAnyLowestStatMem(["hp", "mp"]) returns the list of
    273. *           party members with neither the lowest amount of hp nor mp among  
    274. *           the party                                                      
    275. *      24. notAllLowestStatsMem(stats)                                       
    276. *         - Returns the list of members whose values of                     
    277. *           parameters/ex-parameters/sp-parameters included by stats, which  
    278. *           is a list of names of corresponding                             
    279. *           parameters/ex-parameters/sp-parameters, aren't all the lowest   
    280. *           among the caller                                                
    281. *         - The return value should be an Array of Game_Battler            
    282. *         - stats must be an Array of String as names of Game_Battler      
    283. *           properties with the get function                                 
    284. *         - E.g.:                                                           
    285. *           $gameTroop.notAllLowestStatsMem(["hp", "mp"]) returns the list of
    286. *           troop members without the lowest amount of both hp and mp among  
    287. *           the troop                                                      
    288. *      25. anyAboveStatMem(stats, val)                                       
    289. *         - Returns the list of members whose values of                     
    290. *           parameters/ex-parameters/sp-parameters included by stats, which  
    291. *           is a list of names of corresponding                             
    292. *           parameters/ex-parameters/sp-parameters, include those above val  
    293. *         - The return value should be an Array of Game_Battler            
    294. *         - stats must be an Array of String as names of Game_Battler      
    295. *           properties with the get function                                 
    296. *         - val must be a Number                                             
    297. *         - E.g.:                                                           
    298. *           $gameParty.anyAboveStatMem(["hp", "mp"], 100) returns the list of
    299. *           party members with the value of hp or mp above 100               
    300. *      26. allAboveStatMem(stats, val)                                       
    301. *         - Returns the list of members whose values of                     
    302. *           parameters/ex-parameters/sp-parameters included by stats, which  
    303. *           is a list of names of corresponding                             
    304. *           parameters/ex-parameters/sp-parameters, are all above val      
    305. *         - The return value should be an Array of Game_Battler            
    306. *         - stats must be an Array of String as names of Game_Battler      
    307. *           properties with the get function                                 
    308. *         - val must be a Number                                             
    309. *         - E.g.:                                                           
    310. *           $gameTroop.allAboveStatMem(["hp", "mp"], 100) returns the list of
    311. *           troop members with the value of hp and mp above 100            
    312. *      27. anyBelowStatMem(stats, val)                                       
    313. *         - Returns the list of members whose values of                     
    314. *           parameters/ex-parameters/sp-parameters included by stats, which  
    315. *           is a list of names of corresponding                             
    316. *           parameters/ex-parameters/sp-parameters, include those below val  
    317. *         - The return value should be an Array of Game_Battler            
    318. *         - stats must be an Array of String as names of Game_Battler      
    319. *           properties with the get function                                 
    320. *         - val must be a Number                                             
    321. *         - E.g.:                                                           
    322. *           $gameParty.anyBelowStatMem(["hp", "mp"], 100) returns the list of
    323. *           party members with the value of hp or mp below 100               
    324. *      28. allBelowStatMem(stats, val)                                       
    325. *         - Returns the list of members whose values of                     
    326. *           parameters/ex-parameters/sp-parameters included by stats, which  
    327. *           is a list of names of corresponding                             
    328. *           parameters/ex-parameters/sp-parameters, are all below val      
    329. *         - The return value should be an Array of Game_Battler            
    330. *         - stats must be an Array of String as names of Game_Battler      
    331. *           properties with the get function                                 
    332. *         - val must be a Number                                             
    333. *         - E.g.:                                                           
    334. *           $gameTroop.allBelowStatMem(["hp", "mp"], 100) returns the list of
    335. *           troop members with the value of hp and mp below 100
    复制代码


    Author Notes
    Spoiler: Author Notes
                    Code:       
    1. *      1. This plugin's meant to be a convenience tool to facilitate the use
    2. *         of some unit filters that aren't already available from the default
    3. *         RMMV codebase, so you're still supposed to write some Javascript   
    4. *         codes with the aid of the new plugin calls provided by this plugin.
    5. *      2. You're supposed to implement unit filter result set operations -   
    6. *         union, intersection, complement, difference, etc - yourselves.
    复制代码


    Prerequisites
    Spoiler: Prerequisites
                    Code:       
    1. *      Abilities:                                                           
    2. *      1. Nothing special for most ordinary cases                           
    3. *      2. Little RMMV plugin development proficiency to fully utilize this
    复制代码


    Terms Of Use

    Spoiler: Terms Of Use
                    Code:       
    1. *      1. Commercial use's always allowed and crediting me's always optional.
    2. *      2. You shall keep this plugin's Plugin Info part's contents intact.
    3. *      3. You shalln't claim that this plugin's written by anyone other than
    4. *         DoubleX or my aliases. I always reserve the right to deny you from
    5. *         using any of my plugins anymore if you've violated this.         
    6. *      4. CC BY 4.0, except those conflicting with any of the above, applies
    7. *         to this plugin, unless you've my permissions not needing follow so.
    8. *      5. I always reserve the right to deny you from using this plugin   
    9. *         anymore if you've violated any of the above.
    复制代码


    Authors

    DoubleX

    Changelog

    Spoiler: Changelog
                    Code:       
    1. *      v1.00a(GMT 0800 18-10-2017):                                         
    2. *      1. 1st version of this plugin finished
    复制代码


    Download Links

    DoubleX RMMV Unit Filters


    本贴来自国际rpgmaker官方论坛作者:DoubleX处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/doublex-rmmv-unit-filters.85918/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 19:46 , Processed in 0.137924 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表