Possible to stop enemy encounters from dropping gold?

I don't want the random encounters in my game dropping gold but when I set the gold to 0 I still get the victory screen saying 0 gold was obtained.  Any way to remove this completely?

http://www.dropbox.com/s/m798gdiwkn8lb6q/Screenshot%202014-02-28%2004.47.18.png 
I have just tested this and setting gold reward at 0 makes it not appear in the post-battle screen. Have you tried it in a new and otherwise blank project?
I suppose this is a result of the Yanfly Victory Aftermath Script?  I suppose their is no way to fix it without editing the code?
That would be correct, though it is most likely a simple edit. Let me take a look at the aftermath script.


[Edit] Yeah, as I thought, it's a minor change. Line 1051 should read

Code:
@data = [nil]
Change that to
Code:
@data = []
This will remove gold display entirely. If you want it to still show if there is gold gained, add the following on a new line immediately following the previous one:
Code:
@data.push(nil) if @gold > 0
That would be correct, though it is most likely a simple edit. Let me take a look at the aftermath script.

[Edit] Yeah, as I thought, it's a minor change. Line 1051 should read

@data = [nil]Change that to
Code:
@data = []
This will remove gold display entirely. If you want it to still show if there is gold gained, add the following on a new line immediately following the previous one:
Code:
@data.push(nil) if @gold > 0
Looks like someone already beat me to it, well anyway yea ^this.
Well the script still brings up the spoiled gained page, but now its blank.

https://www.dropbox.com/s/oi6kc30lu4a07kb/Screenshot%202014-02-28%2009.34.22.png
I was under the assumption you just didn't want the gold showing. Should be easy enough to make another edit to skip that stage if blank. One moment.

Around line 467, you'll see the following:

Code:
      SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)      set_victory_text(@victory_actor, :drops)      wait_for_message
You need to replace that bit with the following:
Code:
    if drops.size > 0 or $game_troop.gold_total > 0      SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)      set_victory_text(@victory_actor, :drops)      wait_for_message    end
After changes I get an error when starting play test

https://www.dropbox.com/s/zqk3hw0nd06dp3n/Screenshot%202014-02-28%2010.50.56.png
Did you miss the end by chance? Or accidentally delete the one before? Your line numbers no longer match up with my copy where I've been testing all these changes. The changed gain_drop_items method should look like the following exactly:

Code:
  #--------------------------------------------------------------------------  # overwrite method: self.gain_drop_items  #--------------------------------------------------------------------------  def self.gain_drop_items    drops = []    $game_troop.make_drop_items.each do |item|      $game_party.gain_item(item, 1)      drops.push(item)    end    if drops.size > 0 or $game_troop.gold_total > 0      SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)      set_victory_text(@victory_actor, :drops)      wait_for_message    end  end
You're right I did miss the additional "end"

I tested it and it works great now

thanks for your help
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Next time, it would save a bit of time if you state what scripts you're using in your opening post, and add links to them. It just stops people offering solutions based on RTP, or searching for scripts, so you get your answer sooner 🙂


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/possible-to-stop-enemy-encounters-from-dropping-gold.24296/