# Making an income in game? (RPG maker xp)

Status
Not open for further replies.

#### Cremno

##### Villager
I'm not sure this is the right place to post, if not, I'm sorry...

Anyway, I've been thinking of ways to make an income in game. Say you own a building making a set income, how would I go about it...

I've been trying to experiment with timers, making it so you can go collect your money every time it reaches 0, however, this poses several problems, since the timer does all sort of things when reaching 0.

Then I thought of using steps, however the fact that you can't reset the step counter makes this impossible too.

And even if one of the above worked, it would only work for one shop, making each shop have a different system for income.

So! Does anyone know of a good income system? I searched the internet, but I was unable to find a good way of doing so, so any help is appreciated!

Edit: I'm sorry, this post is totally in the wrong section! Can a mod help me move it to XP support?

Last edited by a moderator:

#### Milennin

##### "With a bang and a boom!"
Use a parallel Common Event with a variable timer? Then when the player collects the money it resets the variable.

#### Andar

##### Veteran
count steps up instead of down - checking current steps in a parallel process and flag the income whenever (steps modulo 1000) equals zero (or any number of steps you choose instead of 1000)

#### Cremno

##### Villager
Use a parallel Common Event with a variable timer? Then when the player collects the money it resets the variable.
I'm not too sure of how that would work, since the timer would still be present, would it not? Since, once the timer reaches 0, battle is no longer possible and such? Or am I wrong?

count steps up instead of down - checking current steps in a parallel process and flag the income whenever (steps modulo 1000) equals zero (or any number of steps you choose instead of 1000)
I'm sorry, but how would this work? I can't seem to figure out how this would be done?

#### Milennin

##### "With a bang and a boom!"
I'm not too sure of how that would work, since the timer would still be present, would it not? Since, once the timer reaches 0, battle is no longer possible and such? Or am I wrong?
I don't understand... how would battle not be possible because of a timer?

#### Andar

##### Veteran
I'm sorry, but how would this work? I can't seem to figure out how this would be done?

The modulo operator (that is one of the basic mathematical operations like plus, minus, division, multiplication found under control variable in VX Ace, and it should be similiar for XP) equals zero only on multiples of the second operand. So when counting steps, the operation (steps modulo 1000) gets zero at 1000 steps, 2000 steps, 3000 steps and so on. If you check that there is no need to reset the steps, the income will come every thousand steps.

And you should be able to check that condition in something like a parallel process even in XP (don't own it, therefore I can't show beyond the basics for you).

#### Cremno

##### Villager
I don't understand... how would battle not be possible because of a timer?
When a timer hits zero it will auto exit all battles, and some people have said it does things when in shop too. This makes it hard to deal with :/

The modulo operator (that is one of the basic mathematical operations like plus, minus, division, multiplication found under control variable in VX Ace, and it should be similiar for XP) equals zero only on multiples of the second operand. So when counting steps, the operation (steps modulo 1000) gets zero at 1000 steps, 2000 steps, 3000 steps and so on. If you check that there is no need to reset the steps, the income will come every thousand steps.

And you should be able to check that condition in something like a parallel process even in XP (don't own it, therefore I can't show beyond the basics for you).
So if I use the MOD it will automatically add the income for every 1000 steps? But then comes the question, would that not need a constant event to run in the background? Should I then have to place an event activating it in all maps? A call common event?

#### Milennin

##### "With a bang and a boom!"
When a timer hits zero it will auto exit all battles, and some people have said it does things when in shop too. This makes it hard to deal with :/
Oh, never used XP, so wouldn't know. Although a variable timer is quite different from the regular timer.

#### Cremno

##### Villager
Oh, never used XP, so wouldn't know. Although a variable timer is quite different from the regular timer.
Don't you need a normal timer to make a variable timer function? The variable will simply follow the timer?

#### Tsukihime

##### Veteran
would that not need a constant event to run in the background
Parallel common event runs on all maps.

Your income would not increase during battle, or in any other scene, but there are probably ways to get around that.

I don't know what kind of scripts they have in XP.

Last edited by a moderator:

#### Milennin

##### "With a bang and a boom!"
Don't you need a normal timer to make a variable timer function? The variable will simply follow the timer?
Parallel common event that does:

-Increase or decrease variable by 1.

-Wait command set to 1 second.

#### Shaz

##### Global Moderators
Edit: I'm sorry, this post is totally in the wrong section! Can a mod help me move it to XP support?
done.

#### Cremno

##### Villager
Parallel common event that does:

-Increase or decrease variable by 1.

-Wait command set to 1 second.
Ah, I see! I'll use this! Thanks!

#### Shaz

##### Global Moderators

Status
Not open for further replies.

### Latest Profile Posts

"This is the real secret to life - To be completely engaged with what you are doing in the here and now. And instead of calling it work, realize it is play."
Me: "I don't to use other engines because I'd have to do a lot of coding."

Also my desktop right now....

...I literally spend more time using VS Code than MZ.
actually, are there any JRPG type games (I guess turn based, so not ARPGs like say, Vagrant Story) where you have only one party member for the majority of the game? (I wonder if I'm forgetting something obvious.)
*sigh* This one turned out really well... except for the left arm pose...

Yes I purposely cutout the arm cause from the pic
A month into making my life/dating sim game and I've finally finished making all of the love interests I still have to make most of their emotion range and overworld sprites but aye I'm proud of myself.