Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Xero Shifter on November 19, 2008, 09:57:35 pm

Title: Class Stat Initilization Script
Post by: Xero Shifter on November 19, 2008, 09:57:35 pm
Alright so here is the current script:
class Game_Actor
  alias satoh_star_class_setup setup
  def setup(actor_id)
    satoh_star_class_setup(actor_id)
    satoh_star_class(actor_id)
  end
  def satoh_star_class(actor_id)
    actor = $data_actors[actor_id]
    case actor.class_id
    when 1 #Zealot or whatever
      @character_name = ''#sets name to blank so only the Class shows... the class is Zealot.
      @hp = maxhp = 2 #Zealot HP
      @sp = maxsp = 1 #SP
      @dex = 3 #whatever a Zealot's Dex is.
      @agi = 4 #Agi
      @str = 5 #Str
      @int = 6 #Int
    when 2 #Ghost or something
      @character_name = ''
      @hp = maxhp = 1 #Ghost HP
      @sp = maxsp = 2 #SP
      @dex = 3 #Dex
      @agi = 4 #Agi
      @str = 5 #Str
      @int = 6 #Int
    when 3 #Archon Hero "Markovich" (for example)
      @character_name = 'Markovich'
      @hp = maxhp = 0 #Markovich's unique HP
      @sp = maxsp = 0 #SP
      @dex = 0 #Dex
      @agi = 0 #Agi
      @str = 0 #Str
      @int = 0 #Int
    end
  end
end


And here is the issue, its not changing the stats like i should, and its not actually changing the max mp/hp its changing the current... Anything else can be explained by Satoh, after all, i must give him credit for it, its his script ^_^.
Also: Using rpgmaker Xp.
Title: Re: Class Stat Initilization Script
Post by: Fantasist on November 20, 2008, 12:35:12 am
Guidelines for the scriptor (Satoh?): The script doean't work because those stats are taken directly from the level graph you define in the database, they're not variables. The methods "base_maxhp", "base_maxsp", "base_str", etc., need to be modded. Also, @character_name is the name of the charset graphic file. @name is the name of the actor.
Title: Re: Class Stat Initilization Script
Post by: Satoh on November 20, 2008, 12:40:50 am
Lol we realized earlier that the whole script is pointless... since Blizzard already wrote a script that meets the necessary criteria...

>.<;
Title: Re: Class Stat Initilization Script
Post by: Fantasist on November 20, 2008, 01:59:47 am
What IS it with my untimely replies these days >.<'