| | Systeme d'upgrade d'armes a la suikoden | |
| | Auteur | Message |
---|
Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Systeme d'upgrade d'armes a la suikoden Lun 28 Mai - 9:15 | |
| le script en lui même est assez simple il vous faudra crée : les armes selon un certain crtitere : votre arme primaire suivi de 15 améliorations ( une arme lvl 16 au final comme dans suikoden =) ) et la 17 ieme rien. maintenant il faudra donc attribuer une arme à chaque heros ^^ les script : - Code:
-
#============================================================================== # ■ Scene_Menu #------------------------------------------------------------------------------ # メニュー画面の処理を行うクラスです。 #==============================================================================
class Scene_arme #-------------------------------------------------------------------------- # ● オブジェクト初期化 # menu_index : コマンドのカーソル初期位置 #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # ● メイン処理 #-------------------------------------------------------------------------- def main # コマンドウィンドウを作成 s1 = "Améliorer arme" s2 = "Sortir" @command_window = Window_Commandarme.new(340, [s1, s2]) @command_window.index = @menu_index # ステータスウィンドウを作成 @status_window = Window_MenuStatus_arme.new @status_window.x = 178 @status_window.y = 160 # ステータスウィンドウを作成 @face_window = Window_face.new @face_window.x = 0 @face_window.y = 160 @facebis_window = Window_facebis.new @facebis_window.x = 0 @facebis_window.y = 0 @gold_window = Window_Goldarme.new @gold_window.x = 480 @gold_window.y = 384 @dummy_window = Window_Base.new(178, 432, 462, 48) # トランジション実行 Graphics.transition # メインループ loop do # ゲーム画面を更新 Graphics.update # 入力情報を更新 Input.update # フレーム更新 update # 画面が切り替わったらループを中断 if $scene2 != nil $game_system.input_allowed = false $scene2.update $game_system.input_allowed = true end if $scene != self break end end # トランジション準備 Graphics.freeze # ウィンドウを解放 @command_window.dispose @status_window.dispose @face_window.dispose @facebis_window.dispose @gold_window.dispose @dummy_window.dispose end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update # ウィンドウを更新 @command_window.update @status_window.update @face_window.update @facebis_window.update @gold_window.update @dummy_window.update # コマンドウィンドウがアクティブの場合: update_command を呼ぶ if @command_window.active update_command return end # ステータスウィンドウがアクティブの場合: update_status を呼ぶ if @status_window.active update_status return end end #-------------------------------------------------------------------------- # ● フレーム更新 (コマンドウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_command # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) if $scene2 != nil $scene = $scene2 else $scene = Scene_Map.new end return end # C ボタンが押された場合 if Input.trigger?(Input::C) # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合 if $game_party.actors.size == 0 and @command_window.index < 4 # ブザー SE を演奏 $game_system.se_play($data_system.buzzer_se) return end # コマンドウィンドウのカーソル位置で分岐 case @command_window.index when 0 # スキル # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) # ステータスウィンドウをアクティブにする @command_window.active = false @status_window.active = true @status_window.index = 0 when 1 # 装備 $game_system.se_play($data_system.decision_se) if $scene2 != nil $scene = $scene2 else $scene = Scene_Map.new end end return end end #-------------------------------------------------------------------------- # ● フレーム更新 (ステータスウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_status # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # コマンドウィンドウをアクティブにする @command_window.active = true @status_window.active = false @status_window.index = -1 return end # C ボタンが押された場合 if Input.trigger?(Input::C) # コマンドウィンドウのカーソル位置で分岐 case @command_window.index when 0 # ステータス # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) $scene = Scene_armebis.new(@status_window.index) # ステータス画面に切り替え end return end end end - Code:
-
#============================================================================== # ■ Scene_Status #------------------------------------------------------------------------------ # ステータス画面の処理を行うクラスです。 #==============================================================================
class Scene_armebis #-------------------------------------------------------------------------- # ● オブジェクト初期化 # actor_index : アクターインデックス #-------------------------------------------------------------------------- def initialize(actor_index = 0, arme_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # ● メイン処理 #-------------------------------------------------------------------------- def main # アクターを取得 @actor = $game_party.actors[@actor_index] # ステータスウィンドウを作成 @status_window = Window_MenuStatus_arme.new @status_window.x = 178 @status_window.y = 160 # ステータスウィンドウを作成 @face_window = Window_face.new @face_window.x = 0 @face_window.y = 160 @facebis_window = Window_facebis.new @facebis_window.x = 0 @facebis_window.y = 0 @gold_window = Window_Goldarme.new @gold_window.x = 480 @gold_window.y = 384 cout = @actor.pet cout *= @actor.pet cout *= 500 if [color=red]$game_variables[6][/color] <= @actor.pet @arme_window = Window_arme2.new(@actor) else if cout > $game_party.gold @arme_window = Window_arme3.new(@actor) else @arme_window = Window_arme1.new(@actor) end end @armebis_window = Window_armebis.new @armebis_window.x = 178 @armebis_window.y = 384
# トランジション実行 Graphics.transition # メインループ loop do # ゲーム画面を更新 Graphics.update # 入力情報を更新 Input.update # フレーム更新 update # 画面が切り替わったらループを中断 if $scene != self break end end # トランジション準備 Graphics.freeze # ウィンドウを解放 @face_window.dispose @facebis_window.dispose @gold_window.dispose @status_window.dispose @armebis_window.dispose @arme_window.dispose end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update @face_window.update @facebis_window.update @gold_window.update @status_window.update @armebis_window.update @arme_window.update # B ボタンが押された場合 cout = @actor.pet cout *= @actor.pet cout *= 500 if [color=red]$game_variables[6][/color] > @actor.pet and cout <= $game_party.gold grr = @actor.weapon_id grr += 1 $game_party.gain_weapon(grr, 1) @actor.equip(0, grr) grr -= 1 $game_party.lose_weapon(grr, 1) $game_party.lose_gold(cout) end # メニュー画面に切り替え $scene = Scene_arme.new(0) end end voila les scenes maintenant les window sur le post suivant :p | |
| | | Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Lun 28 Mai - 9:15 | |
| - Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_arme1< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor) super(178, 432, 462, 48) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh @actor = actor end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, -6, 120, 26, "Travail fait") end end
- Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_arme2< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor) super(178, 432, 462, 48) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh @actor = actor end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, -6, 320, 26, "Arme au maximum de mes connaissances") end end - Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_arme3< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor) super(178, 432, 462, 48) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh @actor = actor end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, -6, 320, 26, "Tu n'as pas assez d'argent") end end
- Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_armebis< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(178, 384, 302, 48) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(0, -5, 120, 26, "Améliorer arme") self.contents.draw_text(150, -5, 120, 26, "Sortir") end end
- Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_face< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 160, 178, 320) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear bitmap = RPG::Cache.icon("Khris") opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(0, 50, bitmap, Rect.new(3, 2, 144, 200), opacity) end end - Code:
-
#============================================================================== # ■ Window_face #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_facebis< Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 160, 640, 160) self.contents = Bitmap.new(width - 12, height - 12) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(10,10, 196, 32, "Forgeron :") self.contents.font.color = normal_color self.contents.draw_text(26, 34, 800, 32, "Bonjour.") self.contents.draw_text(26, 52, 800, 32, "Je peux améliorer vos armes jusqu'au niveau "+[color=red]$game_variables[6].to_s[/color]+"." ) self.contents.draw_text(26, 70, 800, 32, "Que desires-tu?") end end y en as encore XD | |
| | | Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Lun 28 Mai - 9:16 | |
| - Code:
-
#============================================================================== # ■ Window_Command #------------------------------------------------------------------------------ # 一般的なコマンド選択を行うウィンドウです。 #==============================================================================
class Window_Commandarme < Window_Selectablearme #-------------------------------------------------------------------------- # ● オブジェクト初期化 # width : ウィンドウの幅 # commands : コマンド文字列の配列 #-------------------------------------------------------------------------- def initialize(width, commands) # コマンドの個数からウィンドウの高さを算出 super(178, 384, 302, 48) @item_max = commands.size @column_max = commands.size @commands = commands self.contents = Bitmap.new( width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh self.index = 0 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 # color : 文字色 #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(150 * index, -5, self.contents.width - 20, 27) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end #-------------------------------------------------------------------------- # ● 項目の無効化 # index : 項目番号 #-------------------------------------------------------------------------- def disable_item(index) draw_item(index, disabled_color) end end - Code:
-
#============================================================================== # ■ Window_Selectable #------------------------------------------------------------------------------ # カーソルの移動やスクロールの機能を持つウィンドウクラスです。 #==============================================================================
class Window_Selectablearme < Window_Base #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_reader :index # カーソル位置 attr_reader :help_window # ヘルプウィンドウ #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # width : ウィンドウの幅 # height : ウィンドウの高さ #-------------------------------------------------------------------------- def initialize(x, y, width, height) super(x, y, width, height) @item_max = 1 @column_max = 1 @index = -1 end #-------------------------------------------------------------------------- # ● カーソル位置の設定 # index : 新しいカーソル位置 #-------------------------------------------------------------------------- def index=(index) @index = index # ヘルプテキストを更新 (update_help は継承先で定義される) if self.active and @help_window != nil update_help end # カーソルの矩形を更新 update_cursor_rect end #-------------------------------------------------------------------------- # ● 行数の取得 #-------------------------------------------------------------------------- def row_max # 項目数と列数から行数を算出 return (@item_max + @column_max - 1) / @column_max end #-------------------------------------------------------------------------- # ● 先頭の行の取得 #-------------------------------------------------------------------------- def top_row # ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る return self.oy / 16 end #-------------------------------------------------------------------------- # ● 先頭の行の設定 # row : 先頭に表示する行 #-------------------------------------------------------------------------- def top_row=(row) # row が 0 未満の場合は 0 に修正 if row < 0 row = 0 end # row が row_max - 1 超の場合は row_max - 1 に修正 if row > row_max - 1 row = row_max - 1 end # row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする self.oy = row * 16 end #-------------------------------------------------------------------------- # ● 1 ページに表示できる行数の取得 #-------------------------------------------------------------------------- def page_row_max # ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る return (self.height - 32) / 16 end #-------------------------------------------------------------------------- # ● 1 ページに表示できる項目数の取得 #-------------------------------------------------------------------------- def page_item_max # 行数 page_row_max に 列数 @column_max を掛ける return page_row_max * @column_max end #-------------------------------------------------------------------------- # ● ヘルプウィンドウの設定 # help_window : 新しいヘルプウィンドウ #-------------------------------------------------------------------------- def help_window=(help_window) @help_window = help_window # ヘルプテキストを更新 (update_help は継承先で定義される) if self.active and @help_window != nil update_help end end #-------------------------------------------------------------------------- # ● カーソルの矩形更新 #-------------------------------------------------------------------------- def update_cursor_rect # カーソル位置が 0 未満の場合 if @index < 0 self.cursor_rect.empty return end # 現在の行を取得 row = @index / @column_max # 現在の行が、表示されている先頭の行より前の場合 if row < self.top_row # 現在の行が先頭になるようにスクロール self.top_row = row end # 現在の行が、表示されている最後尾の行より後ろの場合 if row > self.top_row + (self.page_row_max - 1) # 現在の行が最後尾になるようにスクロール self.top_row = row - (self.page_row_max - 1) end # カーソルの幅を計算 cursor_width = self.width / @column_max - 20 # カーソルの座標を計算 x = @index % @column_max * (cursor_width + 16) y = @index / @column_max * 16 - self.oy x+= -4 # カーソルの矩形を更新 self.cursor_rect.set(x, y, cursor_width, 16)
end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super # カーソルの移動が可能な状態の場合 if self.active and @item_max > 0 and @index >= 0 # 方向ボタンの下が押された場合 if Input.repeat?(Input::DOWN) # 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、 # またはカーソル位置が(項目数 - 列数)より前の場合 if (@column_max == 1 and Input.trigger?(Input::DOWN)) or @index < @item_max - @column_max # カーソルを下に移動 $game_system.se_play($data_system.cursor_se) @index = (@index + @column_max) % @item_max end end # 方向ボタンの上が押された場合 if Input.repeat?(Input::UP) # 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、 # またはカーソル位置が列数より後ろの場合 if (@column_max == 1 and Input.trigger?(Input::UP)) or @index >= @column_max # カーソルを上に移動 $game_system.se_play($data_system.cursor_se) @index = (@index - @column_max + @item_max) % @item_max end end # 方向ボタンの右が押された場合 if Input.repeat?(Input::RIGHT) # 列数が 2 以上で、カーソル位置が(項目数 - 1)より前の場合 if @column_max >= 2 and @index < @item_max - 1 # カーソルを右に移動 $game_system.se_play($data_system.cursor_se) @index += 1 end end # 方向ボタンの左が押された場合 if Input.repeat?(Input::LEFT) # 列数が 2 以上で、カーソル位置が 0 より後ろの場合 if @column_max >= 2 and @index > 0 # カーソルを左に移動 $game_system.se_play($data_system.cursor_se) @index -= 1 end end # R ボタンが押された場合 if Input.repeat?(Input::R) # 表示されている最後尾の行が、データ上の最後の行よりも前の場合 if self.top_row + (self.page_row_max - 1) < (self.row_max - 1) # カーソルを 1 ページ後ろに移動 $game_system.se_play($data_system.cursor_se) @index = [@index + self.page_item_max, @item_max - 1].min self.top_row += self.page_row_max end end # L ボタンが押された場合 if Input.repeat?(Input::L) # 表示されている先頭の行が 0 より後ろの場合 if self.top_row > 0 # カーソルを 1 ページ前に移動 $game_system.se_play($data_system.cursor_se) @index = [@index - self.page_item_max, 0].max self.top_row -= self.page_row_max end end end # ヘルプテキストを更新 (update_help は継承先で定義される) if self.active and @help_window != nil update_help end # カーソルの矩形を更新 update_cursor_rect end end
| |
| | | Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Lun 28 Mai - 9:18 | |
| - Code:
-
#============================================================================== # ■ Window_MenuStatus #------------------------------------------------------------------------------ # メニュー画面でパーティメンバーのステータスを表示するウィンドウです。 #==============================================================================
class Window_MenuStatus_arme < Window_Selectablearme #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0,0, 462, 224) @column_max = 2 self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = i %2* 218 y = i /2* 95 actor = $game_party.actors[i] draw_actor_name(actor, x, y) item = $data_weapons[actor.weapon_id] cout = actor.pet cout *= actor.pet cout *= 500 draw_item_name(item, x -8 , y + 16) self.contents.draw_text(x+20, y+32, 150, 32, "Arme niveau:") self.contents.draw_text(x+20, y +48, 150, 32, "ATK:") self.contents.draw_text(x+20, y +64, 150, 32, "Cout de l'amélioration:") self.contents.draw_text(x+55, y+32, 84, 32, actor.pet.to_s, 2) self.contents.draw_text(x+20, y +48, 84, 32, actor.fatk.to_s, 2) self.contents.draw_text(x+125, y +64, 84, 32, cout.to_s, 2) end end #-------------------------------------------------------------------------- # ● カーソルの矩形更新 #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(@index%2* 218 - 4, @index /2* 95, 218, 95)
end end end - Code:
-
#============================================================================== # ■ Window_Gold #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #==============================================================================
class Window_Goldarme < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 48) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120-cx-2, 16, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(124-cx, 0, cx, 16, $data_system.words.gold, 2) end end
maitenant le plus dur arrive :p dans game_actor sous def base_str blabla end mettre - Code:
-
def base_pet n = @weapon_id n -= ((@class_id - 1)*17) end
def base_fatk weapon = $data_weapons[@weapon_id] return weapon != nil ? weapon.atk : 0 end dans game_battler sous def str blabla end mettre - Code:
-
def pet n = [[base_pet + @pet_plus, 1].max, 999].min n = [[Integer(n), 1].max, 999].min return n end | |
| | | Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Lun 28 Mai - 9:18 | |
| ca en fini plus lol XD dans game_battler1 remplacer: - Code:
-
def atk n = base_atk for i in @states n *= $data_states[i].atk_rate / 100.0 end return Integer(n) end par: - Code:
-
def atk n = [[base_str + @str_plus, 1].max, 999].min + base_atk for i in @states n *= $data_states[i].atk_rate / 100.0 end return Integer(n) end #-------------------------------------------------------------------------- def fatk n = base_fatk for i in @states n *= $data_states[i].fatk_rate / 100.0 end return Integer(n) end $game_variables[6] ici correspond a la variable numéro 6 si vous avez deja quelque chose remplacer le 6 par une de vos variables vides :p Pour lancer le menu d'upgrade crée un event comme celui. ( vous pouvez voir que j'ai sauté sur le script de mini map XD) la varibale 6 correspond en fait au niveau max de l'upgrade que le foregeron peu faire ( si vous voulez qu'il n'excede pas le niveau 5 mettez alors en valeur pour la variable le chiffre 5 ^^ ) derniere etape comment afficher ca dans le menu de statut XD - Code:
-
self.contents.font.color = system_color self.contents.draw_text(227, 92, 196, 32, "Arme :") self.contents.draw_text(242, 124, 196, 32, "Niveau :") self.contents.draw_text(337, 124, 196, 32, "Atk :") self.contents.font.color = normal_color draw_item_name($data_weapons[@actor.weapon_id], 215, 108) self.contents.draw_text(240, 124, 84, 32, @actor.pet.to_s ,2) self.contents.draw_text(320, 124, 84, 32, @actor.fatk.to_s, 2) c'est comme ca dans mon menu :p si ca bug dites le moi, je chercherais ce que j'ai oublié de mettre = | |
| | | Koss > Administrateur
Nombre de messages : 404 Age : 31 Quels sont vos projets ? : Glandage total... Date d'inscription : 18/04/2007
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Mar 29 Mai - 10:14 | |
| C'est bien complet, mais entre de nombreux codes, il n'y a rien d'écrit. Tu devrai speut-être mettre l'utilisation de ce code (les bouts). | |
| | | Dark.D > Créateur
Nombre de messages : 354 Age : 32 Avez vous RPGMXP ? : Ouaip Quels sont vos projets ? : Aucun, je m'éclate juste un peu ^^ Date d'inscription : 18/11/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Mer 30 Mai - 10:14 | |
| J'ai pas trop comprit à quoi ça servait | |
| | | Lord Ephraim > Artiste confirmé
Nombre de messages : 128 Age : 34 Avez vous RPGMXP ? : Mais quelle question bien sur que oui . Quels sont vos projets ? : Projet en suspend ( cause de manque de temps et d'idées ) Date d'inscription : 05/12/2006
Fiche Créateur Points de Créativité: (0/50) Commentaires:
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden Lun 4 Juin - 11:41 | |
| En fait ce sript serta améliorer son arme en nv .
On ne fit que booster son arme et on peut controler facilement la puissance des armes a partir de la base de donnés | |
| | | Contenu sponsorisé
| Sujet: Re: Systeme d'upgrade d'armes a la suikoden | |
| |
| | | | Systeme d'upgrade d'armes a la suikoden | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |