-
Posts
186 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by Belxebu
-
-
GameBaker Automathic Weather
Descrizione
Condizioni atmosferiche sempre random per un game piu realisticoAutore
sandgolemIstruzioni per l'uso
Inserire su "MATERIAL". per creare un effetto atmosferico occorre impostare ogni singola mappa come di seguito:aggiungete una stringa sotto la riga 16 come da esempio:AutoWeather[1] = [1,6,60,1]
AutoWeather[iD Mappa] = [Tipo,Intensità,Durata, Tempo di attesa]Tipo: 0 = Nessuno, 1 = Pioggia, 2 = Temporale, 3 = NeveIMPORTANTE:
in rpgmaker VX gli script vanno SEMPRE inseriti sotto MATERIALS e non sotto MAIN
# ** GameBaker Automatic Weather #========================================================================== # by sandgolem # This script is a modified version of one that was included in the # Shine Garden japanese sample game, Black Lion's Crest. # # Version 1 [VX] # January 28th, 2008 #========================================================================== module GameBaker AutoWeather = {} AutoWeatherDisable = 0 # Type, power, duration, force wait AutoWeather[1] = [1,6,60,1] AutoWeather[2] = [3,9] AutoWeather[3] = [4,9] AutoWeather[4] = [3,7] end #========================================================================== # # To check for updates or find more scripts, visit: # http://www.gamebaker.com/rmvx/scripts/ # Our RMXP scripts: http://www.gamebaker.com/rmxp/scripts/ # # Instructions: http://www.gamebaker.com/rmvx/scripts/e/automatic-weather.php # Discussion/Help: http://forums.gamebaker.com/showthread.php?t=1221 # #========================================================================== class Game_Map alias gamebaker_autoweather_setup setup def setup(map_id) gamebaker_autoweather_setup(map_id) gamebaker_autoweather_setup2 end def gamebaker_autoweather_setup2 @screen.weather(0,0,0) return if $game_switches[GameBaker::AutoWeatherDisable] or !GameBaker::AutoWeather.key?(@map_id) sg = GameBaker::AutoWeather[@map_id] @screen.weather(sg[0],sg[1],0) @screen.weather(sg[0],sg[1],sg[2]) if sg[2] @wait_count = sg[2] if sg[3] == 1 end end #========================================================================== #========================================================================== -
More saveslots
Descrizione
Aumenta il numero di slot disponibili per il salvataggio fino ad un massimo di 99 slot
Autore
ERZENGEL
Istruzioni per l'uso
Inserire sopra Main,per cambiare numero di slot disponibile sostituire
SAVE_MAX= 99
con il numero di slot desiderato#============================================================================== # ** More saveslots (v1.0 by ERZENGEL) #------------------------------------------------------------------------------ # The value of the saveslots can be set #============================================================================== # value of the saveslots SAVE_MAX = 99 #============================================================================== class Window_SaveFile #-------------------------------------------------------------------------- def initialize(file_index, filename) super(0, 56 + file_index % SAVE_MAX * 90, 544, 90) @file_index = file_index @filename = filename load_gamedata refresh @selected = false end #-------------------------------------------------------------------------- end #============================================================================== class Scene_File #-------------------------------------------------------------------------- def start super @file_max = SAVE_MAX create_menu_background @help_window = Window_Help.new create_savefile_windows if @saving @index = $game_temp.last_file_index @help_window.set_text(Vocab::SaveMessage) else @index = self.latest_file_index @help_window.set_text(Vocab::LoadMessage) end @savefile_windows[@index].selected = true @page_file_max = ((416 - @help_window.height) / 90).truncate for i in 0...@file_max window = @savefile_windows[i] if @index > @page_file_max - 1 if @index < @file_max - @page_file_max - 1 @top_row = @index window.y -= @index * window.height elsif @index >= @file_max - @page_file_max @top_row = @file_max - @page_file_max window.y -= (@file_max - @page_file_max) * window.height else @top_row = @index window.y -= @index * window.height end end window.visible = (window.y >= @help_window.height and window.y < @help_window.height + @page_file_max * window.height) end end #-------------------------------------------------------------------------- def create_savefile_windows @top_row = 0 @savefile_windows = [] for i in 0...@file_max @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end end #-------------------------------------------------------------------------- def cursor_down(wrap) if @index < @file_max - 1 or wrap @index = (@index + 1) % @file_max for i in 0...@file_max window = @savefile_windows[i] if @index == 0 @top_row = 0 window.y = @help_window.height + i % @file_max * window.height elsif @index - @top_row > @page_file_max - 1 window.y -= window.height end window.visible = (window.y >= @help_window.height and window.y < @help_window.height + @page_file_max * window.height) end if @index - @top_row > @page_file_max - 1 @top_row += 1 end end end #-------------------------------------------------------------------------- def cursor_up(wrap) if @index > 0 or wrap @index = (@index - 1 + @file_max) % @file_max for i in 0...@file_max window = @savefile_windows[i] if @index == @file_max - 1 @top_row = @file_max - @page_file_max window.y = @help_window.height + i % @file_max * window.height window.y -= (@file_max - @page_file_max) * window.height elsif @index - @top_row < 0 window.y += window.height end window.visible = (window.y >= @help_window.height and window.y < @help_window.height + @page_file_max * window.height) end if @index - @top_row < 0 @top_row -= 1 end end end #-------------------------------------------------------------------------- end #==============================================================================
-
Random Battle BGM
Descrizione
Con questo script si possono metere svariati BGM ed uno di questi verrà usato all'inizio di una battaglia
Autore
ERZENGEL
Istruzioni per l'uso
Inserite sopra Main.
Se volete disabilitare lo script in prossimità di un boss dovete modificare la linea:$game_map.rbm = false
a
#========================================================================== # ** Random Battle-BGM 1.01 #========================================================================== # by ERZENGEL (www.rpgvx.de.ms) #========================================================================== #========================================================================== # * Game_Map #========================================================================== class Game_Map attr_accessor :rbm attr_accessor :rbmusic alias erzengel_rbminitialize initialize def initialize # The names of the audiofiles (they must be in the BGM-folder!) @rbmusic = ["Battle1", "Battle2", "Battle3","Battle4"] # TRUE if script should be active / FALSE if script should be inactive @rbm = true erzengel_rbminitialize end end #========================================================================== # * Scene_Map #========================================================================== class Scene_Map alias erzengel_rbmcallbattle call_battle def call_battle rbm = $data_system.battle_bgm.name.clone if $game_map.rbm == true rndmusic = rand($game_map.rbmusic.size) $data_system.battle_bgm.name = $game_map.rbmusic[rndmusic] end erzengel_rbmcallbattle $data_system.battle_bgm.name = rbm.clone end end
-
Lite Menu
Descrizione
Un menu in stile Dragon WarriorAutore
WoratanaIstruzioni per l'uso
Inserire sopra Main#============================================================================== # ¦ [RMVX] Lite Menu Version 1.01 #------------------------------------------------------------------------------ # by Woratana [woratana@hotmail.com] # released on 03/02/2008 # # Features Version 1.01 # - Fixed Bug in Gold_Text # Features Version 1.0 # - Allow user to config menu # - Add Gold/Location Window (user can turn on/off) #============================================================================== module Wor_Litemenu #================ # SETUP Script Here! #================ MENU_WINDOW_Y = 50 CHARA_WINDOW_Y = 160 CHARA_WINDOW_WIDTH = 175 SHOW_LV = true SHOW_LOCATION_WINDOW = true VOCAB_LOCATION = "Location:" VOCAB_GOLD = "Gold:" LOCATION_WINDOW_Y = 295 LOCATION_TEXT_X = 96 GOLD_TEXT_X = 84 end class Scene_Menu < Scene_Base def initialize(menu_index = 0) @menu_index = menu_index end def start super create_menu_background create_command_window lite_create_location_window if Wor_Litemenu::SHOW_LOCATION_WINDOW == true lite_create_actor_window end # START LITE METHOD def lite_create_actor_window member = [] @item_max = $game_party.members.size for actor in $game_party.members member.push ((actor.name) + " Lv." + (actor.level.to_s)) if Wor_Litemenu::SHOW_LV == true member.push (actor.name) if Wor_Litemenu::SHOW_LV == false end @status_window = Window_Command.new(Wor_Litemenu::CHARA_WINDOW_WIDTH, member) @status_window.index = @menu_index @status_window.x = (554 /2) - (@status_window.width/2) @status_window.y = Wor_Litemenu::CHARA_WINDOW_Y @status_window.visible = false end def lite_get_map_name mapdata = load_data("Data/MapInfos.rvdata") map_id = $game_map.map_id @map_name = mapdata[map_id].name end def lite_draw_currency_value(value, x, y, width) cx = @location_window.contents.text_size(Vocab::gold).width @location_window.contents.font.color = @location_window.normal_color @location_window.contents.draw_text(x+53, y, @location_window.width+cx, 24, value, 0) @location_window.contents.font.color = @location_window.system_color @location_window.contents.draw_text(x+(($game_party.gold).to_s.size * 8)+68, y, @location_window.width, 24, Vocab::gold, 0) end def lite_create_location_window width = 300 height = 90 x = (554 /2) - (width/2) y = Wor_Litemenu::LOCATION_WINDOW_Y @location_window = Window_Base.new(x, y, width, height) @location_window.create_contents lite_get_map_name @location_window.contents.font.color = @location_window.system_color @location_window.contents.draw_text(0, 0, 300, 24, Wor_Litemenu::VOCAB_GOLD) @location_window.contents.font.color = @location_window.normal_color lite_draw_currency_value($game_party.gold, 4, 0, Wor_Litemenu::GOLD_TEXT_X) @location_window.contents.font.color = @location_window.system_color @location_window.contents.draw_text(0, 32, 300, 24, Wor_Litemenu::VOCAB_LOCATION) @location_window.contents.font.color = @location_window.normal_color @location_window.contents.draw_text(Wor_Litemenu::LOCATION_TEXT_X, 32, 300, 24, @map_name) end # END LITE METHOD def terminate super dispose_menu_background @command_window.dispose @location_window.dispose if @location_window @status_window.dispose end def update super update_menu_background @command_window.update if @command_window.active update_command_selection elsif @status_window.active @status_window.update update_actor_selection end end def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(200, [s1, s2, s3, s4, s5, s6],2,3) @command_window.index = @menu_index @command_window.x = (554 /2) - (@command_window.width/2) #167 @command_window.y = Wor_Litemenu::MENU_WINDOW_Y if $game_party.members.size == 0 @command_window.draw_item(0, false) @command_window.draw_item(1, false) @command_window.draw_item(2, false) @command_window.draw_item(3, false) end if $game_system.save_disabled @command_window.draw_item(4, false) end end def start_actor_selection @command_window.active = false @status_window.visible = true @status_window.active = true @status_window.index = 0 end def end_actor_selection @command_window.active = true @status_window.visible = false @status_window.active = false @status_window.index = -1 end endScreenshot
http://woratana.fileave.com/litemenu1.jpg
-
Mog Basic Menu Plus V 1.0
Descrizione
Menu con locazione del giocatore e tempo di gioco molto somigliante a quello base dell' RPG Maker XP
Autore
Moghunter tradotto da me
Istruzioni per l'uso
Inserire sopra Main
################################################## # Mog Basic Menu Plus V 1.0 # ################################################## # By Moghunter tradotto da Rinnegatamante # ################################################## #Menu padrão VX com adição de alguns extras, neste #script você poderá trabalhar em cima dele e adaptá-lo #facilmente ao seu jogo. #------------------------------------------------- ############## # Game_Actor # ############## class Game_Actor < Game_Battler def now_exp return @exp - @exp_list[@level] end def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end ############### # Window_Base # ############### class Window_Base < Window def draw_actor_level_menu(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, Vocab::level_a) self.contents.font.color = normal_color self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2) end def draw_actor_class_menu(actor, x, y) self.contents.font.color = normal_color self.contents.draw_text(x, y, 85, WLH, actor.class.name) end def exp_gauge_color1 return text_color(30) end def exp_gauge_color2 return text_color(31) end def draw_actor_exp_meter(actor, x, y, width = 100) if actor.next_exp != 0 exp = actor.now_exp else exp = 1 end gw = width * exp / [actor.next_exp, 1].max gc1 = exp_gauge_color1 gc2 = exp_gauge_color2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, "Exp") self.contents.font.color = normal_color xr = x + width self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2) end end ##################### # Window_MenuStatus # ##################### class Window_MenuStatus < Window_Selectable def initialize(x, y) super(x, y, 384, 416) refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, 2, actor.index * 96 + 2, 92) x = 104 y = actor.index * 96 + WLH / 2 draw_actor_name(actor, x, y) draw_actor_class_menu(actor, x + 120, y) draw_actor_level_menu(actor, x + 200, y) draw_actor_state(actor, x, y + WLH * 2) draw_actor_hp(actor, x + 120, y + WLH * 1) draw_actor_mp(actor, x + 120, y + WLH * 2) draw_actor_exp_meter(actor, x , y + WLH * 1) end end def update_cursor if @index < 0 self.cursor_rect.empty elsif @index < @item_max self.cursor_rect.set(0, @index * 96, contents.width, 96) elsif @index >= 100 self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96) else self.cursor_rect.set(0, 0, contents.width, @item_max * 96) end end end ############ # Game_Map # ############ class Game_Map attr_reader :map_id def mpname $mpname = load_data("Data/MapInfos.rvdata") $mpname[@map_id].name end end ############### # Window_Time # ############### class Window_Mapname < Window_Base def initialize(x, y) super(x, y, 160, WLH + 64) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, "Locazione") self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 2) end end ############### # Window_Time # ############### class Window_Time < Window_Base def initialize(x, y) super(x, y, 160, WLH + 64) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, "Tempo di gioco") @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ############## # Scene_Menu # ############## class Scene_Menu def main start perform_transition Input.update loop do Graphics.update Input.update update break if $scene != self end Graphics.update pre_terminate Graphics.freeze terminate end def initialize(menu_index = 0) @menu_index = menu_index end def create_menu_background @menuback_sprite = Sprite.new @menuback_sprite.bitmap = $game_temp.background_bitmap @menuback_sprite.color.set(16, 16, 16, 128) update_menu_background end def create_menu_background @menuback_sprite = Sprite.new @menuback_sprite.bitmap = $game_temp.background_bitmap @menuback_sprite.color.set(16, 16, 16, 128) update_menu_background end def dispose_menu_background @menuback_sprite.dispose end def update_menu_background end def perform_transition Graphics.transition(10) end def start create_menu_background create_command_window @gold_window = Window_Gold.new(0, 360) @status_window = Window_MenuStatus.new(160, 0) @playtime_window = Window_Time .new(0, 270) @mapname_window = Window_Mapname.new(0, 178) @status_window.openness = 0 @playtime_window.openness = 0 @mapname_window.openness = 0 @gold_window.openness = 0 @status_window.open @playtime_window.open @mapname_window.open @gold_window.open end def pre_terminate @status_window.close @playtime_window.close @mapname_window.close @gold_window.close @command_window.close begin @status_window.update @playtime_window.update @mapname_window.update @gold_window.update @command_window.update Graphics.update end until @status_window.openness == 0 end def terminate dispose_menu_background @command_window.dispose @gold_window.dispose @status_window.dispose @playtime_window.dispose @mapname_window.dispose end def update update_menu_background @command_window.update @gold_window.update @status_window.update @mapname_window.update @playtime_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.openness = 0 @command_window.open if $game_party.members.size == 0 @command_window.draw_item(0, false) @command_window.draw_item(1, false) @command_window.draw_item(2, false) @command_window.draw_item(3, false) end if $game_system.save_disabled @command_window.draw_item(4, false) end end def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 $scene = Scene_Item.new when 1,2,3 start_actor_selection when 4 $scene = Scene_File.new(true, false, false) when 5 $scene = Scene_End.new end end end def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end def end_actor_selection @command_window.active = true @status_window.active = false @status_window.index = -1 end def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 $scene = Scene_Skill.new(@status_window.index) when 2 $scene = Scene_Equip.new(@status_window.index) when 3 $scene = Scene_Status.new(@status_window.index) end end end end $mogscript = {} if $mogscript == nil $mogscript["basic_menu_plus"] = true -
DeadlyDan Footsteps
Descrizione
Si sentono i rumori dei passi dei tuoi eroi(ci sono 5 rumori differenti)Autore
Inserite qui il testoAllegati
Ecco i rumori da copiare nella cartella Audio/SEIstruzioni per l'uso
Copiare soprma Main lo script e le musiche dentro Audio/SE#============================================================================== # ■ DeadlyDan_Footsteps by DeadlyDan #------------------------------------------------------------------------------ # Enables ability to "sound" footsteps when walking over specific tiles #============================================================================== # Usage: =begin Simple, place the audio files in your SE directory, and try the game. There are some known bugs in this, if anyone has any fixes just let me know:) To add custom sounds for custom tiles you can do for example: FOOTSTEP_WOOD = [15] # The tilenumber ID that you get with debug_tileid function FOOTSTEP_WOOD_FILE = "Audio/SE/stepwood" # The filename for the sound then add underneath the # Insert custom sounds here line: footstep_check ( FOOTSTEP_WOOD, FOOTSTEP_WOOD_FILE, 0 ) The last number in that function stands for the layer, since the wood tile i selected is on the ground layer, it's layer is 0. (NOTE) There is a problem that when you go on carpet it makes dirt and snow sounds, i currently can't find a way to fix this, so, the best thing to do is to call the command $game_player.footsteps_enabled = false. To enable footsteps while stopping the carpet and tables from making the snow and dirt sounds, there's an uneasy solution of placing a touch event which calls $game_player.footsteps_enabled = false. Sorry about this inconvenience. =end class Game_Player < Game_Character FOOTSTEP_GRASS = [28, 29, 30] FOOTSTEP_GRASS_LONG = [29, 30] FOOTSTEP_GRASS_FILE = "Audio/SE/stepgrass" FOOTSTEP_DIRT = [32, 33, 34] FOOTSTEP_DIRT_LONG = [32 ,34] FOOTSTEP_DIRT_FILE = "Audio/SE/stepdirt" FOOTSTEP_SAND = [36, 37, 38] FOOTSTEP_SAND_LONG = [36, 38] FOOTSTEP_SAND_FILE = "Audio/SE/stepdirt" FOOTSTEP_SNOW = [39, 41] FOOTSTEP_SNOW_LONG = [40, 41] FOOTSTEP_SNOW_FILE = "Audio/SE/stepsnow" FOOTSTEP_WOOD = [15] FOOTSTEP_WOOD_FILE = "Audio/SE/stepwood" FOOTSTEP_PITCH = 100 FOOTSTEP_PITCH2 = 90 attr_accessor :last_foot attr_accessor :footsteps_enabled alias foot_initialize initialize def initialize foot_initialize @last_foot = 0 @last_foot_pitch = FOOTSTEP_PITCH2 @next_foot_pitch = FOOTSTEP_PITCH @footsteps_enabled = true end alias foot_move_left move_left def move_left ( turn_ok = true ) foot_move_left ( turn_ok ) if ( @move_failed == false ) sound_foot end end alias foot_move_right move_right def move_right ( turn_ok = true ) foot_move_right ( turn_ok ) if ( @move_failed == false ) sound_foot end end alias foot_move_up move_up def move_up ( turn_ok = true ) foot_move_up ( turn_ok ) if ( @move_failed == false and @footsteps_enabled ) sound_foot end end alias foot_move_down move_down def move_down ( turn_ok = true ) foot_move_down ( turn_ok ) if ( @move_failed == false and @footsteps_enabled ) sound_foot end end def no_layer_tile? ( layer ) result = [false, false, false] for i in 0..2 if ( @map_tile_id[i] == 0 ) result[i] = true end end if ( layer == 0 ) if ( result[1] and result[2] ) return true else return false end end else if ( layer == 1 ) if ( result[2] ) return true else return false end else return true end end def debug_tileid $game_message.texts[0] = @map_tile_tex[0] $game_message.texts[1] = @map_tile_tex[1] $game_message.texts[2] = @map_tile_tex[2] end def footstep_check ( footstep, file, layer ) for i in 0..footstep.length if ( ( @map_tile_tex[layer] == footstep[i].to_s ) and ( no_layer_tile? ( layer ) ) ) Audio.se_play ( file, 100, @next_foot_pitch ) @last_foot = Graphics.frame_count return nil end end end def sound_foot if ( dash? ) mul = 6 else mul = 7 end if ( Graphics.frame_count > ( @last_foot + mul ) ) @map_tile_id = [] @map_tile_tex = [] for i in 0..2 @map_tile_id.push ( $game_map.data[@x, @y, i] ) @map_tile_tex.push ( @map_tile_id[i].to_s[0,2] ) end # Use "debug_tileid" here to bring up the numbers of all the current tiles # to use with definitions of the tileids, walk over tiles ingame... if ( @last_foot_pitch == FOOTSTEP_PITCH ) @next_foot_pitch = FOOTSTEP_PITCH2 @last_foot_pitch = FOOTSTEP_PITCH2 else @next_foot_pitch = FOOTSTEP_PITCH @last_foot_pitch = FOOTSTEP_PITCH end # Ground layer footstep_check ( FOOTSTEP_GRASS, FOOTSTEP_GRASS_FILE, 0 ) footstep_check ( FOOTSTEP_DIRT, FOOTSTEP_DIRT_FILE, 0 ) footstep_check ( FOOTSTEP_SAND, FOOTSTEP_SAND_FILE, 0 ) footstep_check ( FOOTSTEP_SNOW, FOOTSTEP_SNOW_FILE, 0 ) footstep_check ( FOOTSTEP_WOOD, FOOTSTEP_WOOD_FILE, 0 ) # Layer 1 footstep_check ( FOOTSTEP_GRASS_LONG, FOOTSTEP_GRASS_FILE, 1 ) footstep_check ( FOOTSTEP_DIRT_LONG, FOOTSTEP_DIRT_FILE, 1 ) footstep_check ( FOOTSTEP_SAND_LONG, FOOTSTEP_SAND_FILE, 1 ) footstep_check ( FOOTSTEP_SNOW_LONG, FOOTSTEP_SNOW_FILE, 1 ) # Insert custom sounds here end end end
-
Scene_Credits
Descrizione
Un bellissimo sistema di crediti rifacente ad un vecchio script di RPG Maker XPAutore
MiDas Mike(Script RPG Maker XP),Mac Malone(Script base RPG Maker VX) ed io(Riaparazione di tutto e aggiunta al menu principale della voce Crediti)Allegati
Copiate questa immagine in Graphics/Pictures e chiamatela Battlebackhttp://img522.imageshack.us/img522/6457/battlebackgd9.png
Istruzioni per l\'uso
Per prima cosa andate a Vocab.Raggiungete la 217 stringa e troverete questo:# New Game def self.new_game return $data_system.terms.new_game end # Continue def self.continue return $data_system.terms.continue end
Sostituitelo con:# New Game def self.new_game return $data_system.terms.new_game end # Continue def self.continue return $data_system.terms.continue end # Crediti def self.credits return \"Crediti\" end
Poi andate in Scene_Title e sostituitelo con:#============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs the title screen processing. #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $BTEST # If battle test battle_test # Start battle test else # If normal play super # Usual main processing end end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super 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 #-------------------------------------------------------------------------- # * Execute Transition #-------------------------------------------------------------------------- def perform_transition Graphics.transition(20) end #-------------------------------------------------------------------------- # * Post-Start Processing #-------------------------------------------------------------------------- def post_start super open_command_window end #-------------------------------------------------------------------------- # * Pre-termination Processing #-------------------------------------------------------------------------- def pre_terminate super close_command_window end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_command_window snapshot_for_background dispose_title_graphic end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 #New game command_new_game when 1 # Continue command_continue when 2 # Crediti command_credits when 3 # Shutdown command_shutdown end end end #-------------------------------------------------------------------------- # * Load Database #-------------------------------------------------------------------------- def load_database $data_actors = load_data(\"Data/Actors.rvdata\") $data_classes = load_data(\"Data/Classes.rvdata\") $data_skills = load_data(\"Data/Skills.rvdata\") $data_items = load_data(\"Data/Items.rvdata\") $data_weapons = load_data(\"Data/Weapons.rvdata\") $data_armors = load_data(\"Data/Armors.rvdata\") $data_enemies = load_data(\"Data/Enemies.rvdata\") $data_troops = load_data(\"Data/Troops.rvdata\") $data_states = load_data(\"Data/States.rvdata\") $data_animations = load_data(\"Data/Animations.rvdata\") $data_common_events = load_data(\"Data/CommonEvents.rvdata\") $data_system = load_data(\"Data/System.rvdata\") $data_areas = load_data(\"Data/Areas.rvdata\") end #-------------------------------------------------------------------------- # * Load Battle Test Database #-------------------------------------------------------------------------- def load_bt_database $data_actors = load_data(\"Data/BT_Actors.rvdata\") $data_classes = load_data(\"Data/BT_Classes.rvdata\") $data_skills = load_data(\"Data/BT_Skills.rvdata\") $data_items = load_data(\"Data/BT_Items.rvdata\") $data_weapons = load_data(\"Data/BT_Weapons.rvdata\") $data_armors = load_data(\"Data/BT_Armors.rvdata\") $data_enemies = load_data(\"Data/BT_Enemies.rvdata\") $data_troops = load_data(\"Data/BT_Troops.rvdata\") $data_states = load_data(\"Data/BT_States.rvdata\") $data_animations = load_data(\"Data/BT_Animations.rvdata\") $data_common_events = load_data(\"Data/BT_CommonEvents.rvdata\") $data_system = load_data(\"Data/BT_System.rvdata\") end #-------------------------------------------------------------------------- # * Create Game Objects #-------------------------------------------------------------------------- def create_game_objects $game_temp = Game_Temp.new $game_message = Game_Message.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.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 end #-------------------------------------------------------------------------- # * Determine if Continue is Enabled #-------------------------------------------------------------------------- def check_continue @continue_enabled = (Dir.glob(\'Save*.rvdata\').size > 0) end #-------------------------------------------------------------------------- # * Create Title Graphic #-------------------------------------------------------------------------- def create_title_graphic @sprite = Sprite.new @sprite.bitmap = Cache.system(\"Title\") end #-------------------------------------------------------------------------- # * Dispose of Title Graphic #-------------------------------------------------------------------------- def dispose_title_graphic @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::new_game s2 = Vocab::continue s3 = Vocab::credits s4 = Vocab::shutdown @command_window = Window_Command.new(172, [s1, s2, s3, s4]) @command_window.x = (544 - @command_window.width) / 2 @command_window.y = 288 if @continue_enabled # If continue is enabled @command_window.index = 1 # Move cursor over command else # If disabled @command_window.draw_item(1, false) # Make command semi-transparent end @command_window.openness = 0 @command_window.open end #-------------------------------------------------------------------------- # * Dispose of Command Window #-------------------------------------------------------------------------- def dispose_command_window @command_window.dispose end #-------------------------------------------------------------------------- # * Open Command Window #-------------------------------------------------------------------------- def open_command_window @command_window.open begin @command_window.update Graphics.update end until @command_window.openness == 255 end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close begin @command_window.update Graphics.update end until @command_window.openness == 0 end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop end #-------------------------------------------------------------------------- # * Check Player Start Location Existence #-------------------------------------------------------------------------- def confirm_player_location if $data_system.start_map_id == 0 print \"La posizione iniziale del party non esiste.\" exit end end #-------------------------------------------------------------------------- # * Command: New Game #-------------------------------------------------------------------------- def command_new_game confirm_player_location Sound.play_decision $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 #-------------------------------------------------------------------------- # Command: Credits #-------------------------------------------------------------------------- def command_credits $scene = Scene_Credits.new end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue if @continue_enabled Sound.play_decision $scene = Scene_File.new(false, true, false) else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Command: Shutdown #-------------------------------------------------------------------------- def command_shutdown Sound.play_decision RPG::BGM.fade(800) RPG::BGS.fade(800) RPG::ME.fade(800) $scene = nil end #-------------------------------------------------------------------------- # * Battle Test #-------------------------------------------------------------------------- def battle_test load_bt_database # Load battle test database create_game_objects # Create game objects Graphics.frame_count = 0 # Initialize play time $game_party.setup_battle_test_members $game_troop.setup($data_system.test_troop_id) $game_troop.can_escape = true $game_system.battle_bgm.play snapshot_for_background $scene = Scene_Battle.new end end
Infine copiate sopra Main questo script(Tutto quello che dovra uscirer scritto va traCREDIT=<<_END_ _END_
:#Font CREDITS_FONT = \"Times New Roman\" CREDITS_SIZE = 24 CREDITS_OUTLINE = Color.new(0,0,127, 255) CREDITS_SHADOW = Color.new(0,0,0, 100) CREDITS_FILL = Color.new(255,255,255, 255) #============================================================================== # ¦ Scene_Credits Modificato da Rinnegatamante #------------------------------------------------------------------------------ # This script has been edited from the original RPG Maker XP version. #------------------------------------------------------------------------------ # It now uses pictures from the pictures folder instead of titles from the # titles folder. #------------------------------------------------------------------------------ # This script might need the RMXP to RMVX Compatibility Patch avialble at RPG # Maker.net #------------------------------------------------------------------------------ # Edited by Mac Malone (Dr.?) # XP Version: Oringinal Author unknow, but edidted by MiDas Mike so it doesn\'t # play over the Title, but runs by calling the following: # $scene = Scene_Credits.new #============================================================================== class Scene_Credits # This next piece of code is the credits. #Start Editing CREDIT=<<_END_ _END_ #Stop Editing def main #------------------------------- # Animated Background Setup #------------------------------- @sprite = Sprite.new #@sprite.bitmap = Cache.picture($data_system.title_name) @backgroundList = [\"Battleback\"] #Edit this to the picture(s) you wish to show in the background. They do repeat. @backgroundGameFrameCount = 0 # Number of game frames per background frame. @backgroundG_BFrameCount = 3.4 @sprite.bitmap = Cache.picture(@backgroundList[0]) #------------------ # Credits Setup #------------------ credit_lines = CREDIT.split(/\\n/) credit_bitmap = Bitmap.new(640,32 * credit_lines.size) credit_lines.each_index do |i| line = credit_lines[i] credit_bitmap.font.name = CREDITS_FONT credit_bitmap.font.size = CREDITS_SIZE x = 0 credit_bitmap.font.color = CREDITS_OUTLINE credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1) credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1) credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1) credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1) credit_bitmap.font.color = CREDITS_SHADOW credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1) credit_bitmap.font.color = CREDITS_FILL credit_bitmap.draw_text(0,i * 32,640,32,line,1) end @credit_sprite = Sprite.new(Viewport.new(0,50,640,380)) @credit_sprite.bitmap = credit_bitmap @credit_sprite.z = 9998 @credit_sprite.oy = -430 @frame_index = 0 @last_flag = false #-------- # Setup #-------- # ME?BGS ?????? Audio.me_stop Audio.bgs_stop Audio.se_stop # ????????? Graphics.transition # ?????? loop do # ???????? Graphics.update # ??????? Input.update # ?????? update # ???????????????? if $scene != self break end end # ????????? Graphics.freeze @sprite.dispose @credit_sprite.dispose end #Checks if credits bitmap has reached it\'s ending point def last? return (@frame_index >= @credit_sprite.bitmap.height + 480) end def last if not @last_flag @last_flag = true @last_count = 0 else @last_count += 1 end if @last_count >= 300 $scene = Scene_Map.new end end #Check if the credits should be cancelled def cancel? if Input.trigger?(Input::C) $scene = Scene_Map.new return true end return false end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def update @backgroundGameFrameCount = @backgroundGameFrameCount + 1 if @backgroundGameFrameCount >= @backgroundG_BFrameCount @backgroundGameFrameCount = 0 # Add current background frame to the end @backgroundList = @backgroundList << @backgroundList[0] # and drop it from the first position @backgroundList.delete_at(0) @sprite.bitmap = Cache.picture(@backgroundList[0]) end return if cancel? last if last? @credit_sprite.oy += 1 end end
-
Ecco il tremplate...sulla zona di XP usavo il template ma qui non vedendo il topic non l'ho fatto,provvedo subito
-
BattleDifficulty
Descrizione
Ecco un altro script jappo sempre del mistico autore che ha fatto quello per i 99 eroi.Questa volta potremo modificare le difficoltà di gioco.Autore
SconosciutoIstruzioni per l'uso
Inserire il codice sopra Main#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ 戦闘難易度 - KGC_BattleDifficulty ◆ VX ◆ #_/ ◇ Last update : 2008/02/09 ◇ #_/---------------------------------------------------------------------------- #_/ 戦闘難易度の設定を追加します。 #_/============================================================================ #_/ 【基本機能】≪ドロップアイテム拡張≫ より下に導入してください。 #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #============================================================================== # ★ カスタマイズ項目 - Customize ★ #============================================================================== module KGC module BattleDifficulty # ◆ 難易度を保存する変数の番号 # ここで指定した番号の変数に難易度が入る。 DIFFICULTY_VARIABLE = 15 # ◆ 難易度 # 難易度設定を # DIFFICULTY << { # :name => "難易度名", # :maxhp => MaxHP 修正, # :maxmp => MaxMP 修正, # :atk => 攻撃力修正, # :def => 防御力修正, # :spi => 精神力修正, # :agi => 敏捷性修正, # :param => 攻撃力・防御力・精神力・敏捷性修正 (一括指定), # :hit => 命中率, # :eva => 回避率, # :cri => クリティカル率, # :exp => 経験値, # :gold => お金, # :drop => アイテムドロップ率, # } # という書式で作成。 # (:atk, :def, :spi, :agi は、:param より優先順位が高い) # 各項目の単位は % # :name 以外は省略可能。省略した項目は 100 扱い。 # 難易度番号は、作成順に 0, 1, 2, ... となる。 DIFFICULTY = [] # ~ ここから追加 ~ DIFFICULTY << { # 難易度 0 :name => "Easy", :maxhp => 80, :maxmp => 80, :param => 80, :cri => 50, :drop => 90, } # ← 最後の } を忘れずに DIFFICULTY << { # 難易度 1 :name => "Normal", } DIFFICULTY << { # 難易度 2 :name => "Hard", :maxhp => 150, :maxmp => 130, :atk => 120, :spi => 120, :agi => 110, :drop => 120, } DIFFICULTY << { # 難易度 3 :name => "Mania", :maxhp => 200, :maxmp => 180, :atk => 150, :spi => 150, :agi => 130, :cri => 120, :drop => 140, } DIFFICULTY << { # 難易度 4 :name => "Unknown", :maxhp => 300, :maxmp => 260, :atk => 200, :spi => 200, :agi => 150, :cri => 160, :drop => 160, } DIFFICULTY << { # 難易度 5 :name => "Divine", :maxhp => 500, :maxmp => 400, :atk => 300, :spi => 300, :agi => 180, :cri => 200, :drop => 200, } # ◆ 難易度初期設定 # DIFFICULTY のインデックス。 # デフォルトでは、1 は Normal。 INITIAL_DIFFICULTY = 1 # ◆ メニュー画面に「難易度設定」コマンドを追加する # 追加する場所は、メニューコマンドの最下部です。 # 他の部分に追加したければ、≪カスタムメニューコマンド≫ をご利用ください。 USE_MENU_DIFFICULTY_COMMAND = true end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ $imported = {} if $imported == nil $imported["BattleDifficulty"] = true module KGC::BattleDifficulty # パラメータ一覧 PARAMS = [ :maxhp, :maxmp, :atk, :def, :spi, :agi, :hit, :eva, :cri, :exp, :gold, :drop ] module_function #-------------------------------------------------------------------------- # ○ 難易度補正値作成 #-------------------------------------------------------------------------- def create_param_revs @@param_revs = [] DIFFICULTY.each { |d| rev = {} rev[:name] = d[:name] # 一括指定を適用 if d[:param] != nil rev[:atk] = rev[:def] = rev[:spi] = rev[:agi] = d[:param] end # パラメータ指定を適用 PARAMS.each { |par| if d[par] != nil rev[par] = d[par] else rev[par] = 100 if rev[par] == nil end } # リストに追加 @@param_revs << rev } end #-------------------------------------------------------------------------- # ○ 難易度補正値取得 #-------------------------------------------------------------------------- def param_revs return @@param_revs end #-------------------------------------------------------------------------- # ○ 難易度インデックス取得 #-------------------------------------------------------------------------- def get_index vid = DIFFICULTY_VARIABLE if $game_variables[vid] < 0 || DIFFICULTY.size <= $game_variables[vid] $game_variables[vid] = INITIAL_DIFFICULTY end return $game_variables[vid] end #-------------------------------------------------------------------------- # ○ 難易度取得 #-------------------------------------------------------------------------- def get return @@param_revs[get_index] end #-------------------------------------------------------------------------- # ○ 難易度変更 # index : 難易度インデックス #-------------------------------------------------------------------------- def set(index) index = [[index, DIFFICULTY.size - 1].min, 0].max $game_variables[DIFFICULTY_VARIABLE] = index end create_param_revs end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ RPG::Enemy::DropItem #============================================================================== unless $@ class RPG::Enemy::DropItem #-------------------------------------------------------------------------- # ● 出現率 1/N の分母 N #-------------------------------------------------------------------------- alias denominator_KGC_BattleDifficulty denominator def denominator n = denominator_KGC_BattleDifficulty if n > 1 n = [n * 100 / KGC::BattleDifficulty.get[:drop], 1].max end return n end if method_defined?(:drop_prob) #-------------------------------------------------------------------------- # ○ ドロップ率 (直接指定) #-------------------------------------------------------------------------- alias drop_prob_KGC_BattleDifficulty drop_prob def drop_prob n = drop_prob_KGC_BattleDifficulty if n < 100 && 0 < n n = [[n * KGC::BattleDifficulty.get[:drop] / 100, 1].max, 100].min end return n end end end # class end # unless $@ #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Game_Enemy #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● 基本 MaxHP の取得 #-------------------------------------------------------------------------- alias base_maxhp_KGC_BattleDifficulty base_maxhp def base_maxhp n = base_maxhp_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:maxhp] / 100 return n end #-------------------------------------------------------------------------- # ● 基本 MaxMP の取得 #-------------------------------------------------------------------------- alias base_maxmp_KGC_BattleDifficulty base_maxmp def base_maxmp n = base_maxmp_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:maxmp] / 100 return n end #-------------------------------------------------------------------------- # ● 基本攻撃力の取得 #-------------------------------------------------------------------------- alias base_atk_KGC_BattleDifficulty base_atk def base_atk n = base_atk_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:atk] / 100 return n end #-------------------------------------------------------------------------- # ● 基本防御力の取得 #-------------------------------------------------------------------------- alias base_def_KGC_BattleDifficulty base_def def base_def n = base_def_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:def] / 100 return n end #-------------------------------------------------------------------------- # ● 基本精神力の取得 #-------------------------------------------------------------------------- alias base_spi_KGC_BattleDifficulty base_spi def base_spi n = base_spi_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:spi] / 100 return n end #-------------------------------------------------------------------------- # ● 基本敏捷性の取得 #-------------------------------------------------------------------------- alias base_agi_KGC_BattleDifficulty base_agi def base_agi n = base_agi_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:agi] / 100 return n end #-------------------------------------------------------------------------- # ● 命中率の取得 #-------------------------------------------------------------------------- alias hit_KGC_BattleDifficulty hit def hit n = hit_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:hit] / 100 return n end #-------------------------------------------------------------------------- # ● 回避率の取得 #-------------------------------------------------------------------------- alias eva_KGC_BattleDifficulty eva def eva n = eva_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:eva] / 100 return n end #-------------------------------------------------------------------------- # ● クリティカル率の取得 #-------------------------------------------------------------------------- alias cri_KGC_BattleDifficulty cri def cri n = cri_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:cri] / 100 return n end #-------------------------------------------------------------------------- # ● 経験値の取得 #-------------------------------------------------------------------------- alias exp_KGC_BattleDifficulty exp def exp n = exp_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:exp] / 100 return n end #-------------------------------------------------------------------------- # ● お金の取得 #-------------------------------------------------------------------------- alias gold_KGC_BattleDifficulty gold def gold n = gold_KGC_BattleDifficulty n = n * KGC::BattleDifficulty.get[:gold] / 100 return n end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Window_Command #============================================================================== class Window_Command < Window_Selectable unless method_defined?(:add_command) #-------------------------------------------------------------------------- # ○ コマンドを追加 # 追加した位置を返す #-------------------------------------------------------------------------- def add_command(command) @commands << command @item_max = @commands.size item_index = @item_max - 1 refresh_command draw_item(item_index) return item_index end #-------------------------------------------------------------------------- # ○ コマンドをリフレッシュ #-------------------------------------------------------------------------- def refresh_command buf = self.contents.clone self.height = [self.height, row_max * WLH + 32].max create_contents self.contents.blt(0, 0, buf, buf.rect) buf.dispose end #-------------------------------------------------------------------------- # ○ コマンドを挿入 #-------------------------------------------------------------------------- def insert_command(index, command) @commands.insert(index, command) @item_max = @commands.size refresh_command refresh end #-------------------------------------------------------------------------- # ○ コマンドを削除 #-------------------------------------------------------------------------- def remove_command(command) @commands.delete(command) @item_max = @commands.size refresh end end unless method_defined?(:replace_command) #-------------------------------------------------------------------------- # ○ コマンドを置換 #-------------------------------------------------------------------------- def replace_command(index, command, enabled = true) @commands[index] = command draw_item(index, enabled) end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Title #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ● 各種ゲームオブジェクトの作成 #-------------------------------------------------------------------------- alias create_game_objects_KGC_BattleDifficulty create_game_objects def create_game_objects create_game_objects_KGC_BattleDifficulty # 難易度を初期化 variable_id = KGC::BattleDifficulty::DIFFICULTY_VARIABLE $game_variables[variable_id] = KGC::BattleDifficulty::INITIAL_DIFFICULTY end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # ● コマンドウィンドウの作成 #-------------------------------------------------------------------------- alias create_command_window_KGC_BattleDifficulty create_command_window def create_command_window create_command_window_KGC_BattleDifficulty create_difficulty_window return unless KGC::BattleDifficulty::USE_MENU_DIFFICULTY_COMMAND return if $imported["CustomMenuCommand"] @__command_set_difficulty_index = @command_window.add_command(KGC::BattleDifficulty.get[:name]) if @command_window.oy > 0 @command_window.oy -= Window_Base::WLH end @command_window.index = @menu_index end #-------------------------------------------------------------------------- # ○ 難易度選択ウィンドウの作成 #-------------------------------------------------------------------------- def create_difficulty_window commands = [] KGC::BattleDifficulty::param_revs.each { |d| commands << d[:name] } @difficulty_window = Window_Command.new(160, commands) @difficulty_window.x = @command_window.width - 16 @difficulty_window.z = 1000 @difficulty_window.active = false @difficulty_window.openness = 0 end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- alias terminate_KGC_BattleDifficulty terminate def terminate terminate_KGC_BattleDifficulty @difficulty_window.dispose end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- alias update_KGC_BattleDifficulty update def update @difficulty_window.update if @difficulty_window.active update_KGC_BattleDifficulty update_difficulty_selection return end update_KGC_BattleDifficulty end #-------------------------------------------------------------------------- # ● コマンド選択の更新 #-------------------------------------------------------------------------- alias update_command_selection_KGC_BattleDifficulty update_command_selection def update_command_selection call_ap_viewer_flag = false if Input.trigger?(Input::C) case @command_window.index when @__command_set_difficulty_index # 難易度設定 call_set_difficulty_flag = true end end # 難易度設定に移行 if call_set_difficulty_flag Sound.play_decision start_difficulty_selection return end update_command_selection_KGC_BattleDifficulty end #-------------------------------------------------------------------------- # ○ 難易度選択の開始 #-------------------------------------------------------------------------- def start_difficulty_selection @command_window.active = false dy = @command_window.cursor_rect.y limit_y = Graphics.height - @difficulty_window.height @difficulty_window.y = [[dy, limit_y].min, 0].max @difficulty_window.active = true @difficulty_window.index = KGC::BattleDifficulty.get_index @difficulty_window.open end #-------------------------------------------------------------------------- # ○ 難易度選択の終了 #-------------------------------------------------------------------------- def end_difficulty_selection @command_window.active = true @difficulty_window.active = false @difficulty_window.close end #-------------------------------------------------------------------------- # ○ 難易度選択の更新 #-------------------------------------------------------------------------- def update_difficulty_selection if Input.trigger?(Input::B) Sound.play_cancel end_difficulty_selection elsif Input.trigger?(Input::C) Sound.play_decision # 難易度を変更 KGC::BattleDifficulty.set(@difficulty_window.index) @command_window.replace_command(@__command_set_difficulty_index, KGC::BattleDifficulty.get[:name]) end_difficulty_selection end end end -
KGC Large Party
Versione inglese gentilmente offerta da Holy, qui, autore traduzione Mr. Anonymous (XD)! ^ ^
DescrizioneEcco un codice jappo che permette di creare un gruppo con un massimo di 99 eroi!!!!
AutoreNon lo conosco(Ma credo sia lo stesso che ha fatto la banca di RPG Maker XP)
Istruzioni per l'usoInserire sopra MainSpoiler#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ 多人数パーティ - KGC_LargeParty ◆ VX ◆ #_/ ◇ Last update : 2008/03/02 ◇ #_/---------------------------------------------------------------------------- #_/ 5人以上の大規模パーティを構築可能にします。 #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #============================================================================== # ★ カスタマイズ項目 - Customize ★ #============================================================================== module KGC module LargeParty # ◆ パーティ編成許可を表すスイッチ番号 # このスイッチの ON/OFF でパーティ編成の 許可/不許可 を切り替えます。 PARTYFORM_SWITCH = 1 # ◆ 戦闘中のパーティ編成許可を表すスイッチ番号 # ↑と異なる番号を指定すると、戦闘中のみの入れ替え可否を設定できます。 BATTLE_PARTYFORM_SWITCH = 1 # ◆ デフォルトの編成許可フラグ # true にすると、「ニューゲーム」選択時に両方のパーティ編成許可スイッチが # 自動的に ON になります。 DEFAULT_PARTYFORM_ENABLED = true # ◆ 戦闘メンバー最大数 (デフォルト値) # 5 以上にすると、戦闘画面のステータスがやや見辛くなります。 MAX_BATTLE_MEMBERS = 5 # ◆ パーティメンバー最大数 # Game_Party::MAX_MEMBERS を上書きします。 # 100 以上にすると [Window_MenuStatus] がバグります。 MAX_MEMBERS = 99 # ◆ 固定メンバーの並び替えを禁止 # スクリプトからの操作以外では並び替えできなくなります。 FORBID_CHANGE_SHIFT_FIXED = false # ◆ 待機メンバーの背景色 # 色を変えない場合は Color.new(0, 0, 0, 0) STAND_BY_COLOR = Color.new(0, 0, 0, 128) # ◆ 固定メンバーの背景色 FIXED_COLOR = Color.new(255, 128, 64, 96) # ◆ 並び替え時の背景色 SELECTED_COLOR = Color.new(64, 255, 128, 128) # ◆ パーティ編成ボタン (メニュー画面用) # メニュー画面でこのボタンを押すと、パーティ編成画面に移行します。 # 使用しない場合は nil MENU_PARTYFORM_BUTTON = Input::A # ◆ メニュー画面にパーティ編成コマンドを追加する # 追加する場所は、メニューコマンドの最下部です。 # 他の部分に追加したければ、≪カスタムメニューコマンド≫ をご利用ください。 USE_MENU_PARTYFORM_COMMAND = true # ◆ メニュー画面のパーティ編成コマンドの名称 VOCAB_MENU_PARTYFORM = "パーティ編成" # ◆ 戦闘中にパーティ編成コマンドを使用する # 追加する場所は、パーティコマンドの最下部(「逃げる」の下)です。 USE_BATTLE_PARTYFORM = true # ◆ 戦闘中のパーティ編成コマンドの名称 VOCAB_BATTLE_PARTYFORM = "入れ替え" # ◆ 編成画面のキャラクター描画サイズ [幅, 高さ] # アクターの歩行グラフィックのサイズに応じて書き換えてください。 PARTY_FORM_CHARACTER_SIZE = [40, 48] # ◆ 編成画面の戦闘メンバーウィンドウの空欄に表示するテキスト BATTLE_MEMBER_BLANK_TEXT = "EMPTY" # ◆ 編成画面のパーティメンバーウィンドウの最大行数 # ステータスウィンドウが画面からはみ出る場合は、 # この値を 1 にしてください。 PARTY_MEMBER_WINDOW_ROW_MAX = 2 # ◆ 編成画面のパーティメンバーウィンドウに戦闘メンバーを表示する SHOW_BATTLE_MEMBER_IN_PARTY = false # ◆ 編成画面のパーティメンバーウィンドウの空欄に表示するテキスト PARTY_MEMBER_BLANK_TEXT = "-" # ◆ 編成画面のキャプションウィンドウの幅 CAPTION_WINDOW_WIDTH = 192 # ◆ 編成画面の戦闘メンバーウィンドウのキャプション BATTLE_MEMBER_CAPTION = "戦闘メンバー" if SHOW_BATTLE_MEMBER_IN_PARTY # ◆ 編成画面のパーティメンバーウィンドウのキャプション # SHOW_BATTLE_MEMBER_IN_PARTY = true のとき PARTY_MEMBER_CAPTION = "パーティメンバー" else # ◆ 編成画面のパーティメンバーウィンドウのキャプション # SHOW_BATTLE_MEMBER_IN_PARTY = false のとき PARTY_MEMBER_CAPTION = "待機メンバー" end # ◆ 編成確認ウィンドウの幅 CONFIRM_WINDOW_WIDTH = 160 # ◆ 編成確認ウィンドウの文字列 # ※コマンド数・順番を変更するとバグります。 CONFIRM_WINDOW_COMMANDS = ["編成完了", "編成中止", "キャンセル"] # ◆ ショップ画面のステータスウィンドウスクロール時に使用するボタン # このボタンを押している間、上下ボタンでスクロールできます。 # スクロールを無効にする場合は nil を指定。 # ≪ヘルプウィンドウ機能拡張≫併用時は、上に導入したものを優先。 SHOP_STATUS_SCROLL_BUTTON = Input::A # ◆ 待機メンバー獲得経験値割合【単位:‰(千分率 1‰=0.1%)】 # 500 なら 50.0% です。 STAND_BY_EXP_RATE = 500 # ◆ リザルト画面で待機メンバーのレベルアップを表示する # false にすると、戦闘メンバーのみ表示します。 SHOW_STAND_BY_LEVEL_UP = true # ◆ 戦闘以外でも待機メンバーを表示する # true : 戦闘以外では常に全員を表示。 # false : 入れ替え時以外は、待機メンバーをいないものとして扱う。 SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE = true end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ $imported = {} if $imported == nil $imported["LargeParty"] = true #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ KGC::Commands #============================================================================== module KGC::Commands # メンバーのソート形式 SORT_BY_ID = 0 # ID順 SORT_BY_NAME = 1 # 名前順 SORT_BY_LEVEL = 2 # レベル順 module_function #-------------------------------------------------------------------------- # ○ パーティ編成画面の呼び出し #-------------------------------------------------------------------------- def call_partyform return if $game_temp.in_battle $game_temp.next_scene = :partyform end #-------------------------------------------------------------------------- # ○ 戦闘メンバー最大数を設定 # value : 人数 (省略した場合はデフォルト値を使用) #-------------------------------------------------------------------------- def set_max_battle_member_count(value = nil) $game_party.max_battle_member_count = value end #-------------------------------------------------------------------------- # ○ パーティ人数が一杯か #-------------------------------------------------------------------------- def party_full? return $game_party.full? end #-------------------------------------------------------------------------- # ○ パーティ編成可否を設定 # enabled : 有効フラグ (省略時 : true) #-------------------------------------------------------------------------- def permit_partyform(enabled = true) $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = enabled end #-------------------------------------------------------------------------- # ○ 戦闘中のパーティ編成可否を設定 # enabled : 有効フラグ (省略時 : true) #-------------------------------------------------------------------------- def permit_battle_partyform(enabled = true) $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = enabled end #-------------------------------------------------------------------------- # ○ アクターの固定状態を設定 # actor_id : アクター ID # fixed : 固定フラグ (省略時 : true) #-------------------------------------------------------------------------- def fix_actor(actor_id, fixed = true) $game_party.fix_actor(actor_id, fixed) end #-------------------------------------------------------------------------- # ○ 並び替え # メンバーの index1 番目と index2 番目を入れ替える #-------------------------------------------------------------------------- def change_party_shift(index1, index2) $game_party.change_shift(index1, index2) end #-------------------------------------------------------------------------- # ○ メンバー整列 (昇順) # sort_type : ソート形式 (SORT_BY_xxx) # reverse : true だと降順 #-------------------------------------------------------------------------- def sort_party_member(sort_type = SORT_BY_ID, reverse = false) $game_party.sort_member(sort_type, reverse) end #-------------------------------------------------------------------------- # ○ 待機メンバーの ID を取得 #-------------------------------------------------------------------------- def get_stand_by_member_ids result = [] $game_party.stand_by_members.each { |actor| result << actor.id } return result end #-------------------------------------------------------------------------- # ○ アクターが待機メンバーか # actor_id : アクター ID #-------------------------------------------------------------------------- def stand_by_member?(actor_id) return get_stand_by_member_ids.include?(actor_id) end end class Game_Interpreter include KGC::Commands end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Vocab #============================================================================== module Vocab # 「パーティ編成」コマンド名 (メニュー) def self.partyform return KGC::LargeParty::VOCAB_MENU_PARTYFORM end # 「パーティ編成」コマンド名 (戦闘) def self.partyform_battle return KGC::LargeParty::VOCAB_BATTLE_PARTYFORM end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ○ パーティ内インデックス取得 #-------------------------------------------------------------------------- def party_index return $game_party.all_members.index(self) end #-------------------------------------------------------------------------- # ○ 戦闘メンバーか判定 #-------------------------------------------------------------------------- def battle_member? return $game_party.battle_members.include?(self) end #-------------------------------------------------------------------------- # ○ 固定メンバーか判定 #-------------------------------------------------------------------------- def fixed_member? return $game_party.fixed_members.include?(self) end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Game_Party #============================================================================== class Game_Party #-------------------------------------------------------------------------- # ● 定数 #-------------------------------------------------------------------------- MAX_MEMBERS = KGC::LargeParty::MAX_MEMBERS # 最大パーティ人数 #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_KGC_LargeParty initialize def initialize initialize_KGC_LargeParty @max_battle_member_count = nil @battle_member_count = 0 @fixed_actors = [] end #-------------------------------------------------------------------------- # ○ 戦闘メンバー最大数取得 #-------------------------------------------------------------------------- def max_battle_member_count if @max_battle_member_count == nil return KGC::LargeParty::MAX_BATTLE_MEMBERS else return @max_battle_member_count end end #-------------------------------------------------------------------------- # ○ 戦闘メンバー最大数変更 #-------------------------------------------------------------------------- def max_battle_member_count=(value) if value.is_a?(Integer) value = [value, 1].max end @max_battle_member_count = value end #-------------------------------------------------------------------------- # ○ 戦闘メンバー数取得 #-------------------------------------------------------------------------- def battle_member_count if @battle_member_count == nil @battle_member_count = @actors.size end @battle_member_count = [@battle_member_count, @actors.size, max_battle_member_count].min return @battle_member_count end #-------------------------------------------------------------------------- # ○ 戦闘メンバー数設定 #-------------------------------------------------------------------------- def battle_member_count=(value) @battle_member_count = [[value, 0].max, @actors.size, max_battle_member_count].min end #-------------------------------------------------------------------------- # ● メンバーの取得 #-------------------------------------------------------------------------- alias members_KGC_LargeParty members def members if $game_temp.in_battle || !KGC::LargeParty::SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE return battle_members else return members_KGC_LargeParty end end #-------------------------------------------------------------------------- # ○ 全メンバーの取得 #-------------------------------------------------------------------------- def all_members return members_KGC_LargeParty end #-------------------------------------------------------------------------- # ○ 戦闘メンバーの取得 #-------------------------------------------------------------------------- def battle_members result = [] battle_member_count.times { |i| result << $game_actors[@actors[i]] } return result end #-------------------------------------------------------------------------- # ○ 待機メンバーの取得 #-------------------------------------------------------------------------- def stand_by_members return (all_members - battle_members) end #-------------------------------------------------------------------------- # ○ 固定メンバーの取得 #-------------------------------------------------------------------------- def fixed_members result = [] @fixed_actors.each { |i| result << $game_actors[i] } return result end #-------------------------------------------------------------------------- # ● 初期パーティのセットアップ #-------------------------------------------------------------------------- alias setup_starting_members_KGC_LargeParty setup_starting_members def setup_starting_members setup_starting_members_KGC_LargeParty self.battle_member_count = @actors.size end #-------------------------------------------------------------------------- # ● 戦闘テスト用パーティのセットアップ #-------------------------------------------------------------------------- alias setup_battle_test_members_KGC_LargeParty setup_battle_test_members def setup_battle_test_members setup_battle_test_members_KGC_LargeParty self.battle_member_count = @actors.size end #-------------------------------------------------------------------------- # ○ メンバーの新規設定 # new_member : 新しいメンバー #-------------------------------------------------------------------------- def set_member(new_member) @actors = [] new_member.each { |actor| @actors << actor.id } end #-------------------------------------------------------------------------- # ○ 戦闘メンバーの新規設定 # new_member : 新しい戦闘メンバー #-------------------------------------------------------------------------- def set_battle_member(new_member) new_battle_member = [] new_member.each { |actor| @actors.delete(actor.id) new_battle_member << actor.id } @actors = new_battle_member + @actors self.battle_member_count = new_member.size end #-------------------------------------------------------------------------- # ○ パーティ編成を許可しているか判定 #-------------------------------------------------------------------------- def partyform_enable? return $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] end #-------------------------------------------------------------------------- # ○ 戦闘中のパーティ編成を許可しているか判定 #-------------------------------------------------------------------------- def battle_partyform_enable? return false unless partyform_enable? return $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] end #-------------------------------------------------------------------------- # ○ メンバーが一杯か判定 #-------------------------------------------------------------------------- def full? return (@actors.size >= MAX_MEMBERS) end #-------------------------------------------------------------------------- # ○ 固定アクターか判定 # actor_id : 判定するアクターの ID #-------------------------------------------------------------------------- def actor_fixed?(actor_id) return @fixed_actors.include?(actor_id) end #-------------------------------------------------------------------------- # ○ アクターを加える # actor_id : アクター ID #-------------------------------------------------------------------------- alias add_actor_KGC_LargeParty add_actor def add_actor(actor_id) last_size = @actors.size add_actor_KGC_LargeParty(actor_id) if last_size < @actors.size self.battle_member_count += 1 end end #-------------------------------------------------------------------------- # ○ アクターの固定状態を設定 # actor_id : アクター ID # fixed : 固定フラグ (省略時 : false) #-------------------------------------------------------------------------- def fix_actor(actor_id, fixed = false) unless @actors.include?(actor_id) return end if fixed # 固定 unless @fixed_actors.include?(actor_id) @fixed_actors << actor_id unless battle_members.include?($game_actors[actor_id]) self.battle_member_count += 1 end end # 強制出撃 apply_force_launch else # 固定解除 @fixed_actors.delete(actor_id) end $game_player.refresh end #-------------------------------------------------------------------------- # ○ 強制出撃適用 #-------------------------------------------------------------------------- def apply_force_launch while (fixed_members - battle_members).size > 0 # 固定状態でないメンバーを適当に持ってきて入れ替え actor1 = stand_by_members.find { |a| @fixed_actors.include?(a.id) } actor2 = battle_members.reverse.find { |a| !@fixed_actors.include?(a.id) } index1 = @actors.index(actor1.id) index2 = @actors.index(actor2.id) @actors[index1], @actors[index2] = @actors[index2], @actors[index1] # 戦闘メンバーが全員固定されたら戻る (無限ループ防止) all_fixed = true battle_members.each { |actor| unless actor.fixed_member? all_fixed = false break end } break if all_fixed end end #-------------------------------------------------------------------------- # ○ メンバー整列 (昇順) # sort_type : ソート形式 (SORT_BY_xxx) # reverse : true だと降順 #-------------------------------------------------------------------------- def sort_member(sort_type = KGC::Commands::SORT_BY_ID, reverse = false) # バッファを準備 b_actors = battle_members actors = all_members - b_actors f_actors = fixed_members # 固定キャラはソートしない if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED actors -= f_actors b_actors -= f_actors end # ソート case sort_type when KGC::Commands::SORT_BY_ID # ID順 actors.sort! { |a, b| a.id <=> b.id } b_actors.sort! { |a, b| a.id <=> b.id } when KGC::Commands::SORT_BY_NAME # 名前順 actors.sort! { |a, b| a.name <=> b.name } b_actors.sort! { |a, b| a.name <=> b.name } when KGC::Commands::SORT_BY_LEVEL # レベル順 actors.sort! { |a, b| a.level <=> b.level } b_actors.sort! { |a, b| a.level <=> b.level } end # 反転 if reverse actors.reverse! b_actors.reverse! end # 固定キャラを先頭に持ってくる if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED actors = f_actors + actors b_actors = f_actors + b_actors end # 復帰 set_member(actors) set_battle_member(b_actors) apply_force_launch $game_player.refresh end #-------------------------------------------------------------------------- # ○ 並び替え # 戦闘メンバーの index1 番目と index2 番目を入れ替える #-------------------------------------------------------------------------- def change_shift(index1, index2) size = @actors.size if index1 >= size || index2 >= size return end buf = @actors[index1] @actors[index1] = @actors[index2] @actors[index2] = buf $game_player.refresh end #-------------------------------------------------------------------------- # ● 戦闘用ステートの解除 (戦闘終了時に呼び出し) #-------------------------------------------------------------------------- def remove_states_battle for actor in all_members actor.remove_states_battle end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Window_Command #============================================================================== class Window_Command < Window_Selectable unless method_defined?(:add_command) #-------------------------------------------------------------------------- # ○ コマンドを追加 # 追加した位置を返す #-------------------------------------------------------------------------- def add_command(command) @commands << command @item_max = @commands.size item_index = @item_max - 1 refresh_command draw_item(item_index) return item_index end #-------------------------------------------------------------------------- # ○ コマンドをリフレッシュ #-------------------------------------------------------------------------- def refresh_command buf = self.contents.clone self.height = [self.height, row_max * WLH + 32].max create_contents self.contents.blt(0, 0, buf, buf.rect) buf.dispose end #-------------------------------------------------------------------------- # ○ コマンドを挿入 #-------------------------------------------------------------------------- def insert_command(index, command) @commands.insert(index, command) @item_max = @commands.size refresh_command refresh end #-------------------------------------------------------------------------- # ○ コマンドを削除 #-------------------------------------------------------------------------- def remove_command(command) @commands.delete(command) @item_max = @commands.size refresh end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Window_MenuStatus #============================================================================== class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 定数 #-------------------------------------------------------------------------- STATUS_HEIGHT = 96 # ステータス一人分の高さ #-------------------------------------------------------------------------- # ● ウィンドウ内容の作成 #-------------------------------------------------------------------------- def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, [height - 32, row_max * STATUS_HEIGHT].max) end #-------------------------------------------------------------------------- # ● 先頭の行の取得 #-------------------------------------------------------------------------- def top_row return self.oy / STATUS_HEIGHT end #-------------------------------------------------------------------------- # ● 先頭の行の設定 # row : 先頭に表示する行 #-------------------------------------------------------------------------- def top_row=(row) super(row) self.oy = self.oy / WLH * STATUS_HEIGHT end #-------------------------------------------------------------------------- # ● 1 ページに表示できる行数の取得 #-------------------------------------------------------------------------- def page_row_max return (self.height - 32) / STATUS_HEIGHT end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 # index : 項目番号 #-------------------------------------------------------------------------- def item_rect(index) rect = super(index) rect.height = STATUS_HEIGHT rect.y = index / @column_max * STATUS_HEIGHT return rect end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh @item_max = $game_party.members.size create_contents fill_stand_by_background draw_member end #-------------------------------------------------------------------------- # ○ パーティメンバー描画 #-------------------------------------------------------------------------- def draw_member for actor in $game_party.members draw_actor_face(actor, 2, actor.party_index * 96 + 2, 92) x = 104 y = actor.party_index * 96 + WLH / 2 draw_actor_name(actor, x, y) draw_actor_class(actor, x + 120, y) draw_actor_level(actor, x, y + WLH * 1) draw_actor_state(actor, x, y + WLH * 2) draw_actor_hp(actor, x + 120, y + WLH * 1) draw_actor_mp(actor, x + 120, y + WLH * 2) end end #-------------------------------------------------------------------------- # ○ 待機メンバーの背景色を塗る #-------------------------------------------------------------------------- def fill_stand_by_background color = KGC::LargeParty::STAND_BY_COLOR dy = STATUS_HEIGHT * $game_party.battle_members.size dh = STATUS_HEIGHT * $game_party.stand_by_members.size if dh > 0 self.contents.fill_rect(0, dy, self.width - 32, dh, color) end end #-------------------------------------------------------------------------- # ● カーソルの更新 #-------------------------------------------------------------------------- def update_cursor if @index < 0 # カーソルなし self.cursor_rect.empty elsif @index < @item_max # 通常 super elsif @index >= 100 # 自分 self.cursor_rect.set(0, (@index - 100) * STATUS_HEIGHT, contents.width, STATUS_HEIGHT) else # 全体 self.cursor_rect.set(0, 0, contents.width, @item_max * STATUS_HEIGHT) end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Window_ShopStatus #============================================================================== class Window_ShopStatus < Window_Base #-------------------------------------------------------------------------- # ● ウィンドウ内容の作成 #-------------------------------------------------------------------------- def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, WLH * ($game_party.members.size + 1) * 2) end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● ウィンドウ内容の作成 #-------------------------------------------------------------------------- def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, [WLH * $game_party.members.size, height - 32].max) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- alias refresh_KGC_LargeParty refresh def refresh create_contents refresh_KGC_LargeParty end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormCaption #------------------------------------------------------------------------------ # パーティ編成画面でウィンドウのキャプションを表示するウィンドウです。 #============================================================================== class Window_PartyFormCaption < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 # caption : 表示するキャプション #-------------------------------------------------------------------------- def initialize(caption = "") super(0, 0, KGC::LargeParty::CAPTION_WINDOW_WIDTH, WLH + 32) self.z = 1500 @caption = caption refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(0, 0, width - 32, WLH, @caption) end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormMember #------------------------------------------------------------------------------ # パーティ編成画面でメンバーを表示するウィンドウです。 #============================================================================== class Window_PartyFormMember < Window_Selectable #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- DRAW_SIZE = KGC::LargeParty::PARTY_FORM_CHARACTER_SIZE #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :selected_index # 選択済みインデックス #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # width : ウィンドウの幅 # height : ウィンドウの高さ # spacing : 横に項目が並ぶときの空白の幅 #-------------------------------------------------------------------------- def initialize(x, y, width, height, spacing = 8) super(x, y, width, height, spacing) self.z = 1000 end #-------------------------------------------------------------------------- # ● ウィンドウ内容の作成 #-------------------------------------------------------------------------- def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, [height - 32, row_max * DRAW_SIZE[1]].max) end #-------------------------------------------------------------------------- # ● 先頭の行の取得 #-------------------------------------------------------------------------- def top_row return self.oy / DRAW_SIZE[1] end #-------------------------------------------------------------------------- # ● 先頭の行の設定 # row : 先頭に表示する行 #-------------------------------------------------------------------------- def top_row=(row) super(row) self.oy = self.oy / WLH * DRAW_SIZE[1] end #-------------------------------------------------------------------------- # ● 1 ページに表示できる行数の取得 #-------------------------------------------------------------------------- def page_row_max return (self.height - 32) / DRAW_SIZE[1] end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 # index : 項目番号 #-------------------------------------------------------------------------- def item_rect(index) rect = super(index) rect.width = DRAW_SIZE[0] rect.height = DRAW_SIZE[1] rect.y = index / @column_max * DRAW_SIZE[1] return rect end #-------------------------------------------------------------------------- # ○ 選択アクター取得 #-------------------------------------------------------------------------- def actor return @actors[self.index] end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear restore_member_list draw_member end #-------------------------------------------------------------------------- # ○ メンバーリスト修復 #-------------------------------------------------------------------------- def restore_member_list # 継承先で定義 end #-------------------------------------------------------------------------- # ○ メンバー描画 #-------------------------------------------------------------------------- def draw_member # 継承先で定義 end #-------------------------------------------------------------------------- # ○ 空欄アクター描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_empty_actor(index) # 継承先で定義 end #-------------------------------------------------------------------------- # ○ 固定キャラ背景描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_fixed_back(index) rect = item_rect(index) self.contents.fill_rect(rect, KGC::LargeParty::FIXED_COLOR) end #-------------------------------------------------------------------------- # ○ 選択中キャラ背景描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_selected_back(index) rect = item_rect(index) self.contents.fill_rect(rect, KGC::LargeParty::SELECTED_COLOR) end endSpoiler#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormBattleMember #------------------------------------------------------------------------------ # パーティ編成画面で戦闘メンバーを表示するウィンドウです。 #============================================================================== class Window_PartyFormBattleMember < Window_PartyFormMember #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :selected_index # 選択済みインデックス #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 64, DRAW_SIZE[1] + 32) column_width = DRAW_SIZE[0] + @spacing nw = [column_width * $game_party.max_battle_member_count + 32, Graphics.width].min self.width = nw @item_max = $game_party.max_battle_member_count @column_max = width / column_width @selected_index = nil create_contents refresh self.active = true self.index = 0 end #-------------------------------------------------------------------------- # ○ メンバーリスト修復 #-------------------------------------------------------------------------- def restore_member_list @actors = $game_party.battle_members end #-------------------------------------------------------------------------- # ○ メンバー描画 #-------------------------------------------------------------------------- def draw_member @item_max.times { |i| actor = @actors[i] if actor == nil draw_empty_actor(i) else if i == @selected_index draw_selected_back(i) elsif $game_party.actor_fixed?(actor.id) draw_fixed_back(i) end rect = item_rect(i) draw_actor_graphic(actor, rect.x + DRAW_SIZE[0] / 2, rect.y + DRAW_SIZE[1] - 4) end } end #-------------------------------------------------------------------------- # ○ 空欄アクター描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_empty_actor(index) rect = item_rect(index) self.contents.font.color = system_color self.contents.draw_text(rect, KGC::LargeParty::BATTLE_MEMBER_BLANK_TEXT, 1) self.contents.font.color = normal_color end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormAllMember #------------------------------------------------------------------------------ # パーティ編成画面で全メンバーを表示するウィンドウです。 #============================================================================== class Window_PartyFormAllMember < Window_PartyFormMember #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 64, 64) restore_member_list @item_max = $game_party.all_members.size # 各種サイズ計算 column_width = DRAW_SIZE[0] + @spacing sw = [@item_max * column_width + 32, Graphics.width].min @column_max = (sw - 32) / column_width sh = ([@item_max - 1, 0].max / @column_max + 1) * DRAW_SIZE[1] + 32 sh = [sh, DRAW_SIZE[1] * KGC::LargeParty::PARTY_MEMBER_WINDOW_ROW_MAX + 32].min # 座標・サイズ調整 self.y += DRAW_SIZE[1] + 32 self.width = sw self.height = sh create_contents refresh self.active = false self.index = 0 end #-------------------------------------------------------------------------- # ○ 選択しているアクターのインデックス取得 #-------------------------------------------------------------------------- def actor_index return @index_offset + self.index end #-------------------------------------------------------------------------- # ○ メンバーリスト修復 #-------------------------------------------------------------------------- def restore_member_list if KGC::LargeParty::SHOW_BATTLE_MEMBER_IN_PARTY @actors = $game_party.all_members @index_offset = 0 else @actors = $game_party.stand_by_members @index_offset = $game_party.battle_members.size end end #-------------------------------------------------------------------------- # ○ メンバー描画 #-------------------------------------------------------------------------- def draw_member @item_max.times { |i| actor = @actors[i] if actor == nil draw_empty_actor(i) next end if $game_party.actor_fixed?(actor.id) draw_fixed_back(i) end rect = item_rect(i) opacity = ($game_party.battle_members.include?(actor) ? 96 : 255) draw_actor_graphic(actor, rect.x + DRAW_SIZE[0] / 2, rect.y + DRAW_SIZE[1] - 4, opacity) } end #-------------------------------------------------------------------------- # ● アクターの歩行グラフィック描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 # opacity : 不透明度 #-------------------------------------------------------------------------- def draw_actor_graphic(actor, x, y, opacity = 255) draw_character(actor.character_name, actor.character_index, x, y, opacity) end #-------------------------------------------------------------------------- # ● 歩行グラフィックの描画 # character_name : 歩行グラフィック ファイル名 # character_index : 歩行グラフィック インデックス # x : 描画先 X 座標 # y : 描画先 Y 座標 # opacity : 不透明度 #-------------------------------------------------------------------------- def draw_character(character_name, character_index, x, y, opacity = 255) return if character_name == nil bitmap = Cache.character(character_name) sign = character_name[/^[\!\$]./] if sign != nil and sign.include?('$') cw = bitmap.width / 3 ch = bitmap.height / 4 else cw = bitmap.width / 12 ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity) end #-------------------------------------------------------------------------- # ○ 空欄アクター描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_empty_actor(index) rect = item_rect(index) self.contents.font.color = system_color self.contents.draw_text(rect, KGC::LargeParty::PARTY_MEMBER_BLANK_TEXT, 1) self.contents.font.color = normal_color end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormStatus #------------------------------------------------------------------------------ # パーティ編成画面でアクターのステータスを表示するウィンドウです。 #============================================================================== class Window_PartyFormStatus < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 384, 128) self.z = 1000 @actor = nil refresh end #-------------------------------------------------------------------------- # ○ アクター設定 #-------------------------------------------------------------------------- def set_actor(actor) if @actor != actor @actor = actor refresh end end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear if @actor == nil return end draw_actor_face(@actor, 0, 0) dx = 104 draw_actor_name(@actor, dx, 0) draw_actor_level(@actor, dx, WLH * 1) draw_actor_hp(@actor, dx, WLH * 2) draw_actor_mp(@actor, dx, WLH * 3) 4.times { |i| draw_actor_parameter(@actor, dx + 128, WLH * i, i, 120) } end #-------------------------------------------------------------------------- # ● 能力値の描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 # type : 能力値の種類 (0~3) # width : 描画幅 #-------------------------------------------------------------------------- def draw_actor_parameter(actor, x, y, type, width = 156) case type when 0 parameter_name = Vocab::atk parameter_value = actor.atk when 1 parameter_name = Vocab::def parameter_value = actor.def when 2 parameter_name = Vocab::spi parameter_value = actor.spi when 3 parameter_name = Vocab::agi parameter_value = actor.agi end nw = width - 36 self.contents.font.color = system_color self.contents.draw_text(x, y, nw, WLH, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + nw, y, 36, WLH, parameter_value, 2) end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Window_PartyFormControl #------------------------------------------------------------------------------ # パーティ編成画面で操作方法を表示するウィンドウです。 #============================================================================== class Window_PartyFormControl < Window_Base #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- MODE_BATTLE_MEMBER = 0 MODE_SHIFT_CHANGE = 1 MODE_PARTY_MEMBER = 2 #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, Graphics.width - 384, 128) self.z = 1000 @mode = MODE_BATTLE_MEMBER refresh end #-------------------------------------------------------------------------- # ○ モード変更 #-------------------------------------------------------------------------- def mode=(value) @mode = value refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear case @mode when MODE_BATTLE_MEMBER # 戦闘メンバー buttons = [ "A: 外す", "B: 終了", "C: 決定", "X: 並び替え" ] when MODE_SHIFT_CHANGE # 並び替え buttons = [ "B: キャンセル", "C: 決定", "X: 決定" ] when MODE_PARTY_MEMBER # パーティメンバー buttons = [ "B: キャンセル", "C: 決定" ] else return end buttons.each_with_index { |c, i| self.contents.draw_text(0, WLH * i, width - 32, WLH, c) } end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Title #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ● 各種ゲームオブジェクトの作成 #-------------------------------------------------------------------------- alias create_game_objects_KGC_LargeParty create_game_objects def create_game_objects create_game_objects_KGC_LargeParty if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # ● 画面切り替えの実行 #-------------------------------------------------------------------------- alias update_scene_change_KGC_LargeParty update_scene_change def update_scene_change return if $game_player.moving? # プレイヤーの移動中? if $game_temp.next_scene == :partyform call_partyform return end update_scene_change_KGC_LargeParty end #-------------------------------------------------------------------------- # ○ パーティ編成画面への切り替え #-------------------------------------------------------------------------- def call_partyform $game_temp.next_scene = nil $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_MAP) end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu < Scene_Base if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND #-------------------------------------------------------------------------- # ● コマンドウィンドウの作成 #-------------------------------------------------------------------------- alias create_command_window_KGC_LargeParty create_command_window def create_command_window create_command_window_KGC_LargeParty return if $imported["CustomMenuCommand"] @__command_partyform_index = @command_window.add_command(Vocab.partyform) @command_window.draw_item(@__command_partyform_index, $game_party.partyform_enable?) if @command_window.oy > 0 @command_window.oy -= Window_Base::WLH end @command_window.index = @menu_index end end #-------------------------------------------------------------------------- # ● コマンド選択の更新 #-------------------------------------------------------------------------- alias update_command_selection_KGC_LargeParty update_command_selection def update_command_selection current_menu_index = @__command_partyform_index call_partyform_flag = false if Input.trigger?(Input::C) case @command_window.index when @__command_partyform_index # パーティ編成 call_partyform_flag = true end # パーティ編成ボタン押下 elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil && Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON) call_partyform_flag = true current_menu_index = @command_window.index if current_menu_index == nil end # パーティ編成画面に移行 if call_partyform_flag if $game_party.members.size == 0 || !$game_party.partyform_enable? Sound.play_buzzer return end Sound.play_decision $scene = Scene_PartyForm.new(current_menu_index) return end update_command_selection_KGC_LargeParty end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Shop #============================================================================== unless $imported["HelpExtension"] class Scene_Shop < Scene_Base #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- alias udpate_KGC_LargeParty update def update # スクロール判定 if !@command_window.active && KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON != nil && Input.press?(KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON) super update_menu_background update_scroll_status return else @status_window.cursor_rect.empty end udpate_KGC_LargeParty end #-------------------------------------------------------------------------- # ○ ステータスウィンドウのスクロール処理 #-------------------------------------------------------------------------- def update_scroll_status # ステータスウィンドウにカーソルを表示 @status_window.cursor_rect.width = @status_window.contents.width @status_window.cursor_rect.height = @status_window.height - 32 @status_window.update if Input.press?(Input::UP) @status_window.oy = [@status_window.oy - 4, 0].max elsif Input.press?(Input::DOWN) max_pos = [@status_window.contents.height - (@status_window.height - 32), 0].max @status_window.oy = [@status_window.oy + 4, max_pos].min end end end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # □ Scene_PartyForm #------------------------------------------------------------------------------ # パーティ編成画面の処理を行うクラスです。 #============================================================================== class Scene_PartyForm < Scene_Base #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- CAPTION_OFFSET = 40 # キャプションウィンドウの位置補正 HOST_MENU = 0 # 呼び出し元 : メニュー HOST_MAP = 1 # 呼び出し元 : マップ HOST_BATTLE = 2 # 呼び出し元 : 戦闘 #-------------------------------------------------------------------------- # ● オブジェクト初期化 # menu_index : コマンドのカーソル初期位置 # host_scene : 呼び出し元 (0..メニュー 1..マップ 2..戦闘) #-------------------------------------------------------------------------- def initialize(menu_index = 0, host_scene = HOST_MENU) @menu_index = menu_index @host_scene = host_scene end #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background create_windows create_confirm_window adjust_window_location # 編成前のパーティを保存 @battle_actors = $game_party.battle_members.dup @party_actors = $game_party.all_members.dup end #-------------------------------------------------------------------------- # ○ ウィンドウの作成 #-------------------------------------------------------------------------- def create_windows # 編成用ウィンドウを作成 @battle_member_window = Window_PartyFormBattleMember.new @party_member_window = Window_PartyFormAllMember.new @status_window = Window_PartyFormStatus.new @status_window.set_actor(@battle_member_window.actor) # その他のウィンドウを作成 @battle_member_caption_window = Window_PartyFormCaption.new(KGC::LargeParty::BATTLE_MEMBER_CAPTION) @party_member_caption_window = Window_PartyFormCaption.new(KGC::LargeParty::PARTY_MEMBER_CAPTION) @control_window = Window_PartyFormControl.new end #-------------------------------------------------------------------------- # ○ 確認ウィンドウの作成 #-------------------------------------------------------------------------- def create_confirm_window commands = KGC::LargeParty::CONFIRM_WINDOW_COMMANDS @confirm_window = Window_Command.new(KGC::LargeParty::CONFIRM_WINDOW_WIDTH, commands) @confirm_window.index = 0 @confirm_window.x = (Graphics.width - @confirm_window.width) / 2 @confirm_window.y = (Graphics.height - @confirm_window.height) / 2 @confirm_window.z = 2000 @confirm_window.openness = 0 @confirm_window.active = false end #-------------------------------------------------------------------------- # ○ ウィンドウの座標調整 #-------------------------------------------------------------------------- def adjust_window_location # 基準座標を計算 base_x = [@battle_member_window.width, @party_member_window.width].max base_x = [(Graphics.width - base_x) / 2, 0].max base_y = @battle_member_window.height + @party_member_window.height + @status_window.height + CAPTION_OFFSET * 2 base_y = [(Graphics.height - base_y) / 2, 0].max # 編成用ウィンドウの座標をセット @battle_member_window.x = base_x @battle_member_window.y = base_y + CAPTION_OFFSET @party_member_window.x = base_x @party_member_window.y = @battle_member_window.y + @battle_member_window.height + CAPTION_OFFSET @status_window.x = 0 @status_window.y = @party_member_window.y + @party_member_window.height # その他のウィンドウの座標をセット @battle_member_caption_window.x = [base_x - 16, 0].max @battle_member_caption_window.y = @battle_member_window.y - CAPTION_OFFSET @party_member_caption_window.x = [base_x - 16, 0].max @party_member_caption_window.y = @party_member_window.y - CAPTION_OFFSET @control_window.x = @status_window.width @control_window.y = @status_window.y end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- def terminate super dispose_menu_background @battle_member_window.dispose @party_member_window.dispose @status_window.dispose @battle_member_caption_window.dispose @party_member_caption_window.dispose @control_window.dispose @confirm_window.dispose end #-------------------------------------------------------------------------- # ● メニュー画面系の背景作成 #-------------------------------------------------------------------------- def create_menu_background super @menuback_sprite.z = 500 end #-------------------------------------------------------------------------- # ● 元の画面へ戻る #-------------------------------------------------------------------------- def return_scene case @host_scene when HOST_MENU $scene = Scene_Menu.new(@menu_index) when HOST_MAP $scene = Scene_Map.new when HOST_BATTLE $scene = Scene_Battle.new end $game_player.refresh end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super update_menu_background update_window if @battle_member_window.active update_battle_member elsif @party_member_window.active update_party_member elsif @confirm_window.active update_confirm end end #-------------------------------------------------------------------------- # ○ ウィンドウ更新 #-------------------------------------------------------------------------- def update_window @battle_member_window.update @party_member_window.update @status_window.update @battle_member_caption_window.update @party_member_caption_window.update @control_window.update @confirm_window.update end #-------------------------------------------------------------------------- # ○ ウィンドウ再描画 #-------------------------------------------------------------------------- def refresh_window @battle_member_window.refresh @party_member_window.refresh end #-------------------------------------------------------------------------- # ○ フレーム更新 (戦闘メンバーウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_battle_member @status_window.set_actor(@battle_member_window.actor) if Input.trigger?(Input::A) if @battle_member_window.selected_index == nil # 並び替え中でない actor = @battle_member_window.actor # アクターを外せない場合 if actor == nil || $game_party.actor_fixed?(actor.id) Sound.play_buzzer return end # アクターを外す Sound.play_decision actors = $game_party.battle_members actors.delete_at(@battle_member_window.index) $game_party.set_battle_member(actors) refresh_window end elsif Input.trigger?(Input::B) if @battle_member_window.selected_index == nil # 並び替え中でない # 確認ウィンドウに切り替え Sound.play_cancel show_confirm_window else # 並び替え中 # 並び替え解除 Sound.play_cancel @battle_member_window.selected_index = nil @battle_member_window.refresh @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER end elsif Input.trigger?(Input::C) if @battle_member_window.selected_index == nil # 並び替え中でない actor = @battle_member_window.actor # アクターを外せない場合 if actor != nil && $game_party.actor_fixed?(actor.id) Sound.play_buzzer return end # パーティメンバーウィンドウに切り替え Sound.play_decision @battle_member_window.active = false @party_member_window.active = true @control_window.mode = Window_PartyFormControl::MODE_PARTY_MEMBER else # 並び替え中 unless can_change_shift?(@battle_member_window.actor) Sound.play_buzzer return end # 並び替え実行 Sound.play_decision index1 = @battle_member_window.selected_index index2 = @battle_member_window.index change_shift(index1, index2) @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER end elsif Input.trigger?(Input::X) # 並び替え不可能な場合 unless can_change_shift?(@battle_member_window.actor) Sound.play_buzzer return end if @battle_member_window.selected_index == nil # 並び替え中でない # 並び替え開始 Sound.play_decision @battle_member_window.selected_index = @battle_member_window.index @battle_member_window.refresh @control_window.mode = Window_PartyFormControl::MODE_SHIFT_CHANGE else # 並び替え中 # 並び替え実行 Sound.play_decision index1 = @battle_member_window.selected_index index2 = @battle_member_window.index change_shift(index1, index2) @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER end end end #-------------------------------------------------------------------------- # ○ 並び替え可否判定 #-------------------------------------------------------------------------- def can_change_shift?(actor) # 選択したアクターが存在しない、または並び替え不能な場合 if actor == nil || (KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED && $game_party.actor_fixed?(actor.id)) return false end return true end #-------------------------------------------------------------------------- # ○ 並び替え #-------------------------------------------------------------------------- def change_shift(index1, index2) # 位置を入れ替え $game_party.change_shift(index1, index2) # 選択済みインデックスをクリア @battle_member_window.selected_index = nil refresh_window end #-------------------------------------------------------------------------- # ○ フレーム更新 (パーティウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_party_member @status_window.set_actor(@party_member_window.actor) if Input.trigger?(Input::B) Sound.play_cancel # 戦闘メンバーウィンドウに切り替え @battle_member_window.active = true @party_member_window.active = false @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER elsif Input.trigger?(Input::C) actor = @party_member_window.actor # アクターが戦闘メンバーに含まれる場合 if $game_party.battle_members.include?(actor) Sound.play_buzzer return end # アクターを入れ替え Sound.play_decision actors = $game_party.all_members battle_actors = $game_party.battle_members if @battle_member_window.actor != nil actors[@party_member_window.actor_index] = @battle_member_window.actor actors[@battle_member_window.index] = actor $game_party.set_member(actors.compact) end battle_actors[@battle_member_window.index] = actor $game_party.set_battle_member(battle_actors.compact) refresh_window # 戦闘メンバーウィンドウに切り替え @battle_member_window.active = true @party_member_window.active = false @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER end end #-------------------------------------------------------------------------- # ○ フレーム更新 (確認ウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_confirm if Input.trigger?(Input::B) Sound.play_cancel hide_confirm_window elsif Input.trigger?(Input::C) case @confirm_window.index when 0 # 編成完了 # パーティが無効の場合 unless battle_member_valid? Sound.play_buzzer return end Sound.play_decision return_scene when 1 # 編成中断 Sound.play_decision # パーティを編成前の状態に戻す $game_party.set_member(@party_actors) $game_party.set_battle_member(@battle_actors) return_scene when 2 # キャンセル Sound.play_cancel hide_confirm_window end end end #-------------------------------------------------------------------------- # ○ 戦闘メンバー有効判定 #-------------------------------------------------------------------------- def battle_member_valid? return false if $game_party.battle_members.size == 0 # 戦闘メンバーが空 $game_party.battle_members.each { |actor| return true if actor.exist? # 生存者がいればOK } return false end #-------------------------------------------------------------------------- # ○ 確認ウィンドウの表示 #-------------------------------------------------------------------------- def show_confirm_window if @battle_member_window.active @last_active_window = @battle_member_window else @last_active_window = @party_member_window end @battle_member_window.active = false @party_member_window.active = false @confirm_window.draw_item(0, battle_member_valid?) @confirm_window.open @confirm_window.active = true end #-------------------------------------------------------------------------- # ○ 確認ウィンドウの非表示 #-------------------------------------------------------------------------- def hide_confirm_window @confirm_window.active = true @confirm_window.close @last_active_window.active = true end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # ■ Scene_Battle #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● メッセージ表示が終わるまでウェイト #-------------------------------------------------------------------------- alias wait_for_message_KGC_LargeParty wait_for_message def wait_for_message return if @ignore_wait_for_message # メッセージ終了までのウェイトを無視 wait_for_message_KGC_LargeParty end #-------------------------------------------------------------------------- # ● レベルアップの表示 #-------------------------------------------------------------------------- alias display_level_up_KGC_LargeParty display_level_up def display_level_up @ignore_wait_for_message = true display_level_up_KGC_LargeParty exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000 $game_party.stand_by_members.each { |actor| if actor.exist? actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP) end } @ignore_wait_for_message = false wait_for_message end #-------------------------------------------------------------------------- # ● パーティコマンド選択の開始 #-------------------------------------------------------------------------- alias start_party_command_selection_KGC_LargeParty start_party_command_selection def start_party_command_selection if $game_temp.in_battle @status_window.index = 0 end start_party_command_selection_KGC_LargeParty end if KGC::LargeParty::USE_BATTLE_PARTYFORM #-------------------------------------------------------------------------- # ● 情報表示ビューポートの作成 #-------------------------------------------------------------------------- alias create_info_viewport_KGC_LargeParty create_info_viewport def create_info_viewport create_info_viewport_KGC_LargeParty @__command_partyform_index = @party_command_window.add_command(Vocab.partyform_battle) @party_command_window.draw_item(@__command_partyform_index, $game_party.battle_partyform_enable?) end #-------------------------------------------------------------------------- # ● パーティコマンド選択の更新 #-------------------------------------------------------------------------- alias update_party_command_selection_KGC_LargeParty update_party_command_selection def update_party_command_selection if Input.trigger?(Input::C) case @party_command_window.index when @__command_partyform_index # パーティ編成 unless $game_party.battle_partyform_enable? Sound.play_buzzer return end Sound.play_decision process_partyform return end end update_party_command_selection_KGC_LargeParty end #-------------------------------------------------------------------------- # ○ パーティ編成の処理 #-------------------------------------------------------------------------- def process_partyform Graphics.freeze snapshot_for_background $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE) $scene.main $scene = self @status_window.refresh perform_transition end end end -
Fight In Grass
Descrizione
Si puo fare ad eventi.Premesso questo:Serve per fare lotte stile pokemon solo in erba alta.Autore
MagicaIstruzioni per l'uso
Inserire questo script sopra Main#========================================================================== # ** Fight In Grass #========================================================================== # by Magica # Version 1 [VX] # January 24th, 2008 #========================================================================== module GameBaker GrassFightDisable = 6 end #========================================================================== # # # # # # # # #========================================================================== class Game_Player alias gamebaker_grassfight_updateenc update_encounter def update_encounter if !$game_switches[GameBaker::GrassFightDisable] temp = @encounter_count gamebaker_grassfight_updateenc @encounter_count = temp @encounter_count -= 1 if $game_map.bush?(@x, @y) else gamebaker_grassfight_updateenc end end end #========================================================================== # End of file! #==========================================================================
-
CC_ActorProfileInfo
Descrizione
Questo script aggiunge uno screen del profilo personaggio per una estesa conoscenza delle informazioni dell\'eroe.Autore
ClaimhIstruzioni per l\'uso
Inserire sopra main.FAQQ: Come faccio a modificare le statistiche del mio personaggio con un evento durante il gioco:A: Devi utilizzare un chiama script (terza pagine dei comandi eventi). devi inserire questo codice nel box:Chara_Review::CHARA_INFO[ActorID] = "Actor Info"Chara_Review::CHARA_AGE[ActorID] = "Age"Chara_Review::CHARA_FROM[ActorID] = "Origin"Chara_Review::CHARA_H[ActorID] = "Height"Chara_Review::CHARA_W[ActorID] = "Weight"( Where ActorID = The desired actor's ID number in the database. )
Script:
#==============================================================================# Actor Profile Information - CC_ExtendedActorInfo VX # ◇ Version 1.0.0 by Claimh ◇# ◆ Translation by Mr. Anonymous ◆#------------------------------------------------------------------------------# This script adds a character profile screen for extended actor information.# This screen is called from the status screen by pressing the "C" button# (by default). This information displayed on this screen is customized in# this script itself below (in the Customization block).#==============================================================================module Chara_Review#==============================================================================## ★ Customization ★ ##==============================================================================# # If you have more than 8 actors in your game, you may add additional lines # to each of these fields.#----------------------------------------------------------------------------# Call Screen Input Key#---------------------------------------------------------------------------- # This allows you to change the button/key pressed to call the extended # actor information screen from the status screen. (Default: C) CHENGE_KEY = Input::C #-------------------------------------------------------------------------- # Customize Age #-------------------------------------------------------------------------- CHARA_AGE = { # Age is the first field to the right of the profile image. # ActorID => "Age" 1 => "??", 2 => "??", 3 => "??", 4 => "??", 5 => "??", 6 => "??", 7 => "??", 8 => "??" } #-------------------------------------------------------------------------- # Customize Actor's Origin #-------------------------------------------------------------------------- CHARA_FROM = { # "From" or Origin is the second field to the right of the profile image. # ActorID => "Place" 1 => "??", 2 => "??", 3 => "??", 4 => "??", 5 => "??", 6 => "??", 7 => "??", 8 => "??" } #-------------------------------------------------------------------------- # Customize Height #-------------------------------------------------------------------------- CHARA_H = { # Height is the third field to the right of the profile image. # ActorID => "Height" 1 => "??", 2 => "??", 3 => "??", 4 => "??", 5 => "??", 6 => "??", 7 => "??", 8 => "??" } #-------------------------------------------------------------------------- # Customize Weight #-------------------------------------------------------------------------- CHARA_W = { # Weight is the fourth field to the right of the profile image. # ActorID => "Weight" 1 => "??", 2 => "??", 3 => "??", 4 => "??", 5 => "??", 6 => "??", 7 => "??", 8 => "??" } #-------------------------------------------------------------------------- # Customize Profile Information #-------------------------------------------------------------------------- CHARA_INFO = { # Profile Information is displayed beneath the actor's graphic file. # ActorID => "Information Text" 1 => "???", 2 => "???", 3 => "???", 4 => "???", 5 => "???", 6 => "???", 7 => "???", 8 => "???" } #-------------------------------------------------------------------------- # Customize Face/Profile Image #-------------------------------------------------------------------------- # Image Type Toggle # This toggle allows to use either the default Face graphic that is set up # in the Actor tab in the database, or a custom image of your choosing. # true = Custom images are used. # false = The actor's face graphic is used. BSTUP = true # Custom Profile Graphics ("Graphics/Face" directory)(If BSTUP = true) BSTUP_FILE = { # ActorID => "Profile Image" (Without image format extension) # You may also add more images for actors after the fourth line, if needed. 1 => "Actor1-1", 2 => "Actor1-4", 3 => "Actor2-3", 4 => "Actor2-6" } #----------------------------------------------------------------------------# END Customization#----------------------------------------------------------------------------end #==============================================================================# Window_Charactor#------------------------------------------------------------------------------# Define Window#==============================================================================class Window_Charactor < Window_Base #-------------------------------------------------------------------------- # Initialize Profile Window # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 544, 416) self.contents = Bitmap.new(width - 32, height - 32) refresh(actor) end #-------------------------------------------------------------------------- # Determine BSTUP Type #-------------------------------------------------------------------------- def refresh(actor) self.contents.clear return if actor.nil? if Chara_Review::BSTUP refresh_bstup(actor) # If BSTUP = true else refresh_face(actor) # If BSTUP = false end end #-------------------------------------------------------------------------- # Draw Parameters and Profile Image (BSTUP) #-------------------------------------------------------------------------- def refresh_bstup(actor) draw_face_picture(Chara_Review::BSTUP_FILE[actor.id], 0, 0) self.contents.font.color = system_color self.contents.draw_text(280, 30, 80, WLH, "Name:") self.contents.draw_text(280, 60, 80, WLH, "Age:") self.contents.draw_text(280, 90, 80, WLH, "From:") self.contents.draw_text(280, 120, 80, WLH, "Height:") self.contents.draw_text(280, 150, 80, WLH, "Weight:") self.contents.font.color = normal_color draw_actor_name(actor, 380, 30) self.contents.draw_text(380, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id]) self.contents.draw_text(380, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id]) self.contents.draw_text(380, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id]) self.contents.draw_text(380, 150, 250, WLH, Chara_Review::CHARA_W[actor.id]) draw_enter_text(20, 300, 500, WLH, Chara_Review::CHARA_INFO[actor.id]) end #-------------------------------------------------------------------------- # Draw Parameters and Profile Image (FACE) #-------------------------------------------------------------------------- def refresh_face(actor) draw_actor_face(actor, 8, 32) self.contents.font.color = system_color self.contents.draw_text(200, 30, 80, WLH, "Name:") self.contents.draw_text(200, 60, 80, WLH, "Age:") self.contents.draw_text(200, 90, 80, WLH, "From:") self.contents.draw_text(200, 120, 80, WLH, "Height:") self.contents.draw_text(200, 150, 80, WLH, "Weight:") self.contents.font.color = normal_color draw_actor_name(actor, 300, 30) self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id]) self.contents.draw_text(300, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id]) self.contents.draw_text(300, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id]) self.contents.draw_text(300, 150, 250, WLH, Chara_Review::CHARA_W[actor.id]) draw_enter_text(20, 200, 500, WLH, Chara_Review::CHARA_INFO[actor.id]) endend class Window_Base < Window #-------------------------------------------------------------------------- # Draw Entered Text #-------------------------------------------------------------------------- def draw_enter_text(x, y, width, height, text) info_box = text.split(/n/) for i in 0...info_box.size self.contents.draw_text( x, y+i*WLH, width, WLH, info_box[i]) break if (y+i*WLH) > (self.height-WLH) end end #-------------------------------------------------------------------------- # Draw Face Graphic(Graphics/Face) #-------------------------------------------------------------------------- def draw_face_picture(file_name, x, y) bitmap = Cache.face(file_name) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y, bitmap, src_rect) endend #==============================================================================# Scene_Charactor#------------------------------------------------------------------------------# Define Methods#==============================================================================class Scene_Charactor < Scene_Base #-------------------------------------------------------------------------- # Initialize Actor # actor_index : Actor ID #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # Create Menu Background #-------------------------------------------------------------------------- def start super create_menu_background @actor = $game_party.members[@actor_index] @status_window = Window_Charactor.new(@actor) end #-------------------------------------------------------------------------- # Dispose Status Window #-------------------------------------------------------------------------- def terminate super dispose_menu_background @status_window.dispose end #-------------------------------------------------------------------------- # Return Scene #-------------------------------------------------------------------------- def return_scene $scene = Scene_Status.new(@actor_index) end #-------------------------------------------------------------------------- # Next Actor #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_Charactor.new(@actor_index) end #-------------------------------------------------------------------------- # Previous Actor #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_Charactor.new(@actor_index) end #-------------------------------------------------------------------------- # Actor Profile Screne Inputs #-------------------------------------------------------------------------- def update update_menu_background @status_window.update if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end super endend #==============================================================================# Scene_Status#==============================================================================class Scene_Status #-------------------------------------------------------------------------- # Update Actor #-------------------------------------------------------------------------- alias update_chara update def update if Input.trigger?(Chara_Review::CHENGE_KEY) Sound.play_decision $scene = Scene_Charactor.new(@actor_index) end update_chara endend #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_#_/ The original untranslated version of this script can be found here:# [url="http://www4.plala.or.jp/findias/codecrush/...u_char_top.html"]http://www4.plala.or.jp/findias/codecrush/...u_char_top.html[/url]#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ -
DeadlyDan MapFog
Descrizione
Ecco uno script che reinserisce le FOGS stranamente scomparse o_O...Autore
DeadlyDanIstruzioni per l'uso
Inserire sotto Main.#============================================================================== # ■ DeadlyDan_MapFog by DeadlyDan #------------------------------------------------------------------------------ # Allows maps to have fogs like in RPG Maker XP #============================================================================== # Usage: =begin To initialize a fog for a current map you must: 1) Create a map event and set it to only come on when Self Switch A is on. 2) Rename it to FOG. (Case sensitive, so it has to be FOG) 3) Set it to a Parallel Process. 4) Add for example, the following code into a Script Code event command: $game_map.fog_name = "fog" # Filename of fog image located in the Pictures folder $game_map.fog_zoom = 300 # How much to zoom into the fog image $game_map.fog_sx = 1 # The scrolling speed across the x axis $game_map.fog_sy = 1 # The scrolling speed across the y axis $game_map.fog_target_opacity = 80 # The opacity of the fog $game_map.fog_show # Always call this after changing fog variables 5) Then, add a Control Self Switch after that Script Code, and set it to turn A off. (Note) It is absolutely vital that you put the event name to FOG and set it to a Parallel Proccess and also set it to only run when Self-Switch A is on. Make sure you place this script after all other scripts except for Main. (Extras) You can also use extra commands to change the fog settings, such as the following example: $game_map.fog_tone = Tone.new ( 100, 0, 0, 0 ) $game_map.fog_blend_type = 1 # ( 0 = NONE, 1 = ADD, 2 = SUBTRACT ) (Important!) When you want to have a map with no fog, do all of the above but instead of seting the fog options and then calling $game_map.fog_show, just add a Script Code event command and place in it $game_map.fog_clear. This will clear the fog settings and the fog will dissapear, every map has to have a fog event in it, else maps will keep all other maps fog settings that might be unintentional on the users side. =end class Game_Temp attr_accessor :fog_name attr_accessor :fog_opacity attr_accessor :fog_target_opacity attr_accessor :fog_blend_type attr_accessor :fog_zoom attr_accessor :fog_sx attr_accessor :fog_sy attr_accessor :fog_tone alias original_initialize initialize def initialize original_initialize @fog_name = "" @fog_tone = Tone.new ( 0, 0, 0, 0 ) @fog_opacity = 0 @fog_target_opacity = 0 @fog_blend_type = 0 @fog_zoom = 100 @fog_sx = 0 @fog_sy = 0 end end class Game_Map attr_accessor :fog_name attr_accessor :fog_opacity attr_accessor :fog_target_opacity attr_accessor :fog_blend_type attr_accessor :fog_zoom attr_accessor :fog_sx attr_accessor :fog_sy attr_accessor :fog_ox attr_accessor :fog_oy attr_accessor :fog_tone attr_accessor :fog_start_loop attr_accessor :fog_eventid attr_accessor :fog_visible attr_accessor :fog alias original_initialize initialize def initialize original_initialize @fog = Plane.new ( @viewport1 ) @fog_ox = 0 @fog_oy = 0 end alias original_setup setup def setup ( map_id ) original_setup ( map_id ) fog_event end alias original_update update def update original_update if ( @fog_visible and @fog ) fog_update end end def fog_init @fog_name = $game_temp.fog_name @fog_tone = $game_temp.fog_tone @fog_opacity = $game_temp.fog_opacity @fog_target_opacity = $game_temp.fog_target_opacity @fog_blend_type = $game_temp.fog_blend_type @fog_zoom = $game_temp.fog_zoom @fog_sx = $game_temp.fog_sx @fog_sy = $game_temp.fog_sy @fog_tone_target = Tone.new ( 0, 0, 0, 0 ) @fog_tone_duration = 0 @fog_opacity_duration = 0 @fog_opacity_target = 0 @fog_previous_name = "" fog_setup end def fog_setup fog_hide if ( ( @fog_previous_name != @fog_name ) and ( @fog_name != "" ) ) @fog.bitmap = Cache.picture ( @fog_name ) @fog_name_previous = @fog_name @fog_opacity = @fog_target_opacity @fog.opacity = @fog_opacity @fog.blend_type = @fog_blend_type @fog.zoom_x = @fog_zoom / 100 @fog.zoom_y = @fog_zoom / 100 @fog.ox = @fog_ox @fog.oy = @fog_oy @fog.tone = @fog_tone @fog.z = 99 @fog_visible = true else fog_hide end end def fog_update @fog_ox -= @fog_sx / 8.0 @fog_oy -= @fog_sy / 8.0 if ( @fog_tone_duration >= 1 ) d = @fog_tone_duration target = @fog_tone_target @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d @fog_tone_duration -= 1 end if ( @fog_opacity_duration >= 1 ) d = @fog_opacity_duration @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d @fog_opacity_duration -= 1 end @fog.opacity = @fog_opacity @fog.blend_type = @fog_blend_type @fog.zoom_x = @fog_zoom / 100 @fog.zoom_y = @fog_zoom / 100 @fog.ox = @fog_ox @fog.oy = @fog_oy @fog.tone = @fog_tone end def fog_show fog_init end def fog_hide @fog_visible = false @fog_opacity = 0 $game_temp.fog_opacity = 0 end def fog_clear @fog_visible = false @fog_opacity = 0 $game_temp.fog_opacity = 0 @fog_target_opacity = 0 $game_temp.fog_target_opacity = 0 fog_show end def scroll_up ( distance ) if ( loop_vertical? ) @display_y += @map.height * 256 - distance @display_y %= @map.height * 256 @parallax_y -= distance @fog_oy -= distance / 8.0 else last_y = @display_y @display_y = [@display_y - distance, 0].max @parallax_y += @display_y - last_y @fog_oy += ( @display_y - last_y ) / 8.0 end end def scroll_down ( distance ) if ( loop_vertical? ) @display_y += distance @display_y %= @map.height * 256 @parallax_y += distance @fog_oy += distance / 8.0 else last_y = @display_y @display_y = [@display_y + distance, (height - 13) * 256].min @parallax_y += @display_y - last_y @fog_oy += ( @display_y - last_y ) / 8.0 end end def scroll_left ( distance ) if ( loop_horizontal? ) @display_x += @map.width * 256 - distance @display_x %= @map.width * 256 @parallax_x -= distance @fog_ox -= distance / 8.0 else last_x = @display_x @display_x = [@display_x - distance, 0].max @parallax_x += @display_x - last_x @fog_ox += ( @display_x - last_x ) / 8.0 end end def scroll_right ( distance ) if ( loop_horizontal? ) @display_x += distance @display_x %= @map.width * 256 @parallax_x += distance @fog_ox += distance / 8.0 else last_x = @display_x @display_x = [@display_x + distance, (width - 17) * 256].min @parallax_x += @display_x - last_x @fog_ox += ( @display_x - last_x ) / 8.0 end end def setup_events @fog_eventid = 0 @events = {} for i in @map.events.keys @events[i] = Game_Event.new(@map_id, @map.events[i]) if ( @events[i].name == "FOG" ) @fog_eventid = i end end @common_events = {} for i in 1...$data_common_events.size @common_events[i] = Game_CommonEvent.new(i) end end def fog_event if ( @fog_eventid != 0 ) key = @events[@fog_eventid].selfswitch $game_self_switches[key] = true end end end class Scene_Map < Scene_Base alias original_start start def start original_start $game_map.fog_show $game_map.fog_event end alias original_terminate terminate def terminate original_terminate $game_map.fog_hide end end class Game_Player < Game_Character alias original_perform_transfer perform_transfer def perform_transfer original_perform_transfer $game_map.setup_events $game_map.fog_event $game_map.fog_show end end class Game_Event < Game_Character def name return @event.name end def selfswitch key = [@map_id, @event.id, 'A'] return key end endIstruzioni per l'uso
- inserite la fog che volete nella cartella Graphics/Pictures (il file deve esser PNG)- nella mappa dove volete far comparire la fog create un evento- il nome dell'evento deve esser per forza FOG- settate l'evento in modalità "processo paralello"- tra i comandi evento fate un call scritp (chiama script) e mettete questo:$game_temp.fog_name = "nome fog" $game_temp.fog_zoom = 100 $game_temp.fog_sx = 0 $game_temp.fog_sy = 0 $game_temp.fog_target_opacity = 80 $game_map.fog_show
- tramite questi comandi potete muovere la fog (i comandi sx e xy), cambiare opacità e zoom.- sempre tra i comandi, dopo il chiama script mettete un CONTROLLO SWITCH LOCALE A su ON.- FINE (non dovete creare altre pagine!)ulteriori personalizzazioni le trovate dentro lo script.
EDIT by EIKICHI: ho sistemato lo script e aggiunto le istruzioni
-
ABS VX
Descrizione
Ecco un ABS finalmente anche per RPG Maker VX.EDIT BY EIKICHI: lo script è in spagnolo, le istruzioni sono all'interno ma non vi preoccupate. nulla di incomprensibile ^^Autore
Vlad.Allegati
DEMO VERSIONE 2.0
Istruzioni per l'uso
Sono all'interno del demo inspagnoloSCREEN v.20
http://i59.photobucket.com/albums/g281/Spoofus/Depthsscreenshot.jpg
-
Camminata a 8 Direzioni(non richiede chara speciali)
Descrizione
Camminata a 8 direzioni senza uso di chara a 8 direzioni ^^Autore
AllyIstruzioni per l'uso
Copia questo script sopra Main#===================== # Istruzioni: # Aggiungete una classe sopra Main e inseriteci dentro questo Script # ------------------------- # www.rpgmkr.net # ------------------------- # Movimento 8 direzioni # Autore: Ally # Data: 26/03/2008 #========================= class Game_Player def move_by_input return unless movable? return if $game_map.interpreter.running? case Input.dir8 #Movimento Basso Sinistra when 1; move_lower_left #Movimento Giù when 2; move_down #Movimento Giù Destra when 3; move_lower_right #Movimento Sinistra when 4; move_left #Movimento Destra when 6; move_right #Movimento Su Sinistra when 7; move_upper_left #Movimento Su when 8; move_up #Movimento Su Destra when 9; move_upper_right end end end # Fine Script
-
Delete NMS2 - Neo Message System 2.1 V.1.0
So che è una cavolata ma la posto lo stesso:
Alcune versioni di RPG Maker VX hanno questa fastidiosissima scritta sullo schermo in alto a sinistra:ecco come toglierla:
Sostituite ▼ Main Process con:
class Worale_Text def initialize vp = Viewport.new(0,0,Graphics.width,Graphics.height) vp.z = 10000 @text = Sprite.new(vp) @text.bitmap = Bitmap.new(Graphics.width,Graphics.height) end end
Autore:Rinnegatamante(Io ma è una cavolata,ho tolto solo una stringa)
-
dove devo mettere il codice oer cambiare prezzo ad una magia???(Quello \p[price])
-
Ero partito nel voler fare stile Metin 2 ma poi che ho notato che era impossibile...comunque ho provato a farlo il meno possibile contorto...senza switch...
-
io fatto evento con 2 commenti,lights effects e fire ma non funge
-
Ho creato un fabbro saldatore ovvero che unisce due oggetti per esempio per forgiarne uno solo e i vari up si sbloccano con l'accumulare di bottini di guerra.Mi sono ispirato a quello di FF9 e ho messo le % di riuscita up/rottura stile Metin 2.Sono accetti consigli.
Nella demo è presente l'uomo che è il fabbro,uno che vi fornisce 2 spade e 10 bottini ed un altro che fa partire una lotta per cumulare soldi per tentare l'up.
Download demo:
-
mi da errore linea 23 dove dice "want"
-
dimmi ke script...
-
Si,è aperta
-
come faccio a impostare una mappa come isometrica?

Total Conversion VX to XP
in Scripts RGSS2 (VX)
Posted · Edited by Eikichi
Script di compatibilità(VX a XP)
Descrizione
Autore
Istruzioni per l'uso