Curiosity, Possibility creating...

I'm curious if it's possible to create a feature that Fable has, not sure if there is anyone here has played Fable but I'd like to do the whole buying a place and renting it to earn gold, which then to collect the gold you have to return to the place you are "renting" and retrieve it.

So how would I setup something like that? Is there something already like this?

I could use some ideas and genius minds to conjure something like this!


Edit: Can someone link me to a good stepping script or is there a better way to go about it without a script?
I haven't played Fable but I think you can do what you want with eventing, create an event where the player buys the place. Then have a common event that adds gold to a variable with however you want to add money (time, steps, other). Then finally another event where you need to collect the money that adds X (whatever variable you stored the gold amount in) gold to the player and then resets the variable to 0.
@PhxFire
Okay, so each town I'll only make two building buy-able and rentable so I am not using a ton of events.
I like the steps idea which def. would work since I really don't have time set into my game, and not really sure if I want too. ha ha
Can someone link me to a good stepping script or is there a better way to go about it without a script?
You can use the timing system tutorial in my link for this purpose. It shows how to use time in a smart way, and it also explains how to handle multiple timed events. All that without having to use a parallel process event for each house (timed event).

EDIT
@RouletteBunnie
The tutorial is meant to teach the theory behind efficient timing. It does not cover all the possible algorithms to handle that, but everything mentioned there is explained with screenshots and a lot of details (I recommend reading it carefully). I used different examples, but the theory behind it is the same: just increase a variable when the player is supposed to earn the money (basic variable handling).

Of course, it is not the only way to achieve this, there are definitely other ways to it, but not only is this one efficient, it also keeps track of the current value of the rental if you decide to increase it before picking up the money.I

If you have troubles understanding it, feel free to ask for help there.
Double-post notice: @RouletteBunnie
If you have something to add just a few hours later, I recommend Editing your post to add the new thoughts in.
Double-post notice: @RouletteBunnie
If you have something to add just a few hours later, I recommend Editing your post to add the new thoughts in.

Sorry, didn't think it was a bad thing since it's the same post, i'll make sure I edit next time.
I wouldn't even worry about a common event. You know exactly when you can collect gold - when you return to the house - so just use variables to see how many steps have been made since the last time you did that.

When you rent the house out, set a variable to the number of steps, or the game time, or whatever you want to base your gold earned on. This variable is unique to the house - if you have two houses, you'll have two variables with different values. Do not use these variables for anything else.
When you return to the house, set a new variable to the number of steps, or the game time, etc. This variable is set-and-use which means it doesn't need to be retained between visits, so if you have two houses, you can use the same variable.
Then subtract the original variable from the new one, and calculate how much gold is earned. This can be the same variable as the one above.
Finally, reset the original variable to the current number of steps, or the game time, so you've got it ready for next time you come back.

The only time you'd want a common event that's running all the time is if you want to get your gold at set increments, rather than when you go back.


Example:

When you rent out house 1:
Control Variables [15 - House 1 Steps] = Game Data > Other > Steps

When you rent out house 2:
Control Variables [16 - House 2 Steps] = Game Data > Other > Steps

When you return to house 1 to collect rent:
Control Variables [17 - Reusable Variable] = Game Data > Other > Steps
Control Variables [17 - Reusable Variable] -= Variable [15 - House 1 Steps] (gives how many steps have been taken since you last rented or collected rent on house 1
Control Variables [17 - Reusable Variable] *= 2 (an example of what you might do if you were to earn 2 gold for every step)
Change Gold += Variable [17 - Reusable Variable]
Text: You received \v[17] gold for rent
Control Variables [15 - House 1 Steps] = Game Data > Other > Steps (to reset the original variable)

When you reutrn to house 2 to collect rent:
Control Variables [17 - Reusable Variable] = Game Data > Other > Steps
Control Variables [17 - Reusable Variable] -= Variable [16 - House 2 Steps] (gives how many steps have been taken since you last rented or collected rent on house 2
Control Variables [17 - Reusable Variable] *= 2 (an example of what you might do if you were to earn 2 gold for every step)
Change Gold += Variable [17 - Reusable Variable]
Text: You received \v[17] gold for rent
Control Variables [15 - House 2 Steps] = Game Data > Other > Steps (to reset the original variable)

All of these events are regular map events with Action Button trigger. The commands above may not be the only commands in the events (you probably have the first ones on an NPC who you're buying the house from, or renting it to).
@RouletteBunnie the solution that Shaz provided is one of those I was referring to when I said that there are other good solutions. I recommend going for it if you are planning to have a fixed value for your house. However, if you plan on letting the player be able to modify the house and gain more even without collecting the rental, you need to go for something more complex. If that is not your case, I would recommend the solution that Shaz provided, no matter what, it is very efficient and it does not slow down the game at all.

EDIT: Of course, if you want an event to change its graphic to show that the player can collect the rental, that method is not going to work very well. In the end, everything comes down to what you actually need from your events.

Original thread: https://forums.rpgmakerweb.com/threads/curiosity-possibility-creating.112080/