Skills with no SP cost have empty space instead of "0"

Started by Poison Kiss 13, June 28, 2009, 05:42:26 am

Previous topic - Next topic

Poison Kiss 13

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.

Blizzard

June 28, 2009, 08:48:16 am #1 Last Edit: June 28, 2009, 08:49:33 am by Blizzard
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]").


Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Poison Kiss 13

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.

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.