Trying to add a game mechanic

Status
Not open for further replies.

shubcthulhu

Warper
Member
Joined
Jun 5, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I just got RPG Maker VX Ace (and XP) in the humble bundle a few days ago and have been messing around in it trying to make my first game but I am a bit stuck on one of the mechanics I would like to add to it.

The idea is that, as well as killing monsters and saving the world from a great evil, you can also work as a Mailman delivering letters from time to time (optional of course). Now while this is easy enough to do with me planning each and every delivery it is also very time consuming.

What I was looking for was a way to make it random with more possible recipents being added as more areas are discovered.

So it would go.

  • Visit Post Office
  • Get Random amount of Letters for Random People (number of ppl to increase as game goes on)
  • Deliver Letters
  • Return to Post Office to claim money if all letters are delivered / Return to Post Office and get a reminder you still have letters to deliver if you still have some.
Any help would be appreciated.  Oh and I have never done any kind of Scripting before if any is required.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Your basic quest idea is absolutely no problem - but to give them randomly and conditioned to available maps is a more tricky part.


First, you would need one key item "letter" for each possible destination, and each destination adress should have an event that reacts to that specific item, removes it from your inventory and adds +1 to a variable "letter delivered".


For each post office, you'll need an event that activates a switch "delivery active" to prevent additional quests until all letters have been delivered (if you allow for several such quests at the same time, you'll need more variables, more switches and need to be very carefull about your event logic).


If that switch is off and you go to the post office, it decides on the number of letters needed and stores that in one variable, then activates a common event that hands you that umber of random letters.


If the switch is ON, then it compares the variable of delivery needed with the variable of delivery done, and either sends you to continue or gives the rewards and deactivates the switch.


Now the tricky part is the common event giving you the key items "letters".


It needs a counter and loop for the number of deliveries needed, and for each letter randomly selects one of several possible letters.


And the "possibility" of a letter is conditioned on switches for explored areas - those switches would be activated whenever you enter a new map, which means you need a lot of switches for this, and the conditional branches would be very long.


So yes, it is possible - but a lot of work, and you need to prepare for it before making those maps...
 

shubcthulhu

Warper
Member
Joined
Jun 5, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
To be honest I am not really sure what you mean. 

When you say  "you would need one key item "letter" for each possible destination" do you mean one letter for every person that can get one or one letter for every town / area?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
one item type for every person who can get one, or the letters would count at the wrong destination.


There are other ways to do this with a single item for all deliveries, but then you would need more variables to keep track - and with one letter per person you could use the item description for the adress in case the player forgets where to deliver - that also is more difficult if you try to reduce the number of letters...
 

shubcthulhu

Warper
Member
Joined
Jun 5, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Thanks for the help so far.

I can get it to give me a random amount of one item, but I can't seem to figure out how to give me a random amount of different items.

Also would it not work better if the random number of letters generated also added that number to a "Delivery Active" variable? Then every time I deliver a letter it would -1 from it.  The variable itself would activate a switch which would stop me from getting more letters unless it equals 0

On a side note I have decided to make it a bit easier by giving each region it's own Post Office which only delivers letters to (randomly chosen) people in it's designated area.  That way the amount of letters each area has in its inventory is set and does not get more added when new regions are discovered.

Originally it was going to be

Discover Region 1

Region 1 has 5 potential ppl to deliver to

Post Office can hand out up to 1 - 5 random letters

Discover Region 2

Region 2 has 10 ppl

Post office can now hand out 1 - 15 random letters

now it will go

Region 1 Post Office hands out 1 - 5 letters

Region 2 Post Office hands out 1 - 15 letter

You will even be able to get letters from all post offices at the same time, but won't be able to get more from each one until you have completed your deliveries for each region.

Otherwise the conditional branches are going to be very very long
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I can get it to give me a random amount of one item, but I can't seem to figure out how to give me a random amount of different items.
That's why I said you have to use a loop.
Define the variable of how many letters outside the loop.


each time in the loop, reduce the variable by one and give one random letter (you'll need a variable and a lot of conditional branches for this)


check the remaining letter number, if zero exit loop
 

shubcthulhu

Warper
Member
Joined
Jun 5, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Once again thanks. 

I am happy to say that I finally got it sorted and can now implement it in my game.

Now the only problem is stopping people from spamming this mechanic and making a ton of money in a short amount of time.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

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,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top