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

[转载发布] Critical Effects/Modifier

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

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-8-1 14:16:10 | 显示全部楼层 |阅读模式
    Critical Effects/Modifier v1.0
    By V.M.

    Introduction
    Simple script that allows you to change how much damage a critical hit does for each skill, weapon, actor, class, or enemy (multiplicative) and allow you to add states on the target when dealing a critical hit. (i.e instant kill on crit hit)

    Features
    - Modify critical damage based on class, actor, weapon, skill, and monster specifically (all adds up)
    - Add states to target based on class, actor, weapon, skill, and monster specifically (all adds up)

    Screenshots
    Not available (Again tempted to post useless yet relevant screenshot, this time of hero doing 700billion+ damage)

    How to Use
    Install script (below any that modify the battle system, should be compatible with any)
    Use the noteboxes of classes, actors, skills, weapons, and enemies with the phrases:
    <crit multiplier [number]> and <crit state# [state id]>

    Examples (also in script itself):
    <crit multiplier 1000>
    <crit state1 2>

    Script
    Spoiler                Code:       
    1. #Critical Effects and Multipliers#----------##Features: Provides the ability to tweak the damage modifier of critical hits for#   skills, weapons, classes, actors, and monsters, as well as determining#   if they apply specific states (i.e critical hit means instant death)##Usage: Place any of the following into the note boxes of skills, weapons#   classes, actors, or monsters:#   <crit multiplier [multiplier]>  # - [multiplier] is the percent difference in damage, can be any number#   <crit state[#] [state id]># - [#] is 1-4, allowing one notebox to apply 4 states# - [state id] is the id# of the state to be applied##Examples: <crit multiplier 1000>#   <crit state1 2>#   <crit state2 6>##Game hangs or freezes up? Check the noteboxes related to last used skill for# a missing ">"#----------##-- Script by: V.M of D.T#--- Free to use in any project with credit given class Game_Battler  alias crit_effect_make_damage_value make_damage_value  alias crit_effect_execute_damage execute_damage  alias crit_apply_critical apply_critical  def make_damage_value(user, item)@crit_item = item@crit_target = usercrit_effect_make_damage_value(user, item)  end  def apply_critical(damage)damage = crit_apply_critical(damage)damage = apply_actor_multiplier(damage)damage = apply_class_multiplier(damage)damage = apply_weapon_multiplier(damage) if @crit_item.physical?damage = apply_skill_multiplier(damage)  end  def execute_damage(user)crit_effect_execute_damage(user)crit_apply_state if @result.critical  end  def apply_multiplier(note, start, damage)ends = startwhile ends != "banana" if note[ends] == ">" or note[ends] == '\n' then break end ends += 1endends -= 1damage * (1 + (note[start..ends].to_f / 100.0))  end  def apply_skill_multiplier(damage)note = $data_skills[self.attack_skill_id].noteif note.index('<crit multiplier') == nil then return damage endstart = note.index('<crit multiplier') + 17apply_multiplier(note, start, damage)  end  def apply_actor_multiplier(damage)if @crit_target.is_a?(Game_Actor) note = $data_actors[@crit_target.id].noteelse note = $data_enemies[@crit_target.enemy_id].noteendif note.index('<crit multiplier') == nil then return damage endstart = note.index('<crit multiplier') + 17apply_multiplier(note, start, damage)  end  def apply_class_multiplier(damage)if @crit_target.is_a?(Game_Actor) note = $data_classes[@crit_target.class_id].note if note.index('<crit multiplier') == nil then return damage end start = note.index('<crit multiplier') + 17 apply_multiplier(note, start, damage)else damageend  end  def apply_weapon_multiplier(damage)if @crit_target.is_a?(Game_Actor) if @crit_target.equips[0] != nil      note = $data_weapons[@crit_target.equips[0].id].note    else      note = ""    end if note.index('<crit multiplier') == nil then return damage end start = note.index('<crit multiplier') + 17 apply_multiplier(note, start, damage)else damageend  end  def crit_apply_state@states_apply = []note = $data_skills[self.attack_skill_id].notepush_apply_states(note)if @crit_target.is_a?(Game_Actor) note = $data_actors[@crit_target.id].noteelse note = $data_enemies[@crit_target.enemy_id].noteendpush_apply_states(note)if @crit_target.is_a?(Game_Actor) note = $data_classes[@crit_target.class_id].note push_apply_states(note)endif @crit_target.is_a?(Game_Actor)    if @crit_target.equips[0] != nil      note = $data_weapons[@crit_target.equips[0].id].note    else      note = ""    end push_apply_states(note)endfor i in @states_apply self.add_state(i)end  end  def push_apply_states(note)for i in Range.new(1,5) if note.index('<crit state' + i.to_s) != nilget_start_end(note, i)@states_apply.push(note[@start..@ends].to_i) endend  end  def get_start_end(note, i)start = note.index('<crit state' + i.to_s) + 13ends = startwhile ends != "banana" if note[ends] == ">" or note[ends] == "\n" then break end ends += 1end@start = start@ends = ends - 1  endend
    复制代码





    FAQ
    Game hangs or freezes up? Look for a missing ">" in your noteboxes

    Credit and Thanks
    - By V.M. of D.T.
    - Free to use in any project with credit given


    Author's Notes
    Done while raiding

    (As in if there's a mistake uh... that would be why)


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 23:20 , Processed in 0.129612 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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