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 stat point customization

Hey,
I'm requesting a point system that uses a variable to add a stat to a party member.

Basically, if you've played wizardry or like dungeon crawlers, this may seem familiar.

You create a character/actor by choosing race/sex/etc... and each combination of those has their own base stats. You'll gain a certain number of points (a variable that is changed threw game play and randomness) that can you distribute among the base stats.

The stats I'd like to be able to add to are:
Strength, Dexterity, Agility, Physical Defense, Intelligence, and Magic Defense.

So if threw a certain combination of race/sex/etc.... we end up with an actor whose base stats in STR and PDF were 10 and 0 respectively, and we received 7 points to distribute and we distribute those points to only STR and PDF, as 4 to STR and 3 to PDF the character now has a base STR of 14 and a base PDF of 4.
You can distribute the bonus points to any of the stats, but in this example only two stats were used.

But I also need a callscript that would return the actor to their original base stats, in this example returning that actor to an STR of 10 and a PDF of 0.

If you need to know why, though I'm not sure why one would, I'm requesting this or what I'll be using it for, it's in the spoiler below.
The player creates a party of 6 members. Each member can be of any possible race and sex. At present there are 5 races, for a total of 60 "default" actors - since every combination has their own stats, and you can have a party full of the same race/sex combo.

When the character is created, additional stat bonuses are handed out threw a variable. Random number between x and y, where x and y alter as the certain switches are turned on and certain variables are increased.

I'm using the usual "KO" state, that makes a character unable to act like normal. But I'm also using two "Dead" states that are the same, however where KO is recovered after battle "Dead" must be resurrected threw special means. Some times the resurrection doesn't always work, and when failed the character can be lost forever.

The player will now have to create a brand new character - thus wiping out all stat bonuses gained previously, returning the actor to their database default. This way if I created a party full of male gnomes, and one died, if I created a new male gnome it wouldn't automatically have the same stats as the last one had. It would be reset.
As for appearances, I'm not picky. If it must look like a full menu I won't mind, I'd prefer it too look as if it were entirely done with show text and choice event commands - so that the map is still viewable and all, but it's not important to me either way. If you're willing to do this request, and you have an idea you'd prefer to use, go right ahead.

Thanks for reading.
 
this might be what your looking for if it is similar to the diablo style system.

Code:
#----------------------------------------------------------
# Level Up Point Spend System
# by Stefo
# LV up Point spend system
# If you like this thing and want to use it in your RPG then
# put me in your credits
#----------------------------------------------------------

#Current Spend per level when you start game

$SPLCH1 =  0
$SPLCH2 =  0
$SPLCH3 =  0
$SPLCH4 =  0

$SPLADD = 25
#This is how much you add points to abilities of selected hero
$STRBY = 1
$AGIBY = 1
$DEXBY = 1
$INTBY = 1
$HPBY = 10
$SPBY = 10

#DO NOT CHANGE LINES BELOW!
$Stradd = 1
$agiadd = 1
$dexadd = 1
$intadd = 1
$hpadd = 1
$spadd = 1


$getokay = 0

$stStrR = 1
$stAgiR = 1
$stDexR = 1
$stIntR = 1
$sthpR = 1
$stspR = 1

$actor1gotlv = 0
$actor2gotlv = 0
$actor3gotlv = 0
$actor4gotlv = 0

  #------------------------------------------------------------------------------------------
  # Scene_Battle
  # This is put here to make that you don't have to press 'C' button.
  #-------------------------------------------------------------------------------------------

class Scene_Battle
  def update_phase5
  
    if @phase5_wait_count > 0
      @phase5_wait_count -= 1
      if @phase5_wait_count == 0
        @result_window.visible = true
        $game_temp.battle_main_phase = false
        @status_window.refresh
      end
      return
    end
sleep(3)
      battle_end(0)
  end
end


class Act_Get_Spp
  
def initialize(dtd)
   if !$BTEST
  actor = $game_actors[dtd]
    if dtd != 0
    GET_IT(dtd)
  end
  end
end
  
def GET_IT(actids)
actor = $game_actors[actids]
$stStrR = actor.str.to_i
$stIntR = actor.int.to_i
$stDexR = actor.dex.to_i
$stAgiR = actor.agi.to_i 
$sthpR = actor.maxhp.to_i
$stspR =  actor.maxsp.to_i
   end
end

class Act_Set_Spp
  
  def initialize(cactnum)
    if !$BTEST
    actor = $game_actors[cactnum]
    if cactnum != 0
    SET_IT(cactnum)
  end
  end
  end
  
  def SET_IT(actids)
actor = $game_actors[actids]
actor.str = $stStrR
actor.int = $stIntR
actor.dex = $stDexR
actor.agi = $stAgiR
actor.maxhp = $sthpR
actor.maxsp = $stspR
 actor.recover_all
end
end

class Acts_Set_Spp_Added
  
  def initialize(currentActornum)
    if !$BTEST
    actor = $game_actors[currentActornum]
    if currentActornum != 0
    SET_IT(actor)
  end
  end
  end
  
  def ADD_IT
$ACTORD.str = $Stradd
$ACTORD.int = $intadd
$ACTORD.dex = $dexadd
$ACTORD.agi = $agiadd
$ACTORD.maxhp = $hpadd
$ACTORD.maxsp = $spadd
 $ACTORD.recover_all
end
end

class Scene_Title

   def command_new_game

    # Play decision sound effect
    $game_system.se_play($data_system.decision_se)

    # Stop Title BGM
    Audio.bgm_stop

    # Initialize new game
    Graphics.frame_count = 0

    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    $acst = Act_Set_Spp.new(0)
    $acgt = Act_Get_Spp.new(0)
    $acstadd = Acts_Set_Spp_Added.new(0)

    # Set up hero party
    $game_party.setup_starting_members

    # Set up opening map
    $game_map.setup($data_system.start_map_id)

    # Set up hero party's beginning location
    $game_player.moveto($data_system.start_x, $data_system.start_y)

    # Set up lead character's map sprite graphic
    $game_player.refresh

    # Refresh the map
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new
  end
  
    def battle_test
    
    # Load information from database into memory
    $data_actors        = load_data("Data/BT_Actors.rxdata")
    $data_classes       = load_data("Data/BT_Classes.rxdata")
    $data_skills        = load_data("Data/BT_Skills.rxdata")
    $data_items         = load_data("Data/BT_Items.rxdata")
    $data_weapons       = load_data("Data/BT_Weapons.rxdata")
    $data_armors        = load_data("Data/BT_Armors.rxdata")
    $data_enemies       = load_data("Data/BT_Enemies.rxdata")
    $data_troops        = load_data("Data/BT_Troops.rxdata")
    $data_states        = load_data("Data/BT_States.rxdata")
    $data_animations    = load_data("Data/BT_Animations.rxdata")
    $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
    $data_system        = load_data("Data/BT_System.rxdata")
    $acst = Act_Set_Spp.new(0)
    $acgt = Act_Get_Spp.new(0)
    $acstadd = Acts_Set_Spp_Added.new(0)
    Graphics.frame_count = 0

    # Initialize global classes
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new

    # Set up battle
    $game_party.setup_battle_test_members
    $game_temp.battle_troop_id = $data_system.test_troop_id
    $game_temp.battle_can_escape = true
    $game_map.battleback_name = $data_system.battleback_name

    # Set up music and sound
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)

    $scene = Scene_Battle.new
  end
end
  
#--------------------------------------------------------------------------------------------
# This is edited because when you go to new level
# you automatically gain hp,sp,agility etc. 
# so it's set that you don't get automatically that attributes
#--------------------------------------------------------------------------------------------
class Game_Actor
   
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      $acgt.GET_IT(@actor_id)
      @level += 1
      $acst.SET_IT(@actor_id)
    case @actor_id
   when 1
     $actor1gotlv = 1
           @ADSP = $SPLCH1.to_i
     @ADSP += $SPLADD.to_i
     $SPLCH1 = @ADSP.to_i
    when 2
      $actor2gotlv = 1
                 @ADSP = $SPLCH2.to_i
     @ADSP += $SPLADD.to_i
     $SPLCH2 = @ADSP.to_i
    when 3
        $actor3gotlv = 1
                   @ADSP = $SPLCH3.to_i
     @ADSP += $SPLADD.to_i
     $SPLCH3 = @ADSP.to_i
    when 4
        $actor4gotlv = 1
    @ADSP = $SPLCH4.to_i
     @ADSP += $SPLADD.to_i
     $SPLCH4 = @ADSP.to_i
    end
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
        end
      end
    end
    while @exp < @exp_list[@level]
      @level -= 1
    end
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
 #------------------------------------------------------------------------------- 
    def level=(level)
  $acgt.GET_IT(@actor_id)
    level = [[level, $data_actors[@actor_id].final_level].min, 1].max
    $acst.SET_IT(@actor_id)

  $acst.SET_IT(@actor_id)
   self.exp = @exp_list[level]
   $acst.SET_IT(@actor_id)
   case @actor_id
   when 1
     $actor1gotlv = 1
     $SPLCH1 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
    when 2
      $actor2gotlv = 1
      $SPLCH2 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
    when 3
        $actor3gotlv = 1
        $SPLCH3 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
    when 4
        $actor4gotlv = 1
        $SPLCH4 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
    end
   
  end
end

#-----------------------------------------------------------------------------------------
# This is edited because you need extra things to save
# in this script
#------------------------------------------------------------------------------------------
class Scene_Save
       def write_save_data(file)

    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end

    Marshal.dump(characters, file)
    Marshal.dump(Graphics.frame_count, file)

    $game_system.save_count += 1
    $game_system.magic_number = $data_system.magic_number

    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
    Marshal.dump ($SPLCH1,file)
    Marshal.dump ($SPLCH2,file)
    Marshal.dump ($SPLCH3,file)
    Marshal.dump ($SPLCH4,file)
    Marshal.dump ($actor1gotlv ,file)
    Marshal.dump ($actor2gotlv ,file)
    Marshal.dump ($actor3gotlv ,file)
    Marshal.dump ($actor4gotlv ,file)
    Marshal.dump($acst,file)
    Marshal.dump($acgt,file)
  end
end

#-------------------------------------------------------------------------------------------
# This is edited because you need extra things to load
# in this script
#-------------------------------------------------------------------------------------------
class Scene_Load
    def read_save_data(file)

    characters = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)

    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    $SPLCH1               = Marshal.load (file)
    $SPLCH2               = Marshal.load (file)
    $SPLCH3               = Marshal.load (file)
    $SPLCH4               = Marshal.load (file)
    $actor1gotlv            = Marshal.load (file)
    $actor2gotlv            = Marshal.load (file)
    $actor3gotlv            = Marshal.load (file)
    $actor4gotlv            = Marshal.load (file)
    $acst                       = Marshal.load(file)
    $acgt                        = Marshal.load(file)
    $acstadd                  = Marshal.load(file)
    if $game_system.magic_number != $data_system.magic_number
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end

    $game_party.refresh
  end
end
  
#---------------------------------------------------------------------
# A location shower ( without background window)
# You can show it by calling a script in event
# If you don't know how to do it then check mine!
#---------------------------------------------------------------------
class Window_LocationShow < Window_Base

  def initialize
    super(600, -10, 640, 64)
    $map_infos            = load_data("Data/MapInfos.rxdata")
    for key in $map_infos.keys
      if key = $game_map.map_id
      @mapnm =  $map_infos[key].name
      end
    end
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = 30
    self.x = x - contents.text_size(@mapnm).width 
    self.width = width -  contents.text_size(@mapnm).width / 2
    self.opacity = 0
    refresh
  end

  def refresh
    self.contents.clear
        self.contents.font.color = Color.new(0,0,0)
    kl = contents.text_size(@mapnm).width
    self.contents.draw_text(2, 2, kl, 32,@mapnm , 2)
        self.contents.font.color = normal_color
    kl = contents.text_size(@mapnm).width
    self.contents.draw_text(0, 0, kl, 32,@mapnm , 2)
  end
  
end 

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
  
  
  def drawSPaddparam(actor, x, y, type,get)
        if $getokay != 0    
$Stradd = $ACTORD.str.to_i
$agiadd = $ACTORD.agi.to_i
$dexadd = $ACTORD.dex.to_i
$intadd =   $ACTORD.int.to_i
$hpadd =  $ACTORD.maxhp.to_i
$spadd =  $ACTORD.maxsp.to_i
$getokay = 0
return
end
    @typ = type
case @typ
    when 0
      param_name = "Max. " + $data_system.words.hp
      param_value = $hpadd.to_i
                self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
    self.contents.font.color = normal_color
    cx = contents.text_size(param_value.to_s).width
    self.contents.draw_text((x + cx) + 50, y, 70, 32, param_value.to_s, 2)
    when 1
      param_name =  "Max. " +  $data_system.words.sp
      param_value = $spadd.to_i
                self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
        self.contents.font.color = normal_color
   cx = contents.text_size(param_value.to_s).width
    self.contents.draw_text((x + cx) + 50, y, 70, 32, param_value.to_s, 2)
    when 2
      param_name = $data_system.words.str
      param_value = $Stradd.to_i
                self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
    when 3
      param_name = $data_system.words.dex
      param_value = $dexadd.to_i
                self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
    self.contents.font.color = normal_color

    self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
    when 4
      param_name = $data_system.words.agi
      param_value = $agiadd.to_i
                self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
    when 5
      param_name = $data_system.words.int
      param_value = $intadd.to_i
          self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
end
end

def drawSPADD(x,y)
actors = $ACTORIND

case actors
when 0
    param_name = "Spend Points"
    self.contents.draw_text(x + 120, y, 36, 32, $SPLCH1.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 1
    param_name = "Spend Points"
    self.contents.draw_text(x + 120, y, 36, 32, $SPLCH2.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 2
    param_name = "Spend Points"
     self.contents.draw_text(x + 120, y, 36, 32, $SPLCH3.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 3
    param_name = "Spend Points"
    self.contents.draw_text(x + 120, y, 36, 32, $SPLCH4.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, param_name + ":")
  end
end

def retclear
    if $getokay != 0    
$Stradd = $ACTORD.str.to_i
$agiadd = $ACTORD.agi.to_i
$dexadd = $ACTORD.dex.to_i
$intadd =   $ACTORD.int.to_i
$hpadd =  $ACTORD.maxhp.to_i
$spadd =  $ACTORD.maxsp.to_i
$getokay = 0
end
end
end
#--------------------------------------------------------------------------------------------
# The edited show actor status window
#--------------------------------------------------------------------------------------------
class Window_Status < Window_Base
  
   def refresh
    self.contents.clear
    draw_actor_battler(@actor,55, 250)
    draw_actor_name(@actor, 4, 0)
    self.contents.draw_text(154,-10,50,50,"Class:")
    draw_actor_class(@actor, 4 + 204, 0)
    draw_actor_level(@actor, 116, 32)
    draw_actor_state(@actor,116, 64)
    draw_actor_hp(@actor, 116, 112, 172)
    draw_actor_sp(@actor, 116, 144, 172)
    draw_actor_parameter(@actor, 116, 192, 0)
    draw_actor_parameter(@actor, 116, 224, 1)
    draw_actor_parameter(@actor, 116, 256, 2)
    draw_actor_parameter(@actor, 116, 304, 3)
    draw_actor_parameter(@actor, 116, 336, 4)
    draw_actor_parameter(@actor, 116, 368, 5)
    draw_actor_parameter(@actor, 116, 400, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 48, 80, 32, "EXP:")
    self.contents.draw_text(320, 80, 80, 32, "NEXT:")
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "Equipment")
    self.contents.draw_text(320, 208, 96, 32,$data_system.words.weapon + ":")
    self.contents.draw_text(320, 256, 96, 32, $data_system.words.armor1 + ":")
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor2 + ":")
    self.contents.draw_text(320, 352, 96, 32, $data_system.words.armor3 + ":")
    self.contents.draw_text(320, 400, 96, 32, $data_system.words.armor4 + ":")
    draw_item_name($data_weapons[@actor.weapon_id], 400 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 400 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 400 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 400 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 400 + 16, 400)
  end
  
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  end

end

class Scene_Status 
  
  
     def checkfora(actorindex)
case actorindex
when 0
  if $actor1gotlv != 0
    showlvupwin(actorindex)
  end
when 1
  if $actor2gotlv != 0
    showlvupwin(actorindex)
  end
when 2
  if $actor3gotlv != 0
    showlvupwin(actorindex)
  end
when 3
  if $actor4gotlv != 0
    showlvupwin(actorindex)
  end
end

end
  
  def showlvupwin(acts)
    @brek = 0
      sleep(0.1)
    Graphics.freeze
    Graphics.transition(40)
        sleep(0.1)
    Graphics.update
        sleep(0.1)
    @title = Window_Help.new
    @title.set_text("You got new level! Do you want to level up?", 0)
    @title.y = 100
    @title.z = 99998
    s1 = "Level up!"
    s2 = "Exit"
    @lvupwin = Window_Command.new(192, [s1, s2])
    @lvupwin.x = 220
    @lvupwin.y = 200
    @lvupwin.z = 99998
    @lvupwin.back_opacity = 255
 
    loop do
      Graphics.update
      Input.update
      updat(acts)
      if @brek != 0

        break
      end
    end
            @lvupwin.dispose
        @title.dispose    
  end

  def updat(act)

    @lvupwin.update

    if Input.trigger?(Input::C)

      case @lvupwin.index
      when 0
    @brek = 1

    $scene = Scene_Spend.new
    Graphics.transition
      when 1
        @brek = 1
      end

    end

  end
  
    def main

    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status.new(@actor)
    Graphics.transition
     $ACTORD = @actor
     $ACTORIND = @actor_index
      checkfora(@actor_index)
    loop do
 $ACTORD = @actor
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end  
    end

    Graphics.freeze
    @status_window.dispose
  end
  
  end
class Window_NewHelp < Window_Base
  
  def initialize(text,x,y)
    super(0, 0, 200, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh(text)
  end
  
def refresh(text)
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, 32, text)
    end
  end
  
#-----------------------------------------------------------------------------------------
# Finally the main thing!
#-----------------------------------------------------------------------------------------
class Window_ActorSpp < Window_Base
  
  def initialize(actor,x,y,width,height)
    super(x, y, width, height)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = $ACTORD
    refresh
  end
  
def refresh
      self.contents.clear
    draw_actor_battler($ACTORD, 220, 200)
    draw_actor_name($ACTORD, 150, 210)
    draw_actor_level($ACTORD, 150, 230)
    drawSPaddparam($ACTORD,150,250,0,0)
    drawSPaddparam($ACTORD,150,270,1,0)
    drawSPaddparam($ACTORD,150,290,2,0)
    drawSPaddparam($ACTORD,150,310,3,0)
    drawSPaddparam($ACTORD,150,330,4,0)
    drawSPaddparam($ACTORD,150,350,5,0)
    drawSPADD(150,400)
  end
end

class Scene_Spend

  
  def main
  @sprite = Spriteset_Map.new
    actsr = $ACTORD
  @kill_it = 0
  @clerSP = 1
    @help_text = Window_NewHelp.new("Choose attribute:",0,0)
    @help_text.x = 0
    @help_text.y = 0
    @help_text.width = 200
    @help_text.z = 99999999
    @help_text.height = 64
    @help_text.opacity = 160
    @acSpend = Window_ActorSpp.new(actsr,200,0,440,480)
@acSpend.opacity = 160
    @acSpend.z = 999999
    $getokay = 1
    @acSpend.refresh
    s1 = $data_system.words.hp
    s2 = $data_system.words.sp
    s3 = $data_system.words.str
    s4 = $data_system.words.dex
    s5 = $data_system.words.agi
    s6 = $data_system.words.int
    s7 = "OK"
    s8 = "Clear All"
    @AttrSel = Window_Command.new(200, [s1, s2,s3,s4,s5,s6,s7,s8])
    @AttrSel.y = 64
    @AttrSel.height = 416
    @AttrSel.z = 999999
    @AttrSel.opacity = 160
    Graphics.transition
    @clerSP = 1
    
    
loop do
      Graphics.update
      Input.update
      @acSpend.refresh
      updateATTRSEL
      if @kill_it != 0
        break
      end
    end
Graphics.freeze
@AttrSel.dispose
@acSpend.dispose
@help_text.dispose
@sprite.dispose
Graphics.transition
$acstadd.ADD_IT
$scene = Scene_Map.new

actsr  = $ACTORIND
case actsr
when 0
  if $actor1gotlv != 0
    $actor1gotlv = 0
  end
when 1
  if $actor2gotlv != 0
    $actor2gotlv = 0
  end
when 2
    if $actor3gotlv != 0
    $actor3gotlv = 0
  end
when 3
    if $actor4gotlv != 0
    $actor4gotlv = 0
  end
end
end

  
def updateATTRSEL
    @AttrSel.update
    
    csa = $ACTORIND
    if @clerSP != 0
      @clerSP = 0
case csa
when 0
      $SPLRET = $SPLCH1.to_i
when 1
      $SPLRET = $SPLCH2.to_i
when 2
      $SPLRET = $SPLCH3.to_i
when 3
      $SPLRET = $SPLCH4.to_i
    end
    end
    
    
if Input.repeat?(Input::C)
  case @AttrSel.index
  when 0
    acselt = $ACTORIND
 case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $hpadd = $hpadd + $HPBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
    
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
    $hpadd = $hpadd + $HPBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $hpadd = $hpadd + $HPBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
      $hpadd = $hpadd + $HPBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
end
    
  when 1

    
    acselt = $ACTORIND
case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $spadd = $spadd + $SPBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
    $spadd = $spadd + $SPBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $spadd = $spadd + $SPBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $spadd = $spadd + $SPBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
  end
    
  when 2 

    
    acselt = $ACTORIND
case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $Stradd = $Stradd + $STRBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
    $Stradd = $Stradd + $STRBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $Stradd = $Stradd + $STRBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $Stradd = $Stradd + $STRBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
  end
  
  when 3
    

    
   acselt = $ACTORIND
 case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $dexadd = $dexadd + $DEXBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
    $dexadd = $dexadd + $DEXBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $dexadd = $dexadd + $DEXBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $dexadd = $dexadd + $DEXBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
      end
      
  when 4

   
   acselt = $ACTORIND
case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $agiadd = $agiadd + $AGIBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
    $agiadd = $agiadd + $AGIBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
    $agiadd = $agiadd + $AGIBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $agiadd = $agiadd + $AGIBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
      end
      
  when 5
 
   acselt = $ACTORIND
case acselt
when 0
    unless $SPLCH1 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
   $intadd = $intadd + $INTBY
    @acSpend.refresh
    @ackill = $SPLCH1
    @ackill -= 1
    $SPLCH1 = @ackill
            unless $SPLCH1 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 1
    unless $SPLCH2 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    
   $intadd = $intadd + $INTBY
    @acSpend.refresh
        @ackill = $SPLCH2
    @ackill -= 1
    $SPLCH2 = @ackill
    
            unless $SPLCH2 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 2
    unless $SPLCH3 > 0
      $game_system.se_play($data_system.buzzer_se)
      @AttrSel.disable_item(0)
      return
    end
   $intadd = $intadd + $INTBY
    @acSpend.refresh
        @ackill = $SPLCH3
    @ackill -= 1
    $SPLCH3 = @ackill
            unless $SPLCH3 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
when 3
    unless $SPLCH4 > 0
      $game_system.se_play($data_system.buzzer_se)
      return
    end
   $intadd = $intadd + $INTBY
    @acSpend.refresh
        @ackill = $SPLCH4
    @ackill -= 1
    $SPLCH4 = @ackill
            unless $SPLCH4 > 0
      @AttrSel.disable_item(0)
      @AttrSel.disable_item(1)
      @AttrSel.disable_item(2)
      @AttrSel.disable_item(3)
      @AttrSel.disable_item(4)
      @AttrSel.disable_item(5)
      return
    end
      end
      
  when 6
@kill_it = 1
  when 7
    clear
  end
end
end
end


def clear
    $getokay = 1
    @acSpend.refresh
      @AttrSel.enable_item(0)
      @AttrSel.enable_item(1)
      @AttrSel.enable_item(2)
      @AttrSel.enable_item(3)
      @AttrSel.enable_item(4)
      @AttrSel.enable_item(5)
amp = $ACTORIND
case amp
when 0
$SPLCH1 = $SPLRET
when 1
$SPLCH2 = $SPLRET
when 2
$SPLCH3 = $SPLRET
when 3
$SPLCH4 = $SPLRET
return
end
end

class Window_Command < Window_Selectable
  
    def enable_item(index)
    draw_item(index, normal_color)
  end
end

#THIS IS ALL!!

#--------------------------------------------------------------------------------------------
# End of the Script!
# made by Drago del Fato!
# Last two words : SCREW FLANDERS!
#--------------------------------------------------------------------------------------------
 
Sorry, but that's not what I'm looking for.

I'm looking for a script that can be called via an event to distribute X points to the listed stats above (where X = a specific variable.), and each point added adds 1 point to that stat.

And a 2nd call script to wipe out all stats.

Either way I would need both to be able to handle at least 60 actors.

Thanks though, sorry if I wasn't clear.
 

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