[SOLVED]Help with viarables, random mimic fights when checking chests

Started by GatsRoller, November 21, 2016, 05:38:54 pm

Previous topic - Next topic

GatsRoller

Hi everyone!


Seems that besides being a newbie with RPGMaker also Im not very good with logic....sigh, but hard work can overcome the lack of talent lol, so Im never going to drop my plan of  making my first game.

So this is what happens:

For the sake of making a good dungeon crawler, with replay factor, wanted to have a constant mechanic in which events are randomized througout the area, so you can never tell what events might be triggered when you check them.

I will use the actual example Im trying to master, Imagine a room with 5 chests, from those I want always to have  3 with an item drop and 2 to trigger a mimic fight! a classic right.

But the most my brain was able to process was to have a random variable from 1 to 5, and if equal or less than 2 then trigger fight, otherwise drop item. But what it does is grant like a 40% chance to find a mimic EVERY time I check any of the 5 chests, while as I just would like to have the chance for the mimic to occur up to two times once all the 5 chests were checked.

Do I explain myself?

Also someone tried to explain this to me, using an example of 10 chests with 3 hidden keys, and even if the person seemed to understand variables a lot better, It wasn't quite right either.
Spoiler: ShowHide


Then someone else tried to explain this to me:

QuoteThere is atypo in the first picture - the second and third control variables both use variable for chest2, the third one of course has to be for chest3

Additionally, the commands in the second picture would result in several times "show text there is no key" if none of the variables are chest 4, so better place the second conditional branch inside the else branch of the first and remove the show text from there. Then place the third condition in the else-branch of the second condition and also remove the show text from there.
Keep the show text only in the last else branch.


So yes when I tried the event myself the result was just a loop of both events, it was getting there but broken after all, and I just couldnt understand the second explanation, Im too embarassed to ask again on that forum, for real  :facepalm:, so maybe you guys have a better way to set the  5 chests with 2 hidden mimics  example?  :^_^\':

KK20

Here's the easy way to do it.

Make 3 events that give an item (let's say these are Event IDs 1,2,3) and 2 events that are your mimic battles (IDs 4,5).
Make a parallel process event that does the following:
- Control Variables: Choose a random number between 0 to 3 -> variable ID 1
- Conditional Branches: If variable ID 1 is equal to 1, then swap event ID 4 with ID 1 using Set Event Location. If variable ID 1 is equal to 2, then swap event ID 4 with ID 2. If variable ID 1 is equal to 3, then swap event ID 4 with ID 3.
- Repeat the above two event commands, but swap using event ID 5 instead of 4.
- Turn on self switch A, make a page 2 requiring this self switch to be on, and just make it an empty event with trigger Action Button (thereby disabling the parallel process from running more than once)





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

GatsRoller

Hey KK20!


Ok I tried to follow your instructions but when I test it the events arent even there....

So far I have 5 chests on the map, 3 will trigger items, 2 will trigger mimic.

Now when you say make a parallel event with the variable check, were am I goint to paste this event? one on every chest, or just one page on common events?

Then for the actual content of the event I understood this:

Spoiler: ShowHide


Perhaps you might have some visual aids so I can follow steps a bit easier?

your "set event location" method is a lot better than the other example I had...

KK20

The picture is exactly correct (you can remove the 'else' in the conditional branches by unticking the check box 'set handling when conditions do not apply'). That should only be placed in the parallel process event. This event can just be a blank map event (so event ID 6). Don't make it a common event.

Also, if your chest events aren't showing, you must have a page condition enabled for them. Go ahead and disable those.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

GatsRoller

 :D :D :D :D

Finally got it I'm so glad!

Will remember to put to use the "set event location command" with variables to keep some scenarios replayable with random events.

You rule KK, hope many can find this useful.

thanks!