Jump to content
Rpg²S Forum
  • 0

Regolare difficoltà


Cero
 Share

Question

4 answers to this question

Recommended Posts

  • 0

Mi sembra fattibile più ad eventi, e dipende cosa intendi per difficoltà. Io farei qualcosa del tipo, all'inizio, una scelta: Facile, Medio, Difficile. Ogniuno attiva una switch oppure la variabile difficoltà viene messa a 1 da Facile, a 2 da Medio e a 3 da Difficile.

Quindi, ogni volta che fai un evento diverso, devi controllare questa variabile (oppure quale delle switch è attiva) e fare una cosa diversa.

Per esempio un tizio ti può affidare una missione facile, una media o una difficile in base alla difficoltà. Oppure i mostri possono essere più forti o gli oggetti costare di più; dovresti dire cosa vuoi specificamente che aumenti con la difficoltà, in modo che qualcuno possa aiutarti in maniera più precisa; se vuoi solo che i mostri siano più forti si può fare a script, se vuoi che le missioni cambino è meglio con gli eventi; dipende da te...

 

Volete due giochi Completi e Seri fatti con RPG MAKER? Cliccate su...

www.raldon.altervista.org

 

Problemi con Raldon? Segnalali su...

www.raldon.forumfree.net

 

Partecipante al Rpg2s.net Game Contest 2008/2009

http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpg

Gioco in Sviluppo: Raldon

 

 

Posizioni raggiunte nei Contest

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://img76.imageshack.us/img76/1260/destroy3gr3.pnghttp://img233.imageshack.us/img233/7186/comics2hd8.gifhttp://www.rpg2s.net/gif/GC_bestoftool3.gif

http://www.rpg2s.net/gif/GC_premio3.gifhttp://www.rpg2s.net/gif/GC_premio3.gifhttp://www.rpg2s.net/gif/GC_premio1.gifhttp://www.rpg2s.net/gif/GC_premio2.gifhttp://www.rpg2s.net/gif/GC_grafica3.gifhttp://www.rpg2s.net/gif/GC_programmazione3.gifhttp://www.rpg2s.net/gif/GC_programmazione1.gifhttp://www.rpg2s.net/awards/furordipopolo/Popolo3K.gifhttp://www.rpg2s.net/awards/furordipopolo/Popolo2XP.gifhttp://www.rpg2s.net/awards/furordipopolo/Popolo2BEST.gif

http://www.rpg2s.net/awards/bestuser2.jpghttp://www.rpg2s.net/awards/bestmaker2.jpghttp://www.rpg2s.net/awards/mostpresent1.jpghttp://www.rpg2s.net/awards/mostproductive1.jpg

Link to comment
Share on other sites

  • 0

Abbiamo questi, già modificati

 

#==============================================================================
# ■ Scene_Title
#==============================================================================

class Scene_Title

 def main
# edit #
#==========================================================================
====
$basic_items_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,5050,51,52,53,54,5
5,56,57,58,59,60,
61,62,63,64,65,66,67,68,69]
$quest_items_ids = [71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,
91,92,93,94,95,96,97,98,99,100]
$weapon_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2
9,30,
31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]
$armor_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,61,62,63,64,65,66,67,6
8,69,70,
71,72,73,74,75,76,77,78,79,80]
$accessory_ids = [20,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]
#==========================================================================
====
# end edit #
if $BTEST
  battle_test
  return
end
$data_actors		= load_data("Data/Actors.rxdata")
$data_classes	   = load_data("Data/Classes.rxdata")
$data_skills		= load_data("Data/Skills.rxdata")
$data_items		 = load_data("Data/Items.rxdata")
$data_weapons	   = load_data("Data/Weapons.rxdata")
$data_armors		= load_data("Data/Armors.rxdata")
$data_enemies	   = load_data("Data/Enemies.rxdata")
$data_troops		= load_data("Data/Troops.rxdata")
$data_states		= load_data("Data/States.rxdata")
$data_animations	= load_data("Data/Animations.rxdata")
$data_tilesets	  = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system		= load_data("Data/System.rxdata")
# edit #
#==========================================================================
====
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
  $map_infos[key] = $map_infos[key].name
end
$game_time = Game_Time.new
#==========================================================================
====
# end edit #
$game_system = Game_System.new
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
s1 = "Nuova partita"
s2 = "Carica partita"
s3 = "Crediti"
s4 = "Esci dal gioco"

d1 = "Molto facile"
d2 = "Facile"
d3 = "Normale"
d4 = "Difficile"
d5 = "Molto difficile"

@command_window = Window_Command.new(192, [s1, s2, s3, s4])
@command_window.back_opacity = 160
@command_window.x = (640 - @command_window.width) / 2
@command_window.y = 141
@continue_enabled = false

@diff_command_window = Window_Diff.new(192, [d1, d2, d3, d4, d5])
@diff_command_window.back_opacity = 160
@diff_command_window.visible = false
@diff_command_window.active = false
@diff_command_window.x = (640 - @diff_command_window.width) / 2
@diff_command_window.y = 125

 for i in 0..9
  if FileTest.exist?("Salvataggio #{i+1}.rxdata")
   @continue_enabled = true
  end
 end
if @continue_enabled
  @command_window.index = 1
else
  @command_window.disable_item(1)
end
@diff_command_window.index = 2
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
# トランジション実行
Graphics.transition
# メインループ
loop do
  Graphics.update
  Input.update
  update
  if $scene != self
	break
  end
end
Graphics.freeze
@command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
 end
 #--------------------------------------------------------------------------
 # ● コマンド : ニューゲーム
 #--------------------------------------------------------------------------
 def update
@command_window.update
if Input.trigger?(Input::C)
  case @command_window.index
  when 0
	diff_command_new_game
  when 1
	command_continue
  when 2
	$scene = Scene_CT.new
  when 3
	command_shutdown
  end
end
 end
 def update_diff
@diff_command_window.update
if Input.trigger?(Input::B)
  $game_system.se_play($data_system.cancel_se)
  $scene = Scene_Title.new
end
if Input.trigger?(Input::C)
case @diff_command_window.index
  when 0
	command_new_game (1)
  when 1
	command_new_game (2)
  when 2
	command_new_game (3)
  when 3
	command_new_game (4)
  when 4
	command_new_game (5)
  end
end
 end
 #--------------------------------------------------------------------------
 # ● コマンド : コンティニュー
 #--------------------------------------------------------------------------
def diff_command_new_game
$game_system.se_play($data_system.decision_se)
@diff_command_window.active = true
$game_system.se_play($data_system.decision_se)
@diff_command_window.visible = true
@diff_command_window.active = true
@command_window.active = false
@command_window.visible = false
loop do
  Graphics.update
  Input.update
  update_diff
  if $scene != self
	break
  end
end
Graphics.freeze
@diff_command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
end

def command_new_game (diff)
$game_system.se_play($data_system.decision_se)
Audio.bgm_stop
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
# 初期パーティをセットアップ
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
for i in 1...$data_enemies.size
$data_enemies[i].set_bases
end
$difficulty_options = Difficulty_Options.new
if diff == 1
  $difficulty_options.very_easy_difficulty
end
if diff == 2
  $difficulty_options.easy_difficulty
end
if diff == 3
  $difficulty_options.normal_difficulty
end
if diff == 4
  $difficulty_options.hard_difficulty
end
if diff == 5
  $difficulty_options.very_hard_difficulty
end
 end
 
 def command_continue
# コンティニューが無効の場合
unless @continue_enabled
  # ブザー SE を演奏
  $game_system.se_play($data_system.buzzer_se)
  return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ロード画面に切り替え
$scene = Scene_Load.new
 end
 #--------------------------------------------------------------------------
 # ● コマンド : シャットダウン
 #--------------------------------------------------------------------------
 def command_shutdown
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# BGM、BGS、ME をフェードアウト
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# シャットダウン
$scene = nil
 end
 #--------------------------------------------------------------------------
 # ● 戦闘テスト
 #--------------------------------------------------------------------------
 def battle_test
# データベース (戦闘テスト用) をロード
$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")
# プレイ時間計測用のフレームカウントをリセット
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
# 戦闘テスト用のパーティをセットアップ
$game_party.setup_battle_test_members
# トループ ID、逃走可能フラグ、バトルバックを設定
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# バトル開始 SE を演奏
$game_system.se_play($data_system.battle_start_se)
# バトル BGM を演奏
$game_system.bgm_play($game_system.battle_bgm)
# バトル画面に切り替え
$scene = Scene_Battle.new
 end
end


#==============================================================================
# ■ Window_Diff
#==============================================================================
class Window_Diff < Window_Selectable
  def initialize(width, commands)
# コマンドの個数からウィンドウの高さを算出
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 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(4, 32 * index, self.contents.width - 8, 32)
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

 

 

 

#==============================================================================
# Difficulty Options
#--------------------------------------------------------------------------
# Created By SephirothSpawn (11.11.05)
# Last Updated: 11.11.05
# Modificato da Dexter
#==============================================================================

module RPG
class Enemy
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :b_maxhp, :b_maxsp, :b_str, :b_dex, :b_agi, :b_int
attr_accessor :b_atk, :b_pdef, :b_mdef, :b_eva, :b_exp, :b_gold
#--------------------------------------------------------------------------
# * Set Bases
#--------------------------------------------------------------------------
def set_bases
@b_maxhp, @b_maxsp = @maxhp, @maxsp
@b_str, @b_dex, @b_agi, @b_int = @str, @dex, @agi, @int
@b_atk, @b_pdef, @b_mdef, @b_eva = @atk, @pdef, @mdef, @eva
@b_exp, @b_gold = @exp, @gold
end
end
end

#==============================================================================
# Class Difficulty Options
#==============================================================================
class Difficulty_Options
def very_easy_difficulty
@constant = 0.5
set_attributes
end
def easy_difficulty
@constant = 0.75
set_attributes
end
def normal_difficulty
@constant = 1
set_attributes
end
def hard_difficulty
@constant = 1.25
set_attributes
end
def very_hard_difficulty
@constant = 1.5
set_attributes
end
#--------------------------------------------------------------------------
# * Set Attributes
#--------------------------------------------------------------------------
def set_attributes
for i in 1...$data_enemies.size
$data_enemies[i].maxhp = ($data_enemies[i].b_maxhp * @constant).to_i
$data_enemies[i].maxsp = ($data_enemies[i].b_maxsp * @constant).to_i
$data_enemies[i].str = ($data_enemies[i].b_str * @constant).to_i
$data_enemies[i].dex = ($data_enemies[i].b_dex * @constant).to_i
$data_enemies[i].agi = ($data_enemies[i].b_agi * @constant).to_i
$data_enemies[i].int = ($data_enemies[i].b_int * @constant).to_i
$data_enemies[i].atk = ($data_enemies[i].b_atk * @constant).to_i
$data_enemies[i].pdef = ($data_enemies[i].b_pdef * @constant).to_i
$data_enemies[i].mdef = ($data_enemies[i].b_mdef * @constant).to_i
$data_enemies[i].eva = ($data_enemies[i].b_eva * @constant).to_i
$data_enemies[i].exp = ($data_enemies[i].b_exp * @constant).to_i
$data_enemies[i].gold = ($data_enemies[i].b_gold * @constant).to_i
end
end
end
#Per regolare la difficoltà del gioco inserite un call script e incollateci questo:
#$difficulty_options.very_easy_difficulty
#$difficulty_options.easy_difficulty
#$difficulty_options.normal_difficulty
#$difficulty_options.hard_difficulty
#$difficulty_options.very_hard_difficulty

 

E abbiamo aggiunto

Marshal.dump($difficulty_options, file)

in Scene_Save e

$difficulty_options = Marshal.load(file)

in Scene_Load, il problema l'abbiamo quando si salva, si chiude il gioco, si riapre e si carica, se facciamo così la difficoltà torna normale

http://img368.imageshack.us/img368/1325/firmanz9.jpgDisponibile 1 invito per eRepublik, chiedete per MP | My WebSite | L'Alleanza dei Dragoni - RPG by Cero & Dexter
Link to comment
Share on other sites

  • 0
ma sei Cero di GR! 8-0 ?

Visto che alterno periodi di pausa a quelli attivi, ecco il mio log:

12/02/2009= SALTUARIAMENTE sul forum, rpg maker xp= OFF

7/01/2009= PRESENTE sul forum, rpg maker xp=ON

30/12/08=PRESENTE sul forum, rpg maker xp=OFF

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...