Need Help creating Buff/Icon to show on screen upper right, with Step Counter. MapScreen Only for Leader

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
I'm looking to create or show buffs/debuffs - on Map Screen Only.
This would only pertain to the main character/leader of party.
I Do Not Use plugins for this game! ***

Something similar to what World of Warcraft does.
If I get poisoned in a battle, afterwards it shows I'm 'poisoned' for : 100 Steps
If i use an item that gives +attack power for X Steps for example
It would draw the Icon I call, with a counter next to it

I know it would have to be added as a common event, but the script would do something like

Actor -Uses Item-

Show [ICON] : [Steps]

Actor -Step Count Hit-

Remove [ICON] : [Steps]

Heres a MockUp of what I'm trying to achieve
AIconDisplayMOCK.png


Steps would be different for each item so I'd have to set a variable to each Item to change step amount
After that I'm lost.

Edit1* Also Hi, First post is first post.
Edit2* Fixed. I thought this was correct forum, apologies. and thank you for moving it Wavelength
 
Last edited:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,113
Reaction score
5,810
First Language
English
Primarily Uses
RMVXA
Moving this thread to the JavaScript Plugin Requests board. I'm assuming you are looking for a JS Plugin, not an RGSS Script, based on the fact that you show "Primarily uses RPG Maker MV" in your profile. If this is NOT for a project in RPG Maker MV, please report this post and tell us which RPG Maker Engine you need a script for. (Additionally, "Script Support" is for help using existing scripts - "Requests" is what you were looking for.)

Here are some ways you should edit your request to be more clear about what you want:
  • Specify whether you want the icon to be displayed on the Map screen, the Battle screen, or both.
  • Specify whether you need icons for all actors of the party, just the party leader, or whether there's just one party member in your game.
  • If you want to take a try creating a mockup of what the screen would look like with the icons and text labels, that would be very helpful to anyone trying to make this for you.
 

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
This is what I currently have.. but im lost.
var win = new Window_Base(526,2,25,25);

SceneManager._scene.addChild(win)

win.drawText("$game_variables[27]}", 0, 0, 0, "center");
This function returns and looks like this:
AIconalmost.png

This thread is going to turn into a; watch as I slowly fix this myself, kinda problem I've figured the box out, Now to draw an icon and draw text correctly in the box.
 
Last edited:

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
Current Update, This is how far i've made it troubleshooting it myself:
This draws the window as intended, but the Icon + Step variable doesnt actually show...

AStepCounterNear.png
This is my counter math that works as intended, but I'm trying to call the variable in above basically from this:
ASmokerRanOut.png

Another thing is, I'm going to need the original window, to GROW in-case of multiple buff Icon/step counters.. and idk how to do that either
 

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
Alright, So I am officially stuck for today. I am still looking for help
I have the window drawn , icon is showing up, the variable is showing up. They are where I want them.
AResultofIconWindow.png
The problems: Variable isnt counting. Its meant to count from 85 down to 0, with each step, then the window closes. Currently its displaying the actual STEP count. Only when I use the item however, the number doesnt refresh.
I Need the window to get bigger/refresh if another buff is added, and the buff needs to be place exactly like the current " ICON : NUMBER " only directly below it.
EDIT****ALSO: the window closes if I open up Menu and then close menu..?

I am so close I can taste it.
 

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
Up Still stumped Last post is as far as I've made it
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,743
Reaction score
2,095
First Language
EN
Primarily Uses
RMMZ
Are you aware that a "plugin" in RMMV terms is just a bit of extra JavaScript that extends/replaces some of the existing game code? It's the ideal solution for something like this. :kaoswt2:

There is no elegant way to achieve what you want without a plugin. As you've noticed, going to another scene (e.g. pause menu) will unload the current scene, including all its windows etc. This means you'd need whatever is updating the window each frame to also recreate the window if it doesn't already exist, e.g. because the player has just returned to the map from another scene (pause menu, battle, title, etc).

A plugin would use code similar to yours in its implementation, but more efficiently: fewer redundant updates, and reduced CPU/RAM burden (script calls are run via an eval through the event interpreter, plugins are JIT-compiled like the rest of the core scripts). The custom window would be created when the scene starts; you could make it visible or not as needed, and have it automatically update its icons/text every frame.

It's late here...I'll try to remember to check back sometime tomorrow. If you want an example or starter tips on how to implement this as a plugin (or existing plugins that might be able to do this natively), I'm pretty sure I or someone else here can help with that. Just let us know! :kaothx:

If you're determined (for whatever reason) to stick with events, I think you'd need a Parallel event to:
  1. Recreate the window if it's not there but it is supposed to be there;
  2. Clear the window's contents and re-draw the appropriate icon, value, etc.
You'd need to have the event trigger either each frame (Parallel events do this anyway) or manually (e.g. turn it on/off with a switch).
 

TKarver13

Villager
Member
Joined
Jul 24, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
RMMV
Oof, Well I guess I'll bench this idea, this is my first project and I'm trying to keep it Vanilla. No plugins, No excess stuff, simply what RMMV gives. As silly as it may sound.
Thats why I'm not using plugins. I have an alternative but I thought the buff idea woulda been cool.
but all that aside,

Thanks for the help @caethyril ! :)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,743
Reaction score
2,095
First Language
EN
Primarily Uses
RMMZ
Oh, I see! I think of script calls as sort of "more than what RMMV gives", so was a bit confused. :kaoswt:

All good though, you're welcome~ :kaohi:
 

Latest Threads

Latest Profile Posts

So Deltarune Chapter 2 is supposed to release today... if it's out already, has anyone played it? And I can't because I have a stinking Mac and not a Windows PC.
I forgot that forums have profile walls that you can post or comment on, guess I found a new platform to specifically rant about game-related deranged thought or problems that I have. Salut mes amis!
I couldn't help myself, so I edited the tiles a bit and made a birdhouse :LZSsmile: I hope I will finish the town today!Screenshot 2021-09-17 134349.png
How do I find the threads I have watched? It's been so long I've forgotten :kaoswt:
So far, this is how the wall tileset its looking in-editor. :kaoswt2:
1631863283853.png
Still thinking on details to add.

Forum statistics

Threads
115,134
Messages
1,087,491
Members
149,642
Latest member
xhaust
Top