That's a lot of variables, but I guess in the grand scheme of things not really a lot if it doesn't hinder the game.
There's not much of a hinderance to worry about. Variables store values for you, so don't hesitate to store what you need. Having 5 or 5000 variables in use* isn't much of a difference.
*while "in use" is also relative. Variables won't do anything if you don't interact with them codewise. Most of the time, they are just sitting in their shelf, holding their number and doing nothing but waiting for a call to add +1 or display the value in a textmessage.
What you might be concerned about are parallel process events. Too many of those, and if performed poorly, can affect the performance of the game by a lot.
And in many cases, parallel events can be avoided, if you have a good concept of what they are doing.
For example: You have a time feature in your game and display some kind of clock in your HUD. You could set up a parallel process, that always checks the current time and shows the correct information. But you could also call this check when your ingame time actually changes. There has to be some event that adds +1 to the ingame timer. That would be the right spot to check necessary HUD updates aswell.
Ah sorry I see I didn’t write it well (which happens when I write on my phone 😛), I write them like:
(Material Item IDs)
CraftMatID:01.TEMP
CraftMatID:02.TEMP
and so on…
(Material item amounts)
CraftMat#:01.TEMP
CraftMat#:02.TEMP
And so on…
All good, I didn't refer to you post in particular!
Your given example is a good usecase of variables, and not what I meant with "bad reusage of variables". Yours seem to be focussing on occasional Crafting purposes and loading the needed resources dynamically. So they are used for crafting and nothing else.
What I meant was something like counting wood for a fetch quest in them and later use them to count fish or killed goblins. I wouldn't recommend that just for the sake of reducing variables in use.
This is where my very limited knowledge hinders me. I don't know how to use arrays, or even what they are. I try to research things before asking anything as I don't like to waste time posting the same question that's been asked a thousand times lol I also don't want to look really incompetent that I couldn't figure out or understand basic things
No worries. It's actually nothing the RPG Maker would teach us on it's own. Not sure if there's a clean Tutorial about it. I learned about arrays in variables in this forum between the lines, and it was eye opening. I think
@AquaEcho was talking about it somewhere.
I can give you a few examples how I use arrays in my game. But I'm not the best to explain the scripting, as I just figured out the situations I needed in particular. But others with more coding experience will help with specific questions, I'm sure.
Basically, an Array is a set of information, like:
[1, 5, 14, 17]
or
["Apple", "Herbs", "Potion"]
or
["Apple",2,"Herbs",10] ...
I have an array in a variable that holds all ActorIDs of actors, you have unlocked so far. So I can always use this to check, whichs actors are available for cutscenes, events or other stuff.
I can pick random numbers from the Array for randomized events.
A different array holds stat resistances and weaknesses like:
[1,0,-1,0,0,0,-1,1]
for every character. By script I can tell the game, which position belongs to which element, so it knows "resistant to fire, but weak to ice".
And you can also put text in it to be displayed in textmessages etc. E.g., you have something like:
["Chapter 1", "Chapter 2", "Chapter 3"]
And display these in a menu to click through the given options you want to read about.
You can tell the game by script "if you click right, take the next entry in the array. If you click left, take the previous. If you reach the end of array, go to the start/end and continue."
I could go on, but I hope, this gives a basic impression.