HOW TO A CREATE A NEW STAT IN ADDITION TO HP AND SP (XP)

Posts

Pages: 1
Howdy all.

I've been dabbling in scripting a bit (and am terrible at it, lol) and I was wondering if there was a way to create a new stat in addition to HP and SP that you could then use in battle?
LEECH
who am i and how did i get in here
2599
There should be an extra stat script somewhere.

Google is your friend.
It's funny actually...I've been Google searching stuff for this much of the afternoon and never once thought to type in "extra stat script." Found something in about six seconds...brilliant.

That being the case, I'm wondering if you might have some idea to modify the (hidden) script below to closer suit my needs...

I want to add the "AP" stat to my characters, which I can do. That said, the script I found was already designed to add three new stats and my attempts at taking those out have thus far yielded naught but error messages.

Sorry...forgot the code.

class Window_Status < Window_Base

#-----------------------------------------------------------------------------
# * Variable Setup
#-----------------------------------------------------------------------------
ACTOR =
NAME =

ACTOR =
{
NAME => 1,
NAME => 2,
NAME => 3
}

ACTOR =
{
NAME => 4,
NAME => 5,
NAME => 6
}

#----------------------------------------------------------------------------
# * End Variable Setup
#----------------------------------------------------------------------------

def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
7.times { |i| draw_actor_parameter(@actor, 96, 172 + i * 24, i) }
3.times { |i| draw_actor_other(96, 348 + i * 24, NAME) }
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "equipment")
draw_item_name($data_weapons, 320 + 16, 208)
draw_item_name($data_armors, 320 + 16, 256)
draw_item_name($data_armors, 320 + 16, 304)
draw_item_name($data_armors, 320 + 16, 352)
draw_item_name($data_armors, 320 + 16, 400)
end

def draw_actor_other(x, y, name)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 100, 32, name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32,
$game_variables[ACTOR].to_s, 2)
end
end


Edit: And am now realizing I could have just edited my prior message... Sorry, none too bright at times.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I think you can just change 3.times to 1.times

If you're getting errors, maybe you didn't set up the variables correctly at the beginning. The code doesn't really give any instructions how to do that, though. Hopefully the forum you found it at has the instructions?

Can you paste what you actually are using in your game, with the variables set and everything?

This script just adds a display for the stats, though. It doesn't let you actually use them to cast abilities. It also doesn't let you define max values for the stats, doesn't let you recover the stats in battle, requires the stats to be handled entirely through event variables, and generally is extremely shitty. I'd recommend trying to find another script, if you can.
Pages: 1