The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: JFace on July 11, 2010, 01:32:51 PM

Title: [Resolved] Update Victory Aftermath to show JP (Job Points)
Post by: JFace on July 11, 2010, 01:32:51 PM
I'm currently using the Yanfly Victory Aftermath script, and I'd like it to show the JP earned as well. The thing is, I've seen Yanfly himself post this update on many sites, but subsequently took them down. He does not appear to have them on his wiki, so I'm wondering if somebody can lead me to the code, or show me how to alter it. I would be particulary interested in replacing the "Received X Gold" message with "Received X JP".
Thanks!
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: Mitsarugi on July 11, 2010, 05:24:59 PM
i already did this but it's a little buggy ^^
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: JFace on July 11, 2010, 07:37:26 PM
Quote from: Mitsarugi on July 11, 2010, 05:24:59 PM
i already did this but it's a little buggy ^^

I checked your previous posts and couldn't find anything. I did a pretty thorough search before posting, too. Can you link it? I appreciate your help.
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: Mitsarugi on July 11, 2010, 09:12:26 PM
^^ i didn't say i posted it, i'm no scripter (just a franken scripter) i made the modification for my game it doesn't work that well but it shows how much you gained and that's what counts :p
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: JFace on July 12, 2010, 01:58:45 AM
Quote from: Mitsarugi on July 11, 2010, 09:12:26 PM
^^ i didn't say i posted it, i'm no scripter (just a franken scripter) i made the modification for my game it doesn't work that well but it shows how much you gained and that's what counts :p

I see. Perhaps you can help me with my request? Here is the code snippet I'm referring to:

[spoiler]#--- Draw Gold Window
    @gold = $game_troop.gold_total
    @jp = ?   # What to put here?
    $game_party.gain_gold(@gold)     
    @gold_window = Window_Base.new(0, 56, 272, 56)
    text = sprintf(YEM::VICTORY::VOCAB[:JP_receive], @jp)
    [/spoiler]

This is the gold display section of the Victory Aftermath code. Instead of displaying the @gold, I've replaced it with my @jp. My question would be (to you, or anybody who can help) what would I put after "@jp = " to call the JP value from another script (Yanfly's Skill Overhaul)?

Once again, I appreciate any and all help. I'm honestly trying to figure it out on my own, but I'm having a hard time keeping up.
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: Mitsarugi on July 12, 2010, 06:43:14 AM
i'll make a demo and post it.
Title: Re: [REQUEST] Update Victory Aftermath to show JP (Job Points)
Post by: JFace on July 12, 2010, 09:01:17 PM
Quote from: JFace on July 11, 2010, 01:32:51 PM
I'm currently using the Yanfly Victory Aftermath script, and I'd like it to show the JP earned as well. The thing is, I've seen Yanfly himself post this update on many sites, but subsequently took them down. He does not appear to have them on his wiki, so I'm wondering if somebody can lead me to the code, or show me how to alter it. I would be particulary interested in replacing the "Received X Gold" message with "Received X JP".
Thanks!

Ok! I got it working! It only took a few days, but I learned a lot in the process. Here's what I did, if anybody is interested:

[spoiler]Line 981 onward of the Script "YEM Victory Aftermath"
    #--- Draw Gold Window
    @gold = $game_troop.gold_total 
    $game_party.gain_gold(@gold)
    @jp = $game_troop.distribute_jp   
    @gold_window = Window_Base.new(0, 56, 272, 56)
    text = sprintf(YEM::VICTORY::VOCAB[:JP_receive], @jp)
    @gold_window.contents.draw_text(0, 0, 240, 24, text, 1)[/spoiler]

I also had to comment out ($game_troop.distribute_jp) of "YEM Skill Overhaul" line 2210 to prevent redundant JP earning. Maybe there's a better way to do this, but I couldn't find it on the interwebz.