Possible to stop enemy encounters from dropping gold?

Status
Not open for further replies.

Vinedrius

Member Title
Veteran
Joined
May 14, 2012
Messages
251
Reaction score
94
First Language
Turkish
Primarily Uses
RMVXA
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?
 

escoe

Villager
Member
Joined
Feb 27, 2014
Messages
17
Reaction score
1
Primarily Uses
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?
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
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
 
Last edited by a moderator:

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
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
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
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
 

escoe

Villager
Member
Joined
Feb 27, 2014
Messages
17
Reaction score
1
Primarily Uses
You're right I did miss the additional "end"

I tested it and it works great now

thanks for your help
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top