Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Poison Kiss 13 on June 28, 2009, 05:42:26 am

Title: Skills with no SP cost have empty space instead of "0"
Post by: Poison Kiss 13 on June 28, 2009, 05:42:26 am
I tried to describe it in the topic title, but one sentence probably isn't good enough.

This might be really simple, but...I have no idea how to do it!


What I'm looking for is a script (or script edit) that does something special to a skill that has no SP cost. Instead of displaying that big ol' zero, I want it to have empty space. I'd like it to work with Blizzard's Tons of Add-ons, including the SP cost modifier part, with the option to have 0 SP skills still modified or left alone.

Sorry if this has already been done, I can't think of how to look for it...thanks for your time.
Title: Re: Skills with no SP cost have empty space instead of "0"
Post by: Blizzard on June 28, 2009, 08:48:16 am
In Window_Skill and every mod of it, you need to find a line that looks similar to this (it's in def draw_item):

self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)


Change it to this:

if skill.sp_cost > 0
 self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end


Remember that in some scripts it can look differently. This is some kind of template how it can look like:

self.contents.draw_text(X, Y, W, H, SKILL.sp_cost.to_s, 2)


So you need to add "if SKILL.sp_cost > 0" depending on what SKILL actually is in the script (i.e. "skill" or "data[i]").


Title: Re: Skills with no SP cost have empty space instead of "0"
Post by: Poison Kiss 13 on June 30, 2009, 06:30:07 am
Thanks for replying!

I tried it out and worked fine!

Then I tried it out with the SP cost mod script on (from the latest version of Tons of Add-ons), and it displayed the 0 instead of nothing like normal. Then I tried changing the same line I changed in Window_skill in part of the SP cost mod script. Doing that...made the SP cost mod script do nothing.

It's not that important, obviously. Replacing the 0 with empty space is a very trivial thing, but it makes free skills stand out more, at least to me.

Sorry to bother you.
Title: Re: Skills with no SP cost have empty space instead of "0"
Post by: Blizzard on June 30, 2009, 07:50:28 am
No problem. As I said, you need to replace the proper part. If I remember right, the SP cost mod is not the only add-on in Tons that alters Window_Skill. You should find every place where it is altered.