#============================================================================== # □ 星座設定 (for VX Ace) #------------------------------------------------------------------------------ # Version : 1_20120712 # by サリサ・タイクーン # http://www.tycoon812.com/rgss/ #============================================================================== #============================================================================== # □ 素材スイッチ #============================================================================== $rgsslab = {} if $rgsslab == nil $rgsslab["星座設定"] = true if $rgsslab["星座設定"] #============================================================================== # □ カスタマイズポイント #============================================================================== module RGSSLAB end module RGSSLAB::Constellation_Setting #-------------------------------------------------------------------------- # ○ 星座の文字列 # メニュー等で表示する星座の文字列を設定します。 #-------------------------------------------------------------------------- STRING = "星座" #-------------------------------------------------------------------------- # ○ 星座設定 # アクターの星座を設定します。 # # この使い道については、お任せいたします。 # (設定されていないアクターに関しては、DEFAULTの値で設定されます) # # ・設定方法 # アクターID => "星座", # # ・アクセス方法1 # $game_actors[アクターID].constellation(参照) # $game_actors[アクターID].constellation = "値"(変更) # # ・アクセス方法2 # $game_party.members[パーティ番号 - 1].constellation(参照) # $game_party.members[パーティ番号 - 1].constellation = "値"(変更) #-------------------------------------------------------------------------- CONSTELLATION = { 1 => "獅子座", } DEFAULT = "不明" end # カスタマイズポイントは、ここまで #============================================================================== # □ RGSSLAB::Constellation_Setting [module] #============================================================================== module RGSSLAB::Constellation_Setting #-------------------------------------------------------------------------- # ○ 素材設定用の定数定義 #-------------------------------------------------------------------------- MATERIAL_NAME = "星座設定" VERSION = 1 RELEASE = 20120712 end #============================================================================== # ■ Game_Actor [class] #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_109 = RGSSLAB::Constellation_Setting #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :constellation #-------------------------------------------------------------------------- # ● セットアップ [エイリアス] # actor_id : アクター ID #-------------------------------------------------------------------------- alias constellation_setting_setup setup def setup(actor_id) constellation_setting_setup(actor_id) setup_constellation end #-------------------------------------------------------------------------- # ○ 星座のセットアップ #-------------------------------------------------------------------------- def setup_constellation if RGSSLAB_109::CONSTELLATION[@actor_id] @constellation = RGSSLAB_109::CONSTELLATION[@actor_id] else @constellation = RGSSLAB_109::DEFAULT end end end #============================================================================== # ■ Window_Base [class] #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_109 = RGSSLAB::Constellation_Setting #-------------------------------------------------------------------------- # ○ 星座の描画 # actor : アクター # x : 横 # y : 縦 #-------------------------------------------------------------------------- def draw_actor_constellation(actor, x, y) string_size = contents.text_size(RGSSLAB_109::STRING + " ") draw_text(x, y, string_size.width, line_height, RGSSLAB_109::STRING) draw_text(x + string_size.width, y, 30, line_height, actor.constellation) end end end