MZ Simple custom Scrollbar

Hi all,

do you know a plugin, to create a scrollbar? I do not want to add it to any existing menu or textbox.
I don't need any mouse-drag functionality. It's just for visual orientation.

* Best would be to trigger the Scrollbar by Plugin Commands.
* I'd like to define x and y coords to place it anywhere on the screen.
* Length should be set in px.
* Vertical is mandatory, horizontal a nice to have.
* Also, I want to define two Variables. One to contain the max value, the Scrollbar needs to be mapped to. The other one contains the current position based on the max value.
* As long as the scrollbar is active, it should check the "current position" variable to update in sync with it.
* Maybe the window graphic can be used to build the scrollbar; like textbox etc. aswell.
* Finally, there should be a Plugin Command to delete the scrollbar.

Thanks!
Scrollbar for what exactly? Like the main menu? A part of the menu?
I made a custom eventbased menu to manage your party members. There are about 20 list entries right now to scroll through, and it gets hard to track, where you are in that list. I want to place a scrollbar next to it to provide some orientation.
Is there some reason you can't use Show Picture & Move Picture with variable coordinates? I imagine you already have a looping event to handle the menu, so you could add Move Picture in there, right?

If you want to scale the scrollbar as well, you could add a Script command after Move Picture, e.g.
JavaScript:
$gameScreen.picture(12)._targetScaleY = 80;
I.e. "set the target Y-scale for picture ID 12 to 80%". (Obviously you'd want some sort of calculation there instead, this is just to demonstrate the syntax and units. In a script call, you can get the value of variable ID 34 as: $gameVariables.value(34).)
I need to think about it, how to calculate the position. The amount of list entries is dynamic, depending on how many Chars have been recruited.

I'd have to map the amount of list indexes to the length of the scrollbar I guess. And calculate the position of the scroll indicator my percentage of current index vs. max index.

Edit:
Made it work, thanks!

After every key hit, the event turns back to awaiting an input. At this spot, the Scrollbar indicator position gets updated:

Code:
  ◆Script:var v941 = $gameVariables.value(941); // Current List index
  :      :var v947 = $gameVariables.value(947); // Max List index
  :      :var v1148 = $gameVariables.value(1148); // Y position of Scrollbar indicator
  :      :var v1149 = $gameVariables.value(1149); // Scrollbar length in px
  :      :var result = v1148 + (v1149 * (v941 - 1) / (v947 - 1));
  :      :$gameVariables.setValue(1148, result);
  ◆Show Picture:#81, ScrollCursor, Center ({PM Scroll Cursor X Pos},{PM Scroll Cursor Y Pos}), (100%,100%), 255, Normal
Great! 😂

For efficiency, I would suggest using Show Picture when the scrollbar appears, then use Move Picture for each frame update. Show Picture (re)creates the picture object, but Move Picture just gives it target values.

Original thread: https://forums.rpgmakerweb.com/threads/simple-custom-scrollbar.169060/