Character Selector V. 1.1
3 participantes
Página 1 de 1
Character Selector V. 1.1
Character Selector V. 1.1
Recursos
Versão 1.1
- Você pode agora escolher o do ator, que não devem ser incluídos.
- Agora você pode voltar à seleção de personagem "New Game", "Continuar", "Shutdown"
Versão 1.0
- Simples deslocamento de caracteres selecção janela.
Screen
Demo
Não necessário
Só pegue o script e o insira acima do main
script
Instruções
Você não tem que fazer alguma coisa em seguida, insira-o acima principal, ele irá, em seguida, assumirá automaticamente a cada personagem da "actores" guia no banco de dados.
Se, por outro lado, não queremos todos os actores a aparecer, editar o script na linha 10,
por exemplo, se você não quiser ator 1, 4 e 5, para serem reproduzidos, e depois editá-lo assim...
Créditos:
S.S Muu e Peazinn
Recursos
Versão 1.1
- Você pode agora escolher o do ator, que não devem ser incluídos.
- Agora você pode voltar à seleção de personagem "New Game", "Continuar", "Shutdown"
Versão 1.0
- Simples deslocamento de caracteres selecção janela.
Screen
- Spoiler:
Demo
Não necessário
Só pegue o script e o insira acima do main
script
- Código:
1. #==============================================================================
2. # ** Character selector
3. #------------------------------------------------------------------------------
4. # Author S.S Muu
5. # Version 1.1
6. # Date 23-01-09 (dd-mm-yy)
7. #==============================================================================
8.
9. #--[ Config ]----------------------------------------------------------------
10. DO_NOT_INCLUDE = [] # The actors who shouldn't be included. For example [1, 4, 6]
11.
12. #--[ IMPORTANT ]-------------------------------------------------------------
13. #-- Don't Edit Below if you don't know what you're doing!
14. #------------------------------------------------------------------------------
15.
16. #==============================================================================
17. # ** Game_Party
18. #------------------------------------------------------------------------------
19. # This class handles the party. It includes information on amount of gold
20. # and items. Refer to "$game_party" for the instance of this class.
21. #==============================================================================
22. class Game_Party
23. attr_accessor :actors # Actors
24. end
25.
26. #==============================================================================
27. # ** Window_Command
28. #------------------------------------------------------------------------------
29. # This window deals with general command choices.
30. #==============================================================================
31. class Window_Command < Window_Selectable
32. attr_reader :commands
33. #--------------------------------------------------------------------------
34. # * New Commands
35. #--------------------------------------------------------------------------
36. def new_commands(commands)
37. @item_max = commands.size
38. @commands = commands
39. self.contents = Bitmap.new(self.width - 32, @item_max * 32)
40. refresh
41. self.index = 0
42. end
43. end
44.
45. #==============================================================================
46. # ** Scene_Title
47. #------------------------------------------------------------------------------
48. # This class performs title screen processing.
49. #==============================================================================
50.
51. class Scene_Title
52. #--------------------------------------------------------------------------
53. # * Main Processing
54. #--------------------------------------------------------------------------
55. def main
56. # If battle test
57. if $BTEST
58. battle_test
59. return
60. end
61. # Load database
62. $data_actors = load_data("Data/Actors.rxdata")
63. $data_classes = load_data("Data/Classes.rxdata")
64. $data_skills = load_data("Data/Skills.rxdata")
65. $data_items = load_data("Data/Items.rxdata")
66. $data_weapons = load_data("Data/Weapons.rxdata")
67. $data_armors = load_data("Data/Armors.rxdata")
68. $data_enemies = load_data("Data/Enemies.rxdata")
69. $data_troops = load_data("Data/Troops.rxdata")
70. $data_states = load_data("Data/States.rxdata")
71. $data_animations = load_data("Data/Animations.rxdata")
72. $data_tilesets = load_data("Data/Tilesets.rxdata")
73. $data_common_events = load_data("Data/CommonEvents.rxdata")
74. $data_system = load_data("Data/System.rxdata")
75. # Make system object
76. $game_system = Game_System.new
77. # Make title graphic
78. @sprite = Sprite.new
79. @sprite.bitmap = RPG::Cache.title($data_system.title_name)
80. # Make characters
81. @characters = []
82. for i in 1...$data_actors.size
83. @characters.push($data_actors[i].name) if !DO_NOT_INCLUDE.include?(i)
84. end
85. @characters_height = @characters.size * 32 + 32
86. # Make command window
87. s1 = "New Game"
88. s2 = "Continue"
89. s3 = "Shutdown"
90. @command_window = Window_Command.new(192, [s1, s2, s3])
91. @command_window.back_opacity = 160
92. @command_window.x = 320 - @command_window.width / 2
93. @command_window.y = 288
94. # Make default commands
95. @default = [s1, s2, s3]
96. # Continue enabled determinant
97. # Check if at least one save file exists
98. # If enabled, make @continue_enabled true; if disabled, make it false
99. @continue_enabled = false
100. for i in 0..3
101. if FileTest.exist?("Save#{i+1}.rxdata")
102. @continue_enabled = true
103. end
104. end
105. # If continue is enabled, move cursor to "Continue"
106. # If disabled, display "Continue" text in gray
107. if @continue_enabled
108. @command_window.index = 1
109. else
110. @command_window.disable_item(1)
111. end
112. # Play title BGM
113. $game_system.bgm_play($data_system.title_bgm)
114. # Stop playing ME and BGS
115. Audio.me_stop
116. Audio.bgs_stop
117. # Execute transition
118. Graphics.transition
119. # Main loop
120. loop do
121. # Update game screen
122. Graphics.update
123. # Update input information
124. Input.update
125. # Frame update
126. update
127. # Abort loop if screen is changed
128. if $scene != self
129. break
130. end
131. end
132. # Prepare for transition
133. Graphics.freeze
134. # Dispose of command window
135. @command_window.dispose
136. # Dispose of title graphic
137. @sprite.bitmap.dispose
138. @sprite.dispose
139. end
140. #--------------------------------------------------------------------------
141. # * Frame Update
142. #--------------------------------------------------------------------------
143. def update
144. # Update command window
145. @command_window.update
146. if @command_window.commands == @characters and @command_window.height < @characters_height and @command_window.y > 32
147. @command_window.y -= 5
148. @command_window.height += 5
149. elsif @command_window.commands == @default and @command_window.height > 128
150. @command_window.y += 5
151. @command_window.height -= 5
152. elsif @command_window.commands == @default and @command_window.height < 128
153. @command_window.y -= 1
154. @command_window.height += 1
155. end
156. # If B button was pressed
157. if Input.trigger?(Input::B)
158. # Play cancel SE
159. $game_system.se_play($data_system.cancel_se)
160. # Switch to Default commands
161. @command_window.new_commands(@default)
162. if @continue_enabled
163. @command_window.index = 1
164. else
165. @command_window.disable_item(1)
166. end
167. end
168. # If C button was pressed
169. if Input.trigger?(Input::C)
170. # Branch by command window cursor position
171. if @command_window.commands == @characters
172. command_new_game
173. else
174. case @command_window.index
175. when 0 # New game
176. # Play decision SE
177. $game_system.se_play($data_system.decision_se)
178. # Switch to Character commands
179. @command_window.new_commands(@characters)
180. when 1 # Continue
181. command_continue
182. when 2 # Shutdown
183. command_shutdown
184. end
185. end
186. end
187. end
188. #--------------------------------------------------------------------------
189. # * Command: New Game
190. #--------------------------------------------------------------------------
191. def command_new_game
192. # Play decision SE
193. $game_system.se_play($data_system.decision_se)
194. # Stop BGM
195. Audio.bgm_stop
196. # Reset frame count for measuring play time
197. Graphics.frame_count = 0
198. # Make each type of game object
199. $game_temp = Game_Temp.new
200. $game_system = Game_System.new
201. $game_switches = Game_Switches.new
202. $game_variables = Game_Variables.new
203. $game_self_switches = Game_SelfSwitches.new
204. $game_screen = Game_Screen.new
205. $game_actors = Game_Actors.new
206. $game_party = Game_Party.new
207. $game_troop = Game_Troop.new
208. $game_map = Game_Map.new
209. $game_player = Game_Player.new
210. # Set up initial party
211. $game_party.setup_starting_members
212. $game_party.actors[0] = $game_actors[@command_window.index + 1]
213. # Set up initial map position
214. $game_map.setup($data_system.start_map_id)
215. # Move player to initial position
216. $game_player.moveto($data_system.start_x, $data_system.start_y)
217. # Refresh player
218. $game_player.refresh
219. # Run automatic change for BGM and BGS set with map
220. $game_map.autoplay
221. # Update map (run parallel process event)
222. $game_map.update
223. # Switch to map screen
224. $scene = Scene_Map.new
225. end
226. end
227.
Instruções
Você não tem que fazer alguma coisa em seguida, insira-o acima principal, ele irá, em seguida, assumirá automaticamente a cada personagem da "actores" guia no banco de dados.
Se, por outro lado, não queremos todos os actores a aparecer, editar o script na linha 10,
por exemplo, se você não quiser ator 1, 4 e 5, para serem reproduzidos, e depois editá-lo assim...
Créditos:
S.S Muu e Peazinn
Skeepy- Aldeão
- Mensagens : 25
Gold : 5237
Nível : 11
Re: Character Selector V. 1.1
Gostei mais não é muito personaizado,existe melhores, mas de qualquer maneira obrigado por postar aqui.
Re: Character Selector V. 1.1
Legal mas prefiro por eventos.
bernardo- Aprendiz
- Mensagens : 89
Gold : 5360
Nível : 14
Re: Character Selector V. 1.1
Obrigado, pessoal.
Até eu perfiro por eventos, acho muito mais legal e facil de editar.
Até eu perfiro por eventos, acho muito mais legal e facil de editar.
Skeepy- Aldeão
- Mensagens : 25
Gold : 5237
Nível : 11
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos