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.

Montana Status System

Screens:
http://img80.imageshack.us/img80/5876/s ... ityau2.png[/IMG]
http://img147.imageshack.us/img147/9608 ... entgv8.png[/IMG]
Code:
#==============================================================================

#------------------------------------------------------------------------------
#  スキル画面で、スキル使用者のステータスを表示するウ�
#==============================================================================

class Window_FS < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 180)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font
self.contents.font.size = 22
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 50, 80)
draw_actor_class(@actor, 180,0)
draw_actor_level(@actor, 0,80)
draw_actor_name(@actor, 65, 0)
draw_actor_state(@actor, 65, 20)
draw_actor_hp(@actor, 0, 100)
draw_actor_sp(@actor, 0, 120)
self.contents.font.color = system_color
self.contents.draw_text(180, 80, 80, 32, "Exp:")
self.contents.draw_text(180, 112, 80, 32, "Next Level:")
self.contents.font.color = normal_color
self.contents.draw_text(180 + 80, 80, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(180 + 80, 112, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.size = 60
self.contents.draw_text(430, 30, 150, 82, "Status")
end
end

#==============================================================================

#------------------------------------------------------------------------------
#  スキル画面で、スキル使用者のステータスを表示するウ�
#==============================================================================

class Window_FS2 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0,180, 640, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font
self.contents.font.size = 25
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_parameter(@actor, 40, 50, 0)
draw_actor_parameter(@actor, 40, 120, 1)
draw_actor_parameter(@actor, 40, 190, 2)
draw_actor_parameter(@actor, 240, 40, 3)
draw_actor_parameter(@actor, 240, 100, 4)
draw_actor_parameter(@actor, 240, 160, 5)
draw_actor_parameter(@actor, 240, 220, 6)
self.contents.font.color = system_color
self.contents.font.size = 30
self.contents.draw_text(0,10, 80, 32, "Ability")
end
end

#==============================================================================

#------------------------------------------------------------------------------
#  スキル画面で、スキル使用者のステータスを表示するウ�
#==============================================================================

class Window_FS3 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0,180, 640, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font
self.contents.font.size = 25
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 30
self.contents.draw_text(0, 10, 150, 60, "Equipment")
self.contents.font.size = 25
draw_item_name($data_weapons[@actor.weapon_id], 200 + 16, 20)
draw_item_name($data_armors[@actor.armor1_id], 200 + 16, 60)
draw_item_name($data_armors[@actor.armor2_id], 200 + 16, 100)
draw_item_name($data_armors[@actor.armor3_id], 200 + 16, 140)
draw_item_name($data_armors[@actor.armor4_id], 200 + 16, 180)
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(200, 20, 96, 32, $data_system.words.weapon)
self.contents.draw_text(200, 60, 96, 32, $data_system.words.armor1)
self.contents.draw_text(200, 100, 96, 32, $data_system.words.armor2)
self.contents.draw_text(200, 140, 96, 32, $data_system.words.armor3)
self.contents.draw_text(200, 180, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 200 + 24, 20)
draw_item_name($data_armors[@actor.armor1_id], 200 + 24, 60)
draw_item_name($data_armors[@actor.armor2_id], 200 + 24, 100)
draw_item_name($data_armors[@actor.armor3_id], 200 + 24, 140)
draw_item_name($data_armors[@actor.armor4_id], 200 + 24, 180)
end
end

#==============================================================================
# â–  Scene_Status
#------------------------------------------------------------------------------
#  ステータス画面の処理を行うクラスです。
#==============================================================================

class Scene_Status
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor_index : アクターインデックス
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# アクターを取得
@actor = $game_party.actors[@actor_index]
# ステータスウィンドウを作成
@status_window = Window_FS.new(@actor)

@status2_window = Window_FS2.new(@actor)
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@status_window.dispose
@status2_window.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# メニュー画面に切り替え
$scene = Scene_Menu.new(3)
return
end
# R ボタンが押された場合
if Input.trigger?(Input::R)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 次のアクターへ
@actor_index += 1
@actor_index %= $game_party.actors.size
# 別のステータス画面に切り替え
$scene = Scene_Status2.new(@actor_index)
return
end
# L ボタンが押された場合
if Input.trigger?(Input::L)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 前のアクターへ
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 別のステータス画面に切り替え

$scene = Scene_Status2.new(@actor_index)
return
end
# L ボタンが押された場合
if Input.trigger?(Input:: C)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 前のアクターへ
# 別のステータス画面に切り替え

$scene = Scene_Status3.new(@actor_index)
return
end
end
end

#==============================================================================
# â–  Scene_Status3
#------------------------------------------------------------------------------
#  ステータス画面の処理を行うクラスです。
#==============================================================================

class Scene_Status3
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor_index : アクターインデックス
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# アクターを取得
@actor = $game_party.actors[@actor_index]
# ステータスウィンドウを作成
@status_window = Window_FS.new(@actor)

@status2_window = Window_FS3.new(@actor)

# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@status_window.dispose
@status2_window.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# メニュー画面に切り替え
$scene = Scene_Menu.new(3)
return
end
# R ボタンが押された場合
if Input.trigger?(Input::R)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 次のアクターへ
@actor_index += 1
@actor_index %= $game_party.actors.size
# 別のステータス画面に切り替え
$scene = Scene_Status2.new(@actor_index)
return
end
# L ボタンが押された場合
if Input.trigger?(Input::L)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 前のアクターへ
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 別のステータス画面に切り替え

$scene = Scene_Status2.new(@actor_index)
return
end
# L ボタンが押された場合
if Input.trigger?(Input:: C)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 前のアクターへ
# 別のステータス画面に切り替え
$scene = Scene_Status.new(@actor_index)

return
end

end
end

Credits:
Leviathan_12
Montana':|
 
O.o Where's the introduction to the script?
And why's it in Japanese language (Comments)?

Overall.The screenshot is well nice, I'm sure many people will put this to a good use.
 
Good job Montana I might consider updating it for the English,
your script is teaching me lots of things about Scripting.
English Translation is below for people, more updated a few more twists to it.
 
I messed around with some setting translated the rest of the things I couldn't
added some side notes, changed alot of the font default setting in the different parts. Moved the character some to make it look even, and moved the words in the left hand corner.
I turned off some of the text, 2 options.
I added a part where it tells you how to turn it back on, by typing in what you want.

Montana's Status V.1.10 English Translation
#==============================================================================
# Written By Leviathan_12/Montana, and Translated by Hellladen
# Status/Equip Menu Script Enhanced By Hellladen. V.1.10
#==============================================================================
# Updated on November 11th by Hellladen.
# Added more options, Italic writing in Status/Equip Menu.
# Changed some of the placements of the Character/Etc.
# To go to the Equip part of the script press Enter while in the Status part.
#==============================================================================

#------------------------------------------------------------------------------
# In the Skill picture, this indicates the Status of the Skill User.
#==============================================================================

class Window_FS < Window_Base
#--------------------------------------------------------------------------
# ● Object initialization
# Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 180)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font.
self.contents.font.italic = true
self.contents.font.size = 22 # "Skill status window font size.
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.italic = true
self.contents.font.bold = false
draw_actor_graphic(@actor, 30, 80)
draw_actor_class(@actor, 180,0)
draw_actor_level(@actor, 0,80)
draw_actor_name(@actor, 80, 0)
draw_actor_state(@actor, 65, 20)
self.contents.font.italic = false
draw_actor_hp(@actor, 0, 100)
draw_actor_sp(@actor, 0, 120)
self.contents.font.color = system_color
self.contents.font.size = 23
self.contents.font.italic = true
#-------------------------------------------------------------------------------
# This is the name labels for your current Experience, and the experience until
# your next level, to change the text just change the text inside " ".
#-------------------------------------------------------------------------------
self.contents.draw_text(180, 80, 80, 32, "Experience:") # This is where you name Exp.
self.contents.draw_text(180, 112, 80, 32, "Next Level:") # This is where you name Next Level
self.contents.font.color = normal_color
self.contents.font.size = 21
self.contents.draw_text(180 + 80, 80, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(180 + 80, 112, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.size = 60
#----------------------------------------------------------------------------
# This is the name for the label, which used to say Status, this was
# outward of Experience/Next Level. To name it just change the text inside " ".
#----------------------------------------------------------------------------
self.contents.draw_text(430, 30, 150, 82, "") # This is where you name another option.
self.contents.font.size = 22
end
end

#==============================================================================
#------------------------------------------------------------------------------
#  In the Skill picture, this indicates the Status of the Skill User.
#==============================================================================

class Window_FS2 < Window_Base
#--------------------------------------------------------------------------
# ● Object initialization
# Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0,180, 640, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font
self.contents.font.size = 25
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_parameter(@actor, 40, 50, 0)
draw_actor_parameter(@actor, 40, 120, 1)
draw_actor_parameter(@actor, 40, 190, 2)
draw_actor_parameter(@actor, 240, 40, 3)
draw_actor_parameter(@actor, 240, 100, 4)
draw_actor_parameter(@actor, 240, 160, 5)
draw_actor_parameter(@actor, 240, 220, 6)
self.contents.font.color = system_color
self.contents.font.size = 26

#----------------------------------------------------------------------------
# This is the name for the label beside the stats to name it just change the
# text inside " ".
#----------------------------------------------------------------------------
self.contents.draw_text(0,10, 80, 32, " ") # This is where you name a Stats option.
end
end

#==============================================================================
#------------------------------------------------------------------------------
# In the Skill picture, this indicates the Status of the Skill User.
#==============================================================================

class Window_FS3 < Window_Base
#--------------------------------------------------------------------------
# ● Object initialization
# Class Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0,180, 640, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # "Skill" status window font
self.contents.font.size = 25
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 30
self.contents.font.italic = true
self.contents.draw_text(20, 10, 150, 60, "Equipment")
self.contents.font.italic = true
self.contents.font.size = 25
draw_item_name($data_weapons[@actor.weapon_id], 200 + 16, 20)
draw_item_name($data_armors[@actor.armor1_id], 200 + 16, 60)
draw_item_name($data_armors[@actor.armor2_id], 200 + 16, 100)
draw_item_name($data_armors[@actor.armor3_id], 200 + 16, 140)
draw_item_name($data_armors[@actor.armor4_id], 200 + 16, 180)
end
def dummy
self.contents.font.color = system_color
self.contents.font.italic = true
self.contents.draw_text(200, 20, 96, 32, $data_system.words.weapon)
self.contents.draw_text(200, 60, 96, 32, $data_system.words.armor1)
self.contents.draw_text(200, 100, 96, 32, $data_system.words.armor2)
self.contents.draw_text(200, 140, 96, 32, $data_system.words.armor3)
self.contents.draw_text(200, 180, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 200 + 24, 20)
draw_item_name($data_armors[@actor.armor1_id], 200 + 24, 60)
draw_item_name($data_armors[@actor.armor2_id], 200 + 24, 100)
draw_item_name($data_armors[@actor.armor3_id], 200 + 24, 140)
draw_item_name($data_armors[@actor.armor4_id], 200 + 24, 180)
end
end

#==============================================================================
# â–  Scene_Status
#------------------------------------------------------------------------------
#  It is the class which processes the status picture.
#==============================================================================

class Scene_Status
#--------------------------------------------------------------------------
# ● Object initialization
# Actor_Index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ● Main processing
#--------------------------------------------------------------------------
def main
# Acquiring the actor
@actor = $game_party.actors[@actor_index]
# Drawing up the status window
@status_window = Window_FS.new(@actor)

@status2_window = Window_FS2.new(@actor)
# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@status_window.dispose
@status2_window.dispose
end
#--------------------------------------------------------------------------
# ● Frame renewal
#--------------------------------------------------------------------------
def update
# When the B button is pushed.
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Change to menu screen
$scene = Scene_Menu.new(3)
return
end
# When the R button is pushed.
if Input.trigger?(Input::R)
#Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To the following actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Change to another status picture
$scene = Scene_Status2.new(@actor_index)
return
end
# When the L button is pushed.
if Input.trigger?(Input::L)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Change to another status picture

$scene = Scene_Status2.new(@actor_index)
return
end
# When the L button is pushed.
if Input.trigger?(Input:: C)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
# Change to another status picture

$scene = Scene_Status3.new(@actor_index)
return
end
end
end

#==============================================================================
# â–  Scene_Status 3
#------------------------------------------------------------------------------
#  It is the class which processes the status picture.
#==============================================================================

class Scene_Status3
#--------------------------------------------------------------------------
# ● Object initialization
# Actor_Index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ● Main processing
#--------------------------------------------------------------------------
def main
# Acquiring the actor
@actor = $game_party.actors[@actor_index]
# Drawing up the status window
@status_window = Window_FS.new(@actor)

@status2_window = Window_FS3.new(@actor)

# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@status_window.dispose
@status2_window.dispose
end
#--------------------------------------------------------------------------
# ● Frame renewal
#--------------------------------------------------------------------------
def update
# When the B button is pushed.
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Change to menu screen
$scene = Scene_Menu.new(3)
return
end
# When the R button is pushed.
if Input.trigger?(Input::R)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To the following actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Change to another status picture
$scene = Scene_Status2.new(@actor_index)
return
end
# When the L button is pushed.
if Input.trigger?(Input::L)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Change to another status picture

$scene = Scene_Status2.new(@actor_index)
return
end
# When the L button is pushed.
if Input.trigger?(Input:: C)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
#Change to status picture classified by
$scene = Scene_Status.new(@actor_index)

return
end

end
end

Enjoy, not by me just fixed some things up that annoyed me :yes:...
All I did was add like 20-30 lines of code mostly notes.
 

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