[Résolu - Merci Sihn !] Incompatibilité entre deux scripts...
Auteur
Message
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:16
Salut, J'ai un petit probleme d'incompatibilté entre deux scripts : ♦ Les Sorts deviennent plus puissants plus on les utilises ♦ Rafidelis Title X Voici mon probleme :
J'ai placé le script pour les sorts en dessous de celui du Title. Merci d'avance.
Dernière édition par Naruzozo le Ven 10 Juil 2009 - 15:14, édité 1 fois
Raitosan
† Fondateur du forum †
Age : 31 Inscrit le : 09/02/2008 Messages : 1974
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:30
Bonjour, li les règles de présentation et édite ensuite ton poste merci.
Pourrais tu nous donner tes deux scripts, et ton script "Window_Comman" s'il te plait?
Merci.
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:33
Merci de m'aider. j'attends vraiment que quelqu'un me résolve ce proleme qui m'empeche de poster ma démo. J'espere que vous allez y arriver .
Le scrit Window_Command de base de VX :
Code:
#============================================================================== # ** Window_Command #------------------------------------------------------------------------------ # This window deals with general command choices. #==============================================================================
class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :commands # command #-------------------------------------------------------------------------- # * Object Initialization # width : window width # commands : command string array # column_max : digit count (if 2 or more, horizontal selection) # row_max : row count (0: match command count) # spacing : blank space when items are arrange horizontally #-------------------------------------------------------------------------- def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32) if row_max == 0 row_max = (commands.size + column_max - 1) / column_max end super(0, 0, width, row_max * WLH + 32, spacing) @commands = commands @item_max = commands.size @column_max = column_max refresh self.index = 0 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # * Draw Item # index : item number # enabled : enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, @commands[index]) end end end
"Up Skills" de ASHKA
Code:
#------------------------------------------------------------------------------------------- # Systeme d'evolution dans la maitrise des competences # Par ASHKA #-------------------------------------------------------------------------------------------
module Maitrise # Somme d'exp gagné à chaque utilisation de la competence EXP = 5 # Montant d'exp necessaire pour passer au niveau superieur ( fixe ) NEED_EXP = 100 # Augmentation de la puissance par niveau ( si 0.2, degats doublé apres 5 niveaux ) BONUS = 0.5 end class Game_Battler def make_obj_damage_value(user, obj) damage = obj.base_damage # get base damage if damage > 0 # a positive number? damage += user.atk * 4 * obj.atk_f / 100 # Attack F of the user damage += user.spi * 2 * obj.spi_f / 100 # Spirit F of the user unless obj.ignore_defense # Except for ignore defense damage -= self.def * 2 * obj.atk_f / 100 # Attack F of the target damage -= self.spi * 1 * obj.spi_f / 100 # Spirit F of the target end damage = 0 if damage < 0 # If negative, make 0 elsif damage < 0 # a negative number? damage -= user.atk * 4 * obj.atk_f / 100 # Attack F of the user damage -= user.spi * 2 * obj.spi_f / 100 # Spirit F of the user end damage *= elements_max_rate(obj.element_set) # elemental adjustment damage /= 100 damage = apply_variance(damage, obj.variance) # variance damage = apply_guard(damage) # guard adjustment #### if user.actor? and obj.is_a?(RPG::Skill) and damage > 0 $maitrise_skill[user.id][obj.id] += Maitrise::EXP exp = $maitrise_skill[user.id][obj.id] indice = 1 while exp > Maitrise::EXP_NEED exp -= Maitrise::EXP_NEED indice += Maitrise::BONUS end damage *= indice end #### if obj.damage_to_mp @mp_damage = damage.to_i # damage MP else @hp_damage = damage.to_i # damage HP end end end ################################################################################ class Scene_Title < Scene_Base def start super $maitrise_skill = Hash.new(0) load_database # Load database create_game_objects # Create game objects check_continue # Determine if continue is enabled create_title_graphic # Create title graphic create_command_window # Create command window play_title_music # Play title screen music end def command_new_game confirm_player_location Sound.play_decision for id in 1..($data_actors.size - 1) $maitrise_skill[id] = {} end for id in 1..($data_actors.size - 1) for i in 1..($data_skills.size - 1) $maitrise_skill[id][i] = 0 end end $game_party.setup_starting_members # Initial party $game_map.setup($data_system.start_map_id) # Initial map position $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.refresh $scene = Scene_Map.new RPG::BGM.fade(1500) close_command_window Graphics.fadeout(60) Graphics.wait(40) Graphics.frame_count = 0 RPG::BGM.stop $game_map.autoplay end end ################################################################################ class Scene_File < Scene_Base def write_save_data(file) characters = [] for actor in $game_party.members characters.push([actor.character_name, actor.character_index]) end $game_system.save_count += 1 $game_system.version_id = $data_system.version_id @last_bgm = RPG::BGM::last @last_bgs = RPG::BGS::last Marshal.dump(characters, file) Marshal.dump(Graphics.frame_count, file) Marshal.dump(@last_bgm, file) Marshal.dump(@last_bgs, file) Marshal.dump($game_system, file) Marshal.dump($game_message, file) Marshal.dump($game_switches, file) Marshal.dump($game_variables, file) Marshal.dump($game_self_switches, file) Marshal.dump($game_actors, file) Marshal.dump($game_party, file) Marshal.dump($game_troop, file) Marshal.dump($game_map, file) Marshal.dump($game_player, file) Marshal.dump($maitrise_skill, file) end
def read_save_data(file) characters = Marshal.load(file) Graphics.frame_count = Marshal.load(file) @last_bgm = Marshal.load(file) @last_bgs = Marshal.load(file) $game_system = Marshal.load(file) $game_message = Marshal.load(file) $game_switches = Marshal.load(file) $game_variables = Marshal.load(file) $game_self_switches = Marshal.load(file) $game_actors = Marshal.load(file) $game_party = Marshal.load(file) $game_troop = Marshal.load(file) $game_map = Marshal.load(file) $game_player = Marshal.load(file) $maitrise_skill = Marshal.load(file) if $game_system.version_id != $data_system.version_id $game_map.setup($game_map.map_id) $game_player.center($game_player.x, $game_player.y) end end end ################################################################################ class Window_Base < Window def draw_item_name(item, x, y, enabled = true, actor = nil) if item != nil draw_icon(item.icon_index, x, y, enabled) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 if item.is_a?(RPG::Skill) exp = $maitrise_skill[actor.id][item.id] level = 1 while exp > Maitrise::EXP_NEED exp -= Maitrise::EXP_NEED level += 1 end text = " - Lv : " + level.to_s else text = "" end self.contents.draw_text(x + 24, y, 172, WLH, item.name + text) end end end ################################################################################ class Window_Skill < Window_Selectable def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) skill = @data[index] if skill != nil rect.width -= 4 enabled = @actor.skill_can_use?(skill) draw_item_name(skill, rect.x, rect.y, enabled, @actor) self.contents.draw_text(rect, @actor.calc_mp_cost(skill), 2) end end end
Le script de Title Arrive.
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:38
Voici les scripts nécessaires pour le Title. Merci d'avance.
Rafidelis Title X de Rafidelis
Code:
#============================================================================== # VX_SP1 #------------------------------------------------------------------------------ # Correção do sistema de pré-configuração #==============================================================================
#------------------------------------------------------------------------------ # Código de correção #------------------------------------------------------------------------------ # * Em uma animação, quando um frame possui dimensões maiores ou menores # que as dimensões de uma imagem utilizada, ocorre um erro de exibição # * Problemas na exibição de animações com coordenada Y inválida (causada # pelo problema acima) # * Problemas relacionados ao caminho dos gráficos de uma animação, que, se # indisponíveis, não reportavam problema #------------------------------------------------------------------------------
class Sprite_Base < Sprite #-------------------------------------------------------------------------- # Exibição da animação #-------------------------------------------------------------------------- alias eb_sp1_dispose_animation dispose_animation def dispose_animation eb_sp1_dispose_animation @animation_bitmap1 = nil @animation_bitmap2 = nil end #-------------------------------------------------------------------------- # Configuração do gráfico de animação # frame : informações do frame (RPG::Animation::Frame) #-------------------------------------------------------------------------- alias eb_sp1_animation_set_sprites animation_set_sprites def animation_set_sprites(frame) eb_sp1_animation_set_sprites(frame) cell_data = frame.cell_data for i in 0..15 sprite = @animation_sprites[i] next if sprite == nil pattern = cell_data[i, 0] next if pattern == nil or pattern == -1 if @animation_mirror sprite.y = @animation_oy + cell_data[i, 2] end sprite.z = self.z + 300 + i end end end
Code:
#============================================================== #~ #Module Rafidelis For Scene Logo and Rafidelis Title X~ # Rafa_Fidelis@hotmail.com # www.ReinoRpg.com #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module Rafidelis #==============================================================================| # Abaixo o nome das Imagens que irão servir como "New Game" "Continue" e "Exit"| #=-----------------------------------------------------------------------------| COMMAND_PIC_NAMES = ["NewGame", # Nome da Imagem usada como a opção novojogo "Continue", # Nome da Imagem usada como a opção continuar "ExitGame"] # Nome da Imagem usada como a opção Sair CURSOR_PIC_NAME = "op_selected" # Nome da imagem usada como Cursor TIME_DURATION_TITLE = 10 # Duração da Scene MOVE_TITLE_PIC = false # true = mover false = não mover TITLE_PIC_HORIZONTAL_MOVIMENT_SPEED = 2 # Velocidade do movimento horizontal da img do titulo TITLE_PIC_VERTICAL_MOVIMENT_SPEED = 0 # Velocidade do movimento vertical da img do titulo #==============================================================================| # Nome da Imagemcom o nome do jogo,caso não queira usar deixe o nome em "" | #------------------------------------------------------------------------------| NAME_GAME_PIC = "game_name" NAME_GAME_PIC_POSY = 20 # Pos Y da imagem #=====================================| # Configurações :: Fog | #-------------------------------------| TITLE_FOG_NAME = "fog" # Nome da Fog usada no Title [ Deve estar na Pasta Picture] TITLE_FOG_BLEND_TYPE = 2 # Tipo do Blend da Fog do Title (0: normal, 1: adição, 2: subtração). TITLE_FOG_OPACITY = 65 # Opacidade Final da Fog ( 0 ~~ 255) LOGO_FOG_NAME = "fog2" # Nome da Fog usada na logo [ Deve estar na Pasta Picture] LOGO_FOG_BLEND_TYPE = 2 # Tipo do Blend da Fog usada na Logo (0: normal, 1: adição, 2: subtração). LOGO_FOG_OPACITY = 190 # Opacidade Final da Fog usada na Logo FOG_HORIZONTAL_MOVIMENT_SPEED = 2 # velocidade do Movimento Horizontal da fog FOG_VERTICAL_MOVIMENT_SPEED = 0 # Velocidade do Movimento Vertical da Fog #=====================================| # Configurações :: Logo | #-------------------------------------| NAME_LOGO_PIC = "logo" # Nome da Imagem de Logo NAME_LOGO_BACK_PIC = "logo_back" # Nome da imagem de fundo da logo TIME_DURATION_LOGO = 100 # Duração da Scene LOGO_BACK_HORIZONTAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento horizontal da imagem de fundo da logo USE_RANDOM_BGS = true # true = usar false = não usar RANDONS_BGS = [ # Caso a opção de usar BGS aleatoria não estiver "Wind", # sendo usada,a primeira musica sera a permanente "", # Nesse caso sera a "Wind" "" ] VOLUME_LOGO_BGS = 75 # Volume da BGS de Logo #=================================================| # Configurações :: Imagem de Luz :: Lights | #-------------------------------------------------| LIGHT_PIC_NAME = "bat" #Nome da imagem de luz LOGO_LIGHT_PIC_BLEND_TYPE = 1 #Tipo do blend da img de luz na logo TITLE_LIGHT_PIC_BLEND_TYPE = 1 # """"""""""""""""""""""""""" no title LIGHT_PIC_OPACITY = 255 # Opacidade final da imagem de luz LIGHT_PIC_HORIZONTAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento Horizontal da Luz LIGHT_PIC_VERTICAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento vertical da Luz LIGHT_PIC_TITLE_ZOOM_X = 1.5 # Zoom x da img de luz no Title LIGHT_PIC_TITLE_ZOOM_Y = 1.5 # Zoom y da img de luz no Title LIGHT_PIC_LOGO_ZOOM_X = 1 # Zoom X da img de luz na Logo LIGHT_PIC_LOGO_ZOOM_X = 1 # Zoom Y da img de luz na logo end
Code:
#===================================================== #~ #Rafidelis Scene Logo # By Rafidelis ( xD ) # Rafa_fidelis@hotmail.com # www.ReinoRpg.com # Data: 30/11/08 ( Falta pouco para 2009) #====================================================
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Instruções de Como Usar: #============================================================================== # Cole Acima do Main depois da linha ate a linha configure como você quer que # seja sua logo. # Você deve ter 4 imagens: # 1 da sua logo (da sua equipe,da sua produtora etc) # 1 de fundo para a Logo # 1 com efeitos de Luz # 1 de uma Fog # Se você não quiser por exemplo,não usar a imagem com efeitos de luzes,na # linha 59 modifique o nome para "",o mesmo serve para qualquer imagem.
# att. Rafidelis =D #=============================================================================== # Fim das Instruções #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#==================================== # Inicio das Configurações ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module Rafidelis #=====================================| # Configurações :: Fog | #-------------------------------------| LOGO_FOG_NAME = "fog2" # Nome da Fog usada na logo [ Deve estar na Pasta Picture] LOGO_FOG_BLEND_TYPE = 2 # Tipo do Blend da Fog usada na Logo (0: normal, 1: adição, 2: subtração). LOGO_FOG_OPACITY = 200 # Opacidade Final da Fog usada na Logo FOG_HORIZONTAL_MOVIMENT_SPEED = 2 # velocidade do Movimento Horizontal da fog FOG_VERTICAL_MOVIMENT_SPEED = 0 # Velocidade do Movimento Vertical da Fog #=====================================| # Configurações :: Logo | #-------------------------------------| NAME_LOGO_PIC = "logo" # Nome da Imagem de Logo NAME_LOGO_BACK_PIC = "logo_back" # Nome da imagem de fundo da logo TIME_DURATION_LOGO = 100 # Duração da Scene LOGO_BACK_HORIZONTAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento horizontal da imagem de fundo da logo USE_RANDOM_BGS = true # true = usar false = não usar RANDONS_BGS = [ # Caso a opção de usar BGS aleatoria não estiver "Wind", # sendo usada,a primeira musica sera a permanente "Wind", # Nesse caso sera a "Wind" "Wind" ] VOLUME_LOGO_BGS = 75 # Volume da BGS de Logo #=================================================| # Configurações :: Imagem de Luz :: Lights | #-------------------------------------------------| LIGHT_PIC_NAME = "bat" #Nome da imagem de luz LOGO_LIGHT_PIC_BLEND_TYPE = 1 #Tipo do blend da img de luz na logo LIGHT_PIC_OPACITY = 255 # Opacidade final da imagem de luz LIGHT_PIC_HORIZONTAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento Horizontal da Luz LIGHT_PIC_VERTICAL_MOVIMENT_VELOCITY = 1 # Velocidade do Movimento vertical da Luz LIGHT_PIC_LOGO_ZOOM_X = 1 # Zoom X da img de luz na Logo LIGHT_PIC_LOGO_ZOOM_Y = 1 # Zoom Y da img de luz na logo end #===================================================== # Fim das Configurações e Inicio do script de Logo #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Scene_Logo < Scene_Base include Rafidelis def start perform_transition #-------------------------------------------- # ::.. Criando a Imagem de Logo ..:: #-------------------------------------------- @logo = Sprite.new @logo.bitmap = Cache.picture(NAME_LOGO_PIC) @logo.opacity = 0 @logo_back = Plane.new @logo_back.bitmap = Cache.picture(NAME_LOGO_BACK_PIC) @logo_back.z = @logo.z - 10 @logo_back.opacity = 100 #-------------------------------------------- # ::.. Criando a Fog da Logo ..:: #-------------------------------------------- @fog_logo = Plane.new @fog_logo.bitmap = Cache.picture(LOGO_FOG_NAME) @fog_logo.blend_type = LOGO_FOG_BLEND_TYPE @fog_logo.z = @logo_back.z + 1 @fog_logo.opacity = 149 #-------------------------------------------- # ::.. Criando a Imagem das Luzes ..:: #-------------------------------------------- @lights = Plane.new @lights.bitmap = Cache.picture(LIGHT_PIC_NAME) @lights.blend_type = LOGO_LIGHT_PIC_BLEND_TYPE @lights.z = @logo.z - 1 @lights.zoom_x = LIGHT_PIC_LOGO_ZOOM_X @lights.zoom_y = LIGHT_PIC_LOGO_ZOOM_Y @lights.opacity = LIGHT_PIC_OPACITY @tempo = 0 @retire_opacity = false end
def update Graphics.update #----------------------- # ::.. Tocar BGS ..:: #====================== if @tempo == 0 if USE_RANDOM_BGS aleatory_se = rand(3) if aleatory_se == 0 Audio.bgs_play("Audio//BGS//#{RANDONS_BGS[0]}",VOLUME_LOGO_BGS) elsif aleatory_se == 1 Audio.bgs_play("Audio//BGS//#{RANDONS_BGS[1]}",VOLUME_LOGO_BGS) elsif aleatory_se == 2 Audio.bgs_play("Audio/BGS//#{RANDONS_BGS[2]}",VOLUME_LOGO_BGS) end else Audio.bgs_play("Audio/BGS//#{RANDONS_BGS[0]}",VOLUME_LOGO_BGS) end end
@tempo += 1 if @tempo < TIME_DURATION_LOGO if @logo.opacity > 0 and @retire_opacity == true @logo.opacity -= 10 end if @logo_back.opacity > 0 and @retire_opacity == true @logo_back.opacity -= 10 end if @lights.opacity > 0 and @retire_opacity == true @lights.opacity -= 10 end if @fog_logo.opacity > 8 and @retire_opacity == true @fog_logo.opacity -=10 end if @fog_logo.opacity <= 8 and @logo.opacity <= 0 and @lights.opacity <= 0 and @logo_back.opacity <= 0 terminate end #///////////////////////// # ::.. Logo Fog ..:: #/////////////////////// @fog_logo.opacity += 3 if @fog_logo.opacity < LOGO_FOG_OPACITY @fog_logo.ox -= FOG_HORIZONTAL_MOVIMENT_SPEED @fog_logo.oy =FOG_VERTICAL_MOVIMENT_SPEED #/////////////////////////// # ::.. Logo Back IMG ..:: #////////////////////////// @logo_back.ox += LOGO_BACK_HORIZONTAL_MOVIMENT_VELOCITY @logo_back.opacity += 1 if @logo_back.opacity < 255 @logo.opacity += 1 if @logo.opacity < 255 #///////////////////////// # ::.. Lights ..:: #/////////////////////// @lights.ox += LIGHT_PIC_HORIZONTAL_MOVIMENT_VELOCITY @lights.oy += LIGHT_PIC_VERTICAL_MOVIMENT_VELOCITY @lights.opacity += 1 if @lights.opacity < LIGHT_PIC_OPACITY #///////////////////////// # ::.. Logo Time ..:: #/////////////////////// if @tempo == TIME_DURATION_LOGO @retire_opacity = true #====================================================== # ::.. Deixando as Imagens da Logo não Visiveis ..:: #------------------------------------------------------ end def terminate Audio.bgs_stop @tempo = TIME_DURATION_LOGO + 1 # Adiciona mais 1 para que a logo não ocorra novamente $scene = Scene_Title.new # Chama o Title end end end #================================================================================ # FIM DO script - Encontre mais scripts de Rafidelis em www.ReinoRpg.com/forum #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raitosan
† Fondateur du forum †
Age : 31 Inscrit le : 09/02/2008 Messages : 1974
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:38
Remplace ton windows command par celui la:
Code:
#============================================================================== # ** Window_Command #------------------------------------------------------------------------------ # This window deals with general command choices. #==============================================================================
class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :commands # command #-------------------------------------------------------------------------- # * Object Initialization # width : window width # commands : command string array # column_max : digit count (if 2 or more, horizontal selection) # row_max : row count (0: match command count) # spacing : blank space when items are arrange horizontally #-------------------------------------------------------------------------- def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32) if row_max == 0 row_max = (commands.size + column_max - 1) / column_max end super(0, 0, width, row_max * WLH + 32, spacing) @commands = commands @item_max = commands.size @column_max = column_max refresh self.index = 0 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # * Draw Item # index : item number # enabled : enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, @commands[index]) end end
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:39
Merci Raito, je vais tester. Voici juste le dernier script de Title.
Code:
#===================================================== #~ #Rafidelis Title X # By Rafidelis ( xD ) # Rafa_fidelis@hotmail.com # www.ReinoRpg.com # Data: 30/11/08 ( Falta pouco para 2009) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Scene_Title < Scene_Base include Rafidelis def start super load_database create_game_objects check_continue create_title_graphic play_title_music create_pic_commands end def post_start end def pre_terminate end
@fog.opacity += 1 if @fog.opacity < TITLE_FOG_OPACITY and @sprite.opacity >= 255 @fog.ox += FOG_HORIZONTAL_MOVIMENT_SPEED @fog.oy += FOG_VERTICAL_MOVIMENT_SPEED
@lights.opacity += 1 if @lights.opacity < LIGHT_PIC_OPACITY and @fog.opacity >= TITLE_FOG_OPACITY
@name_game.opacity += 1 if @name_game.opacity < 255 and @lights.opacity >= LIGHT_PIC_OPACITY @newgame.opacity += 1 if @newgame.opacity < 255 and @name_game.opacity >= 105 @continue.opacity += 1 if @continue.opacity < 255 and @name_game.opacity >= 105 @exit.opacity += 1 if @exit.opacity < 255 and @name_game.opacity >= 155 @cursor.opacity += 1 if @cursor.opacity < 255 and @name_game.opacity >= 105
if MOVE_TITLE_PIC @sprite.ox += TITLE_PIC_HORIZONTAL_MOVIMENT_SPEED @sprite.oy += TITLE_PIC_VERTICAL_MOVIMENT_SPEED end
if Input.trigger?(Input::DOWN) and @exit.opacity >= 20 and @index == 0 Sound.play_cursor @index = 1 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0) @exit.tone = Tone.new(0,0,0,255) @cursor.y = @continue.y elsif Input.trigger?(Input::DOWN) and @index == 1 Sound.play_cursor @index = 2 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0,255) @exit.tone = Tone.new(0,0,0) @cursor.y = @exit.y elsif Input.trigger?(Input::DOWN) and @index == 2 Sound.play_cursor @index = 0 @newgame.tone = Tone.new(0,0,0) @continue.tone = Tone.new(0,0,0,255) @exit.tone = Tone.new(0,0,0,255) @cursor.y = @newgame.y elsif Input.trigger?(Input::UP) and @index == 0 Sound.play_cursor @index = 2 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0,255) @exit.tone = Tone.new(0,0,0) @cursor.y = @exit.y elsif Input.trigger?(Input::UP) and @index == 2 Sound.play_cursor @index = 1 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0) @exit.tone = Tone.new(0,0,0,255) @cursor.y = @continue.y elsif Input.trigger?(Input::UP) and @index == 1 Sound.play_cursor @index = 0 @newgame.tone = Tone.new(0,0,0) @continue.tone = Tone.new(0,0,0,255) @exit.tone = Tone.new(0,0,0,255) @cursor.y = @newgame.y end if Input.trigger?(Input::C) and @exit.opacity >= 150 case @index when 0 # Novo Jogo command_new_game when 1 # Continuar command_continue when 2 # Sair command_shutdown end end end def terminate super snapshot_for_background dispose_title_graphic dispose_command_pictures end
def dispose_command_pictures @newgame.dispose @continue.dispose @exit.dispose @name_game.dispose @cursor.dispose @lights.dispose end def dispose_command_window @command_window.dispose end def open_command_window end def close_command_window end
def create_title_graphic if MOVE_TITLE_PIC @sprite = Plane.new @sprite.bitmap = Cache.system("Title") else @sprite = Sprite.new @sprite.bitmap = Cache.system("Title") end end end #================================================================================ # FIM DO script - Encontre mais scripts de Rafidelis em www.ReinoRpg.com/forum #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raitosan
† Fondateur du forum †
Age : 31 Inscrit le : 09/02/2008 Messages : 1974
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:41
D'accord, tu me dira quoi^^
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:41
Désolé mais ça ne fonctionne pas. Toujours le même probleme.
Raitosan
† Fondateur du forum †
Age : 31 Inscrit le : 09/02/2008 Messages : 1974
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 11:45
Je pense que Fixnum veut dire constante, donc, à mon avis, un script essaye de donner au tableau une constante en paramètre, mais je suis encore un gros débutant en script, donc désoler si je ne peut pas t'aider plus, il faudrait demander à notre modérateur de script.
Sihn
Voyageur Lv.10
Age : 36 Inscrit le : 24/04/2009 Messages : 407
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 12:16
Créé un nouveau projet, mets-y ces scripts, ainsi que les innombrables ressources nécessaires à leurs fonctionnement, puis héberges ce projet sous megaupload.
La Meche
Flibustier Lv.21
Age : 30 Inscrit le : 24/05/2008 Messages : 3234
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 12:20
Nan mais je sais c'est quoi qui bug :depression: Quand il appelle Window_Command il met un tableau à la place d'une valeur donc sa va pas le faire =/
Sihn
Voyageur Lv.10
Age : 36 Inscrit le : 24/04/2009 Messages : 407
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 12:26
De toute façon, son script de titre est codé à l'arrache... Aucun alias, plein de répétition inutile... Quand au script des compétences, il ne respecte pas du tout la structure des scripts de bases d'RMVX... Remarque, ce dernier est assez petit... Je vais voir si y a moyen de le refaire de façon plus "propre".
Edit : J'ai refait à ma sauce le script pour les compétences :
Code:
# Somme d'exp gagné à chaque utilisation de la compétence. EXP = 5 # Montant d'exp necessaire pour passer au niveau superieur (fixe). NEED_EXP = 100 # Augmentation de la puissance par niveau (si 0.5, degats doublé apres 2 niveaux). BONUS = 0.5
class Game_Actor < Game_Battler attr_accessor :skill_power
alias skill_power_initialize initialize def initialize(actor_id) @skill_power = {} skill_power_initialize(actor_id) end end
class Game_Battler alias skill_power_make_obj_damage_value make_obj_damage_value def make_obj_damage_value(user, obj) skill_power_make_obj_damage_value(user, obj) if user.actor? and obj.is_a?(RPG::Skill) if user.skill_power.has_key?(obj.id) user.skill_power[obj.id] += EXP else user.skill_power[obj.id] = EXP end bonus = (user.skill_power[obj.id] / NEED_EXP) * BONUS + 1 if obj.damage_to_mp @mp_damage *= bonus else @hp_damage *= bonus end end end end
Places-le au dessus de Main, mais au dessous de tous les autres. (tu peux retirer le script d'Ashka si tu l'utilises) Mon script utilises un alias pour chaque méthode, ce qui lui assures (normallement) une compatibilité complète avec n'importe quel autre script, et devrait donc régler le problème. Si tu as encore des bugs, ça voudra dire que ce n'était pas l'utilisation du script d'Ashka qui gênait...
Naruzozo
Vagabond Lv.5
Age : 28 Inscrit le : 20/04/2009 Messages : 88
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts... Ven 10 Juil 2009 - 15:13
Merci beaucoup, pour l'instant ça à l'air de marcher.
Contenu sponsorisé
Sujet: Re: [Résolu - Merci Sihn !] Incompatibilité entre deux scripts...
[Résolu - Merci Sihn !] Incompatibilité entre deux scripts...