Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
xs.png


XS - Stamina System

Version 1.0c

Introduction
This script will add a Stamina System to the game. It will effect how long the player can dash around the map.

Features

  • Control the stamina easily with built in methods or with variables.
  • An HUD that will show the stamina values to the player. (Fade effect)
  • Custom pictures for the gauge.
  • Items can also effect the stamina. You can make a potion that will permanently increase max stamina etc.
  • Both the system and the HUD can be enabled/disabled by a switch ingame.
  • And more!
Screenshots
xs-stamina-system.png


xs-stamina-system2.png


How to Use
Instructions how to use it can be find inside the script.
To install this script, open up your script editor and copy/paste this script to an open slot below Materials but above Main. Remember to save.

Script
Get the script here.

Put these above: Core Script and the Numeric Class.

Optional: Download example pictures for the HUD. Need to be located in "Graphics/Picture" folder.

Updates

Released 1.0c:

  • Fixed a bug where the window/pictures would sometimes create itself more then once which would cause lag.
  • And more minor bug fixes.
Credit
Do credit me, Nicke, if you are planing on using this script. Thanks.
Can be use in a commercial project.
 
Last edited by a moderator:

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Released 1.0a. Fixed a few minor things in the instructions and cleaned up the code.
 

Ice Cluster

Veteran
Veteran
Joined
Feb 4, 2013
Messages
68
Reaction score
6
First Language
German
Primarily Uses
RMMV
Hey, I really like your scripts and would like to use this as well.

Could you maybe add two things to it?

An option to recover stamina  when you walk, but not dash with a different (slower) rate as standing still.

And another maybe harder request is: Could you make it so the item weight from your other script does in this case not effect if you can dash (like it does) but  change the stamina used for dashing. Like every 25% of weight you lose stamina 25% faster and only with full load you're no longer able to dash.

Thanks for making such great scripts
 
Last edited by a moderator:

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Released 1.0b! See details in the first post.
 

TengHu

Abscond Games
Veteran
Joined
Mar 16, 2012
Messages
469
Reaction score
120
First Language
English
Primarily Uses
RMVX
I love this script. But just a heads up, the link to the images is dead.
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Yeah fixed the URL for the graphics pack now. :p
 

Ice Cluster

Veteran
Veteran
Joined
Feb 4, 2013
Messages
68
Reaction score
6
First Language
German
Primarily Uses
RMMV
Thanks for the patch with movement regen. Now this script's really awesome.
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Grab the script again, I have fixed a bug in battle.
 

Sozdorferz

Demon
Member
Joined
Feb 22, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Hey, this script is amazing! I've been trying to do something like this for some time now, and when I saw this script I almost died xD Quick question though 0-0  How would I bind a variable to the stamina? In the game I'm making, not only does running drain stamina, but pushing objects does too. So I wanted to bind the stamina to check if your stamina was under say 5%, you couldn't push the table. Once again, hanks for making this script, it's great. :D
P.S. Sorry if the instructions for this question are actually in the comments of the code, I looked but just couldn't find where it said HOW to bind them, just that I was able to.
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Hello, pretty old post but I've released 1.0c now which fixes a major bug.
 

Culai03

"Wanted Cookie Monster"
Veteran
Joined
Jan 21, 2014
Messages
161
Reaction score
9
First Language
English
Primarily Uses
When there is a text window, the stamina pictures show up over the window.

EDIT: never mind. didn't know what z coordinates were  :p
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Hoping someone can help me with this issue. I'm really new and I noticed in the comments talks about needing a switch 10 and 11 on. Could someone explain how that is accomplished please. By Default with the 3 scripts installed I see no Stamina bar no any slow down when sprinting for long durations. 
 

RubikPanda

Creator
Veteran
Joined
Mar 6, 2014
Messages
39
Reaction score
5
First Language
English
Primarily Uses
Are there any recommended settings for this? As I can't seem to make the stamina system 'work' (it appears though). It doesn't go down when I run.
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Yeah I tried to get it to work but no luck. Not sure if there is a bug or if its out of date or what. I hope someone can take a look offer suggestions. 
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Read the instructions. You need to activate the script by turning switch 10 and 11 using the event system. The stamina will only go down once you dash with the shift key pressed. Hope that helps :)
 

RubikPanda

Creator
Veteran
Joined
Mar 6, 2014
Messages
39
Reaction score
5
First Language
English
Primarily Uses
I did that, and for some reason it still doesn't work :/

I have an event on the first level of my game that is on Parallel Process. In it is @>Control Switches: [0010:Stamina Script] = ON and @>Control Switches: [0011:Stamina HUD] = ON. I have also kept the script as it was.

By any chance is it not compatible with Khas' Sapphire IV Combat System? As that might be the source of the problem.
 
Last edited by a moderator:

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
556
Reaction score
563
First Language
Swedish
Primarily Uses
RMMZ
Try disabiling the battle system and see if it works? :)
 

creatorx2

Warper
Member
Joined
Jun 23, 2014
Messages
1
Reaction score
0
Primarily Uses
Hey, I have three questions --

Can I change which two switches the script maps to? I'm using 10 and 11 for other things. I guess I could just find each instance I referred to them and change it in each Event (or more likely, a single Common Event, which will make it easier ... good forward thinking, creatorx2) but I'd rather just swap out the switches in this script if that's possible.

Can I enable stamina use without its HUD? I don't see why it wouldn't (seeing as they're mapped to separate switches) but I figured I'd make sure.

Can I adjust the recharge rate?

Thanks! I appreciate it. :)
 

2k13Ghost

Warper
Member
Joined
Nov 12, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I want the HUD to turn on only when the current Stamina is below 30. My conditional statement works only if the second conditional is off. If I put that in the else statement, it does the same thing. Now I'm wondering, even though the script is switched on, does the current stamina variable work only if the HUD is showing? Because even if the HUD is off, the stamina system still works. I attached my conditional statement.

Common Events Conditional Branch.png
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
For some reasons all the links are unattainable now.........
 

Latest Threads

Latest Posts

Latest Profile Posts

TIL, TP means Tactical Points.
I think those extra pixels did it. ^_^ Now to work on the front and back views.
PlusTest-02.gif
What props/tiles are missing from this scene?

My team recruitment thread is finally online. Please, if you guys are interested in language learning, take a look. Even if you don't join, a word of encouragement is always welcome.
Rats! These Rats are pretty cute!

Forum statistics

Threads
116,470
Messages
1,098,914
Members
152,055
Latest member
KeinHexer
Top