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.

Breath of Fire Masters

Hey guys!

I was wondering if a script is out there that makes masters available in your games, like the ones in the breath of fire games?

For those that don't know: You can apprentice one of your party members to a master once certian conditions have been met. Once apprenticed, your base stats will be changed each time you level up. Also, each time you visit the master you may learn a new skill based on what other conditions have been met, for example:

MASTER: Bunyan
REQUIREMENTS: Bunyan will take an apprentice for 500 gold
ABILITIES: While Apprenticed to Bunyan, your abilities will change as follows: (HP +6, SP -2, STR +4, DEX -1, AGI -1) each time you level up.
SKILLS: If you visit Bunyan 4 levels later than you became his apprentice, he teaches you a new skill, after a further 4 levels you get another and after a further 6 you get another.

NOTES: You can choose to end your apprentiship at any time, you retain the skills, but your progress is set back to 0.
NOTES: A character may only be apprenticed to only one master at a time

I hope this is detailed enough, any help would be greatly appreciated.

Thanks in advance!

EDIT: The main problem I have is the level up stat differences
 
Bump

I thought I'd mention, I have some programming experience with java and C# and I've been able to edit most scripts to suit my game... Its just writing the bones of the code I have trouble with, due to college I just don't have the time to get to grips with ruby. Any help would be greatly appreciated!

Reaper: If no help is forthcoming, I promise I'll do my best to get to know ruby over the summer, I know its a long way off, but I'd love to get to know this language and get this script up and running!
 
Bump

I figured it out! It isn't fully scripted unfortunately, it makes use of a common event, some switches and variables. I will put a tutorial on how to make it when I'm back from my holiday (2 weeks), you also need a script from Seph's Test Bed to make it work. Anyway, if one could get this running with a really nice script I would be eternally grateful!
 
I've played that game a few years back, so if there's a mistakes here, I appologize~(I'm also at uni at the moment, so sorry about that too xD)


What you need is a global variable containing array like:

$Actor_Mstr = [0,0,0,0,0,0,0]

so that the first value represents masterID that is currently assigned to first actor, second to second actor and so on

and this
$Mstr_bonus = {1 => [0,0,0,0],...}
in this format: {MasterID => [strBonus,DexBonus,AgiBonus,IntBonus], ...}

then in Game_Actor (I think) where there are @str_plus and @agi_plus etc. replace 0 with get_master_bonus_str (or agi or dex or int~~)

then in the same class, make a new def called get_master_bonus_str etc with something like this
Code:
def get_master_bonus_str
m = $Mstr_bonus[$Actor_Mstr[@actor_id]]
return m[0] #remember, array index starts at 0 ;P
end

again, sorry if there are typo, I'll check this again when I get home :D
 
WHOA!!!!
If this works (and it looks like it should!) Its gonna cut a pile of code from what i've added to the scripts and reduce my events size, switch usage, variable usage etc considerably!!!!

If this does work, your gonna get credZ!!!
 
:x I think I'll just try to make a complete script of this.

edit: here is a really simple version. I'll work more on this at uni ;P

assign a master to actor using: change_master(actor,master)
where actor is the position of the actor in your party (ie, 1 for first person, 2 for second)

make sure to add masters first, before using change_master XD
Code:
MASTERS = {
0 => [0,0,0,0], 
1 => [0,0,0,0],
2 => [5,0,0,0]
} #str,dex,agi,int

class Game_Actor < Game_Battler
  
  attr_accessor :master
  attr_accessor :master_progress
  #-----------------------------------------------------------------------------
  # * alias list
  #-----------------------------------------------------------------------------
  alias lettuce_master_gameactor_init initialize
  alias lettuce_master_gameactor_str base_str
  alias lettuce_master_gameactor_dex dex
  alias lettuce_master_gameactor_agi agi
  alias lettuce_master_gameactor_int int
  #-----------------------------------------------------------------------------
  
  def initialize(actor_id)
    lettuce_master_gameactor_init(actor_id)
    @master = 0
    @master_progress = 0
  end
  
  def str
    n = lettuce_master_gameactor_str
    bonus = MASTERS[@master]
    n += bonus[0]
    return n
  end
  
  def dex
    n = lettuce_master_gameactor_dex
    bonus = MASTERS[@master]
    n += bonus[1]
    return n
  end
  
  def agi
    n = lettuce_master_gameactor_agi
    bonus = MASTERS[@master]
    n += bonus[2]
    return n
  end
  
  def int
    n = lettuce_master_gameactor_int
    bonus = MASTERS[@master]
    n += bonus[3]
    return n
  end
    
end
#-------------------------------------------------------------------------------
# * Interpreter
#   :change_master     change actor's master
#-------------------------------------------------------------------------------
class Interpreter
  
  def change_master(actor_id_party,master_id)
    actor = $game_party.actors[actor_id_party - 1]
    actor.master = master_id
    actor.master_progress = 0
  end
  
  def add_progress(actor_id)
    actor = $game_party.actors[actor_id - 1]
    actor.master_progress += 1
  end
  
end
 
Excellent! I got to admit I got home from college with your mini script yesterday, and got lost straight away! This seems easier to impliment.

So to change character one's master, i suppose i would need a call script event saying:
change_master(1,0)

which will apprentice the first character to the first master, right?
 

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