Silver's Dash Stamina

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
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'.
work really good. tank you a lot friend
 


Little sugestion;
Play sound eatch case or eatch stamina decrease


:)
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Done:


Update v1.08 (3 April 2016) [Parameters Changed]
- Added an optional SFX to the tile-mode.
- Added two new parameters: "Default SFX Volume" and "Stamina Decrease Tiled SFX".


Download v1.08


Didn't have a lot of time to test it though so lemme know if something bugs out.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
Done:


Update v1.08 (3 April 2016) [Parameters Changed]
- Added an optional SFX to the tile-mode.
- Added two new parameters: "Default SFX Volume" and "Stamina Decrease Tiled SFX".


Download v1.08


Didn't have a lot of time to test it though so lemme know if something bugs out.
Very nice, for now is good rendering, your plugin are awsome !!


see my concept.
I developed the idea of an isometric game, turn per turn.
The player has dice to move on an isometric map.

These the turn per turn, but the idea is to allow the player to think about the dice used and resources to advance in the game.
No dice = game over

Somewhat in the style of Mario Party, but with an open card.
Here is a presentation of the alpha version.


SFX are for now basic, if you have some idea, for you plugin, for now your plugin are awsome and very help me.










Tank you a lot Friend


Maybe a border radius for stamina bar , it possible ?


And 0 stamina = other SFX
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
I don't think I'll be adding any visuals like borders. But if you find a programmer to customize it for you it's not much work. You could even just paste a sprite underneath it yourself.

And 0 stamina = other SFX
You can do this with a common event and by configuring it in the parameters of the Stamina plugin to fire that common event when the stamina value is 0.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
I don't think I'll be adding any visuals like borders. But if you find a programmer to customize it for you it's not much work. You could even just paste a sprite underneath it yourself.


You can do this with a common event and by configuring it in the parameters of the Stamina plugin to fire that common event when the stamina value is 0.
Tanks


Hello friend , I come back to you.
I have very serious lag issues with your super plugin. :(
I took the time to search and search and I think I found the culprit.
a line 775 and 800.
The problem is major, because on Android and the web, it is impossible to run the scripts game.


I made a video that allows viewing, and also scanning performance that shows the 2 line of code that caused problems appear.



Do you have an idea or solution ?



I dare not make changes because I have not written the code, but if you have any suggestions I can try.


I  made a video of three minutes if you have time.



thank you












Line 775

//------------------------------------------------------------------------------------------------------------------------------------
// Stamina Window Update
//------------------------------------------------------------------------------------------------------------------------------------
Window_DashStamina.prototype.update = function()
{
if (Silv.DashStamina.ScreenIsFading)
{
this.visible = false;
}
else
{
Window_Base.prototype.update.call(this);
this.drawStaminaWindow(, , Silv.DashStamina.StaminaGaugeRectangle.width);
this.updateSliding();
}
};





Line 800

Code:
Window_DashStamina.prototype.drawStaminaWindow = function(x, y, width)
{
	this.contents.clear();
	
	// Draw text before the gauge
	if (this.windowText !== null)
	{
		this.contents.drawText(this.windowText, , Silv.DashStamina.WindowTextOffsetY, this.windowTextWidth, );
	}

	// Draw gauge
	this.drawStaminaGauge(Silv.DashStamina.StaminaGaugeRectangle.x + this.windowTextWidth + this.windowTextGaugeSpacingX, Silv.DashStamina.StaminaGaugeRectangle.y, Silv.DashStamina.StaminaGaugeRectangle.width, Silv.DashStamina.StaminaGaugeRectangle.height, $gamePlayer.dashStaminaPerc);
	// Draw text on top of the gauge
	var text;
	switch(Silv.DashStamina.DrawStaminaValue) // allowed values: absolute/percentage/both/none
	{
		case 'absolute':
			text = parseInt($gamePlayer.dashStamina) + '/' + parseInt($gamePlayer.dashStaminaMax);
			break;
		case 'percentage':
			text = Math.round($gamePlayer.dashStaminaPerc * 100) + '%';
			break;
		case 'both':
			text = parseInt($gamePlayer.dashStamina) + '/' + parseInt($gamePlayer.dashStaminaMax) + ' (' + Math.round($gamePlayer.dashStaminaPerc * 100) + '%)';
			break;
		case 'none':
			return;
		default:
			throw 'ERROR: drawStaminaWindow missing case-statement or incorrect Silv.DashStamina.DrawStaminaValue value. Value: ' + Silv.DashStamina.DrawStaminaValue;
	}
	
	this.resetTextColor();
	this.drawText(text, x + this.windowTextWidth + this.windowTextGaugeSpacingX, y + 1, width, 'center');
};
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
  1. You did NOT run any common events when testing right (like last time)? Try disabling those first see if it helps.
  2. Did you try running my plugin with default parameters?
  3. If it still lags, outcomment the entire contents of drawStaminaWindow()
  4. If it still lags, outcomment the entire contents of that update function and only put in this line:

Window_Base.prototype.update.call(this);




I also uploaded v1.09. This should not fix your problems though. I do believe yours are caused by a wrongly setup common event but nonetheless version 1.09 should perform slightly better (moved most calculations out of the update method).


v1.09 (11 April 2016)
- Refactoring & minor performance optimizations.


Download v1.09
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
  1. You did NOT run any common events when testing right (like last time)? Try disabling those first see if it helps.
  2. Did you try running my plugin with default parameters?
  3. If it still lags, outcomment the entire contents of drawStaminaWindow()
  4. If it still lags, outcomment the entire contents of that update function and only put in this line:


Window_Base.prototype.update.call(this);




I also uploaded v1.09. This should not fix your problems though. I do believe yours are caused by a wrongly setup common event but nonetheless version 1.09 should perform very slightly better. But shouldn't be noticable.


v1.09 (11 April 2016)
- Refactoring & minor performance optimizations.


Download v1.09
I tried several solutions proposed.
Unfortunately no solution work. !
I even try a previous version.
V1.01, and the problem persists.
I am a can discourage.
If I'm not mistaken, these may be a command call execute by rpg_core.js who has difficulty managing some demand for your plugin.
Because I have much more huge plugins, which does not cause any problems in OpenGL mode.
Do you think if I send you the project?
Only if you have the time, because of me, I'm almost about to give up lol
Would you agree to take a discreet eye on my project?


ps: i try V1.09 but noting


Tank you friend for support
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
I tested it with an Android build and it works fine at max FPS. Tried Firefox and again max FPS. Worst I was able to get (had more plugins) was 55 FPS (60 is max for me).


Either you configured it wrong or another plugin is causing it.


Try a new blank project with my plugin (and no other plugins and no common events or anything!) and deploy to FireFox and it should perform just fine.


Also if you tried the above solutions/tests and it still causes performance problems then it can not be my plugin because if you disable both it's update and it's drawing then it basically does nothing. If you still have bad FPS then, then it's once again not my plugin that is causing it, if properly configured.


Also you can disable the update here:


Silv.AddAlias('dashStamina_Scene_Map_updateMain', Scene_Map.prototype.updateMain);
Scene_Map.prototype.updateMain = function()
{
Silv.Alias.dashStamina_Scene_Map_updateMain.apply(this, arguments);
// outcomment the lines below
//$gamePlayer.updateStamina();
//if (Silv.DashStamina.ShowWindow) { Silv.DashStamina.Window.update(); }
};






Could be a compatibility problem with another plugin. But I doubt it's my plugin even though disabling does seem to increase FPS for you.
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
I tested it with an Android build and it works fine at max FPS. Tried Firefox and again max FPS. Worst I was able to get (had more plugins) was 55 FPS.


Either you configured it wrong or another plugin is causing it. Try a new blank project with my plugin and deploy to FireFox and it should perform just fine.

I tested it with an Android build and it works fine at max FPS. Tried Firefox and again max FPS. Worst I was able to get (had more plugins) was 55 FPS.


Either you configured it wrong or another plugin is causing it. Try a new blank project with my plugin and deploy to FireFox and it should perform just fine.
Yes I have every try.
I think I'll give up lol
I will tried to find an alternative.
I try a blank project, and 120 fps, is true, magic!
I do not understand anything.
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Because like I said before (not magic) it's likely either one of these problems:

  • Your common event is bad
  • The way you configured your common event with my plugin is wrongly configured
  • Incompatibility with another plugin in that huge list of plugins you have

Good luck.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
Because like I said before (not magic) it's likely either one of these problems:

  • Your common event is bad
  • The way you configured your common event with my plugin is wrongly configured
  • Incompatibility with another plugin in that huge list of plugins you have

Good luck.
no common event, i delete all


No event on map


initial configuration of your plugin


No other plugin are active


:)


When I turn my 50 other plugins. Without your plugin.
I run a 120 FPS.
But when I activate only yours plugin.
No other plugin.
I run at 60 FPS.


:unsure:
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
Because like I said before (not magic) it's likely either one of these problems:

  • Your common event is bad
  • The way you configured your common event with my plugin is wrongly configured
  • Incompatibility with another plugin in that huge list of plugins you have

Good luck.
Ok found why.


When you debug with the canva screen.
This take a instant screen (0.01 SEC activity).


And a see 251 Call fonction to the rpg_core.js most by your Draw gauge function.
I think is this thing, am no pro in javascript, i only know html,css,php ?


You can try and see like the print screen.


View attachment 36287
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Your screenshot is too small to read. I can't zoom it in.


I tested it myself and I found a 0.03% performance usage of the total performance used (minimal possible for me because even a keypress uses 0.03%) for my entire plugin together. It was in fact so fast I could (if removing the FPS limiter somehow) run in theory at around 970.8 FPS and that is including other plugins...


The other thing I don't understand is that you out-commented the draw before and still had bad fps. So how can this be the problem? And then there is this thing that it does perform well for you when running in a clean project... Meaning it has got to be another plugin that uses a bad alias or overwrite or something somewhere.


It uses this.gaugeBackColor() and this.contents.fillRect(). But only 3 calls total per call and no loops or anything. If this is causing 251 calls per frame for you then you probably have a bad plugin somewhere.


Fine just send me the entire project or send me the URL to it in a private PM and I'll take a quick look at it. Don't post it here obviously!
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,604
Reaction score
1,397
First Language
French
Primarily Uses
RMMV
Your screenshot is too small to read. I can't zoom it in.


I tested it myself and I found a 0.03% performance usage of the total performance used (minimal possible for me because even a keypress uses 0.03%) for my entire plugin together. It was in fact so fast I could (if removing the FPS limiter somehow) run in theory at around 970.8 FPS and that is including other plugins...


The other thing I don't understand is that you out-commented the draw before and still had bad fps. So how can this be the problem? And then there is this thing that it does perform well for you when running in a clean project... Meaning it has got to be another plugin that uses a bad alias or overwrite or something somewhere.


It uses this.gaugeBackColor() and this.contents.fillRect(). But only 3 calls total per call and no loops or anything. If this is causing 251 calls per frame for you then you probably have a bad plugin somewhere.


Fine just send me the entire project or send me the URL to it in a private PM and I'll take a quick look at it. Don't post it here obviously!
ok lol i will compilate this today.


For picture you can , [ left click] on , and select [show picture]



you will get this
http://forums.rpgmakerweb.com/uploads/monthly_2016_04/canva-debug.jpg.de7547ccf8d5e2eb73f347324af14429.jpg


afer you can zoom with [CTRL][+] and zoom out with [CRTL][-], or simply [CTRL] + [the mouse role.]


Tank you friend

 

Attachments

Last edited by a moderator:

arceus69

Villager
Member
Joined
Jul 23, 2013
Messages
5
Reaction score
1
First Language
Italian
Primarily Uses
Hi, i have a problem with that plugin. In the window in game, instead of the number i get NaN/NaN (NaN%), the stamina doesn't work and the window don't go away. How can i solve this? Thanks!

Senza nome.png
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
Remove the plugin from the plugin-manager (F10) and add it again. This will reset all parameters. Now test it on a blank map without any plugin-commands. It should work now.


You probably miss-configured a parameter or a plugin-command. It is possible that a plugin-command is bugged but in that case please let me know which one is causing it as well as the command used.
 

arceus69

Villager
Member
Joined
Jul 23, 2013
Messages
5
Reaction score
1
First Language
Italian
Primarily Uses
Remove the plugin from the plugin-manager (F10) and add it again. This will reset all parameters. Now test it on a blank map without any plugin-commands. It should work now.


You probably miss-configured a parameter or a plugin-command. It is possible that a plugin-command is bugged but in that case please let me know which one is causing it as well as the command used.
I've tried but nothing. After doing this, it doesn't dash anymore and the window have NaN% as text.
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
I confirm that there is a draw-bug when starting the game when not having the stamina window set to "autohide". After moving at least one tile it should work again. I will fix this in the next version.
 
Last edited by a moderator:

Ursolino

Villager
Member
Joined
Feb 11, 2016
Messages
5
Reaction score
0
First Language
Portuguese
Primarily Uses
Hello!



Thank you for this Pluggin! Is really awesome!

I'm using this pluggin for my project. But I have 1 issue.
I want to show the Stamina always, but some times I don't want to show the stamina, because I'll show some story or something.

I would like to know if have same way to set OFF to this pluggin in some maps. Could you put some thing like this in your pluggin? some way to disable this pluggin by some interaction in an Map Event.
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
393
Reaction score
156
First Language
Dutch
Primarily Uses
RMMV
@Ursolino


Please see the plugin commands in the plugin help section. Also you can optionally disable stamina entirely for a map using map-notetags.
 

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

Latest Threads

Latest Profile Posts

I really need to stop thinking there are new freebies just because someone made a new post in the freebies subforum lol.
AND just like that..... I got STEAM DLC up and working! YES!
Game making is like a marathon, except the last 1/4 is more like sprint... a very long and intense sprint.
Finally got to finish the demo for my project!
Another week has gone by. Maybe you made changes to your project/s. Maybe you didn't. Nonetheless, THAT IS NO EXCUSE TO NOT BACK THEM UP O_O!

Forum statistics

Threads
93,440
Messages
912,433
Members
122,963
Latest member
curos
Top