Jump to content
Rpg²S Forum

*Sistema di sviluppo alla FF 2


Valentino
 Share

Recommended Posts

FF2 Development System

Descrizione


Questo script emula il sistema di sviluppo di FF 2, cioè i personaggi non si potenziano più tramite i livelli ma in base a cosa fanno durante le battaglie. Se usano magie potenzieranno il lato magico ecc....


Autore

 

Avon Valentino (Io)

 

Allegati


Demo Link:
http://www.mediafire.com/download.php?bl2o7igjyyz83fv


Script


EDIT: Nuova versione più leggera e compatibile:

 

 

 

#---------------------------FF 2 development system---------------------
#
#script creato da Valentino Avon, se lo usate creditatemi ;)
#Sistema di Wait via script preso dallo script tankentai di Enu
#Si prega di creditare anche lui.
#
#
#ogni volta che gli hp verranno dimezzati, aumenteranno di un ventesimo degli
#hp massimi.
HP_PIU = 20

#ogni volta che gli sp verranno dimezzati, aumenteranno di un ventesimo degli
#sp massimi.
SP_PIU = 20

#percentuale per la possibilità di potenziare la forza attaccando.
PERC_FORZA = 10
#Quando aumenta, la forza sale di un decimo di quella attuale.
STR_PIU = 10

#come per la forza (potenzia l'intelligenza usando magie)
PERC_MAGIE = 10
#quando aumenta, l'intelligenza sale di un decimo di quella attuale
INT_PIU = 10

#come per la forza (potenzia l'agilità subendo attacchi fisici)
PERC_AGI = 5
#quando aumenta, l'agilità sale di un decimo di quella attuale
AGI_PIU = 10

#come per la forza (potenzia la destrezza usando attacchi fisici)
PERC_MIRA = 10
#quando aumenta, la destrezza sale di un decimo di quella attuale
DEX_PIU = 10
class Game_Actor < Game_Battler
	attr_accessor :last_hp #hp più
	attr_accessor :last_sp #sp più
	attr_accessor :attacca #forza e attacco
	attr_accessor :uso_magie #intelligenza
	attr_accessor :colpito #schivata e agilità
	attr_accessor :attacca_arma #destrezza
	alias valentino_setup setup
	def setup(actor_id)
		@last_hp = 0
		@last_sp = 0
		@attacca = false
		@uso_magie = false
		@colpito = false
		@attacca_arma = false
		valentino_setup(actor_id)
	end
end

class Window_Help < Window_Base
	attr_accessor :potenziamenti
	alias valentino_initialize initialize
	def initialize
		@potenziamenti = []
		valentino_initialize
	end
	def update_basic
		Graphics.update
		Input.update
		$game_system.update
		$game_screen.update
	end
	def testo(testo)
		self.set_text(testo)
		loop do
			update_basic
			break if Input.trigger?(Input::C)
		end
	end
end

class Scene_Battle
	alias valentino_main main
	def main
		for actor in $game_party.actors
			actor.last_hp = actor.hp
			actor.last_sp = actor.sp
			actor.attacca = false
			actor.uso_magie = false #intelligenza
			actor.colpito = false #schivata e agilità
			actor.attacca_arma = false #destrezza
		end
		valentino_main
	end
	def update_basic
		Graphics.update
		Input.update
		$game_system.update
		$game_screen.update
		@spriteset.update
	end
	def wait(duration)
		for i in 0...duration
			update_basic
		end
	end
	alias ff2_phase5 start_phase5
	def start_phase5
		ff2_phase5
		for actor in $game_party.actors
			unless actor.hp == 0
				if actor.hp <= (actor.last_hp/2)
					actor.maxhp += (actor.maxhp/HP_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Hp!")
				end
				
				if actor.sp <= (actor.last_sp/2)
					actor.maxsp += (actor.maxsp/SP_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Sp!")
				end
				
				if actor.attacca
					actor.str += (actor.str/STR_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Forza!")
				end
				
				if actor.uso_magie
					actor.int += (actor.int/INT_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Intelligenza!")
				end
				
				if actor.colpito
					actor.agi += (actor.agi/AGI_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Agilità!")
				end
				
				if actor.attacca_arma
					actor.dex += (actor.dex/DEX_PIU)
					@help_window.potenziamenti.push(actor.name + " ha guadagnato un livello di Destrezza!")
				end
			end
		end
		loop do
			for pot in @help_window.potenziamenti
				@help_window.testo(pot)
				wait(1)
				@help_window.potenziamenti.delete(pot)
			end
			break if @help_window.potenziamenti.size == 0
		end
		@help_window.visible = false
	end
end

class Window_BattleResult < Window_Base
	def refresh
		self.contents.clear
		x = 4
		self.contents.font.color = normal_color
		cx = contents.text_size(@gold.to_s).width
		self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
		x += cx + 4
		self.contents.font.color = system_color
		self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
		y = 32
		for item in @treasures
			draw_item_name(item, 4, y)
			y += 32
		end
	end
end

class Game_Battler
	alias ff2_attack attack_effect
	def attack_effect(attacker)
		ff2_attack(attacker)
		hit_result = (rand(100) < attacker.hit)
		if hit_result == true
			if attacker.is_a?(Game_Actor)
				attacker.attacca = true if rand(100) < PERC_FORZA
				attacker.attacca_arma = true if rand(100) < PERC_MIRA
			end
			#se colpito aumenta l'agilità
			if attacker.is_a?(Game_Enemy)
				self.colpito = true if rand(100) < PERC_AGI
			end
		end
	end
	
	alias ff2_skill skill_effect
	def skill_effect(user, skill)
		ff2_skill(user, skill)
		#se usa una magia che abbia un potere diverso da 0
		if user.is_a?(Game_Actor) and skill.power != 0 and skill.atk_f == 0
			user.uso_magie = true if rand(100) < PERC_MAGIE
		end
	end
end

class Window_MenuStatus < Window_Selectable
	def refresh
		self.contents.clear
		@item_max = $game_party.actors.size
		for i in 0...$game_party.actors.size
			x = 64
			y = i * 116
			actor = $game_party.actors[i]
			draw_actor_graphic(actor, x - 40, y + 80)
			draw_actor_name(actor, x, y)
			draw_actor_class(actor, x + 144, y)
			draw_actor_state(actor, x + 236, y)
			draw_actor_hp(actor, x , y + 32)
			draw_actor_sp(actor, x , y + 64)
		end
	end
end

class Window_Status < Window_Base
	def refresh
		self.contents.clear
		draw_actor_graphic(@actor, 40, 112)
		draw_actor_name(@actor, 4, 0)
		draw_actor_class(@actor, 4 + 144, 0)
		draw_actor_state(@actor, 96, 64)
		draw_actor_hp(@actor, 96, 112, 172)
		draw_actor_sp(@actor, 96, 144, 172)
		draw_actor_parameter(@actor, 96, 192, 0)
		draw_actor_parameter(@actor, 96, 224, 1)
		draw_actor_parameter(@actor, 96, 256, 2)
		draw_actor_parameter(@actor, 96, 304, 3)
		draw_actor_parameter(@actor, 96, 336, 4)
		draw_actor_parameter(@actor, 96, 368, 5)
		draw_actor_parameter(@actor, 96, 400, 6)
		self.contents.font.color = system_color
		self.contents.draw_text(320, 160, 96, 32, "equipment")
		draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
		draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
		draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
		draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
		draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
	end
end

 

 

 

Istruzioni per l'uso


Trovate tutto all'interno dello script, se lo usate creditatemi per favore


Bugs e Conflitti Noti


N/A

Edited by Dilos
Script monoriga sistemato.
Link to comment
Share on other sites

  • 2 weeks later...
Ho modificato il primo post, ho inserito una versione migliore. L'errore era dovuto al fatto che inserendo lo script in Code aveva spostato delle parti di script! Spero che ora sia tutto a posto!
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...