Skill damage in target help window

● ARCHIVED · READ-ONLY
Started by stratigamo 1 posts View original ↗
  1. Hello all, and thanks for reading.

    I'm currently trying to make it so when you select a skill, say fireball, it goes to the targeting screen per usual. However in the target name status box at the top of the screen I'd like it to say something like: "Deals 32 fire damage to <target name>"

    I have found a script that works when you are in the skill menu. Well when I say works, not entirely. It will calculate the skill damage if casted upon another player actor. When you select a damaging skill, it treats b.def (in the skill creation tab in ACE), and uses a.def instead. Great for heal spells, not for damage.

    Here is the code for the skill damage:

    class Window_Help < Window_Base def set_item(item) damage_type = ["none", "HP damage", "MP damage", "HP recovery", "MP recovery", "HP drain", "MP drain"] damage_color = [ "", "1", #Physical "2", #Absorb "3", #Fire "4", #Ice "5", #Thunder "6", #Water "7", #Earth "8", #Wind "9", #Holy "10", #Dark "11", #Law "12", #Chaos "13", #Good "14", #Evil "15", #Neutral "16"] #Sonic if item then if item.is_a?(RPG::Skill) && item.damage.none? != 0 then result = item.description.to_s.clone result.gsub!(/\$DT/i) { damage_type[item.damage.type] } if item.damage.element_id != 0 then result.gsub!(/\$DC/i) { "\\C["+damage_color[item.damage.element_id]+"]" } result.gsub!(/\$DN/i) { $data_system.elements[item.damage.element_id] } end set_text(result) else set_text(item.description) end else set_text("") end endendclass Window_SkillList < Window_Selectable def update_help if item if item.damage.none? != 0 then $game_variables[120] = (item.damage.eval(@actor, @actor, $game_variables).to_i).abs end end @help_window.set_item(item) endendUsing the variable 120 you can use \V[120] in the skill description and the damage will be shown.

    I've tried playing around with it a bit so item.damage.eval will have a target to compare the actor to. I'm just not sure how to do it completely. Any advice would be helpful!

    Original script by Mundywoof.