Way to permanently increase gold drop?

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
So, I have this idea on an event that permanently increase gold drop rate. Is there a way to achieve this using either plugins
or the base software? At least a way that doesn't mean I'll have to make custom enemies for each and every level of bonus gold drop rate the player collects.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,764
Reaction score
7,868
First Language
German
Primarily Uses
RMMV
the default ways to change the gold rate are in the "other" traits for the party.
However, that is very limited and you would have to have it either permanently or on equipment.

for a more diverse handling, you'll need a plugin.
 

Sauteed_Onion

Mmm Tasty
Veteran
Joined
Dec 13, 2017
Messages
554
Reaction score
3,665
First Language
English
Primarily Uses
RMMV
Or maybe run a common event with a variable that gives extra gold after certain conditions are met? I am not very knowledgeable about any of this stuff. Maybe that helps.
 

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
The only function I find while editing characters is a "gold double" which is far too much for what I am going for. Basically, I have a "looting skill" if you will, that when it levels up, increase gold drop from enemies. It would be grand if there was a plugin for that, but so far I haven't found any.
 

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
If you are looking for a plugin to do this, I found Alistair's Gold & Drop Rate plugin.

EDIT: Yay! You are! You kinda ninja'd me there. :)
That's great, but the instructions he provides is a bit obscure to me. Perhaps you could help me out? :) I'd like the gold drop to increase depending on a variable, so that I don't just have a flat bonus but a bonus that could vary over time (ie. when i increase/decrease the variable through an event, it then increase/decrease gold drop).

EDIT 1: I think I got it, hold on...

EDIT 2: I got it.
 
Last edited:

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
Sure no problem! I followed the link from that post to his blog and in the parameters it has this instruction:

Gold Rate Formula: A custom gold rate formula for you to define. Use v[x] for variables and s[x] for switches. The default n refers to the Default Gold Rate. Default: n

So, let's say you wanted Variable 32 to store your "looting skill level", and for each level in looting skill you get an extra 10% gold drop rate. The formula you'd put in the Gold Rate Formula parameter would be:
Code:
n + v[32] * 0.10
This means your looting skill level 1 will get 110% gold drops. You might have to make sure the "looting skill level" is manually set at the beginning of the game to 0...sometimes variables are a little finicky if they don't get manually set up first

If you wanted to do the same thing but you wanted to start at "looting skill level" of 1 with a standard 100% drop rate, you could still use that formula, but change the parameter "Default Gold Rate" (which is n in the above formula) to 0.90. Again, make sure your variable is set to 1 at the beginning of the game.
 

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
Sure no problem! I followed the link from that post to his blog and in the parameters it has this instruction:

Gold Rate Formula: A custom gold rate formula for you to define. Use v[x] for variables and s[x] for switches. The default n refers to the Default Gold Rate. Default: n

So, let's say you wanted Variable 32 to store your "looting skill level", and for each level in looting skill you get an extra 10% gold drop rate. The formula you'd put in the Gold Rate Formula parameter would be:
Code:
n + v[32] * 0.10
This means your looting skill level 1 will get 110% gold drops. You might have to make sure the "looting skill level" is manually set at the beginning of the game to 0...sometimes variables are a little finicky if they don't get manually set up first

If you wanted to do the same thing but you wanted to start at "looting skill level" of 1 with a standard 100% drop rate, you could still use that formula, but change the parameter "Default Gold Rate" (which is n in the above formula) to 0.90. Again, make sure your variable is set to 1 at the beginning of the game.
Doesn't seem to work. I get 0 gold now xD Using just the v [31] (thats the variable i store the gold level in, remarkably close to your suggested 32) i get a multiplier of whatever, but it's still in flat numbers, so I'd really like that multiplier to work :) If it's not to much to ask, here's how I set it up, could you check if I'm being stupid or what? xD

EDIT: Also, after the battle, the party gold level changes to NaN
 

Attachments

Last edited:

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
711
Reaction score
229
First Language
English
Primarily Uses
Try this:
n + $gameVariables.value(32) * 0.10

v[x] only works in the damage formula for skills. It may work in some plugins but only if the developer has told you they develop the plugin to read it in else it won't work.

By default use $gameVariables.value(x) to be safe, since as long as the the formula or plugin parameter can read javascript it'll work.
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Open your rpg_objects.js in your project/data folder
search for this code:
Game_Troop.prototype.goldTotal = function() {

return this.deadMembers().reduce(function(r, enemy) {

return r + enemy.gold();

}, 0) * this.goldRate();

};
add * this.goldRate() * $gameVariables.value(999);
Also these lines:
Game_Party.prototype.gainGold = function(amount) {

this._gold = (this._gold + amount).clamp(0, this.maxGold());

};
change this._gold = (this._gold + amount).clamp(0, this.maxGold()); to
this._gold = ($gameVariables.value(999)*(this._gold + amount)).clamp(0, this.maxGold());

that should do it i think? Now change variable 999 to whatever number you want in RPGMV :)
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
Try this:
n + $gameVariables.value(32) * 0.10

v[x] only works in the damage formula for skills. It may work in some plugins but only if the developer has told you they develop the plugin to read it in else it won't work.

By default use $gameVariables.value(x) to be safe, since as long as the the formula or plugin parameter can read javascript it'll work.
The plugin author indicated that v[x] should be used for variables, however, I agree that this would be a good step to try. Apparently the formula is not evaluating to a number currently.
 

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
The plugin author indicated that v[x] should be used for variables, however, I agree that this would be a good step to try. Apparently the formula is not evaluating to a number currently.
Tried that as well. Total gold still ends up "NaN" after battle. Even tried reverting to the v[31] i had first, just to try it out, see if it was an issue with number rounding, still ends up NaN after battle. Could it be a conflict with yanfly's plugins?
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
Entirely possible it's a conflict. That's always a good starting point for troubleshooting plugins; turn off all your other plugins and see if it works. If it does, there's a conflict. You can turn the plugins back on one by one, testing between each one, to determine which one causes the conflict.

EDIT: If that still doesn't work, try opening your console with F8 and see if you get any error messages. If so, please take a screenshot.
 
Last edited:

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
Doing the "disable plugins one by one" route, it seems yanfly's item core is the culprit in this drama. I really don't want to disable that for my game tho... I wonder if it's something with the settings that can be fiddled with...
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
711
Reaction score
229
First Language
English
Primarily Uses
Try changing the plugin postion, ie place Alistairs plugin above Yanfly's if it's below. Or place it below Yanfly's if it's above.
 

PathosFear

Veteran
Veteran
Joined
Dec 23, 2012
Messages
53
Reaction score
10
First Language
Swedish
Primarily Uses
N/A
So, I'm stupid. I realized the issue was something else entirely, not even yanfly's item core. There was another issue, with the order I had put the Victory Aftermath and Victory Aftermath level up plugins. After correcting that, it works as it should. I also played around a bit with the "Enemy Levels" plugin, since I wondered if it was some kind of issue there, since both handle gold drop rates. I managed to sort it out, at least :)

Thanks all of you for taking time out of your day to help me with this. The game-making can finally resume :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

While we prepare the official trailer, enjoy this kind-of-second teaser! ^^
-Ele
New Episodes of RPG Shenanigans Uploaded to Youtube!

Episode 5 - Surprise Party!
Youtube Link:
Episode 6 - Killer Gin
Youtube Link:
Episode 7 - Gaia's Melody: Echoed Melodies
(Coming soon!)

Episode 8 - Clarent Saga: Tactics
(Coming soon!)

Episode 9 - Star Shift
(Coming soon!)
When the Map Generator throws in the assets in the most dumbest way possible - your path is blocked :D

I went to sleep at 3 am because of my anxiety. Set up my alarm for 7 am so that I could have sasagues for breakfast and do morning routine before lessons starts at 8 am. I knew I wouldn't be able to sleep even after my lessons finished because I have to visit my grandparents today I was sad bc I was really tired. Thats when I realised. My lesson starts at 9 am. I could get one extra hour of sleep if I didnt forget it

Forum statistics

Threads
107,562
Messages
1,030,568
Members
139,671
Latest member
WDRS
Top