How can I efficiently check for completion of long term goals?

celebrus

Veteran
Veteran
Joined
May 2, 2012
Messages
233
Reaction score
2
First Language
English
Primarily Uses
When the player achieves certain goals, I add items to his inventory. What is the most efficient way to check completion of goals that could be completed at any time? Here are some examples:

Specified character reaches level 25

Specified character learns 10th spell

Equip a specified character with a specified armor type

Collect every item within a specified armor type

Encounter each type of monster (in conjunction with modernalg's bestiary script)

Should I have a common event checking these conditions 100% of the time? Seems bleck.
 

Lustermx

Veteran
Veteran
Joined
Mar 17, 2012
Messages
252
Reaction score
147
Primarily Uses
Well, I would use common events. I have them running all the time with no problem.

That's half the reason why they're here anyway...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Just be careful you don't have too many running at the same time - the more you have, the more it'll affect performance.


Achievements are tough - I WAS going to add them to my current game, but I just don't have the time, and yes, they're going to be tough to implement. I had planned to actually modify the scripts so every time something was done that contributed to a goal, it'd call a special method of a new class to update the progress. But it means I'd have to put "fingers" all over the scripts, wherever anything changes that affects any of the goals. So very intrusive (maybe not if I kept it all as an additional script, but I prefer to have my scripts merged so I'm not aliasing all over the place).
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Hmm, depending on how your characters are meant to move about, I would say, have a certain place they return to frequently. Set up an NPC or a type of event where the player can talk to said person, or sleep or something, and if conditions are met upon talking to person/sleeping, provide the rewards.

For my game, a sort of sandbox style rpg/fighter, I have characters sleep to move events along. After certain parts of the story, they can sleep. But I also set up an event on the map where, if certain conditions are met, they earn certain skills and are given permanent stat increases. As well as special skills as bonus.

I would think most games would have places that players must pass through every so often.

I have two events.

The first event is just setting my variables for the characters level. Second event checks to see if variable has been increased by that characters level:

So, if variable Gabriel is 10 then variable is 10. Then the event plays if that condition is met upon player choosing to sleep. Like that.
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
When the player achieves certain goals, I add items to his inventory. What is the most efficient way to check completion of goals that could be completed at any time? Here are some examples:

Specified character reaches level 25

Specified character learns 10th spell

Equip a specified character with a specified armor type

Collect every item within a specified armor type

Encounter each type of monster (in conjunction with modernalg's bestiary script)

Should I have a common event checking these conditions 100% of the time? Seems bleck.
Similar to what CWells said, if you don't want to use a common event for this I would just set up a hub specifically designated for the purpose and do your conditional checks there.
 

celebrus

Veteran
Veteran
Joined
May 2, 2012
Messages
233
Reaction score
2
First Language
English
Primarily Uses
Thanks for the replies. I have a strong preference to show the goals have been completed at the exact moment they're accomplished. Common events do work, so maybe I'm being to fussy. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top