Silver's Dash Stamina

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Hi there SilverDash, i'm running into an issue with events causing a fadeout with the updated version of the script ... it's giving the old 'null' error message.
I need more details. Error, console output, what you did, what kind of event and all the stuff.
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Oops! Sorry ... here's the event ... 


Screen Shot 2016-02-03 at 20.55.00.png


and here's the error message and console ...


Screen Shot 2016-02-03 at 20.54.45.png
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Does it happen to be an autorun event? Meaning it would fade the screen in on the other map. But the event blocked the execution of other events and some plugins perhaps.


Could you try changing the line 434 from:


Silv.DashStamina.Window.visible = false;


to


if (Silv.DashStamina.Window !== null) { Silv.DashStamina.Window.visible = false; }


I can not reproduce the bug so I hope that this is the cause & solution.
 
Last edited by a moderator:

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
It was a Player Touch event, but the code replacement fixed it :)
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Good.


I uploaded v1.04 which contains the bugfix.
 
Last edited by a moderator:

djmisterjon

Villager
Member
Joined
Aug 18, 2014
Messages
29
Reaction score
6
First Language
francais
Primarily Uses
Script name: Dash Stamina v1.04
Author: Silver
 
 
Features:
- Increase/decrease max stamina............











Hi friends.
It is possible to adjust the maximum value with a variable?


Ex: <dash_stamina:IncreaseMax [variableID]>
 

djmisterjon

Villager
Member
Joined
Aug 18, 2014
Messages
29
Reaction score
6
First Language
francais
Primarily Uses
Script name: Dash Stamina v1.04
Author: Silver


Hello friend


I would like to use your plugin into a single system box.
Is it you can reduce the stamina only 1 has 48px each box?
For the moment, it reduces very quickly.
Thank you
Desolated for my bad english writing

I also use the  plugin Quasi movement in combination.
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
I have no idea what you are asking. I guess you want a smaller box.


Customizing the plugin for your specific needs (if parameters are not sufficient) however is best done yourself or through a commission if it requires a lot of changes in code.
 

djmisterjon

Villager
Member
Joined
Aug 18, 2014
Messages
29
Reaction score
6
First Language
francais
Primarily Uses
I have no idea what you are asking. I guess you want a smaller box.


Customizing the plugin for your specific needs (if parameters are not sufficient) however is best done yourself or through a commission if it requires a lot of changes in code.


Ok I have made you a little video below. :D
According to my calculations, when the character that moves one space.
The stamina is reduced by 31.
I would like to actually reduce it by 1.

I really look around your script, I did not find in relation to a formula that I can change.
It would have a line that I can modify to change the way it reduces the stamina?

 unfortunately I only know html css and php.
I find the java very difficult lol


Called me if this is not possible
Thank you
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Wow I really love your custom art. It's amazing.


I see. This was asked before. So you know what, I just quickly added it. Didn't test it much to be honest as I only had like half an hour time today. If there are any problems let me know:


v1.05 (21 March 2016) (PARAMETERS CHANGED!)
- Added a new parameter "Stamina Decrease Mode". Now stamina can also be decreased on a per-tile-basis instead of only on a per-update-cycle-basis. Because a new parameter was added, please delete the script in the plugin manager and add it again to refresh the parameters if you are upgrading from a previous version.
- Added new functions and a new alias to accomodate the above new feature.


Download v1.05


Set the new parameter to "Tile" and it will only decrease the stamina when the player enters a new tile (while dashing of course). The new parameter is the first one in the "Stamina Pool" section.


Note that I had zero Javascript knowledge when I wrote this script. I wrote this script to learn it. Practice makes 'perfect' ;).
 
Last edited by a moderator:

djmisterjon

Villager
Member
Joined
Aug 18, 2014
Messages
29
Reaction score
6
First Language
francais
Primarily Uses
Wow I really love your custom art. It's amazing.


I see. This was asked before. So you know what, I just quickly added it. Didn't test it much to be honest as I only had like half an hour time today. If there are any problems let me know:


v1.05 (21 March 2016) (PARAMETERS CHANGED!)
- Added a new parameter "Stamina Decrease Mode". Now stamina can also be decreased on a per-tile-basis instead of only on a per-update-cycle-basis. Because a new parameter was added, please delete the script in the plugin manager and add it again to refresh the parameters if you are upgrading from a previous version.
- Added new functions and a new alias to accomodate the above new feature.


Download v1.05


Set the new parameter to "Tile" and it will only decrease the stamina when the player enters a new tile (while dashing of course). The new parameter is the first one in the "Stamina Pool" section.


Note that I had zero Javascript knowledge when I wrote this script. I wrote this script to learn it. Practice makes 'perfect' ;).
whaouuu , you are awsome


is work and easy.


tank you friend for the support
 

djmisterjon

Villager
Member
Joined
Aug 18, 2014
Messages
29
Reaction score
6
First Language
francais
Primarily Uses
Hi friend.
Possible to use a variable for the command Stamina SetMax () inside your command module ?
 


i try Stamina SetMax $gameVariables.value(41)


But no work :(


Do you have any idea ?


Tank you a lot
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
Is it possible to toggle the ability to dash within a single map from off, to on, back to off, etc.? Or just off to on? I need to be able to switch it back and forth  by use of the plugin command.

(the map contains the note <disable_dashing>, and then after the plugin command stamina EnableDashing <true> is run, dashing is then enabled, however, if I later run stamina EnableDashing <false>, it will not become disabled again, it will remain enabled)
 
Last edited by a moderator:

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Update v1.06


- Added new plugin commands: SetVar, SetEval, SetMaxEval & SetMaxVar.
- The plugin command "Stamina EnableDashing" now accepts a third value: toggle.


@djmisterjon


Upgrade to v1.06 and use:


Stamina SetMaxVar 41






@Zerothedarklord


Stamina EnableDashing true


NOT <true>. I updated the help-info to make this more clear.


Enjoy.
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
Performance issus.


Hi friend can you chek your code.


When try game with your plugin on web browser.


Have very laggy, [4fps]


When i turn off your plugin, [have 60 fps]
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
Update v1.06


- Added new plugin commands: SetVar, SetEval, SetMaxEval & SetMaxVar.
- The plugin command "Stamina EnableDashing" now accepts a third value: toggle.


@djmisterjon


Upgrade to v1.06 and use:



Stamina SetMaxVar 41






@Zerothedarklord



Stamina EnableDashing true


NOT <true>. I updated the help-info to make this more clear.


Enjoy.
tank you for update stamina setmaxvar.


Also, i add feature to line 351.


Add


if (this.dashStamina == 0) { $gameTemp.reserveCommonEvent(9);


So when stamina 0, you can call common event.


If you want add this new thing. work perfecly to my side.
the common event for me, stop the player with invers tileset.
But if you have solution to stop move player more easy.


Final code

Code:
// Call this method after decreasing the stamina
Game_Player.prototype.postDecreaseStaminaHandling = function()
{
	if (this.dashStamina == ) { $gameTemp.reserveCommonEvent(9);}
	if (this.dashStamina < ) { this.dashStamina = ; }
	this.isRecoveringStamina = false;
	if (Silv.DashStamina.ShowWindow && !Silv.DashStamina.ScreenIsFading) { Silv.DashStamina.Window.showMe(); }
};
 
Last edited by a moderator:

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Hi friend can you chek your code.


When try game with your plugin on web browser.


Have very laggy, [4fps]


When i turn off your plugin, [have 60 fps]
I tried the plugin in a browser (Firefox) and it worked flawlessly on 60FPS in a new project with default plugin parameters. So I can not reproduce it.

So when stamina 0, you can call common event.
I'll add it to the todo-list. I will probably make the zero value a variable-parameter instead. It's simple to add indeed.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
I tried the plugin in a browser (Firefox) and it worked flawlessly on 60FPS in a new project with default plugin parameters. So I can not reproduce it.


I'll add it to the todo-list. I will probably make the zero value a variable-parameter instead. It's simple to add indeed.
No lag during software testing, only during emulation on the web.
But it shows that the plugin takes too much cooling.
May reduce the refresh plugin?


here the test with and without your plugin












For common event , for now , a add this

Code:
if (this.dashStamina == 0 ) { $gameTemp.reserveCommonEvent(9);}
so when stamina = 0, common events 9 start.


Tank you a lot for support
 
Last edited by a moderator:

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
I tried the plugin in a browser (Firefox) and it worked flawlessly on 60FPS in a new project with default plugin parameters. So I can not reproduce it.
I DID test it in a browser (NOT during 'software testing') and no performance problems whatsoever, not even 1 FPS loss.


Try my plugin (redownload the original unaltered latest version please) in a new project and don't run the common event. Does it still have bad FPS?


It is very likely that it is your code or your common event that is causing it. You are likely calling it like 60x per frame or more.

For common event , for now , a add this
No I don't "add this for now" as a dirty workaround just for you. Like I said, I will add it to the todo-list and do it properly. When I have time that is and when I feel like it.


I hope you understand and that we are not miscommunicating here.
 
Last edited by a moderator:

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
394
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Update  v1.07a (1 April 2016) [Parameters Changed]
- Added a new parameter to run common events at certain stamina values/percentages. Also comes with a Common Event limiter.
- Added a new parameter "Use Custom Stamina Regen Formula?" for those who need more optimization.
- Added more comments to the code.


Download v1.07a


@Jonforum


V1.07a also has a limiter for how many times Common Events can be run when matching the stamina value. This is probably the reason your code didn't work and probably also the reason why you shouldn't 'quickly add some quick workarounds'.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

In today's seminar:
Presenter: In the past, there was a saying, "One who has tuberculosis is doomed for life." But now-
Everyone: *starts coughing in unision*
Gosh... Today seems too much like a good day to do nothing....

I need to keep myself focused...! :kaoback:
javascript'ing essentials.

So, what can I do solve this problem, guys? The plugin is MOG_Weather and I have several Yanfly plugins too.

Forum statistics

Threads
93,696
Messages
914,696
Members
123,292
Latest member
VinzBandicoot
Top