Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
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
Code:
#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
biggrin.png
(As in if there's a mistake uh... that would be why)
 
Last edited by a moderator:

Liak

Veteran
Veteran
Joined
Mar 13, 2012
Messages
1,788
Reaction score
270
First Language
German
Primarily Uses
Ah, there it is! :) Critical hit states and stronger critical hits, huh? I shall spend some thoughts on whether I want to use that. :)
 
Last edited by a moderator:

Sophien

Veteran
Veteran
Joined
Apr 30, 2013
Messages
38
Reaction score
2
First Language
German
Primarily Uses
mhm maybe you can make it for states too? and maybe you know Galv's Magic Shards? i want to use both so i can create shards with crit multiplier

but i dont work xD or with state :D if someone knows how pls let me know :D
 

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Oh wow, what a cool script! So many interesting applications.

First thought: each character adds a different state on critical! But there's so much more it could do too!
 

Metafiction

Warper
Member
Joined
Jul 11, 2013
Messages
1
Reaction score
1
First Language
English
Primarily Uses
Awesome, this is exactly what I needed for the locational damage system I'm working on! Now I can apply a different state only on criticals depending on the hit zone like cripple for leg, stun for head. Off to try it out :)
 

Kryterion

Villager
Member
Joined
Sep 26, 2012
Messages
32
Reaction score
4
Primarily Uses
Hi there Vlue. Can I use this script to alter the chances of a critical hit, or only its effects?

Thanks in advance. I'm always very grateful to all scriptwriters out there.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
^ can't you already do that using the traits?
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
Hi there Vlue. Can I use this script to alter the chances of a critical hit, or only its effects?

Thanks in advance. I'm always very grateful to all scriptwriters out there.
Only it's effects, as adiktuzmiko (thats a name and a half! :3) said, you can do chances of a critical hit with effects under uh.. under... oh, maybe that's only for features. Well, I thought you could as well, interesting... erm hrm. I'll look into it unless anyone can tell us otherwise.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
yeah only traits... so it will work for equips, classes, states but not for skills
 

Sophien

Veteran
Veteran
Joined
Apr 30, 2013
Messages
38
Reaction score
2
First Language
German
Primarily Uses
Hey :D Nice Script, but my game shows an Error and i know why...more or less xD
Everytime if a Actor deal a critical hit WITHOUT a weapon it frees

The Error Calls Script 'Critical Effects and Multiliers' line 105: NoMethodError

occurred.
undefinied method  `id' for:NilClass

Someone knows the Problem?
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
Messy messy script this is, I tend to forget it exists!

I know the problem, and edited the script up there to fix it. I hope.
 

Mojo907

Veteran
Veteran
Joined
May 21, 2013
Messages
169
Reaction score
39
First Language
English
Primarily Uses
RMMV
I've tried the script in pastebin, and occasionally it'll give an error with unarmed characters as the above person posted. Just wanted to give you a heads up.
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
382
First Language
English
Primarily Uses
Noticed something else that could cause that! Fixed up~
 

Pugh95Bear

Veteran
Veteran
Joined
Nov 11, 2013
Messages
191
Reaction score
12
First Language
English
Primarily Uses
Just a thought, but couldn't this really be kinda combined with your CritFlash script?


Looks great, by the way :D .
 

Sir_Kiken

Warper
Member
Joined
Jul 26, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Hey, great script by the way.

I'm actually having an issue with it though.  Wheneer I land a critical hit, I get an error as follows:

line 64: NoMethodError occurred.

undefined 'enemy_id' for nil:NilClass

Admittedly, I have quite a few other scripts, but none of which adjust critical hits.
 

YaMaskSey

Villager
Member
Joined
Apr 3, 2016
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Hey I like your script but I'm having issues with it 


I put in a state for a critical hit that makes your character have an extra turn, but instead of one of your characters getting an extra turn the enemy get's it


Is there a way you can help me with that?
 

Latest Threads

Latest Profile Posts

IlluminaughtyStore.jpg
:kaojoy:
Welcome to the Illuminaughty store.
Yes... they are "wearing Illuminati branded everything, reclining on huge Illuminati body pillows. Occasionally they'll "teehee" at each other and have pillow fights with Illuminati branded pillows full of hundred dollar bills."
BCj
Working on Escalia again, feels good. Have this overwhelming urge to map as well, but need to get some extra tiles commissioned first :D
Lee Sang wrote on Bandito's profile.
Hi, I've just tried your plugin "Game is Active" and when I tested it on Android, it gave me an error, something about "Cannot read property 'underfined' of underfined.
With my project, I want the player to have access to all the tools they need to get from New Game to Credits as soon as possible; I want the player's progress to only be impeded by the player not knowing how to use the tools the game provides.
Just a little close up shot...
w2xZocX.jpg

Forum statistics

Threads
113,867
Messages
1,078,033
Members
147,957
Latest member
Broskiman1
Top