Some help with Self Switches?

Hey everyone, I was just wondering if someone would be able to help me out with an issue I've been having

with Self Switches? Basically, I need more than the four that are available by default. And yes, I have looked at the

scripts increasing the number (I have actually implemented the Self Data Suite), however they still don't function like

the default self switches. I need a way (if one exists, which hopefully it does) to have more than the self switches A-D, 

which can be used as preliminary conditions for event pages (as in, unless self switch 'B' is on, Event page 4 won't function).

I need a way (again, if possible) of increasing those self switches, would anyone be able to point me in the right direction?

Thanks for any help in advance,

Regards,

David Bergström
So just to be clear, using variables as the condition on your event pages is out of the question?
Yes, sadly, because the event is liable to be duplicated on run time, and thus (sadly) global variables, and switches won't work.
you can't add self-switches with full functionality as you can't change the editor - PK8's self data suite is the maximum possible in that direction, and you're already using that if I read your description correct.

you have to find a way around that and use something other than self-switches for that. Because you don't tell what you're doing or what logic you're trying to implement, I can't give you specific advice - but a general one:

Go looking through Tsukihime's blog, she wrote several scripts for handling events with additional options. IIRC there was one event wrapper that allows you to program eventy dynamically while the game plays, other scripts that add more conditions or triggers by comments in the event and more.

If you don't find anything on her block, please post a description on what you want to do here, perhaps we'll find a way to rework your intended logic structure to need less self-switches.
Ah, thanks for that Andar, I was afraid of that. Here's what I intended to do;

I have 'crop' events that mirror farm crops, so when a crop is planted, it spawns a crop event in front of the player. The first page of the event sets up a number of self variables (such as the crops age, and the current date), and then switches self switch 'A' on. This graphic is a dry soil crop. When self switch 'A' is on, it changes to a new event page, in which when the player then interacts with the event, they are given the option to water it. If chosen, this (in theory) should set self switch B 'on' (and 'A' off) , thus advancing the event to another page where the graphic is a watered crop, and at the end of the day, it sets self switch C 'On' (and 'B' off), thus moving to yet another page, wherin the crop has grown, but is dry again. Again, the player is given the option to water it, which, if chosen, sets self switch 'D' on, (and 'C' off), changing the even page to one with the 'watered' plant, which at the end of the day (this is where I need the extra self switches), set's self switch 'E' on (and 'D' off), thus taking the crop to the next growth stage (which would be the completed crop ready for harvesting).
it's a bit more work, but you can do several water-cycles on a single event page:

Make a sprite where the different growth stages are different directions of the sprite - since you have four directions, you can combine up to four "stages" into a single event page. Make sure that the sprite on that page is direction-fixed.

Upon action button, have a conditional branch check the current stage from the self-variable you're already using, redirecting the event code to four different branches depending on that status

In each status, you check the condition for the current status and what the player should do to get to the next status. If that is done, simply use a move route command to turn the sprite, and change the self variable accordingly.

OK, the above only works if all stages are triggered by player action - to implement timers you need a second event page.

A timer-controlled change would probably go into an parallel process checking the timers. But again, you can combine up to four timed stages on a single event page by checking the self-variables and turning the event sprite instead of switching to a different page.

If you want to alternate between timed and player-controlled changes, you need two self-switches to change the event page between those two pages at the same moment you change the self-variable (after the self-variable of course).

That way, two self-switches and one self-variable from PK8's scripts are enough to change between 8 crop stages (four timed, four player action).

If you want more then you can even add more pages by the other two self-switches, but you have to sort the stages in a way that each page contains only crop stages that require the same trigger.
Ah, that would dodge around it somewhat, yeah. The only problem with that is that originally, I had a similar system whereby if the crop was watered  (a self_switch "watered" was on), the graphic would change. I found, however, that a problem would arise, as due to the event being imported from another map, rather than changing the sprite of the correct event, it would change the graphic of the sprite on the current map that had the same event ID.

For example, my farm cro was on Map 5, and was event 4. When imported to Map 1, rather than  changing it;'s own graphic to the watered crop, it changed Map 1, Event 4's graphic to the watered crop.

Is there a way to get around this at all?

But thankyou so much for all your help, I'll have a fiddle with what you have said and hope it works out! 😀
How did you import that?

It sounds as if you copied the data over the existing events, but you need to add it with a new ID to the list.

This is possible, but I don't know the exact code at the moment...
I used an 'event call' script (it wasn't Yanfly's), but I got it a while ago, and was stupid enough not to get the source!
I used an 'event call' script (it wasn't Yanfly's), but I got it a while ago, and was stupid enough not to get the source!
Google for a snippet of the code - if that snippet is specific (and not basic commands) and goes over 3-4 lines, then you should be able to find the original site of that script.
Ah! It worked

It's made by Fomar0153, the link is here
http://www.rpgmakervxace.net/topic/786-copy-events/  😀
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/some-help-with-self-switches.18600/