Chaos Project

RPG Maker => Event Systems => Event System Database => Topic started by: Rymdpotatis on July 19, 2008, 05:40:00 pm

Title: [RESOLVED] Enemies drop moneybags?
Post by: Rymdpotatis on July 19, 2008, 05:40:00 pm
Is it possible to make enemies drop moneybags that when you pick them up you get cash?
Title: Re: Tons of add ons - Enemies drop moneybags?
Post by: Phasedscar on July 19, 2008, 05:58:06 pm
One way you can do it is have a dummy item called Money Bag that has a chance to drop with Multi-Drop from tons.  Then have a parallel event running that says:

Conditional Branch: Inventory: Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 1-10
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Money Bag
>Wait 0.1 frames
Else
>Wait 0.1 frames
End

This should give you gold equal to anywhere from your character's level to ten times of his level.  You can change the modifier easy if you want.  This is just a basic idea.  You could have things that look like this...

Conditional Branch: Inventory: Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 1-10
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Money Bag
>Wait 0.1 frames
End
Conditional Branch: Inventory: Big Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 10-50
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Big Money Bag
>Wait 0.1 frames
End
Conditional Branch: Inventory: Massive Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 50-100
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Massive Money Bag
>Wait 0.1 frames
End
Wait 0.1 frames
Title: Re: Tons of add ons - Enemies drop moneybags?
Post by: Rymdpotatis on July 20, 2008, 05:37:22 am
A million thanks! It works perfectly. And so easy to understand too! =D
Title: Re: Tons of add ons - Enemies drop moneybags?
Post by: Phasedscar on July 20, 2008, 07:20:24 am
one of the neat things about that kind of set up is it scales well with the progression of your game since it's based off of character level.  And it's simple to program.
Title: Re: Tons of add ons - Enemies drop moneybags?
Post by: Blizzard on July 21, 2008, 08:07:24 am
Not only that, this should work without Multi-Drop as well and with Blizz-ABS, too, even though in Blizz-ABS you can activate the option to make enemies drop gold, but that's not the same.
Title: Re: [RESOLVED] Enemies drop moneybags?
Post by: Phasedscar on July 21, 2008, 09:27:26 pm
Could also make it so there's items in the game that take money away instead of adding money.

Not sure of the use of that, but it's an option.

Also, you can make it so that you have to turn in items at a NPC and get random rewards.  That requires a little extra scripting but it's the same basic principle.
Title: Re: [RESOLVED] Enemies drop moneybags?
Post by: Blizzard on July 24, 2008, 09:28:16 pm
Why would it require scripting? Make stuff drop as normal items and just make an event that does all the job with a reward system.
Title: Re: [RESOLVED] Enemies drop moneybags?
Post by: Phasedscar on July 25, 2008, 03:50:17 am
I actually meant event scripting, not ruby.  Then the rest as basically what you said.