Using Picture ID above 100 - Script or Plug-in for MZ?

But it doesn't work with the default plugin ButtonPicture. ButtonPicture still has a selectable Picture ID limit of 100.
This is actually an easy fix. Just find this block (toward the top of the ButtonPicture plugin):
Code:
 * @arg pictureId
 * @type number
 * @min 1
 * @max 100
 * @default 1
 * @text Picture Number
 * @desc Control number of the picture.

And change the 100 to whatever your new max is.
@ZombieKidzRule - Does your current click picture plugin (1) tell you the xPos and yPos of where you clicked, and (2) give you the option of differentiating L-click from R-click? If it were me, I would

Use a 9x9 event boxes, each with 21 pages (blank, 0-9 in clickable color, 0-9 in fixed color)
Create 81 variables for each of those event boxes
Place one transparent grid picture over them (to differentiate each 3x3 block)
When the player clicks, go to one common event that reads the xPos and yPos of the clicked area, use conditionals to determine which event is being clicked, then

If it's a fixed cell, then error sound, no change in the variable
If it's a changeable cell, then was it a L-click or a R-click, if a L-click, increase the variable of that cell by 1 (if it's 9 make it 0), if a R-click, decrease the variable of that cell by 1 (if it's a 0, make it 9)

I haven't tested this, so I'm not sure if by clicking on a picture over an event will cause the player to move, but if that's the case, you can always use a script that prevents player movement while the game is being played. I know I have one stored on my other computer. Also, if the player were visible, you can also show those thought bubbles (happy, confused, etc.) above the player to give visual effects as well as the sound effects.
@Arthran Oh, for the love of all things Zombie! I actually looked in that plug-in to see if I could change the limit and I saw that section, but because I don’t really understand how to Interpret plugins, I didn’t think that section did anything! I thought it was just referring or explaining what the other stuff later was doing! I was also concerned about being permitted to change that plug-in since it is an official plug-in that comes with MZ. I will have to look and see what it says. Thanks for pointing that out!

@Lady_JJ That is a lot to digest! I don’t really know how the ButtonPicture plug-in works. I like what you are proposing. So I will have to try to experiment to see if I can understand how to implement that type of solution. That gives me more to think about so thanks!
I know you had the random gen working fine, that's why I was curious how it was done and then stored, to see how we might be able to layer the visual over top of the logic/puzzle data. If you can drop a more current one, that might help.
Q with the puzzle: do you keep a copy of the solution anywhere, and then variables hold the player input, or does the generation simply place the hints in the right variables, then run a check on the whole board (group of variables) for validity?

@Lady_JJ hit on this as I was writing it up, lol; though my take is a bit of a different of the same idea:
Maybe this is overengineering, maybe this is a potential solution, but it might be possible to do some shinanigans with a kind of support script; if the button plugin records/tracks the x.y position of the click, it may be possible to get away with using an image of your game board, record the click, and feed that position to a support script that just draws the "icons".

BUT, I think the short of it is, there's a few ways to approach the problem without the sheer number of images 🙂 Now, if there's no performance hit to simply raising that limit, there's not a ton of reason not to do it your way; as the saying goes "its not dumb if it works." If you find it occupies a good deal too much memory or difficulty, the skeleton sounds more than viable in that its working well now but sprites carved up from a single image tend to have lower overhead than a number of images, and it may be possible to pick up some performance cleaning that up.
All these responses give me a lot to consider and more experiments to try to see what I can actually figure out.

@daMooseNeo I actually have to think more about the puzzle check solution. But right now the squares will have fixed values based on the puzzle generation.

in the older version of the puzzle, I didn’t actually check each value of each square to make sure it was correct. Instead, what I did was I pushed square values into arrays for each column, row, and group. Then I checked to see if each array contains the values 1-9. If so, that column, row, or group was ok. If all the columns, rows, and groups were ok, then that means the puzzle has a valid solution. Although not necessarily the intended solution.

I can’t remember exactly why I did it that way. I would have to go back and look. But I should be able to just check the values of the squares with the values the player input. That would just require two sets of values. The randomly generated values for the puzzle and then the player input values.

I like learning new things and I am intrigued by these suggestions. The lazy part of me says to just go with the increased limit if it doesn’t cause any issues. And I will probably continue to Event that way while I am experimenting with trying to understand these other options. Only because I know how to do this way and I can continue making progress.

But I do like the idea of simpler solutions. And anything that helps me better understand how to script stuff always adds value.
Oh, for the love of all things Zombie! I actually looked in that plug-in to see if I could change the limit and I saw that section, but because I don’t really understand how to Interpret plugins, I didn’t think that section did anything! I thought it was just referring or explaining what the other stuff later was doing! I was also concerned about being permitted to change that plug-in since it is an official plug-in that comes with MZ. I will have to look and see what it says. Thanks for pointing that out!
That section doesn't do anything engine-wise, but it is what creates the plugin command UI inside the editor. The 100 max limit was only being enforced by the editor, and not by the actual code in the plugin.

IIRC, as the plugin is an asset that came with MZ, it should fall under the same rules as the RTP assets (it's fine to edit them and share them with other people who own the engine).

but sprites carved up from a single image tend to have lower overhead than a number of images
Off the top of my head, I can't think of any reason why this would be accurate. A sprite doesn't really know or care what the original source of its bitmap is.

On MZ, there should be no performance issue with showing over 100 pictures. I've actually tested 10000 pictures without any discernable framerate drop. However, you probably wouldn't want to do it on MV, because MV has a problem with displaying too many pictures.
Off the top of my head, I can't think of any reason why this would be accurate. A sprite doesn't really know or care what the original source of its bitmap is.

On MZ, there should be no performance issue with showing over 100 pictures. I've actually tested 10000 pictures without any discernable framerate drop. However, you probably wouldn't want to do it on MV, because MV has a problem with displaying too many pictures.
Its a true-ism I've run into with some other platforms and web design. There's a preference in different circles to run off a singular image and copy the parts out than to load unique files for every part. As I said, "lower overhead," which in some web templates translates to faster load times when you're pulling from a single source rather than making multiple calls to load multiple files. Loading one image, and copying parts from something already in memory, versus a few dozen calls and loads, can add up.
I'll grant, this may not be true of RPGM, I've not pushed it in that way and most of its calls are going to be to local sources and not remote servers. I have encountered it on some web design projects, where using a "sprite sheet" for a UI and reading coordinates to output worked faster than loading unique files for each component of the UI.
Its a true-ism I've run into with some other platforms and web design. There's a preference in different circles to run off a singular image and copy the parts out than to load unique files for every part. As I said, "lower overhead," which in some web templates translates to faster load times when you're pulling from a single source rather than making multiple calls to load multiple files. Loading one image, and copying parts from something already in memory, versus a few dozen calls and loads, can add up.
I'll grant, this may not be true of RPGM, I've not pushed it in that way and most of its calls are going to be to local sources and not remote servers. I have encountered it on some web design projects, where using a "sprite sheet" for a UI and reading coordinates to output worked faster than loading unique files for each component of the UI.
The general reason for doing it that way is so that it essentially pre-loads all the images that you might need, to eliminate any loading delay later on. It's the same concept as why we use sprite sheets for our characters, instead of having a different file for each frame--that way, each frame is already loaded into memory, so that we don't need to be loading files in-between frames (and potentially experiencing flicker).

In this case, it doesn't matter, since the OP is displaying all the images upfront anyway. Plus, MZ pre-loads the images for Show Picture commands upon entering a map anyway.
I just want to express again how much I appreciate all the help, ideas, suggestions, and new things I learn from the threads that I post seeking assistance.

Sometimes what you all think might be a simple thing makes something click with someone else and then many new doors of possibility open.

The support I get from this forum warms the hackles cackles cockles of this undead, unbeating, Zombie heart.

You are all FABULOUS!
So, I don't think this breaks any rules since this is my thread and I have found something new and relevant about it.

It turns out that MZ has a built-in way to increase the Picture Limit that works with both Show Picture and script calls for Show Picture.

It has been in the Advance Settings tab all along as the Pictures Upper Limit. I just tested this and it works perfectly fine.

MZ Advanced Settings.png

I don't know why I didn't find this a year ago, but oh well. I went back to old projects where I haven't updated the core script and the option has been there. Apparently since launch in 2020.

It is true that you still need to change the upper limit in the ButtonPicture plugin because that Max is set to 100. So you would still have to manually change that.

But changing the Pictures Upper Limit in the Advanced Settings of MZ allows you to increase the limit beyond 100 and that works with Show Picture and the script for Show Picture.

Zombie feels like says...DUH!
It has been in the Advance Settings tab all along as the Pictures Upper Limit.
👋 Just for info, that setting was added in update 1.9.0:
  • In the database [System 2] - [Advanced Settings] - [Pictures Upper Limit], you can now change the maximum number of pictures. You can set up to 500.
@caethyril That's odd. Why would the option show up in a project that is still using an earlier version? A much earlier version. Like a v1.4.something version.

I probably just don't understand how that works, but I thought it would only show up in new projects or projects that have been updated.
@caethyril That's odd. Why would the option show up in a project that is still using an earlier version?
There are 2 versions involved here:
  • The editor version - this determines what options are available in the editor, like Pictures Upper Limit or custom tile/face sizes. This affects whether data for newer features is present in the game's data files.

  • The project version - this determines the version of the core scripts on which the game runs. This affects whether the game recognises data pertaining to newer features. It may also affect compatibility with plugins.
Generally speaking, it's safest to ensure that the project and editor are running the same version:
  1. If the game is older than the editor, it will not recognise newer features.
  2. If the game is newer than the editor, it may run into problems with missing data.
Newer features typically have safety checks for missing data, but e.g. I believe that icon/face size will bug out if opening a v1.9.0 project saved in an older editor version, because all fallback sizes in core script v1.9.0 are undefined due to typos.
Thanks for explaining that! I will edit my edit to the OP to avoid confusion.

I really thought I was going crazy for a moment because I couldn't believe I missed that.

Original thread: https://forums.rpgmakerweb.com/threads/using-picture-id-above-100-script-or-plug-in-for-mz.165036/