Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

FFVIII SeeD money system - Help!

Chouru

Member

I'm not quite sure exactly where this should go (not sure if it can be done with scripting or without) and I've searched for this type of thing, and could only find someone suggesting it be done. Basically I want to create a system like FFVIII to get money.

For those of you who haven't played the game, basically you are part of an elite group called "SeeD" (forgot the meaning) and if you are on task doing the things you're supposed to (in the storyline) then your "SeeD level" will go up. You can also take a "SeeD exam" (with various questions about the game and gameplay) to raise it. The point of this is every so often (Hour?) depending on your level, you will get money. Monster's don't drop money, so the only way to get a lot of money is to raise your SeeD level (or sell items; not very profitable).

I'm looking for a way to implement this system, where every 20 or 30 minutes (suggest a better time?) the player is awarded with a sum of money depending on a specific level (separate from the character's level) defined by the actions and choices of the player. Also, something on the menu should tell the player what that level is.

I'm guessing that the level can be defined by variables, but the menu and the "every so often" things are what I am needing help with. Is there anyone who can at least point me in the right direction? I'd appreciate the help.

If this is in the wrong place, please let me know so it won't happen again
 
Ok, you can create a variable called SeeD.  Just make a common event that checks it every 20 minutes, and a conditional branches saying it's equalt to whatever.  ...gtg, i'll tell you more later is I have time.
 
What is the formula for calculating the amount of Gold based on SeeD Level?

Do you now, or will you have any other customizations to your menu?

Where on the menu do you want the SeeD Level?
(I'm thinking we make the Step window one line, then put SeeD Level on top of Gold???

And how high can the SeeD level go?

Also, what's to prevent someone from finding a safe place to stand, and leaving the game running all night to cash in?

Be Well      (ref Test9)
 
If you don't need the step count window.  Just go to the step count script, and replace "Step Count" with "SeeD Level" .  Then, in the lower brackets, in place of the frase right after the last comma, insert $game_variables[insert variables ID here].to_s, 2

That will display your SeeD level.  Sry about the quick explanation, but I'm at school and I have to go to class now.
 
Here ya go. This adds the SeeD level to the steps window, and updates the Gold based on the SeeD level

I just used (SeeD Level * 100) for the amount of gold gained.

Insert in a new script above main

Code:
#-------------------------------------------------------------------------------
#
#   SeeD Level - Brewmeister 14MAR08
#
#   Add SeeD level to the main menu
#   Update Gold based on SeeD level
#-------------------------------------------------------------------------------

SEED_LEVEL_VAR = 1      # the variable where you store SeeD Level
FREQUENCY = 0.1         # how often, in minutes, to update Gold based on SL
                        # I used 0.1 minutes (6 seconds) for testing

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  #
  # Draw the SeeD Level under the Steps
  #
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 64, 32, "Steps")
    self.contents.draw_text(4, 30, 84, 32, "SeeD Lvl")
    self.contents.font.color = normal_color
    self.contents.draw_text(64, 0, 64, 32, $game_party.steps.to_s, 2)
    self.contents.draw_text(84, 30, 44, 32, $game_variables[SEED_LEVEL_VAR].to_s, 2)    
  end
end

class Scene_Map
  alias seed_update update
  
  #
  # Update Gold every FREQUENCY minutes while on the map
  #
  def update
    seed_update
    frames = Graphics.frame_count 
    freq = FREQUENCY * 60 * Graphics.frame_rate
    if (frames % freq) == 0
      #update Gold based on SeeD Level (game variable)
      $game_party.gain_gold($game_variables[SEED_LEVEL_VAR] * 100)
    end
  end
end

class Scene_Menu
  alias seed_update update
  
  #
  # Update Gold every FREQUENCY minutes while in the menu
  #
  def update
    seed_update
    frames = Graphics.frame_count 
    freq = FREQUENCY * 60 * Graphics.frame_rate
    if (frames % freq) == 0
      #update Gold based on SeeD Level (game variable)
      $game_party.gain_gold($game_variables[SEED_LEVEL_VAR] * 100)
      @gold_window.refresh
    end
  end
end
 

Chouru

Member

The idea behind is that (in FFVIII) if you are not "on task" doing the things you're supposed to do, then every few payouts your level will go down. So to answer your question about that, there would also need to be some system that makes the level go down. I know this is rather complex for this type of game, so I probably won't do that, I might just find another way.

Thank you very much! I will try this script out. Really appreciate it. Do you want me to credit you for making this script?
 
No, I want you to fly me to Dublin & hook me up to a Guinness tap!  :scruff:

Credit is nice, but not necessary.

I think we can also implement the reduction. I just need to understand how to determine if the player is
not "on task".

Hmmm, according to this.. http://www.gamefaqs.com/console/psx/fil ... 9029&nbsp; the seed level (or experience) goes down with every payment. That's easy.  Just need to know how much.
Even if it's every other payout, we can do that too.

Let me know. Also, answer the rest of the questions in my first post.

Be Well
 

Chouru

Member

Brewmeister":30ry2acu said:
What is the formula for calculating the amount of Gold based on SeeD Level?
I think it will be something like this. P is a variable for Payout, L is the variable for Level, and it will start at 500. (I'm just using those letters because that's how a math problem would do it)

500 + (L *500) = P

Basically start at 500, and raise it by 500 every level. Does that seem reasonable?

Brewmeister":30ry2acu said:
Do you now, or will you have any other customizations to your menu?
I will probably only use a large party script which I think will customize the menu to make more people show up.

Brewmeister":30ry2acu said:
Where on the menu do you want the SeeD Level?
(I'm thinking we make the Step window one line, then put SeeD Level on top of Gold???
I like your idea, above the Gold section.

Brewmeister":30ry2acu said:
And how high can the SeeD level go?
What seems like a decent number? I don't want it to be too low so it's easy to max out, but also not too high so it seems unattainable. Let's go with 25 for now.

Brewmeister":30ry2acu said:
Also, what's to prevent someone from finding a safe place to stand, and leaving the game running all night to cash in?
In FFVIII, as you said, it lowers the SeeD experience by 10 each payout. I like this idea. Should we implement the "kill an enemy, gain a point" as well?

Just to clarify, every 100 experience would equal one level. Also, by "on task" (since I didn't know specifics) I guess that if you are killing monsters it will go up, and certain ingame events will increase or decrease the experience as well (which is something I want to be able to do) If there's anything more you might need, just ask. Thank you so much!

-Edit- Apparently, in FFVIII you get a payout every 24575 steps you take. While this is a large number for a "tile" based game, perhaps we could create a system that goes by the number of steps instead of a certain amount of time, so that people can't abuse the system by standing in one spot. Perhaps that number should be something around 100 steps? Or maybe we should stick with the time thing, I don't know.

Also, I do not want to use the term "SeeD" because that is not very "original" so I would like to be able to change the name at a later time, if possible. Thank you very much.
 
Chouru":1pudl6iu said:
...start at 500, and raise it by 500 every level.

So, that's just P = L * 500,  unless you want to get paid at level 0???

I added a MAX_LEVEL constant that you can set as well.

I did a quick test, constantly walking at normal speed a character travels about 275 steps per minute.
I rounded that down to 200, to allow for messages, looking at things, etc...
So, if you were shooting for 20-30 minutes, that's 4000 - 6000 steps.
The FREQUENCY constant is now in steps instead of minutes.

I also changed the SEED_LEVEL_VAR to SEED_EXP_VAR
This means that you will store SeeD EXP in the variable, and the program will calculate the level.
So, each time your party kills a beasty, you can add a EXP point.
When they complete a quest, or do something magnanimous, add EXP points.

If you want to change the name "SeeD Lvl" on the menu, just edit the string on line 27

Give it a shot...

Code:
#-------------------------------------------------------------------------------
#
#   SeeD Level - Brewmeister 15MAR08
#   (2nd version based on steps instead of time)
#
#   Adds SeeD level to the main menu
#   Updates Gold based on SeeD level
#   Deducts 10 EXP with each payout
#-------------------------------------------------------------------------------

SEED_EXP_VAR = 1       # the variable where you store SeeD EXP
FREQUENCY = 10         # how often, in steps, to update Gold based on SL
                       # I used 10 steps for testing
MAX_LEVEL = 25         # Maximum level

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  #
  # Draw the SeeD Level under the Steps
  #
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 64, 32, "Steps")
    self.contents.draw_text(4, 30, 84, 32, "SeeD Lvl")
    self.contents.font.color = normal_color
    self.contents.draw_text(64, 0, 64, 32, $game_party.steps.to_s, 2)
    seed_level = [$game_variables[SEED_EXP_VAR] / 100, MAX_LEVEL].min
    self.contents.draw_text(84, 30, 44, 32, seed_level.to_s, 2)    
  end
end

class Scene_Map
  alias seed_update update
  #
  # Update Gold every FREQUENCY steps while on the map
  #
  def update
    seed_update
    steps = $game_party.steps 
    freq = FREQUENCY
    if (steps % freq) == 0 and steps > 0
      # Don't let EXP go above 2500
      if $game_variables[SEED_EXP_VAR] > MAX_LEVEL * 100
        $game_variables[SEED_EXP_VAR] = MAX_LEVEL * 100
      end      
      # update Gold based on SeeD Level (game variable)
      $game_party.gain_gold($game_variables[SEED_EXP_VAR] / 100 * 500)
      # deduct 10 from SeeD EXP with each payout
      $game_variables[SEED_EXP_VAR] -= 10
      # Don't let EXP go below 0
      if $game_variables[SEED_EXP_VAR] < 0
        $game_variables[SEED_EXP_VAR] = 0
      end
      # bump steps up by one, so it only pays out once
      $game_party.increase_steps
    end
  end
end

Be Well
 

Chouru

Member

Heh, my math skills are *makes raspberry sound* lately. In high school I used to be in Pre-calc, then took a placement exam for College and got beginning algebra wth... Sorry for the crappy formula, in other words :P

Thank you so much. I'll try it out. I'm actually going to use this for a sci fi project I want to make.

Oh, also, if SephirothSpawn doesn't know about this already, you might want to show him the script. I know he's made some other FFVIII scripts, I just thought he might want to take a look at it. I don't know . . .
 
No worries, mate.  Math is my baileywick. although I seriously don't remember calc. I haven't touched it in 25 yrs, and the computer does it for me. :wink:

No better compliment than seeing it being used. I'll keep an eye out for the project.

Seph went AWOL. But if I'm ever in Kansas, I'll let him know. You should drop him a "Hey, check this out" PM. He'll appreciate it.

Test it out good. Let me know if there's issues.

Be Well
 

Chouru

Member

Is there some way that we can have some text on the screen for the following:

1. When money is gained
2. When a level goes up or down

Maybe something that just shows up but you don't have to press the confirm button, if possible. Would we need to make a picture or something?

Thanks in advance!
 
Ok, this will show a "+500 G" window when gold is gained, and a "Level" window when the level changes due to the -10 deduction in EXP. Either window will show for 2 seconds, then disappear automatically.

You control when EXP is gained, so you'll have to show the Level window then.

Use
Code:
$scene.show_level
to show the level window for 2 seconds.

Code:
#-------------------------------------------------------------------------------
#
#   SeeD Level - Brewmeister 16MAR08
#   (3rd version shows +gold window, and level window when changing them)
#
#   Adds SeeD level to the main menu
#   Updates Gold based on SeeD level
#   Deducts 10 EXP with each payout
#   Show a "+ Gold" window when payed
#   Show a "Level" window when the level drops due to a payment
#   show_level method added so you can call it from an event with
#   $scene.show_level
#-------------------------------------------------------------------------------

SEED_EXP_VAR = 1       # the variable where you store SeeD EXP
FREQUENCY = 10         # how often, in steps, to update Gold based on SL
                       # I used 10 steps for testing
MAX_LEVEL = 25         # Maximum level

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  #
  # Draw the SeeD Level under the Steps
  #
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 64, 32, "Steps")
    self.contents.draw_text(4, 30, 84, 32, "SeeD Lvl")
    self.contents.font.color = normal_color
    self.contents.draw_text(64, 0, 64, 32, $game_party.steps.to_s, 2)
    seed_level = [$game_variables[SEED_EXP_VAR] / 100, MAX_LEVEL].min
    self.contents.draw_text(84, 30, 44, 32, seed_level.to_s, 2)    
  end
end

class Scene_Map
  alias seed_update update
  #
  # Update Gold every FREQUENCY steps while on the map
  #
  def update
    seed_update
    steps = $game_party.steps 
    freq = FREQUENCY
    if (steps % freq) == 0 and steps > 0
      # Don't let EXP go above 2500
      if $game_variables[SEED_EXP_VAR] > MAX_LEVEL * 100
        $game_variables[SEED_EXP_VAR] = MAX_LEVEL * 100
      end      
      # update Gold based on SeeD Level (game variable)
      $game_party.gain_gold($game_variables[SEED_EXP_VAR] / 100 * 500)
      # Show the gold window
      if $game_variables[SEED_EXP_VAR] >= 100
        $gold_window = Window_Add_Gold.new
        $gold_showing = Graphics.frame_count / Graphics.frame_rate
      end
      # deduct 10 from SeeD EXP with each payout
      $game_variables[SEED_EXP_VAR] -= 10
      # show the Seed Level if level just dropped
      if $game_variables[SEED_EXP_VAR] % 100 > 90
        show_level
      end
      # Don't let EXP go below 0
      if $game_variables[SEED_EXP_VAR] < 0
        $game_variables[SEED_EXP_VAR] = 0
      end
      # bump steps up by one, so it only pays out once
      $game_party.increase_steps
    end
    if $gold_showing
      timer = Graphics.frame_count / Graphics.frame_rate
      if timer >= $gold_showing + 2
        $gold_window.dispose
        $gold_showing = nil
      end
    end
    if $level_showing
      timer = Graphics.frame_count / Graphics.frame_rate
      if timer >= $level_showing + 2
        $level_window.dispose
        $level_showing = nil
      end
    end
  end
  def show_level
    $level_window = Window_Seed_Level.new
    $level_showing = Graphics.frame_count / Graphics.frame_rate
  end
end

#==============================================================================
# ** Window_Add _Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class Window_Add_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    gold = ($game_variables[SEED_EXP_VAR] / 100 * 500)
    self.contents.draw_text(4, 0, 120-cx-2, 32, "+ " + gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end

class Window_Seed_Level < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(480, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    level = ($game_variables[SEED_EXP_VAR] / 100)
    self.contents.draw_text(4, 0, 100, 32, "SeeD Lvl:")
    self.contents.font.color = system_color
    self.contents.draw_text(100, 0, 40, 32, level.to_s)
  end
end

Let me know how it works

Be Well
 
Here's how I tested it.  Create an event that sets the variable to something like 212.
Either an autorun, with a self-switch, so it only runs once. Or a action button event
that you trigger when you first start.
Leave the default frequency at 10 steps, just for testing.
Now, fire up the game & walk 10 steps. You should see "+1000 G" (because you're at level 2),
walk 10 more steps, "+1000 G" again, because your still at 202 EXP. Walk 10 more, "+500G"
Now you have to walk 100 steps to get it to go to level 0, and stop paying.
I'm not even keeping track of the level. It's just calculating each time based on the EXP.

Let me know if it works, or doesn't

Be Well
 

Chouru

Member

It works now, what happened before was I set the EXP to 100 via a Parallel Process event, but when I do that, the "+500 G" doesn't show up. It works if I set the EXP to 212, however, so I don't know what is wrong with 100 EXP.

Thanks for baring with me so far...

So if I wanted to change what was said in those boxes (like if I wanted to use a different currency, like Dollars (D) or Credits (C)) would I be able to?
 
Ah, good catch.  Line 56 should be changed to:

    #if $game_variables[SEED_EXP_VAR] > 100
      if $game_variables[SEED_EXP_VAR] >= 100

You can change the word for Gold in the system tab of the database.

You can change the "SeeD Lvl" in the steps window on Line 31 of the script.

Be Well
 

Chouru

Member

Oh, I see. So the script goes off of the "currency" named in the database, I did not know that. You are such a great help. You will be credited on the top of the list. Once I can figure my way around pixel art, I will be able to start my project, in which this script will be used.

Thanks a billion times!
 
Cool idea, I hope it adds to your project.

But I also wanted to say thanks to Brewmeister. I think it's great to see members willing to help others. It makes our community stronger.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top