Hello!
I'm currently making a game where I need a lot of events, and a lot of self switches. (Maybe up to 10-20) Is there any way I can do this? I could have made two-three events extra, and hidden them outside the map, but it would be better if there's a script letting me have more selv switches.
More self switches?
● ARCHIVED · READ-ONLY
-
-
-
there are some scripts that do this. Sadly you have to use script calls and such to do it though.
ex: http://forums.rpgmakerweb.com/index.php?/topic/965-more-self-switches/
edit: looks like I need to go faster (gotta go fast) -
I would also encourage you to take a look at the events themselves and see if there's maybe a more efficient way to make them. Maybe there are things you could use a global switch or a variable instead of a ton of self-switches. :)
-
What Lunarea said is true.
Variables are quite powerful, but can be intimidating because people teach them improperly.
Allow me to explain variables:
Variables simply store data. In the case of RPG Maker, they store numbers. (Vanilla)
Think of a folder on your desktop that you name. Imagine that folder can only store one file. Imagine that file is a number.
That's exactly what variables are.
You name the variable (like you'd name a folder), then you store a single piece of information in it, in this case a number.
Using the "Control Variable" we can change the number in a variable. For example, we can set the number to whatever we want. Like 2, or 55. (All variables are 0 by default) We can then alter that variable any time using the math functions in the Control Variable box, like add, subtract, divide, etc. So we could count up in the variable. Or, count down.
Imagine an event that counts up every time you use action on it. You can make this easily with the info I just gave you.
The real use comes from the "Conditions" and "Conditional Branch" box, which lets us evaluate the variable to see if it's a specific number or in a certain range.
Imagine that after using action on an event 10 times, something happens. Using (Condition)al Branches you can do this.
A lot of the power of variables is in the "Game Data" part of "Control Variables" which lets us change variables according to the data in the game, like an Actor's HP or ATK attribute.
Imagine that you can only learn a spell from an NPC if your DEF is higher than 70. You can make this.
Since variables are numbers (Vanilla) they can do a lot. Numbers are extremely powerful tools to game developers. This is why variables can do so much.
To replace self switches with variables, imagine A, B, C and D are 1, 2, 3 and 4. Imagine that instead of turning on a switch, we set a variable to 1 if self switch A is on, 2 if self switch B is on, 3 if self switch C is on and 4 if self switch D is on. Now if we want a "Self Switch E" then we just think of that as 5.
This is also good for people who are using switches to go through a linear story in their game. Instead of "Susie finds Key" (1), "Susie opens door" (2), "Susie fights boss" (3), we can make a single variable and just count up every time something happens to progress the story. We just turned 3 switches into 1 variable.
(Vanilla refers to the simplistic way RPG Maker's prompt boxes handle variables simply as numbers. Variables can actually store any data, from words to menu windows and even entire programming constructs. But that is likely to confuse a beginner.) -
Variables are a pain though, if you want to do the same thing in each event and not have it affect other events.
Say you have 5 events and you want each to have 5 states, independent of each other. At the moment you can do it completely with self switches, as each event has the default (no condition) state, and a state for each of 4 self switches. Turning them on or off has no effect at all on any other events on any other maps.
If you were to do the same with variables, you would need 20 to imitate that behaviour - 4 variables for an event, and because you don't want them to affect anything BUT that one event, you'll need each one to have 4 different variables.
PK8's Self Data Suite would be ideal in this situation - probably very similar to the scripts listed above as far as these requirements goes. I also wish you could define a much larger numbers of self switches. Sometimes 4 just isn't enough. -
I agree, there has been several instances where the limitations of self-switches was encumbering. For example the ability to check the self-switch state of an event is only possible through script use.
The limitation of 4 self-switches hasn't necessarily bothered me. Most the time, I can get away with the 4 self-switch limitation. But there has been a few times when I've desired more. In those cases I just suck it up and use variables, which is fine. Sometimes I need to combine both self switches and variables anyways, which gives me powerful options in some of my systems.
I would argue that most people here aren't at the skill level where they actually need more than 4 self-switches anyways. They should be learning more efficient methods first.
Only the more complex events need that kind of boost. It's typically the veterans who require it, and even then it's just for convenience or aesthetic purposes anyways. In those cases it's better to just take up scripting methods. (Which if you're a veteran you should start learning)
But this is definitely out of the scope of the topic. I'm always open for discussion through PM though, including just talking systems and system design. -
You wouldn't need 20 variables, though. You can do it with 5 variables - one per event. Assign a value to each state and a conditional branch or page that checks what the value is and applies the right state (ex. if Variable = 1, set state A, if Variable = 2, set state B ). To remove the state entirely, simply set the variable to 0.Say you have 5 events and you want each to have 5 states, independent of each other. At the moment you can do it completely with self switches, as each event has the default (no condition) state, and a state for each of 4 self switches. Turning them on or off has no effect at all on any other events on any other maps.
If you were to do the same with variables, you would need 20 to imitate that behaviour - 4 variables for an event, and because you don't want them to affect anything BUT that one event, you'll need each one to have 4 different variables.
If the event needs to only activate once per map via player input, it's even simpler - just one variable. Set the value (via choice or however it's set), run the conditional branch, apply state, set variable value back to 0.
I do agree that a few more self-switches would be convenient, but there are definitely ways to get by that limitation by putting variables and global switches into the mix. :) -
Ah yes, of course you can. You'd need 20 if you were trying to do it with switches.
There I go again, posting on the forum before my morning caffeine! lol! -
Been there, done that, Shaz. :guffaw:
And, yea, you would totally need a ton of switches otherwise. Thank goodness there's variables and some self-switches at the very least. Sure makes eventing go smoother. :D