Comment Event Achievement idea

I was playing with an idea in Common Events. For example, I was going to have it if the player has read 50 bookcases a Common Event set to Parallel would display a message that the player has read 50 books, give them an reward and then end the event.

But with Parallel the message loops. So I added a +1 to the variable so when the Condition equals 50 it would stop. But then it wouldn't keep accurate track of how many books player has read.

Is there any way around this? I wanted little rewards like this.
Depending on how your really implementing it, if you make each bookshelf event 2 pages, and on the first page let the player read the book, if he does increase the variable, and set a self flag in the event. Have a second page on the event that is basically the same, but doesn't increase the variable or change any self flags, and make that page need the self flag turned on. so this way your bookcases each only give their books read count one time. in the common event that's keeping track of things, have it look for a second variable beyond just the books read one. when you reach fifty books read, it does its thing and then adds 1 to a second variable name that however you want to so you know what its keeping track of. For your first 50 books achievement event to play it should need both the books read to be 50, and the second variable to be 0. When it runs it adds one to that second variable. Since it needed it to be at 0, it will no longer repeat that achievement. You can then say add a second stage to the achievement for say 100 books read, needing the books read variable to hit 100, and the second variable to be at 1. That way you can increment multiple progressions to this one kind of achievement. Of course you could use this same method for keeping track of other kinds of things. Like, fish caught, potions used, slimes squished. etc etc.
Hope this helps. 😀
Yeah, I've actually thought of that but was hoping there was an easier away around it. I would have to make more variables for each check for fish caught, potions used, etc

Thank you!
Yea, unfortunately there isn't really a one click way around it, you have to really keep track of things yourself and set aside a bunch of variables for it all. @_@ the joys of rpgmaker.
It might be worth considering not setting the common event to parallel as it will run the checks a stupid amount of times. It would probably be better if you just have it set to no trigger and then call the common event just after you increase the variable for books read, this way it will only run once when it is needed rather than running all the time and contributing to lag.

A small time saving step would be to just have the increase variable inside the common event as well, that would save you having to add the command to every bookcase event.
^---Exactly Silva's answer.
@Silva Good points but how would you make that event only increase the variable the FIRST time you read the book, and not every time you read the book?
@Isaac The Red exactly as you described it. Two event pages per bookcase

page 1 (Condition - none): do book stuff, call common event, turn on self switch A
page 2 (Condition - self switch A): do book stuff
If you take off the parallel the event no longer works. =/
@evmaster you will need to call the common event within your bookcase event. The event command is on page 1 under 'Flow Control'.

Spoiler
upload_2019-3-1_19-31-8.png
@Silva OMG... my brain... I totally overlooked that being the thing. Why am I dumb for no reason at unpredictable times.
Yeah but I don't want to call common event just for one event. If there are bookcases throughout the game it would be easier if I did the Parallel?
Yeah but I don't want to call common event just for one event. If there are bookcases throughout the game it would be easier if I did the Parallel?
You call the common event on page 1 of each book case event. That way the achievement event only runs when you read a new bookcase, it wont visibly do anything until say someone reads their 50th bookcase and the variable reaches fifty then the event can do whatever it is you want it to, show message, flash screen etc etc. Just this way it would be run only when it would make sense to run it, rather than always running in the background taking up processor time when it doesn't need to.
This way is also saving a line of eventing each time. Since you wouldn't need to much with the variable in each event, only tell it to run the common event, and change its own self switch.
each bookcase would have its two pages, both being essentially the same. with the first page just calling the common event and turning the self switch on. and the second page just doing the book stuff, but needing the self switch to be on.
It would certainly be easier, but it's generally a bad idea to have unnecessary parallels running all the time as they contribute to lag.

You would only need to set up one book case that works with this method, then after that you can copy and paste it wherever you want more book cases. You could then change the image, or the books text if the player was to read it to something different if you wanted a bit of variety.

The choice is ultimately yours. It's your game after all. 🙂
So I have one common event that checks for multiple achievements. So instead of parallel I just insert the command "Call common event" at the at each event I want and the event will check the common events conditions and play out?
You don't even need 2 event pages per bookcase.

Just one page, like this:
Code:
Text: (for reading the book)
If Self Switch A is OFF
  Call Common Event
  Control Self Switch A = ON
End

and your common event:
Code:
Control Variables # Books Read += 1
If Books Read = 50
  Show Achievement
End

You can use self switches just as conditions - you don't HAVE to have an event page for each one.

So it'll only call the common event once per book, and you don't need two event pages. And the common event increases the variable ('cause you wouldn't want 100 books in your game world then discover you'd used a variable that's already being used for something else, and have to go through and find and change them all). And it doesn't matter that the common event is going to continue being called after you've read 50 books - it'll still increase the variable but you won't get a message. In fact, you could give an achievement for 50, then 100, then 500, just by adding extra checks.
Multiple reading achievements, yes. If it's for something like fishing as mentioned previously you'd need another common event. Just to give you a visual aid of what I'm describing:

Spoiler: Common Event
upload_2019-3-1_22-53-5.png
Spoiler: Bookcase Event Page 1
upload_2019-3-1_22-44-18.png
Spoiler: Bookcase Event Page 2
upload_2019-3-1_22-44-42.png

EDIT: Accidentally posted event page 2 twice, my bad. Shaz is also correct in saying that you don't necessarily need 2 event pages.
That idea of different text showing based on whether you read the book or not is good. You can still do it on a single page, by adding an Else branch, and putting the text inside the true/false blocks.

Original thread: https://forums.rpgmakerweb.com/threads/comment-event-achievement-idea.106260/