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

[转载发布] TAA_SubstituteSkills (v1.0.0)

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

    连续签到: 2 天

    [LV.7]常住居民III

    8004

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    TAA_SubstituteSkills - v1.0.0
    Created by taaspider

    Terms of Use
    Any plugins developed by taaspider are free for use for both commercial and noncommercial RPG Maker games, unless specified otherwise. Just remember to credit "taaspider".

    Redistribution of parts or the whole of taaspider plugins is forbidden (which also includes reposting), unless it comes from the official website (linked within the post). You are allowed to edit and change the plugin code for your own use, but you're definitely not allowed to sell or reuse any part of the code as your own. Although not required to use my plugins, a free copy of your game would be nice!

    Introduction

    This plugin provides more control over the substitute effect. The engine default allows only for a substitute character to cover for all its allies at the same time for all types of attacks, and only when they are at low health. With TAA_SubstituteSkill you can create more specific and flexible substitutions, like covering for a single ally with no health limitations, having different substitutes for each skill type, or even covering for an enemy unit.

    Main Features

    • Create substitute skills for each skill types independently;
    • Allow substitution skills to work on as many targets as you want, from one to all allies at the same time, or even covering for enemies;
    • Supports multiple substitutes at the same time, one for each skill type (so you can have a Knight cover for normal and special skills, and a Mage cover for magic attacks);
    • Allow for substitutions to cover (or not) from ally skills as well;
    • Create skills that ignores substitutes and force its way to the original target;

    Screenshots

    SpoilerCouldn't think of a nice way to show much of the plugin features with images, but here's a gif not showing much anyway








    How to Use

    WARNING: This plugin requires RPG Maker MV 1.5.0 or above! Please make sure your RPG Maker MV software is up to date before using this plugin.You don't need any specific version if you're using MZ.

    First of, download the plugin here. You can also test the plugin using my sample demo project. It was built with MV, but you can open it with MZ as well (just open the game.rmmzproject file and you're good to go).

    Spoiler: Substitution States
    Substitution is configured by creating specific states, that when applied to a character turns the user who applies it its substitute for as long as that state is active.

    States have the following settings:

    • Type: This determines which skill type will be covered by the substitute. You can specify a comma separated list of types using their names or engine indexes. For example, the engine default types Magic and Special. You can use their names as configured in the editor, or use their index according to their order: Magic is 1 and Special is 2. If you want the state to allow for normal attacks substitution just specify Normal or index 0. You can also specify all skill types by setting to "all" or -1. See some examples in the States Note Tags section.
      This is the only obligatory parameter.
    • Friendly Fire: This determines if the substitute will cover the target in case they're being hit by their allies. For example, if this is set to true and a healer issues a healing skill to the target, the substitute we'll be healed instead. If false, the substitution will not occur.
      If not set, the default global parameter is used (which you can configure through the Plugin Manager).
    • Condition: This determines on which conditions the substitution can occur. For example, only allow the substitute to take over damage if the target's HP is below 50%, or if the target's health is greater than the substitute.
      If not set, the default global parameter is used (which you can configure through the Plugin Manager).
    A character can have multiple substitution states at the same time, but only one state will be active for each skill type. For example, if state A covers for Magic, and state B covers for all (and A was inflicted after B ), than the character will be substituted by whoever inflicted A if it is hit by a magic skill, while whoever inflicted B will cover for anything else.
    Spoiler: Plugin Parameters
    There are just two parameters, which sets the default values for Friendly Fire and Condition:

    • Substitute Friendly Fire

      • If set to true, substitutes will also cover for any allies issued abilities as long as substitution conditions are met. If false, only enemy attacks are substituted. You can overwrite this config using States Note Tags.

    • Substitute Condition

      • This sets a default condition to allow an applied substitution to happen. For example, only if the target HP is lower than the substitute HP, or the target health is below 50%, and so on.
        This is an eval clause, and the following special objects can be used:

        • a: access the attacker parameters like hp, mp, etc.
        • b: access the original target parameters;
        • c: access the substitute parameters;
        • v[n]: access the value from variable number n;
        • s[n]: access the value (true or false) from switch number n;


    Just remember that this condition must return true or false. If it is evaluated to anything other than that the condition will always fail. You can leave this parameter blank to have if you want default condition to always pass.​

    Spoiler: State Note Tags
    State note tags are used to create substitute states and customize default settings. The only mandatory tag is "type", which specifies which skill types are affected by the substitution:
    <TAA_SSK: type:type1,type2,...,typeN>​
    type is a comma separated list of skill types. You can use skill type names as they appear in the editor, or use their index. Here's some examples:
    <TAA_SSK: type:normal,Special>​
    This tag enables the substitution for both normal and Special skills. Magic skills are not affected. One important thing to note though, is that despite "normal" being case INSENSITIVE, any other skill types are case SENSITIVE, and they should be written exactly as they are set in the editor System tab.​

    <TAA_SSK: type:0,2>​
    Assuming the engine default config, this tag has the exact same meaning as the first one. The 0 index represent normal attacks, while 2 is the Special skill type index.​

    <TAA_SSK: type:all>​
    <TAA_SSK: type:-1>​
    Both this tags render the same result: a substitution for all skill types.​

    To include a custom Friendly Fire or Condition settings, add the "friendFire" and "condition" clauses to your tag, and separate each clause with a ';':
    <TAA_SSK: type:all; friendFire:true; condition:eval clause>​
    friendFire must be either "true" or "false", while condition is an eval clause. As long as the type clause is present, you can add one or both of the others as you like, just be sure to keep the proper order (first type, then friendFire and last condition).

    The following codes can be used inside a condition clause:

    • a: access the attacker parameters like hp, mp, etc.
    • b: access the original target parameters;
    • c: access the substitute parameters;
    • v[n]: access the value from variable number n;
    • s[n]: access the value (true or false) from switch number n;

    Here's a few examples:
    <TAA_SSK: type:1; condition: b.hp < b.mhp/2 >​
    This denotes a substitution for skill type 1 that only takes effect when the target's HP is below 50%.​

    <TAA_SSK: type:Normal; friendFire:false; condition: c.hp > b.hp >​
    This creates a state that allows substitution to normal attacks, won't allow substitution for ally issued skills and only takes place when the substitute's HP is higher than the targets.​

    <TAA_SSK: type:Magic; friendFire:true>​
    This state will allow substitutions only for magical attacks, and will also work against ally's moves.​

    State tags can also span multiple lines when inside the proper tags:
    <TAA_SSK>​
    type:type1,type2,...,typeN​
    friendFire:true|false​
    condition:eval clause​
    </TAA_SSK>​

    Here's how the three examples above would look like in a multi line format:
    <TAA_SSK>​
    type:1​
    condition: b.hp < b.mhp / 2​
    </TAA_SSK>​

    <TAA_SSK>​
    type:Normal​
    friendFire:false​
    condition: c.hp > b.hp​
    </TAA_SSK>​

    <TAA_SSK>​
    type:Magic​
    friendFire:true​
    </TAA_SSK>​

    Spoiler: Skill Note Tags
    Skill note tags are way simpler, as their only setting is how likely the skill is to ignore the substitution and hit the actual target:
    <TAA_SSK: N >​
    where N is a number between 0 and 100, being 0 always hit the substitute, and 100 always bypass him and hit the original target.
    Spoiler: Script Calls
    $gameSystem.sskIsFriendlyFireAllowed()
    Returns true if the global default friendly fire setting is enable, otherwise false.​

    $gameSystem.sskEnableFriendlyFire()
    Enables the global default friendly fire setting.​

    $gameSystem.sskDisableFriendlyFire()
    Disables the global default friendly fire setting.​

    $gameSystem.sskResetFriendlyFire()
    Resets the global default friendly fire setting to its original value.​

    $gameSystem.sskCondition()
    Returns the current global default substitution condition.​

    $gameSystem.sskUpdateCondition(newCondition)
    Sets the global default substitution condition to newCondition.​

    $gameSystem.sskResetCondition()
    Resets the global default substitution condition to its original value.​

    Spoiler: Plugin Commands
    Substitute FriendFire enable
    Substitute FriendFire disable
    Substitute FriendFire reset
    Enable, disable or reset global default friendly fire setting.​

    Substitute Condition Set newCondition
    Updates the global default substitution condition to newCondition​

    Substitute Condition Reset
    Resets the global default substitution condition to its original value.​

    Spoiler: CHANGE LOG

    • Version 1.0.0:

      • Fixed a bug for when a single state covers for more than one skill type;
      • Fixed a bug which would always have a substitute cover for friendly skills (unless a ignore tag was set);
      • Fixed a minor bug that could cause a substitute to cover for himself if he substitutes a target for a substitution skill issued by himself;

    • Version 0.9.0:

      • Beta release;



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 09:34 , Processed in 0.107392 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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