The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Tutorials => Topic started by: Sthrattoff on October 29, 2006, 07:56:57 PM

Title: [XP] Victory point
Post by: Sthrattoff on October 29, 2006, 07:56:57 PM
I have post it before...
Before this forum crashed.

I'll repost this tuts.

My idea about Victory Points is a point given to the party when they're winning a battle.
This point then can be used for any purpose, like a requirement for entering arena, bargaining an amazing stuff, used for Training Points like on Digimon World 3, or anything in your mind.

So, what you need is an RMXP.
Let's get started! ;)

First, on the beginning of your game, activate a SWITCH, just call it SW1
Now, on the Common Event tab, create 2 events, called Counter and Operand.

On counter, enter these command, and set the trigger to SW1 ---> Parallel Process
<>Comment : Create 2 Variables
<>Var01 = Mainchara's EXP
<>Var02 = Var01

On Operand, enter these command and set the trigger to SW2 ---> Parallel Process
<>Comment : Defining
<>Var01 = Mainchara's EXP
<>If Var01 > Var02
 <>Var01 - Var02
 <>Comment : Implementing EXP Sharing System. This is OPTIONAL!
 <>If 2ndChara is on party
  <>
 <>Else
  <>Change 2ndChara EXP + Var01
 <>Comment : Victory Points! It will random between 1~10
 <>Var03 + Random Between 1~10
<>end if
<>SW1 = ON
<>SW2 = OFF

Now go to monster party  tab.
Add this command to every party, set the event trigger to Turn 0
<>SW2 = ON
<>SW1 = OFF

Phew, a lot of words...
Hope it works well with you... ^-^
Title: Re: Victory point
Post by: Sthrattoff on November 04, 2006, 07:21:11 PM
Guess we just have to remove it...

It's a secret anyway...................
Title: Re: Victory point
Post by: Blizzard on November 05, 2006, 04:18:18 PM
What?! No! You won't remove that! :=:
Title: Re: Victory point
Post by: Sthrattoff on November 08, 2006, 12:58:16 AM
Just kidding...
Can you move it to tut database?
Title: Re: Victory point
Post by: Blizzard on November 08, 2006, 01:15:59 PM
*moves* Oops. >.< I thought I already did.
Title: Re: Victory point
Post by: Demonic Blade on December 23, 2007, 11:33:02 AM
Nice! Could you like try updating it so it's more advanced? I think of these victory points as experience points, and if you could make 3 different types of victory points, all changed on how much you use different aspects of attacks (eg. you use magic skills, you get magic exp. points, you attack with a weapon, you get strength exp. points. With bow, you get Skill/Ranged exp. points and so on)? But I'm dreaming... It's cool, I might use it! :D
Title: Re: Victory point
Post by: Sthrattoff on December 30, 2007, 12:01:42 PM
Just make another variables and put it on Operand common events.
Title: Re: Victory point
Post by: Demonic Blade on December 30, 2007, 06:47:16 PM
Hey, that does make sense. Hmm, I'll try it out, thx
Title: Re: Victory point
Post by: Sthrattoff on January 05, 2008, 07:47:46 AM
Hey, lately I found a way to make this thing into script, so things will be simpler...

I'll post when it finished!
Title: Re: Victory point
Post by: Demonic Blade on January 05, 2008, 04:56:04 PM
Thanks! Even though I don't understand them, I clearly like scripts better. Events are just long, and unless there's a demo attached, it can take ages to put it in... ;)
Title: Re: Victory point
Post by: Kokowam on January 05, 2008, 07:40:52 PM
Lol, you don't need an actual full script. You just need to have two lines of code. Maybe even one. Just one lines makes a random number and the other lines adds the random number to a global variable. Then you can use whatever variable you want as the holder of Victory Points. This should go in the place where you get your EXP and stuff.
Title: Re: Victory point
Post by: Demonic Blade on January 05, 2008, 08:40:59 PM
A script is a script, that's all there is to say. And a 2-line-script can still be a full script. But not bad, I might try it out meself, it'd be decent practise (for someone who's never scripted before at least...)!
But if some1 could do it, then that'd be really great!
Title: Re: Victory point
Post by: Kokowam on January 05, 2008, 09:37:52 PM
I'll try it a little later, lol. You could also probably alias the method into there. Which would be a script for those who are willing to take the initiative so that the people using scripts won't need to look for it. I'll try this some other time.
Title: Re: Victory point
Post by: Demonic Blade on January 06, 2008, 10:04:55 AM
I'm not even going to try to understand that. Darn, RPG's tuts really weren't that useful I guess....
Title: Re: Victory point
Post by: Sthrattoff on June 26, 2008, 05:25:12 AM
Ssshh...
The script's done!

But I did not make the window to show how much VP you have. You have to make it yourself (because I don't know where you will put it).
The variable used is: $game_system.victory_pts

Code: [Select]
#==============================================================================
# Victory Points
#------------------------------------------------------------------------------
# ** Version 2.0
# ** Original by Sthrattoff
#==============================================================================

class Game_System
 
  attr_accessor :victory_pts
 
  alias old_initialize initialize
  def initialize
    old_initialize
    @victory_pts = 0
  end
   
end


class Scene_Battle
 
  alias old_start_phase5 start_phase5
  def start_phase5
    old_start_phase5
    $game_system.victory_pts += 1
  end
 
end

Something that you need to know that I'm not test it yet. I just run it and no problem so far. Maybe when you saving your game, you'll find something.
Maybe...

Please test it for me.