Jump to content
Rpg²S Forum

*Regolare difficoltà di gioco


Walrus1235
 Share

Recommended Posts

Il magnifico sito di loppa ha riaperto, quindi posso trasferire qui uno script importante.
no rens please.

Difficulty Options

Descrizione:

Questo Script permette di cambiare la difficoltà del gioco

Autore:

SephirothSpawn


Istruzioni per l'uso

Create una nuova classe e metteteci questo:


Script:

 

 

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

#==============================================================================
# Module RPG
#==============================================================================
module RPG
	#=========================================================================
	# Class Enemy
	#=========================================================================
	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
	#--------------------------------------------------------------------------
	# * Object Initialization
	#--------------------------------------------------------------------------
	def initialize
		normal_difficulty
	end
	#--------------------------------------------------------------------------
	# * Very Easy Difficulty
	#--------------------------------------------------------------------------
	def very_easy_difficulty
		@constant = 0.5
		set_attributes
	end
	#--------------------------------------------------------------------------
	# * Easy Difficulty
	#--------------------------------------------------------------------------
	def easy_difficulty
		@constant = 0.75
		set_attributes
	end
	#--------------------------------------------------------------------------
	# * Normal Difficulty
	#--------------------------------------------------------------------------
	def normal_difficulty
		@constant = 1
		set_attributes
	end
	#--------------------------------------------------------------------------
	# * Hard Difficulty
	#--------------------------------------------------------------------------
	def hard_difficulty
		@constant = 1.5
		set_attributes
	end
	#--------------------------------------------------------------------------
	# * Very Hard Difficulty
	#--------------------------------------------------------------------------
	def very_hard_difficulty
		@constant = 2
		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
			$data_enemies[i].maxsp = $data_enemies[i].b_maxsp * @constant
			$data_enemies[i].str = $data_enemies[i].b_str * @constant
			$data_enemies[i].dex = $data_enemies[i].b_dex * @constant
			$data_enemies[i].agi = $data_enemies[i].b_agi * @constant
			$data_enemies[i].int = $data_enemies[i].b_int * @constant
			$data_enemies[i].atk = $data_enemies[i].b_atk * @constant
			$data_enemies[i].pdef = $data_enemies[i].b_pdef * @constant
			$data_enemies[i].mdef = $data_enemies[i].b_mdef * @constant
			$data_enemies[i].eva = $data_enemies[i].b_eva * @constant
			$data_enemies[i].exp = $data_enemies[i].b_exp * @constant
			$data_enemies[i].gold = $data_enemies[i].b_gold * @constant
		end
	end
end

#==============================================================================
# Class Scene Title
#==============================================================================
class Scene_Title
	#--------------------------------------------------------------------------
	# * Alias' New Game Method
	#--------------------------------------------------------------------------
	alias new_game command_new_game
	#--------------------------------------------------------------------------
	# * Adds Difficulty Game Variables
	#--------------------------------------------------------------------------
	def command_new_game
		for i in 1...$data_enemies.size
			$data_enemies[i].set_bases
		end
		$difficulty_options = Difficulty_Options.new
		new_game
	end
end

#==============================================================================
# Scene_Save
#==============================================================================
class Scene_Save < Scene_File
	#--------------------------------------------------------------------------
	# * Alias Save Data
	#--------------------------------------------------------------------------
	alias new_save write_save_data
	#--------------------------------------------------------------------------
	# * Write Save Data
	#--------------------------------------------------------------------------
	def write_save_data(file)
		new_save(file)
		Marshal.dump($difficulty_options, file)
	end
end

#==============================================================================
# Scene_Load
#==============================================================================
class Scene_Load < Scene_File
	#--------------------------------------------------------------------------
	# * Alias Read Save Data
	#--------------------------------------------------------------------------
	alias new_load read_save_data
	#--------------------------------------------------------------------------
	# * Read Save Data
	#--------------------------------------------------------------------------
	def read_save_data(file)
		new_load(file)
		$difficulty_options = Marshal.load(file)
	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

 

Bugs e Conflitti Noti

N/A

One flew east, one flew west, one flew over the cuckoo's nest.
Link to comment
Share on other sites

  • 3 months later...
Scusate se posto in un topic vecchio ma a me questo codice non mi funzia, o meglio non mi da errori ma quando inserisco il call script ad esempio in un evento non succede niente...

(\__/)

(='.'=)

(")_(")

Questo è Bunny. Ho deciso di aiutarlo nella sua missione di conquista del mondo.

Compagni di Bunny unitevi a me!

 

http://img170.imageshack.us/img170/1858/pizzelartzzennm9.png

I chara da me postati: CLICCA QUI! PER XP - CLICCA QUI! PER XP(2) - CLICCA QUI! PER VX - CLICCA QUI! PER 2K/2K3!

I tileset da me postati:CLICCA QUI! PER XP

I Personaggi Completi da me postati: CLICCA QUI! PER XP

I Face da me postati: CLICCA QUI! PER XP

I Battlers da me postati: CLICCA QUI! PER XP!

Le Windowskin da me postate: CLICCA QUI! PER XP!

Risorse sonore da me postate: CLICCA QUI! PER SCARICARLE!

Guida al Ruby: CLICCA QUI! PER SCARICARLA!

Vi prego di inserirmi nei crediti...Grazie!

Link to comment
Share on other sites

Ehm..prova a mettere il call script very hard e poi a combattere con un mostro...direi che la differenza si vede.

"Quarantadue!" urlò Loonquawl. "Questo è tutto ciò che sai dire dopo un lavoro di sette milioni e mezzo di anni?"

"Ho controllato molto approfonditamente," disse il computer, "e questa è sicuramente la risposta. Ad essere sinceri, penso che il problema sia che voi non abbiate mai saputo veramente qual è la domanda."

 

 

 

Gioco disponibile: Prophecy of Last Era - OPEN SOURCE

 

http://www.mediafire.com/?u6aut42ks12ixgf

 

Puoi utilizzare qualsiasi evento, mappa, chara, grafica, e programmazione contenuta nel gioco-demo.

Nessun diritto di copia.

Hope you enjoy.

http://www.rpg2s.net/awards/bestmusician3.jpg

Link to comment
Share on other sites

ah quindi non si può regolare nel senso che si apre un menu e il player sceglie la difficoltà...

(\__/)

(='.'=)

(")_(")

Questo è Bunny. Ho deciso di aiutarlo nella sua missione di conquista del mondo.

Compagni di Bunny unitevi a me!

 

http://img170.imageshack.us/img170/1858/pizzelartzzennm9.png

I chara da me postati: CLICCA QUI! PER XP - CLICCA QUI! PER XP(2) - CLICCA QUI! PER VX - CLICCA QUI! PER 2K/2K3!

I tileset da me postati:CLICCA QUI! PER XP

I Personaggi Completi da me postati: CLICCA QUI! PER XP

I Face da me postati: CLICCA QUI! PER XP

I Battlers da me postati: CLICCA QUI! PER XP!

Le Windowskin da me postate: CLICCA QUI! PER XP!

Risorse sonore da me postate: CLICCA QUI! PER SCARICARLE!

Guida al Ruby: CLICCA QUI! PER SCARICARLA!

Vi prego di inserirmi nei crediti...Grazie!

Link to comment
Share on other sites

Si che si può fare.

Metti dove vuoi nel menù le scelte

Facile

Normale

Difficile

Ecc

e le colleghi al rispettivo call script.

"Quarantadue!" urlò Loonquawl. "Questo è tutto ciò che sai dire dopo un lavoro di sette milioni e mezzo di anni?"

"Ho controllato molto approfonditamente," disse il computer, "e questa è sicuramente la risposta. Ad essere sinceri, penso che il problema sia che voi non abbiate mai saputo veramente qual è la domanda."

 

 

 

Gioco disponibile: Prophecy of Last Era - OPEN SOURCE

 

http://www.mediafire.com/?u6aut42ks12ixgf

 

Puoi utilizzare qualsiasi evento, mappa, chara, grafica, e programmazione contenuta nel gioco-demo.

Nessun diritto di copia.

Hope you enjoy.

http://www.rpg2s.net/awards/bestmusician3.jpg

Link to comment
Share on other sites

Ci ho provato ma non funziona...forse sono impedito io...

(\__/)

(='.'=)

(")_(")

Questo è Bunny. Ho deciso di aiutarlo nella sua missione di conquista del mondo.

Compagni di Bunny unitevi a me!

 

http://img170.imageshack.us/img170/1858/pizzelartzzennm9.png

I chara da me postati: CLICCA QUI! PER XP - CLICCA QUI! PER XP(2) - CLICCA QUI! PER VX - CLICCA QUI! PER 2K/2K3!

I tileset da me postati:CLICCA QUI! PER XP

I Personaggi Completi da me postati: CLICCA QUI! PER XP

I Face da me postati: CLICCA QUI! PER XP

I Battlers da me postati: CLICCA QUI! PER XP!

Le Windowskin da me postate: CLICCA QUI! PER XP!

Risorse sonore da me postate: CLICCA QUI! PER SCARICARLE!

Guida al Ruby: CLICCA QUI! PER SCARICARLA!

Vi prego di inserirmi nei crediti...Grazie!

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...