Yes, it seemed to work, but I didint know if something was missing that could ruin my project. Also I really didint know if the places where I put the things were at the right place. To be honest, it was more luck that I had the right place. Id like to prevent problems before they even appear. I hope that was okay.
And since we're talking about the script, heres what also bothers me which I havent found a solution for.
Atoa has a nice CTBlike script that I use. He has made a thing called CTB_Delay, (skills can do a delay on the CTB Bar when damage is received). It is determinable how strong a skill can delay the ctb bar.
The configuration sections is as following. (im going to quote in parts because the script itself is too big.)
#--------------------------------------------------------------------------
# Delay on the CTB bar when recive damage
# This value is used for all actions that don't have individual definition.
Base_CTB_Delay = 0
# Set here the actions that will cause CTB delay
#
# Cast_Cancel[Action_Type] = {Action_ID => Delay}
# Action_Type = 'Skill' for skills, 'Item' for items, 'Weapon' for weapons
# Action_ID = ID of the skill, item or weapon
# Delay = CTB delay value, increases with damage caused.
#
# Important: if the action is an physical skill, the weapon delay is also calculated
CTB_Delay['Skill'] = {417 => 100},
CTB_Delay['Skill'] = {430 => 200},
CTB_Delay['Skill'] = {431 => 350},
CTB_Delay['Skill'] = {432 => 450},
CTB_Delay['Skill'] = {401 => 250}
end
According to that the skills that are mentioned there should cause some ctb delay on the enemies. But nothing happens. I mean really nothing. The last numbers are the values that should effect the CTB bar. As far as I've understood, the higher the value, the higher the delay on the CTB bar. Oh, the max CTB Bar value is 500. Also, my skills do damage.
And here are the parts where things are determined for the whole CTB delay function. Im only quoting parts that are related to CTB delay function, not the whole script.
line 533 - 550
#--------------------------------------------------------------------------
# * Set CTB delay action
# user : user
# action : action
#--------------------------------------------------------------------------
def set_delay_action(user, action)
if action != nil and CTB_Delay[action.type_name] != nil and
CTB_Delay[action.type_name][action.id] != nil
delay_action(user, CTB_Delay[action.type_name][action.id], action)
if action.type_name == 'Skill' and not action.magic?
for weapon in weapons
delay_action(user, CTB_Delay['Weapon'][weapon.id], action)
end
end
else
delay_action(user, Base_CTB_Delay, action)
end
end
from line 576 till 586
#--------------------------------------------------------------------------
# * Set ATB delay
# user : user
# delay : delay value
# action : action
#--------------------------------------------------------------------------
def delay_action(user, delay, action)
return if cant_delay(user, action)
rate = delay + (delay * (user.target_damage[self] * 50.0 / self.maxhp) / 100.0)
self.ctb -= rate.to_i
end
504-514
#--------------------------------------------------------------------------
# * Final damage setting
# user : user
# action : action
#--------------------------------------------------------------------------
alias set_damage_ctb set_damage
def set_damage(user, action = nil)
set_damage_ctb(user, action)
set_cast_cancel(user, action)
set_delay_action(user, action)
end
Thats it. Theres a "cast cancel function" (skills can cancel other casting skills) which works, lets say, similar and functions without problems. But, this is somehow doesnt want to work despite being coded similar. I compared both codes over and over again but didint find any bugs that could cause the error
Any ideas?
Thanks.