Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: FHZebedee on November 03, 2006, 12:30:41 AM

Title: Strange Money Earning Systems and Other Misc Trouble
Post by: FHZebedee on November 03, 2006, 12:30:41 AM
I'm not a big fan of the "Kill things and get their money." RPG earnings system. In one of my games, I made the only ways to make money by doing minigame jobs or by selling items that you find. That worked fairly well, although it was slightly easy to break once you got good at the games.

This new game, I want to try a system where the character has investments and gains money over time. However, instead of just setting a timer to increase a variable (too easy to abuse), I want to make it so that the player gains a certain ammount in a variable after every battle. (The ammount the variable increases dependant on the battle.) This is EASY with plot battles, but I don't know how to work it with random battles.

The player then can cash in the stockpiled variable for money by talking with an allied NPC, and later on gets a spell to do so remotely. I've got that all taken care of. Now I just need to know some way to do this with random battles.
Title:
Post by: Raen Ryong on November 03, 2006, 06:17:13 AM
Ah, this is very similar to my Bank system whereby you generate interest after each battle;

At the very beginning of your game, set a Variable to 1;

Set Variable [0002:Victories +1], Set 1

Now, in a common event (set to Parallel Process);

Set Variable [0001:Victories], Set Number of Victories
Fork Optn: Var[0001:Victories], Var[0002:Victories +1], IS SAME
(Ie when Victories = Victories +1)
~~
:Set Variable [0004:Bank Modifier], as [0003:Bank Amount]
(Removing it so we can play around with the variable)
Set Variable [0004:Bank Modifier], /100 (Turn it into 1%)
Set Variable [0004:Bank Modifier], * [0005:Bank Interest]   (Where Bank Interest is your % interest)
~~
Set Variable [0003:Bank Amount], + [0005:Bank Interest]
(Adding your newly calculated interest to the original amount)
Set Variable [0005:Bank Interest], 0 (so if you don't set an interest added number in the monster groups tab, the game assumes you won't add any interest)
Set Variable [0002:Victories +1], +1 (So it doesn't loop)

End :)

Now, if you want a different amount per battle, just go into Monster Groups and in every battle;

Set Variable [0005:Bank Interest], {Desired amount}

Adjustments you could make;

1

It's set to Victories at the moment so one can only generate interest after a successful battle, ie they can't go into battle and then flee.

If you want to change this, simply change it to Number of Battles.

2

If you're not interested in a percentage added, you can ignore all of the coding between the "~~"s and replace Variable number 5 for the number you want to add.

3

If you want 0.1% interest or that instead of 1%, just divide by 1000 instead of 100, remembering that 1 = 0.1% instead of 1%.

This way will work for ALL battles, as long as you remember to add in the Monster Group tabs, meaning that you don't have to do anything different for preset battles.

Hope this helps :D

Incidentally, this kind of coding with the Victories +1 or whatever is how you make things occur after every battle with two simple Variables.
Title:
Post by: thepsynergist on November 09, 2006, 03:47:05 PM
What I did for my rpg maker game was to make it so that monsters don't produce any gold after battle.  They rather have items that they drop and can only be sold to get money.  I thought it was realistic, like you kill a bear, and sell it's hide.
Title:
Post by: plightofthepureblood on November 09, 2006, 03:54:18 PM
Ive got a script for my XP....its a bank script with Intrest.

And an Option to buy Savings bonds, that grow in intrest depending on how old the bond is, according to the game clock.
Title: Thank you!
Post by: FHZebedee on November 14, 2006, 06:09:52 AM
Thanks for the help. I've done the carried item system in an earlier (aborted) project, and it worked fairly well. Hopefully, with any luck, and a l'il tweaking, that code there should work just fine. Many thanks!