دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
السلام عليكم ورحمة الله وبركاته
بعد ما توفر الأربيجي ميكر أكس بي للتحميل قلت بحط هالموضوع للفائدة
البداية في الرد الجاي.
ملاحظة اللي عنده إضافة يحطها بالشكل التالي للفائدة:
النوع : كود روبي أو صورة أو .... إلخ
صورة : مايحتاج توضيح
الفائدة : وش فائدة اللي حطيته
طريقة الإستخدام : وش لون نستخدم اللي حطيت
وشكرا
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
النوع : Ruby Game Script System Code بالعربي كود روبي :biggthump
صورة: http://img.photobucket.com/albums/v458/dsww/RMXP-NS.bmp
الفائدة : يطلع إسم اللي تكلمه فوق المربع حق النص
طريقة الإستخدام : إستبدل سكريبت Window_Message بهذا
كود:
#==============================================================================
# ■ Window_Message
#------------------------------------------------------------------------------
# 文章表示に使うメッセージウィンドウです。
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(80, 304, 480, 160)
@name_win = Window_Base.new(80,252,164,56)
@name_win.z = 9998
@name_win.visible = false
@name_win.contents = Bitmap.new(132,22)
@name_win.contents.font = Font.new("Arial")
@name_win.contents.font.color = Color.new(255,255,0)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font = Font.new("Arial")
self.visible = false
self.z = 9998
@fade_in = false
@fade_out = false
@contents_showing = false
@cursor_width = 0
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
terminate_message
$game_temp.message_window_showing = false
if @input_number_window != nil
@input_number_window.dispose
end
super
end
#--------------------------------------------------------------------------
# ● メッセージ終了処理
#--------------------------------------------------------------------------
def terminate_message
self.active = false
self.pause = false
@name_win.visible = false
self.index = -1
self.contents.clear
@name_win.contents.clear
@contents_showing = false
if $game_temp.message_proc != nil
$game_temp.message_proc.call
end
$game_temp.message_text = nil
$game_temp.message_proc = nil
$game_temp.choice_start = 99
$game_temp.choice_max = 0
$game_temp.choice_cancel_type = 0
$game_temp.choice_proc = nil
$game_temp.num_input_start = 99
$game_temp.num_input_variable_id = 0
$game_temp.num_input_digits_max = 0
if @gold_window != nil
@gold_window.dispose
@gold_window = nil
end
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
@name_win.contents.clear
x = y = 0
@cursor_width = 0
if $game_temp.choice_start == 0
x = 8
end
if $game_temp.message_text != nil
text = $game_temp.message_text
begin
last_text = text.clone
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end until text == last_text
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
text.gsub!(/\-([\w ]+)\-/) do
@name = $1
""
end
text.gsub!(/\\\\/) { "\000" }
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Gg]/) { "\002" }
while ((c = text.slice!(/./m)) != nil)
if c == "\000"
c = "\\"
end
if c == "\001"
text.sub!(/\[([0-9]+)\]/, "")
color = $1.to_i
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
next
end
if c == "\002"
if @gold_window == nil
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
else
@gold_window.y = self.y >= 128 ? 32 : 384
end
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
end
next
end
if c == "\n"
if y >= $game_temp.choice_start
@cursor_width = [@cursor_width, x].max
end
y += 1
x = 0
if y >= $game_temp.choice_start
x = 8
end
next
end
self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
x += self.contents.text_size(c).width
end
end
if @name != nil and @name != "" and @name != " "
@name_win.visible = true if @name_win.visible == false
@name_win.contents.clear
@name_win.contents.draw_text(4,0,120,25,@name)
end
if $game_temp.choice_max > 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
end
if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
end
end
#--------------------------------------------------------------------------
# ● ウィンドウの位置と不透明度の設定
#--------------------------------------------------------------------------
def reset_window
if $game_temp.in_battle
self.y = 16
else
case $game_system.message_position
when 0 # 上
self.y = 16
when 1 # 中
self.y = 160
when 2 # 下
self.y = 304
end
end
if $game_system.message_frame == 0
self.opacity = 255
@name_win.opacity = 255
else
self.opacity = 0
@name_win.opacity = 0
end
self.back_opacity = 160
@name_win.back_opacity = 160
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if @fade_in
self.contents_opacity += 24
@name_win.contents_opacity += 24
if @input_number_window != nil
@input_number_window.contents_opacity += 24
end
if self.contents_opacity == 255
@fade_in = false
end
return
end
if @input_number_window != nil
@input_number_window.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_map.need_refresh = true
@input_number_window.dispose
@input_number_window = nil
terminate_message
end
return
end
if @contents_showing
if $game_temp.choice_max == 0
self.pause = true
end
if Input.trigger?(Input::B)
if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_message
end
end
if Input.trigger?(Input::C)
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
end
terminate_message
end
return
end
if @fade_out == false and $game_temp.message_text != nil
@contents_showing = true
$game_temp.message_window_showing = true
reset_window
refresh
Graphics.frame_reset
self.visible = true
if @name != nil and @name != "" and @name != " "
@name_win.visible = true
else
@name_win.visible = false
end
self.contents_opacity = 0
@name_win.contents_opacity = 0
if @input_number_window != nil
@input_number_window.contents_opacity = 0
end
@fade_in = true
return
end
if self.visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = false
@name_win.visible = false
@fade_out = false
$game_temp.message_window_showing = false
end
return
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
if @index >= 0
n = $game_temp.choice_start + @index
self.cursor_rect.set(8, n * 32, @cursor_width, 32)
else
self.cursor_rect.empty
end
end
end
بعدين حط أسم اللي تبيه يطلع بين --
مثال:
-RedDragy-RPG Maker is the best
كاتب الكود : RPG :bigeyes:
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
النوع : Ruby Game Script System Code بالعربي كود روبي :biggthump
صورة: http://img.photobucket.com/albums/v4...w/RMXP-SVB.bmp
الفائدة : يغير نظام المعركة
طريقة الإستخدام : إستبدل سكريبت Game_Actor بهذا
كود:
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
# アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :name # 名前
attr_reader :character_name # キャラクター ファイル名
attr_reader :character_hue # キャラクター 色相
attr_reader :class_id # クラス ID
attr_reader :weapon_id # 武器 ID
attr_reader :armor1_id # 盾 ID
attr_reader :armor2_id # 頭防具 ID
attr_reader :armor3_id # 体防具 ID
attr_reader :armor4_id # 装飾品 ID
attr_reader :level # レベル
attr_reader :exp # EXP
attr_reader :skills # スキル
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor_id : アクター ID
#--------------------------------------------------------------------------
def initialize(actor_id)
super()
setup(actor_id)
end
#--------------------------------------------------------------------------
# ● セットアップ
# actor_id : アクター ID
#--------------------------------------------------------------------------
def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@name = actor.name
@character_name = actor.character_name
@character_hue = actor.character_hue
@battler_name = actor.battler_name
@battler_hue = actor.battler_hue
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
@level = actor.initial_level
@exp_list = Array.new(101)
make_exp_list
@exp = @exp_list[@level]
@skills = []
@hp = maxhp
@sp = maxsp
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
# スキル習得
for i in 1..@level
for j in $data_classes[@class_id].learnings
if j.level == i
learn_skill(j.skill_id)
end
end
end
# オートステートを更新
update_auto_state(nil, $data_armors[@armor1_id])
update_auto_state(nil, $data_armors[@armor2_id])
update_auto_state(nil, $data_armors[@armor3_id])
update_auto_state(nil, $data_armors[@armor4_id])
end
#--------------------------------------------------------------------------
# ● アクター ID 取得
#--------------------------------------------------------------------------
def id
return @actor_id
end
#--------------------------------------------------------------------------
# ● インデックス取得
#--------------------------------------------------------------------------
def index
return $game_party.actors.index(self)
end
#--------------------------------------------------------------------------
# ● EXP 計算
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
for i in 2..100
if i > actor.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
end
end
#--------------------------------------------------------------------------
# ● 属性補正値の取得
# element_id : 属性 ID
#--------------------------------------------------------------------------
def element_rate(element_id)
# 属性有効度に対応する数値を取得
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# 防具でこの属性が防御されている場合は半減
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
# ステートでこの属性が防御されている場合は半減
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
# メソッド終了
return result
end
#--------------------------------------------------------------------------
# ● ステート有効度の取得
#--------------------------------------------------------------------------
def state_ranks
return $data_classes[@class_id].state_ranks
end
#--------------------------------------------------------------------------
# ● ステート防御判定
# state_id : ステート ID
#--------------------------------------------------------------------------
def state_guard?(state_id)
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil
if armor.guard_state_set.include?(state_id)
return true
end
end
end
return false
end
#--------------------------------------------------------------------------
# ● 通常攻撃の属性取得
#--------------------------------------------------------------------------
def element_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.element_set : []
end
#--------------------------------------------------------------------------
# ● 通常攻撃のステート変化 (+) 取得
#--------------------------------------------------------------------------
def plus_state_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.plus_state_set : []
end
#--------------------------------------------------------------------------
# ● 通常攻撃のステート変化 (-) 取得
#--------------------------------------------------------------------------
def minus_state_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.minus_state_set : []
end
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 9999].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
def base_maxhp
return $data_actors[@actor_id].parameters[0, @level]
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
def base_maxsp
return $data_actors[@actor_id].parameters[1, @level]
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
def base_str
n = $data_actors[@actor_id].parameters[2, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.str_plus : 0
n += armor1 != nil ? armor1.str_plus : 0
n += armor2 != nil ? armor2.str_plus : 0
n += armor3 != nil ? armor3.str_plus : 0
n += armor4 != nil ? armor4.str_plus : 0
return [[n, 1].max, 999].min
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
def base_dex
n = $data_actors[@actor_id].parameters[3, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.dex_plus : 0
n += armor1 != nil ? armor1.dex_plus : 0
n += armor2 != nil ? armor2.dex_plus : 0
n += armor3 != nil ? armor3.dex_plus : 0
n += armor4 != nil ? armor4.dex_plus : 0
return [[n, 1].max, 999].min
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
def base_agi
n = $data_actors[@actor_id].parameters[4, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.agi_plus : 0
n += armor1 != nil ? armor1.agi_plus : 0
n += armor2 != nil ? armor2.agi_plus : 0
n += armor3 != nil ? armor3.agi_plus : 0
n += armor4 != nil ? armor4.agi_plus : 0
return [[n, 1].max, 999].min
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
def base_int
n = $data_actors[@actor_id].parameters[5, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, 999].min
end
#--------------------------------------------------------------------------
# ● 基本攻撃力の取得
#--------------------------------------------------------------------------
def base_atk
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.atk : 0
end
#--------------------------------------------------------------------------
# ● 基本物理防御の取得
#--------------------------------------------------------------------------
def base_pdef
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
pdef1 = weapon != nil ? weapon.pdef : 0
pdef2 = armor1 != nil ? armor1.pdef : 0
pdef3 = armor2 != nil ? armor2.pdef : 0
pdef4 = armor3 != nil ? armor3.pdef : 0
pdef5 = armor4 != nil ? armor4.pdef : 0
return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
end
#--------------------------------------------------------------------------
# ● 基本魔法防御の取得
#--------------------------------------------------------------------------
def base_mdef
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
mdef1 = weapon != nil ? weapon.mdef : 0
mdef2 = armor1 != nil ? armor1.mdef : 0
mdef3 = armor2 != nil ? armor2.mdef : 0
mdef4 = armor3 != nil ? armor3.mdef : 0
mdef5 = armor4 != nil ? armor4.mdef : 0
return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
end
#--------------------------------------------------------------------------
# ● 基本回避修正の取得
#--------------------------------------------------------------------------
def base_eva
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
eva1 = armor1 != nil ? armor1.eva : 0
eva2 = armor2 != nil ? armor2.eva : 0
eva3 = armor3 != nil ? armor3.eva : 0
eva4 = armor4 != nil ? armor4.eva : 0
return eva1 + eva2 + eva3 + eva4
end
#--------------------------------------------------------------------------
# ● 通常攻撃 攻撃側アニメーション ID の取得
#--------------------------------------------------------------------------
def animation1_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation1_id : 0
end
#--------------------------------------------------------------------------
# ● 通常攻撃 対象側アニメーション ID の取得
#--------------------------------------------------------------------------
def animation2_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation2_id : 0
end
#--------------------------------------------------------------------------
# ● クラス名の取得
#--------------------------------------------------------------------------
def class_name
return $data_classes[@class_id].name
end
#--------------------------------------------------------------------------
# ● EXP の文字列取得
#--------------------------------------------------------------------------
def exp_s
return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"
end
#--------------------------------------------------------------------------
# ● 次のレベルの EXP の文字列取得
#--------------------------------------------------------------------------
def next_exp_s
return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"
end
#--------------------------------------------------------------------------
# ● 次のレベルまでの EXP の文字列取得
#--------------------------------------------------------------------------
def next_rest_exp_s
return @exp_list[@level+1] > 0 ?
(@exp_list[@level+1] - @exp).to_s : "-------"
end
#--------------------------------------------------------------------------
# ● オートステートの更新
# old_armor : 外した防具
# new_armor : 装備した防具
#--------------------------------------------------------------------------
def update_auto_state(old_armor, new_armor)
# 外した防具のオートステートを強制解除
if old_armor != nil and old_armor.auto_state_id != 0
remove_state(old_armor.auto_state_id, true)
end
# 装備した防具のオートステートを強制付加
if new_armor != nil and new_armor.auto_state_id != 0
add_state(new_armor.auto_state_id, true)
end
end
#--------------------------------------------------------------------------
# ● 装備固定判定
# equip_type : 装備タイプ
#--------------------------------------------------------------------------
def equip_fix?(equip_type)
case equip_type
when 0 # 武器
return $data_actors[@actor_id].weapon_fix
when 1 # 盾
return $data_actors[@actor_id].armor1_fix
when 2 # 頭
return $data_actors[@actor_id].armor2_fix
when 3 # 身体
return $data_actors[@actor_id].armor3_fix
when 4 # 装飾品
return $data_actors[@actor_id].armor4_fix
end
return false
end
#--------------------------------------------------------------------------
# ● 装備の変更
# equip_type : 装備タイプ
# id : 武器 or 防具 ID (0 なら装備解除)
#--------------------------------------------------------------------------
def equip(equip_type, id)
case equip_type
when 0 # 武器
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
when 1 # 盾
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor1_id], $data_armors[id])
$game_party.gain_armor(@armor1_id, 1)
@armor1_id = id
$game_party.lose_armor(id, 1)
end
when 2 # 頭
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor2_id], $data_armors[id])
$game_party.gain_armor(@armor2_id, 1)
@armor2_id = id
$game_party.lose_armor(id, 1)
end
when 3 # 身体
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor3_id], $data_armors[id])
$game_party.gain_armor(@armor3_id, 1)
@armor3_id = id
$game_party.lose_armor(id, 1)
end
when 4 # 装飾品
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor4_id], $data_armors[id])
$game_party.gain_armor(@armor4_id, 1)
@armor4_id = id
$game_party.lose_armor(id, 1)
end
end
end
#--------------------------------------------------------------------------
# ● 装備可能判定
# item : アイテム
#--------------------------------------------------------------------------
def equippable?(item)
# 武器の場合
if item.is_a?(RPG::Weapon)
# 現在のクラスの装備可能な武器に含まれている場合
if $data_classes[@class_id].weapon_set.include?(item.id)
return true
end
end
# 防具の場合
if item.is_a?(RPG::Armor)
# 現在のクラスの装備可能な防具に含まれている場合
if $data_classes[@class_id].armor_set.include?(item.id)
return true
end
end
return false
end
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
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 と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● レベルの変更
# level : 新しいレベル
#--------------------------------------------------------------------------
def level=(level)
# 上下限チェック
level = [[level, $data_actors[@actor_id].final_level].min, 1].max
# EXP を変更
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# ● スキルを覚える
# skill_id : スキル ID
#--------------------------------------------------------------------------
def learn_skill(skill_id)
if skill_id > 0 and not skill_learn?(skill_id)
@skills.push(skill_id)
@skills.sort!
end
end
#--------------------------------------------------------------------------
# ● スキルを忘れる
# skill_id : スキル ID
#--------------------------------------------------------------------------
def forget_skill(skill_id)
@skills.delete(skill_id)
end
#--------------------------------------------------------------------------
# ● スキルの習得済み判定
# skill_id : スキル ID
#--------------------------------------------------------------------------
def skill_learn?(skill_id)
return @skills.include?(skill_id)
end
#--------------------------------------------------------------------------
# ● スキルの使用可能判定
# skill_id : スキル ID
#--------------------------------------------------------------------------
def skill_can_use?(skill_id)
if not skill_learn?(skill_id)
return false
end
return super
end
#--------------------------------------------------------------------------
# ● 名前の変更
# name : 新しい名前
#--------------------------------------------------------------------------
def name=(name)
@name = name
end
#--------------------------------------------------------------------------
# ● クラス ID の変更
# class_id : 新しいクラス ID
#--------------------------------------------------------------------------
def class_id=(class_id)
if $data_classes[class_id] != nil
@class_id = class_id
# 装備できなくなったアイテムを外す
unless equippable?($data_weapons[@weapon_id])
equip(0, 0)
end
unless equippable?($data_armors[@armor1_id])
equip(1, 0)
end
unless equippable?($data_armors[@armor2_id])
equip(2, 0)
end
unless equippable?($data_armors[@armor3_id])
equip(3, 0)
end
unless equippable?($data_armors[@armor4_id])
equip(4, 0)
end
end
end
#--------------------------------------------------------------------------
# ● グラフィックの変更
# character_name : 新しいキャラクター ファイル名
# character_hue : 新しいキャラクター 色相
# battler_name : 新しいバトラー ファイル名
# battler_hue : 新しいバトラー 色相
#--------------------------------------------------------------------------
def set_graphic(character_name, character_hue, battler_name, battler_hue)
@character_name = character_name
@character_hue = character_hue
@battler_name = battler_name
@battler_hue = battler_hue
end
#--------------------------------------------------------------------------
# ● バトル画面 X 座標の取得
#--------------------------------------------------------------------------
def screen_x
if self.index != nil
return self.index * 40 + 360
else
return 0
end
end
#--------------------------------------------------------------------------
# ● バトル画面 Y 座標の取得
#--------------------------------------------------------------------------
def screen_y
return self.index * 20 + 220
end
#--------------------------------------------------------------------------
# ● バトル画面 Z 座標の取得
#--------------------------------------------------------------------------
def screen_z
# パーティ内の並び順から Z 座標を計算して返す
if self.index != nil
return 4 - self.index
else
return 0
end
end
end
المصدر : http://www.phylomortis.com/html/rgss.html
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
:bigeyes: أبدااع
يعطيك الف الف عافية اخوي ريد دراقي
كمل و احنى وراك :biggthump
وياريت لو تحل لنة هلمشكلتين :
التعريب ( خصوصا التعريب اضن صار اسهل لان يعتمد على خطوط الوندوز )
و مشكلة مقاس الشاشة ( يعني يشتغل على 800 × 600 )
و جذي يصير البرنامج محطم المقاييس :D
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
مشكور (( انا عربت البرنامج بس ناقص الكتابة بالعربي ))
وشكراً
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
التعريب ( خصوصا التعريب اضن صار اسهل لان يعتمد على خطوط الوندوز )
و مشكلة مقاس الشاشة ( يعني يشتغل على 800 × 600 )
التعريب تقدر تكتب عربي في البرنامج بس يطلع كذ
ا ل ب ر ن ا م ج ي ك ت ب ع ر ب ي
يمكن البرنامج الللي حطه يزيد ينفع (حق ال2003)
دقة الشاشة مالها حل لأن دقة اللعبة صارت 640×480 ضعف الأولى فلازم تكبر حجم الشاشة.
وقريبا بحط بعض الأكواد الحلوة
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
موضوع رااائع :cool:
نريد المزيد :biggthump
خاصية الأكواد رااائعة :icon6:
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
:fest30: RPG رجع ...
مع موقع ممتاز :biggthump
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
مرحبا بعودتك RPG
وكما معتادين منك على هذه المسات الفنية :biggthump
مشكور على الموضوع اخى Red_Dragy
استمر
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
مرحبا بعودتك RPG , مشكور على الموضوع اخى Red_Dragy
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
العفو (للجميع)
RPG :
هذا كود جديد.
----------------------------------------
صورة : لا يوجد
الفائدة : الكود هذا يخلي التخزين ينحذف إذا سويت له لود.
يعني مثلا أنا وصلت عند وحش صعب وقلت بخزن وبباريه وهكذا لين أهزمه.
طريقة الإستخدام :
1-أفتح البرنامج ورح للـScript Editor وأفتح السكربيت Scene_Save وأبحث عن:
اقتباس:
def on_decision(filename)
اقتباس:
# セーブ SE を演奏
$game_system.se_play($data_system.save_se)
# セーブデータの書き込み
file = File.open(filename, "wb")
write_save_data(file)
file.close
# イベントから呼び出されている場合
if $game_temp.save_calling
# セーブ呼び出しフラグをクリア
$game_temp.save_calling = false
# マップ画面に切り替え
$scene = Scene_Map.new
return
end
# メニュー画面に切り替え
$scene = Scene_Menu.new(4)
end
2-وأستبدله بـ:
اقتباس:
def on_decision(filename)
اقتباس:
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
$scene = Scene_Title.new
end
3- وأفتح سكربت Scene_Load وأبحث عن :
اقتباس:
def on_decision(filename)
# ファイルが存在しない場合
unless FileTest.exist?(filename)
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# ロード SE を演奏
$game_system.se_play($data_system.load_se)
# セーブデータの書き込み
file = File.open(filename, "rb")
read_save_data(file)
file.close
# BGM、BGS を復帰
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
# マップを更新 (並列イベント実行http://montada.com/images/smilies/wink.gif
$game_map.update
# マップ画面に切り替え
$scene = Scene_Map.new
end
4-وأستبدله بـ:
اقتباس:
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
read_save_data(file)
file.close
File.delete(filename)
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
$game_map.update
$scene = Scene_Map.new
end
وشكرا
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
::
::
هاذي قصة مب كود :09:
تسلم
و سلامتكم.....:ciao:
::
::
مشاركة: دروس، إضافات، أكواد روبي، برامج، صور ....إلخ (RPG Maker XP)
تسلم على الكود ;)
في إنتظار المزيد :biggthump