Changing events' sprites based on variables...uh, I can explain better in the topic itself

First off, I spent a few minutes before even getting this far, making sure I was in the right place. I'm 99.01% sure this is the right forum, so hopefully I don't get made fun of or embarrass myself here. By the way, this is a question for RPG Maker VX Ace/Ruby, specifically.

Let's get down to business. I like to make my own little RPG battle systems with RPG Maker and that usually involves doing some weird things that are, sometimes, difficult to explain. It also poses a lot of difficult problems randomly that I didn't see coming before. Right now, one of the obstacles I face is one of those "I can do this within the engine itself but it requires hours upon hours of annoying busywork" and I'm curious if there's a way to alleviate some of this tedium via scripting. BASICALLY, it's like this: variables 1-1000 are assigned to the "active player," or the player whose turn it is currently. The active player's variables are loaded, with a script, from players 1-50, whose variables are 1001-2000 (player 1) all the way to 49,001 - 50,000 (player 50). (*Note: I've used the limit breaker thing to get more variables/switches) Now, in all honesty, I've only actually programmed in up to player 15--the rest aren't really coded in but the OPTION is there, should I want it. This was a mistake I made in my older RPG battle systems; I would kind of "hard code" a maximum amount of players/enemies, usually a pretty small and arbitrary number, and since this is like, my "big" project, I wanted everything to be bigger and better and more flexible. Oh, and also, THIS time around, players and enemies are the exact same--no more separate Player/Enemy variables or code; everyone uses the same stuff.

ANYWAY, sorry, that part isn't super important but it was necessary to explain this next one: SO, of those 1000 variables per player, one of the variables is that player's "sprite ID" value. Based on this number, their corresponding event on the map (PLAYER 1, PLAYER 2, etc.) will be assigned a different sprite graphic. This is all very simple and easy to do and in fact, I've already done this for the 15 players I do have programmed in, and each one has the same 13 different sprites, based on the sprite ID. This means I had to go through each player with a long conditional branch (which I've included a picture of to kind of better illustrate my point), and ANY time I want to make changes to one of the 13 sprites, I have to change EVERY SINGLE INSTANCE of it for all 15 (or more) players.

USV9kdm.jpg


Basically, what I want to know is if, through scripting, is it possible to make this job at least a little easier? If so, how? I know scripting is powerful but I'm sure it has its limits, too. And honestly, I know very little of Ruby or any scripting language, despite a few attempts to learn it myself. It just doesn't click with me for whatever reason. However, if someone could point me in the right direction for this particular problem, I think I'd be motivated enough to actually try hard enough to figure it out. Er, well, I think, anyway. But either way, I'm not asking for someone to just do it for me; I won't learn anything like that. I've had issues like this in the past that people have just wrote something up real fast and gave it to me, which fixed the problem, and I'm eternally grateful--but the thing is...inevitably, I'll just end up right back here, again, with a new problem. I'd like to be able to figure this stuff out on my own, but every time I look into Ruby, it never sticks with me because I never learn anything that I can actually use for RPGMVXA. And when I try to USE stuff I've learned in VX Ace, it doesn't work. Like the simplest command, print or something--it just doesn't work. I don't understand.

Anywho, any replies of any kind would be appreciated, even if it's to tell me I did, in fact, post this in the wrong forum. My apologies, if so. I swear I tried to make sure it was in the right place. Also, I am sorry for the wall of text and/or confusing, weird way of typing. I'm actually a lot more normal than this, but whenever I post on these RPG Maker websites I just turn into, well, a dork, I don't know why. It's just how I am.
Scripting this will ABSOLUTELY be easier than a billion conditional branches. So how do you get started? Well, first it helps to understand and be able to read Ruby code (the basis for RGSS3). There are lots of great resources out there to help you do this. Here's a few:


https://www.codecademy.com/learn/ruby

https://learnrubythehardway.org/book/

http://ruby-doc.com/docs/ProgrammingRuby/

The first two offer step by step instruction while the last one is a good reference book. Now there's a LOT to learn and it can be overwhelming. I was at first. So just do a couple of lessons, and then try messing around using this site:

https://repl.it/

You can select ruby and just mess around with the code. Once you feel like you can write small functions. Try reading some of the code in the Script Editor. Just see if you can understand some (not all) of what it's doing. Now all that's left is to get a bigger/better understanding of what RGSS3 is doing. For that, I recommend the Learning Ruby forum and Trihan's guide:

https://forums.rpgmakerweb.com/inde...troductory-guide-to-rgss-for-beginners.38900/

The last thing I'll leave you with it this. From the time I started learning Ruby until I finished my first 'real' script was about 4 months. So don't get discouraged if progress seems slow or you feel like you're not 'getting it'. It takes time to learn, but the results are definitely worth it! Good luck!
Scripting this will ABSOLUTELY be easier than a billion conditional branches. So how do you get started? Well, first it helps to understand and be able to read Ruby code (the basis for RGSS3). There are lots of great resources out there to help you do this. Here's a few:


https://www.codecademy.com/learn/ruby

https://learnrubythehardway.org/book/

http://ruby-doc.com/docs/ProgrammingRuby/

The first two offer step by step instruction while the last one is a good reference book. Now there's a LOT to learn and it can be overwhelming. I was at first. So just do a couple of lessons, and then try messing around using this site:

https://repl.it/

You can select ruby and just mess around with the code. Once you feel like you can write small functions. Try reading some of the code in the Script Editor. Just see if you can understand some (not all) of what it's doing. Now all that's left is to get a bigger/better understanding of what RGSS3 is doing. For that, I recommend the Learning Ruby forum and Trihan's guide:

https://forums.rpgmakerweb.com/inde...troductory-guide-to-rgss-for-beginners.38900/

The last thing I'll leave you with it this. From the time I started learning Ruby until I finished my first 'real' script was about 4 months. So don't get discouraged if progress seems slow or you feel like you're not 'getting it'. It takes time to learn, but the results are definitely worth it! Good luck!

Thank you so much for taking the time to reply and offering your input. The problem is, though, I've already messed with Code Academy quite extensively. I think I've finished the Ruby course twice, but at least once, though this was at least a year or two ago and it might have changed since then. Like I mentioned in my OP, nothing at all stuck because it wasn't anything I was looking for at the time.

For instance, right now I need to know what functions/script calls/commands/whatever would point me in the right direction for assigning graphics to map events, based on variables that go up by 1,000 at a time. I sincerely doubt I will find anything of the sort at Code Academy, though I'm not ruling out the possibility entirely; I'm just not big on wasting my time like that again.

What I want to know is a handful of commands that will help me, and I think I can figure out the rest myself. I've tried googling stuff like this for the obstacles I've had in the past, and that never works, either. Again, though, I'm not asking for someone to do it for me, I just want someone who KNOWS how to do what I'm talking about to give me a good starting point, and I can look up the rest as I go along. I have no idea where to even begin, you see, and spending hours on Code Academy learning nothing beneficial doesn't really seem like a good idea, since I've already done that before.

I will check out the other stuff you mentioned, though. But don't get me wrong, I'm not discrediting Code Academy at all. I think it's a great tool, just not for RPG Maker VX Ace users, as the stuff they teach on Ruby doesn't even seem to work in RPGMVXA, anyway. I've never figured out why.
Code Academy is strictly for learning Ruby, and it's not the only place to do that - just a popular one. The forum post I linked above has info specific to RMVXA. If you already feel comfortable with Ruby then I'd start there.

Original thread: https://forums.rpgmakerweb.com/threads/changing-events-sprites-based-on-variables-uh-i-can-explain-better-in-the-topic-itself.79103/