Bars with Variables

Sera

Veteran
Veteran
Joined
Oct 27, 2015
Messages
80
Reaction score
16
First Language
English
Seems to happen regardless of what variables I use, be they defined or undefined.

Please let me know if you get it working with your own variables.
 

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
264
First Language
English
Something something when you start a game the variables aren't quite created yet.
So it gets grumpy on us. I just put the variables inside the actual window methods to avoid this, as I should have done in the first place.

See link to updated script.
I made two chests that raised and lowered my game variable, the bar responds as predicted and moves back and forth from positive to negative.

http://pastebin.com/x9SdiqDA
 

Sera

Veteran
Veteran
Joined
Oct 27, 2015
Messages
80
Reaction score
16
First Language
English
Ah, it looks like it's working!

Just one tiny thing: in the process of updating it, you appear to have left out two of the options you had integrated previously: namely the EnabledMap and EnabledBattle params.

But the bar itself is definitely fixed and displays variables correctly now. Thanks very much for addressing that.
 

Sera

Veteran
Veteran
Joined
Oct 27, 2015
Messages
80
Reaction score
16
First Language
English
Thanks for that, setting it to battle only was quite crucial for me. The bar itself is perfect now!

Feel free to move on now and focus on Bareacine, or any other projects you're working on.

In the event that you'd like to expand upon this, though:

1. Is the text above the bar always supposed to read 'var/varMax', or should it automatically be using the values that are selected for the bar itself? Sorry if this is something the user is supposed to edit for themselves, I looked through the script but couldn't find any obvious places to put it. An option to hide the text completely could also be quite useful to some.

2. Some of the positioning parameters don't quite seem to work in the way you might expect. This is a completely unfounded guess, but I suspect this may have something to do with the fact that the default 816x624 resolution is referenced in the script a few times, resulting in strange behaviour when using one of the resolution change plugins that have been released.

3. Is there a way to change the vertical positioning of the text? I tried fiddling with the 'bar 1 text y' parameter but that seems to either be affecting the size of the text or not affecting it at all.

Side note: you said earlier that this plugin is too specific to each individual user to be posted in its own plugin thread, which I agreed with. However, if you were to implement a greater degree of user customization at some point, I think this would actually have some pretty broad appeal. At the very least, it would be a shame if your hard work wasn't properly showcased.
 

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
264
First Language
English
1) User edited

2)I can check if I can get it to detect your resolution. I am running default. Which plugin did you use to change this with?

3)I could clean it up a lot and make it more presentable for released plugins, I could have overridden the text y when debugging and forgot to change it back, happens.

Trying to solve the enemy bars issue at the moment., don't know enough about how sprites are placed and moved on the screen to resolve it. Will probably have to wait until Yanfly or someone who hasn't been programming for 2 weeks to release one.
 

Sera

Veteran
Veteran
Joined
Oct 27, 2015
Messages
80
Reaction score
16
First Language
English
1. Ah, I took another look and found where the text is configured. I have no idea how to reference variables within text, though.

this.drawText('$gameVariables.value(5)/100', x , y - this.lineHeight(), width, 'center'); will literally just show '$gameVariables.value(5)/100'... But that's just me being code illiterate.

2. Personally, I'm using Yanfly's Core Engine to change my resolution. I think there's a simple way to check and reference the current screen width and height, just based on what I've seen while skim-reading through scripts, but I have no idea what it is.
 

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
264
First Language
English
this.drawText($gameVariables.value(5)+'/100', x , y - this.lineHeight(), width, 'center');
 

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

Latest Threads

Latest Profile Posts

Please do not buy games from g2a.com. The sellers have total power over you. The website has many scam sellers. It looks cheap, but the key code didn't work.
A while back I was having fun making my own custom tiles, then I hit carpet... why is it so difficult!? Lol.
Weekend is finally here... what would you like to see (?):
1) Pokemon into zelda minish-cap style
or
2) Pokemon into zelda gbc style
or
3) Zelda into pokemon style

#= Choose ===============#
||__[ Full mockup ]_[ Charset ]__||
#=======================#
I know someday I'll start working on this...

I'm so happy that I got Steam achievements to work in my game, thanks in large part to the posts by other RPG Maker devs on this issue!

Forum statistics

Threads
97,935
Messages
948,005
Members
129,177
Latest member
CapnZach
Top