• Anmelden
  • »Jin Katsuro« ist der Autor dieses Themas

Motto: Ich bin Kwappa. Ich spring für meinen Bruder ein, der zurzeit für längere Zeit abwesend sein wird. Ich werde ihn also sozusagen hier vertreten. Richtet also eure Fragen bitte an den lieben, kleinen Kwappa ;-)

  • Nachricht senden

1

Donnerstag, 30. September 2010, 10:08

Characterfaces im Cybersam-Battlesystem-Skript einfügen?

Hallo, hab da mal ne Frage. Ist es denn möglich, Facesets der jeweiligen Charaktere, die im Spiel vorhanden sind, im Cybersam-Kampfsystem einzufügen? Das normale Battlesystem funktioniert ja so, dass die Battlerbilder hinter dem Namen, LP- und SPanzeige und Status angezeigt wird. Da muss es doch auch theoretisch und praktisch möglich sein, anstelle der Battlerbilder auch Facepictures dort anzuzeigen.

Hier mal ein Bild, um zu verdeutlichen, was ich meine.

Attachment 14278
Bild

2

Freitag, 1. Oktober 2010, 13:47

Füge dieses Script unter deine Cybersam Battle System Scripts ein.
Danach legst du im Graphics/Characters/ Ordner ein Faces Ordner an.Dort kommen deine Face Bilder rein.
Die Face Bilder müssen genau den gleichen Namen haben wie die Charactere im Characters Ordner die du benutzt.
z.b. Hast du im Characters Ordner den Character 001-Fighter01,dann musst du im Characters/Faces/Ordner dein
Face Bild auch 001-Fighter01 benennen.
Am besten benutzt du Bilder in 64x64 größe und natürlich in PNG Format.

Bei schwierigkeiten melde dich ruhig nochmal.

Spoiler

Ruby Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
module N01
   DISPLAY_TYPE = 0
   H_CENTRALIZE = false
  CUSTOM_STAT_POSITION = [[0,0],[8,24],[16,48],[18,72]]
  BATTLE_WINDOW_X = 0  
  BATTLE_WINDOW_Y = 320  
  BATTLE_WINDOW_W = 640   
  BATTLE_WINDOW_H = 160  
  BATTLE_WINDOW_O = 160   
  BORDER_OPACITY  = false 
  NAME_POS_X = 0     	
  NAME_POS_Y = -8     	
  NAME_TXT_FONT = "Arial" 
  NAME_TXT_SIZE = 22   
  NAME_TXT_BOLD = false   
  HP_POS_X = 0       	
  HP_POS_Y = 40       	
  HP_TXT_FONT = "Arial"   
  HP_NUM_FONT = "Arial"   
  HP_TXT_SIZE = 22  
  HP_NUM_SIZE = 22
  HP_TXT_BOLD = false 	
  HP_NUM_BOLD = false 	
  SHOW_MAX_HP_SP = true  
  SP_POS_X = 0        	
  SP_POS_Y = 64       	
  SP_TXT_FONT = "Arial"  
  SP_NUM_FONT = "Arial"   
  SP_TXT_SIZE = 22
  SP_NUM_SIZE = 22
  SP_TXT_BOLD = false	
  SP_NUM_BOLD = false	
  STATE_POS_X = 0     	
  STATE_POS_Y = 88   	
  LVL_UP_FLAG = true 	
  DRAW_LEVEL = false  	
  LVL_POS_X = 0       	
  LVL_POS_Y = 16      	
  LVL_TXT_FONT = "Arial" 
  LVL_NUM_FONT = "Arial"  
  LVL_NUM_SIZE = 22
  LVL_TXT_BOLD = false   
  LVL_NUM_BOLD = false   
  LVL_UP_MSG = "Nächster Aufstieg"
  LVL_TEXT = "LV"
  SHOW_FACES = true
  FACE_POS_X = 28 
  FACE_POS_Y = 96 
  FACE_OPACITY = 160
end
class Window_Base
   def draw_actor_name(actor, x, y)
	self.contents.font.color = normal_color
	self.contents.font.name = NAME_TXT_FONT if $game_temp.in_battle
	self.contents.font.size = NAME_TXT_SIZE if $game_temp.in_battle
	self.contents.font.bold = NAME_TXT_BOLD if $game_temp.in_battle
	self.contents.draw_text(x, y, 120, 32, actor.name)
	self.contents.font.name = Font.default_name if $game_temp.in_battle
	self.contents.font.size = Font.default_size if $game_temp.in_battle
	self.contents.font.bold = false if $game_temp.in_battle
  end
  def draw_actor_level(actor, x, y)
	self.contents.font.color = system_color
	self.contents.font.name = LVL_TXT_FONT if $game_temp.in_battle
	self.contents.font.size = LVL_TXT_SIZE if $game_temp.in_battle
	self.contents.font.bold = LVL_TXT_BOLD if $game_temp.in_battle
	self.contents.draw_text(x, y, 32, 32, LVL_TEXT)
	self.contents.font.color = normal_color
	self.contents.font.name = LVL_NUM_FONT if $game_temp.in_battle
	self.contents.font.size = LVL_NUM_SIZE if $game_temp.in_battle
	self.contents.font.bold = LVL_NUM_BOLD if $game_temp.in_battle
	self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
	self.contents.font.name = Font.default_name if $game_temp.in_battle
	self.contents.font.size = Font.default_size if $game_temp.in_battle
	self.contents.font.bold = false if $game_temp.in_battle
  end
   def draw_actor_hp(actor, x, y, width = 144)
	self.contents.font.color = system_color
	self.contents.font.name = HP_TXT_FONT if $game_temp.in_battle
	self.contents.font.size = HP_TXT_SIZE if $game_temp.in_battle
	self.contents.font.bold = HP_TXT_BOLD if $game_temp.in_battle
	self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
	if width - 32 >= 108
  	hp_x = x + width - 108
  	flag = true
	elsif width - 32 >= 48
  	hp_x = x + width - 48
  	flag = false
	end
	self.contents.font.color = actor.hp == 0 ? knockout_color :
  	actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
	self.contents.font.name = HP_NUM_FONT if $game_temp.in_battle
	self.contents.font.size = HP_NUM_SIZE if $game_temp.in_battle
	self.contents.font.bold = HP_NUM_BOLD if $game_temp.in_battle
	self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
	if flag
  	self.contents.font.color = normal_color
  	self.contents.font.name = HP_TXT_FONT if $game_temp.in_battle
  	self.contents.font.size = HP_TXT_SIZE if $game_temp.in_battle
  	self.contents.font.bold = HP_TXT_BOLD if $game_temp.in_battle
  	self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  	self.contents.font.name = HP_NUM_FONT if $game_temp.in_battle
  	self.contents.font.size = HP_NUM_SIZE if $game_temp.in_battle
  	self.contents.font.bold = HP_NUM_BOLD if $game_temp.in_battle
  	self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
	end
	self.contents.font.name = Font.default_name if $game_temp.in_battle
	self.contents.font.size = Font.default_size if $game_temp.in_battle
	self.contents.font.bold = false if $game_temp.in_battle
  end
   def draw_actor_sp(actor, x, y, width = 144)
	self.contents.font.color = system_color
	self.contents.font.name = SP_TXT_FONT if $game_temp.in_battle
	self.contents.font.size = SP_TXT_SIZE if $game_temp.in_battle
	self.contents.font.bold = SP_TXT_BOLD if $game_temp.in_battle
	self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
	if width - 32 >= 108
  	sp_x = x + width - 108
  	flag = true
	elsif width - 32 >= 48
  	sp_x = x + width - 48
  	flag = false
	end
	self.contents.font.color = actor.sp == 0 ? knockout_color :
  	actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
	self.contents.font.name = SP_NUM_FONT if $game_temp.in_battle
	self.contents.font.size = SP_NUM_SIZE if $game_temp.in_battle
	self.contents.font.bold = SP_NUM_BOLD if $game_temp.in_battle
	self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
	if flag
  	self.contents.font.color = normal_color
  	self.contents.font.name = SP_TXT_FONT if $game_temp.in_battle
  	self.contents.font.size = SP_TXT_SIZE if $game_temp.in_battle
  	self.contents.font.bold = SP_TXT_BOLD if $game_temp.in_battle
  	self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  	self.contents.font.name = SP_NUM_FONT if $game_temp.in_battle
  	self.contents.font.size = SP_NUM_SIZE if $game_temp.in_battle
  	self.contents.font.bold = SP_NUM_BOLD if $game_temp.in_battle
  	self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
	end
	self.contents.font.name = Font.default_name if $game_temp.in_battle
	self.contents.font.size = Font.default_size if $game_temp.in_battle
	self.contents.font.bold = false if $game_temp.in_battle
  end
   def draw_actor_battle_face(actor, x, y, opacity = 255)
	face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
	fw = face.width
	fh = face.height
	src_rect = Rect.new(0, 0, fw, fh)
	self.contents.blt(x - fw / 23, y - fh, face, src_rect, opacity)
  end
end
class Window_BattleStatus < Window_Base
   def initialize
	super(BATTLE_WINDOW_X, BATTLE_WINDOW_Y, BATTLE_WINDOW_W, BATTLE_WINDOW_H)
	self.contents = Bitmap.new(width - 32, height - 32)
	@level_up_flags = []
	for i in 0...$game_party.actors.size
  	@level_up_flags.push(false)
	end
	self.z = 2000
	self.back_opacity = BATTLE_WINDOW_O
	self.opacity = BATTLE_WINDOW_O if BORDER_OPACITY
	refresh
  end
	def refresh
	self.contents.clear
	@item_max = $game_party.actors.size
	for i in 0...$game_party.actors.size
  	self.contents.font.size = 22
  	w = 80 unless SHOW_MAX_HP_SP
  	w = 140 if SHOW_MAX_HP_SP
  	actor = $game_party.actors[i]
  	case DISPLAY_TYPE
  	when 0 
    	actor_x = H_CENTRALIZE ? ((624 / 4) * ((4 - $game_party.actors.size)/2.0 + i)).floor : i * 156 
    	actor_y = 0
  	when 1 
    	actor_x = 0
    	actor_y = i * 32
  	when 2 
    	actor_x = CUSTOM_STAT_POSITION[i][0]
    	actor_y = CUSTOM_STAT_POSITION[i][1]
  	end
  	draw_actor_battle_face(actor, actor_x + FACE_POS_X, actor_y + FACE_POS_Y, FACE_OPACITY)
  	draw_actor_name(actor, actor_x + NAME_POS_X, actor_y + NAME_POS_Y)
  	draw_actor_hp(actor, actor_x + HP_POS_X, actor_y + HP_POS_Y, w)
  	draw_actor_sp(actor, actor_x + SP_POS_X, actor_y + SP_POS_Y, w)
  	draw_actor_level(actor, actor_x + LVL_POS_X, actor_y + LVL_POS_Y) if DRAW_LEVEL
  	if @level_up_flags[i] and LVL_UP_FLAG
    	self.contents.font.color = normal_color
    	self.contents.draw_text(actor_x + STATE_POS_X, actor_y + STATE_POS_Y, 120, 32, LVL_UP_MSG )
  	else
    	draw_actor_state(actor, actor_x + STATE_POS_X, actor_y + STATE_POS_Y)
  	end
	end
  end
   def update
	super
  end
end
 
class Game_Troop
  def clear_actions
	for enemies in @enemies
  	enemies.current_action.clear
	end
  end
end
class Window_Base < Window
	include N01
	def draw_actor_state(actor, x, y, width = 0)
	status_icon = []
	for i in actor.states
  	if $data_states[i].rating >= 1
    	begin
      	status_icon.push(RPG::Cache.icon($data_states[i].name + "_st"))
      	break if status_icon.size > (Icon_max - 1)
    	rescue
    	end
  	end
	end
	for icon in status_icon
  	self.contents.blt(x + X_Adjust, y + Y_Adjust + 4, icon, Rect.new(0, 0, Icon_X, Icon_Y), 255)
  	x += Icon_X + 2
	end
  end
end
zum Lesen den Text mit der Maus markieren


MFG
Realität ist auch nur eine Art von Rollenspiel.

  • »Jin Katsuro« ist der Autor dieses Themas

Motto: Ich bin Kwappa. Ich spring für meinen Bruder ein, der zurzeit für längere Zeit abwesend sein wird. Ich werde ihn also sozusagen hier vertreten. Richtet also eure Fragen bitte an den lieben, kleinen Kwappa ;-)

  • Nachricht senden

3

Freitag, 1. Oktober 2010, 23:19

Ah, sorry. Hab vergessen, dass das Script für den RPG Maker XP sein soll. Oder ist das egal? Funktioniert das auch auf dem XP? Weil ich habs grad getestet und es wird leider kein Face im Kampf angezeigt :(

Edit Halt!!! Ich hab das Programm mal kurz eben geschlossen und dann wieder geöffnet. Und jetzt gehts. Danke dir für deine Hilfe Asandril.
Bild

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Gjorsch« (2. Oktober 2010, 12:15)


Ähnliche Themen

Social Bookmarks