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.

Actor Customization V.6.0.2

Hi there, maybe it's a stupid question, but how do I call the Upgrade Scene?
I implemented the script normally but when a level up commences it still levels automatically and there's no "option" to go to the upgrade screen.

Any ideas anyone ;)

Greets,
Dukey
 
I had the same question in mind, I installed the script, ran it without problem. Fight monsters, gain levels, but nothing ever happened, no popup, no warning, nothing.

Is there a call script we must put, how does the character point system show up?

thx
 

S0L0

Member

well you need call the script yourself, either add an option for end of battle if you levelup show it, or create some kind of NPC where you talk for buy the new atributes, in either way for call it use the:


$scene = Scene_Upgrade.new
:)
 

S0L0

Member

try to explain your problem a lilttle better, and i'm sure someone will help you, because I assure you this script works great (if you call the scende for upgrade ...)

and case you having some problems, my small suggestion would be, try merge the game_party code part with your game_party directly and see again

Myself have a total mess of scripts together (some intact, some heavy modified) and this stil work good :P
 

S0L0

Member

well ofcourse you won't see any window for custumize... unless if you call it

you can either create a new option on your menu for call the:
$scene = Scene_Upgrade.new

or just create a NPC (event) and call scene when you talk to him

OR case you know RGSS a lil more, you can try make it call that after the end of battle IF you level up

but in either ways, you need to create the:
$scene = Scene_Upgrade.new

somewhere, for it show up :)
 
Edit: Don't need help anymore. I know how to do that, thanks S0l0.
Edit2: Hmmm, if I want to make str 1 higher, it gives an error. I go see on wich stats he gives another error.
Edit3: It seems that only hp works.
 
Nice script, the only problem I have with it is it lags really bad even with 2 different anti-lag scripts, is there any way to cut down on the lag?
 
t0tal king;183741 said:
Edit: Don't need help anymore. I know how to do that, thanks S0l0.
Edit2: Hmmm, if I want to make str 1 higher, it gives an error. I go see on wich stats he gives another error.
Edit3: It seems that only hp works.

What is the error, and on which line?

Nice script, the only problem I have with it is it lags really bad even with 2 different anti-lag scripts, is there any way to cut down on the lag?

I will look into it.
EDIT: The lag bug is fixed, please replace the script with the one found in the first post.

Props to S0l0 for helping out while I was away.

Edit: Added a F.A.Q section on the first post, please refer to it.
 
Synthesize, it's no error. The script fully works, but, if I open the customize screen, I can only upgrade HP. If I do str, I don't get a new level on it...
 

S0L0

Member

hey dude, I think this script is stil remaining one single feature, wich is:
preview the effects, I think would be nice, when you move cursor over the "Increase Health" the staus window would show the status for exemple:

800/800HP => 807/807HP

or increase strenght would show like:
19 Strenght => 20 Strenght

instead using the very static method of "Increase Health by 7" on the command window :)

just a small suggestion stil :)
 
t0tal king;184280 said:
Synthesize, it's no error. The script fully works, but, if I open the customize screen, I can only upgrade HP. If I do str, I don't get a new level on it...

Please try the new script wit the lag fix.

hey dude, I think this script is stil remaining one single feature, wich is:
preview the effects, I think would be nice, when you move cursor over the "Increase Health" the staus window would show the status for exemple:

800/800HP => 807/807HP

or increase strenght would show like:
19 Strenght => 20 Strenght

instead using the very static method of "Increase Health by 7" on the command window

just a small suggestion stil

Good idea, working on it now.

EDIT: V.4.8.0 released. Please see First post.
 

S0L0

Member

hey man :)

I like what you tried do now, but no offense but, I think the way you added stuff make them look a little confusing ...

I mean, for exemple if you have cursor over Strenght for buy it, you see the preview of ALL effects, so a first-time player may think if he choose that option he will gain ALL the bonus effects ...

stil in MY opinion, I think it would maybe look betterr as ONLY show the preview of the effect you currently have the cursor over, I mean if you currently over the HP you would see a preview of how your HP would stay if you buy it, if you currently over Dextery you would see a preview on how Dextery would become if you buy it.

I think you get my point, but it's already getting even better :D

PS: off-topic, on your verion history you have the same version repeated:
"
*V.4.5.0-*
Lag Bug Fixed
Additional Options Added
*V.4.5.0-*
Lag Bug Fixed
Additional Options Added
"
 
hey are you planning on adding a skil level system into this or is it already in there an i just missed it? Alsois there a way to change the sprite with a faceset or a battler image?
 

S0L0

Member

for replace the charset for a battler or faceset or whateva, you just need go to the window_upgrade and modify this line:

draw_actor_graphic(@actor, 122, 60)

and change it to what you prefer :)
 

S0L0

Member

Hey Synthesize, I modified your script (kept all your original credits as obvious), but this is just to show you what I meant with (also note, I think you had one miss-placed 'end' on end of def main at scene_upgrade instead be in the end of the scene) here is what I meant:

Code:
#=================================
# Syn's Upgrade Customization V4.8 (3/28/07)
# Created by Synthesize
# Help from Raziel, Trickster, Icedmetal57
#
#
# Modified Stats Effects Preview by 2R aka S0L0 (29/07/2007)
#=================================


module Upgrade_Points 
  Points_Gained = 3
  Hp_rise = 12
  Sp_rise = 8
  Str_rise = 1
  Dex_rise = 1
  Agi_rise = 1
  Int_rise = 1
end


#=================================
# *Create Points*
#=================================
class Game_Actor < Game_Battler                                                               
  attr_accessor :upgrade_points 
  alias stat_point_lvlup_game_actor_setup setup

  def setup(actor_id)
    stat_point_lvlup_game_actor_setup(actor_id)
    @upgrade_points = 0
  end
  
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      @upgrade_points += Upgrade_Points::Points_Gained
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
          $scene = Scene_Upgrade.new
        end
      end
    end
    while @exp < @exp_list[@level]
      @level -= 1
    end
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
end

#=================================
# Begin Upgrade Code
#=================================

class Scene_Upgrade

  def initialize(actor_index = 0, command_index = 0)
    @actor_index = actor_index
    @command_index = command_index
  end
  
  def main
    @spriteset = Spriteset_Map.new
      s1 = "Increase Health"
      s2 = "Increase Magic"
      s3 = "Increase Strength"
      s4 = "Increase Dexterity"
      s5 = "Increase Agility"
      s6 = "Increase Intellegence"
      @command_window = Window_Command.new(260, [s1, s2, s3, s4, s5, s6])
      @command_window.x = 46
      @command_window.y = 112
      @command_window.z = 350
      @command_window.opacity = 200
      @command_window.active = true
      @actor = $game_party.actors[@actor_index]
      @status_window = Window_Upgrade.new(@actor)
      @status_window.opacity= 200
      @status_window.x = 304
      @status_window.y = 56
      @raise_window = Window_Raise.new
      @raise_window.x = 46
      @raise_window.y = 56
      @raise_window.opacity = 200
      @raise_window.visible = false    
    @actor_window = Window_ActorTab.new(@actor)
      @actor_window.x = 304
      @actor_window.y = 0
      @actor_window.opacity = 200
      @actor_window.visible = true 
      @controls_window = Window_Controls.new
      @controls_window.opacity= 200
      @controls_window.x = 46
      @controls_window.y = 333
      @controls_window.visible = true
      Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
      Graphics.freeze
      @command_window.dispose
      @status_window.dispose
      @raise_window.dispose
    @controls_window.dispose
    @actor_window.dispose
      @spriteset.dispose
  end

  def update
    @command_window.update
    @raise_window.update
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Upgrade.new(@actor_index)
      return
    end
      if Input.trigger?(Input::L)
        $game_system.se_play($data_system.cursor_se)
        @actor_index += $game_party.actors.size - 1
        @actor_index %= $game_party.actors.size
        $scene = Scene_Upgrade.new(@actor_index)
        return
      end
      if @command_window.active
        update_command
        return
      end
  end

  def update_command
        @raise_window.update
    @spriteset.update
    if Input.press?(Input::UP) or Input.press?(Input::DOWN)
      case @command_window.index
      when 0
        @status_window.refresh(0)
      when 1
        @status_window.refresh(1)
      when 2
        @status_window.refresh(2)
      when 3
        @status_window.refresh(3)
      when 4
        @status_window.refresh(4)
      when 5
        @status_window.refresh(5)
      end
      return
    end
    if Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        if @actor.upgrade_points > 0
          if @actor.maxhp >= 9999
            @raise_window.visible = false
            name = '057-Wrong01'
            volume = 100
            pitch = 100
            Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
            @actor.maxhp += Upgrade_Points::Hp_rise
            @actor.hp += Upgrade_Points::Hp_rise
            @actor.upgrade_points -= 1
            @raise_window.visible = true
            @status_window.update
          end
        else
          @raise_window.visible = false
          name = '057-Wrong01'
              volume = 100
              pitch = 100
              Audio.se_play("Audio/SE/" + name, volume, pitch)
        end
      when 1
        if @actor.upgrade_points > 0
          if @actor.maxsp >= 9999
            @raise_window.visible = false
                name = '057-Wrong01'
                volume = 100
                pitch = 100
                Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
                @actor.maxsp += Upgrade_Points::Sp_rise
                @actor.sp += Upgrade_Points::Sp_rise
                @raise_window.visible = true     
                @actor.upgrade_points -= 1    
                @status_window.update
          end
        else
          @raise_window.visible = false
              name = '057-Wrong01'
              volume = 100
              pitch = 100
              Audio.se_play("Audio/SE/" + name, volume, pitch)
        end     
      when 2
        if @actor.upgrade_points > 0
          if @actor.str >= 999
            @raise_window.visible = false
                name = '057-Wrong01'
                volume = 100
                pitch = 100
                Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
            @actor.str += Upgrade_Points::Str_rise
            @raise_window.visible = true     
            @actor.upgrade_points -= 1    
            @status_window.update
          end
        else
          @raise_window.visible = false
              name = '057-Wrong01'
              volume = 100
              pitch = 100
              Audio.se_play("Audio/SE/" + name, volume, pitch)
        end
      when 3
        if @actor.upgrade_points > 0
          if @actor.dex >= 999
            @raise_window.visible = false
                name = '057-Wrong01'
                volume = 100
                pitch = 100
                Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
            @actor.dex += Upgrade_Points::Dex_rise
            @raise_window.visible = true     
                @actor.upgrade_points -= 1    
                @status_window.update
          end
        else
                      @raise_window.visible = false
                name = '057-Wrong01'
            volume = 100
                pitch = 100
                Audio.se_play("Audio/SE/" + name, volume, pitch)
        end
      when 4
        if @actor.upgrade_points > 0
          if @actor.agi >= 999
            @raise_window.visible = false
                name = '057-Wrong01'
                volume = 100
                pitch = 100
            Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
                @actor.agi += Upgrade_Points::Agi_rise
            @raise_window.visible = true     
                @actor.upgrade_points -= 1    
                @status_window.update
          end
        else
          @raise_window.visible = false
              name = '057-Wrong01'
              volume = 100
              pitch = 100
              Audio.se_play("Audio/SE/" + name, volume, pitch)
        end
      when 5
        if @actor.upgrade_points > 0
          if @actor.int >= 999
            @raise_window.visible = false
                name = '057-Wrong01'
                volume = 100
                pitch = 100
                Audio.se_play("Audio/SE/" + name, volume, pitch)
          else
            $game_system.se_play($data_system.decision_se)
                @actor.int += Upgrade_Points::Int_rise
                    @raise_window.visible = true     
                @actor.upgrade_points -= 1    
                @status_window.update
          end
        else
          @raise_window.visible = false
              name = '057-Wrong01'
              volume = 100
              pitch = 100
              Audio.se_play("Audio/SE/" + name, volume, pitch)
        end
      end
    end
  end
end

#=================================
# *Status Window*
#=================================

class Window_Upgrade < Window_Base
  
  def initialize(actor)
    super(32, 32, 315, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Arial"
    self.contents.font.size = 18
    @actor = actor
    self.opacity = 200
    refresh(0)
  end

  def refresh(type)
    @type = type
    self.contents.clear
    draw_actor_graphic(@actor, 122, 60)
    draw_actor_class(@actor, 176, 3)
    draw_actor_level(@actor, 6, 3)
    draw_actor_state(@actor, 95, 48)
    if @actor.upgrade_points >= 1
      case @type
      when 0
        self.contents.font.color = system_color
        if @actor.hp < 9999
          self.contents.draw_text(170, 70, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @hp_preview = @actor.hp + Upgrade_Points::Hp_rise
        @mhp_preview = @actor.maxhp +  Upgrade_Points::Hp_rise
        if @actor.hp < 9999
          self.contents.draw_text(200, 70, 100, 100, "#{@hp_preview}/#{@mhp_preview}")
        end
      when 1
        self.contents.font.color = system_color
        if @actor.sp < 9999  
          self.contents.draw_text(170, 94, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @sp_preview = @actor.sp + Upgrade_Points::Sp_rise
        @msp_preview = @actor.maxsp + Upgrade_Points::Sp_rise
        if @actor.sp < 9999
          self.contents.draw_text(200, 94, 100, 100, "#{@sp_preview}/#{@msp_preview}")    
        end
      when 2
        self.contents.font.color = system_color
        if @actor.str < 999
          self.contents.draw_text(170, 158, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @str_preview = @actor.str + Upgrade_Points::Str_rise
        if @actor.str < 999
          self.contents.draw_text(200, 158, 100, 100, "#{@str_preview}")    
        end
      when 3
        self.contents.font.color = system_color
        if @actor.dex < 999
          self.contents.draw_text(170, 182, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @dex_preview = @actor.dex + Upgrade_Points::Dex_rise
        if @actor.dex < 999
          self.contents.draw_text(200, 182, 100, 100, "#{@dex_preview}")    
        end
      when 4
        self.contents.font.color = system_color
        if @actor.agi < 999
          self.contents.draw_text(170, 206, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @agi_preview = @actor.agi + Upgrade_Points::Agi_rise
        if @actor.agi < 999
          self.contents.draw_text(200, 206, 100, 100, "#{@agi_preview}")    
        end
      when 5
        self.contents.font.color = system_color
        if @actor.int < 999
          self.contents.draw_text(170, 230, 100, 100, "=>")
        end
        self.contents.font.color = normal_color
        @int_preview = @actor.int + Upgrade_Points::Int_rise
        if @actor.int < 999
          self.contents.draw_text(200, 230, 100, 100, "#{@int_preview}")
        end
      end
    end
    draw_actor_hp(@actor, 4, 104, 172)
    draw_actor_sp(@actor, 4, 128, 172)
    draw_actor_exp(@actor, 4, 152)
    draw_actor_parameter(@actor, 4, 192, 3)
    draw_actor_parameter(@actor, 4, 216, 4)
    draw_actor_parameter(@actor, 4, 240, 5)
    draw_actor_parameter(@actor, 4, 264, 6)
    x = contents.text_size("Points:").width
    text = "Points:"
    text2 = "#{@actor.upgrade_points.to_s}"
    self.contents.font.color = system_color
    self.contents.draw_text(190, 360, x, 32, text)
    self.contents.font.color = normal_color
    self.contents.draw_text(200+x, 360, (self.width/2), 32, text2.to_s)
  end
  
  def update
    refresh(type)
  end
end

#--------------------------------------------------------------------------
# Raise Window
#-------------------------------------------------------------------------- 
class Window_Raise< Window_Base
  def initialize
    super(0, 0, 260, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 21
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 180, 30, "Attribute Increased.")
  end
end

#--------------------------------------------------------------------------
# ActorTab Window
#-------------------------------------------------------------------------- 
class Window_ActorTab< Window_Base
  def initialize(actor)
    super(0, 0, 120, 60)
    @actor = actor
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 21
    refresh
  end
  
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 3)
  end
end

#--------------------------------------------------------------------------
# Controls Window
#-------------------------------------------------------------------------- 
class Window_Controls < Window_Base
  def initialize
    super(0, 0, 260, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 20
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 200, 30, "Q: Shift <-   W: Shift->  ")
  end
end
your entire code stil on same, I just modified the effect preview method, for you see what I meant, and I also removed the comments :P, you are completley free to use my tiny modified add without credit me at all, I only post the creidts on the modification at this script for you know was me who made them :)


and if you prefer I can also remove this script from this topic, if you prefer to, just need let me know

To Siggy: (check this :) )

Code:
replace this code part from the window_upgrade


    draw_actor_graphic(@actor, 122, 60)
    draw_actor_state(@actor, 200, 300)

for
    draw_actor_battler(@actor, 220, 300)
    draw_actor_state(@actor, 200, 300)


and add this code before this script

#=================================
# *battler Window*
#=================================
class Window_Base < Window
  def draw_actor_battler(actor, x, y)
    bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw,ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
end

hope it helps :)
 

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