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.
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.
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.
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.