Day.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Jeux: Final Fantasy 2.0 / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

390 connectés actuellement

29189966 visiteurs
depuis l'ouverture

5017 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Level Up!

Le Temple de Valor

ConsoleFun

RPG Maker Détente

Lumen

Tous nos partenaires

Devenir
partenaire



Mode07 on the Map! 0.6

Ajoute un effet de profondeur sur une carte de votre choix.

Script pour RPG Maker XP
Ecrit par mewsterus
Publié par Pixelvengeur360! (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur: mewsterus
Logiciel : RPG Maker XP
Nombre de scripts : 1
Source : RPG Creative (?)

Fonctionnalités
- Ajoute un effet de profondeur sur les maps souhaitées.
- Option pour modifier la largeur et la hauteur de l'effet (pas la résolution).
- Option pour modifier le zoom.
- Option pour améliorer les performances en jeu sur les cartes concernées.
- Option pour incurver la map.

Installation
A placer au-dessus de Main.
Si vous utilisiez une version antérieure de ce script, vous devrez réinstaller une version non touchée de Spriteset_Map (les versions antérieures amenaient à la modification de ce script).

Utilisation
- pour activer le mode, ajoute [#XX] dans le nom de la map, remplacer les X pour le pourcentage à appliquer.
ex: Overworld[#40] c'est comme le screen
- pour redimensionner les sprites sur la map ajouter [OV] au nom de la map. cela va rendre les sprites plus petits sur la map.
- pour ajouter un ciel, utilisez un panorama

Dans le script, vous pouvez configurer cette portion de code :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
$width = 640 # Screen width (will not change resolution, 
$height = 480 # Screen height here for compatibility) 
$ov_zoom = 0.6 # Overworld zoom multiplier 
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less. 
# Recommended that this number be a power of 2. 
# Do not make higher than 64. 
$curve = true # Whether the map is curled, for overworlds (old method) 



Limitations

Passage004 a dit:


- Il tue une bonne partie des chipsets de la map.
- Les événements ne suivent pas les mouvements définis.
- Certains objets parmi lesquels on doit passer en dessous nous font passer au dessus...
-Des traces bizarres qui s'incrustent dans l'écran parfois...



Portion de code : Tout sélectionner

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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
=begin 
 
Mode07 on the Map! 
Includes: 
Mode07 v0.6 
Overworld Sprite Resize 
Written by mewsterus 
 
Special Thanks: 
Fanha Giang (for a reverse engineered Tilemap class) 
-------------------------------------------------------------------------------- 
Instructions: 
-------------------------------------------------------------------------------- 
To install, just insert this in a descriptive code slot right above Main. 
This is different than previous instructions; please read the next paragraph. 
 
If you had a previous install of this script and need an original version of 
Spriteset_Map, one can be found at: 
https://www.rpg-palace.com/scripts/spriteset_map.txt 
 
To activate Mode07, add [#XX] to the map's name, replacing XX with the 
percentage of Mode07 to apply. Greater numbers will result in a more slanted 
world. 
 
To activate overworld sprite resize, add [OV] to the map's name. This will make 
sprites smaller on that map. 
 
For the purposes of location scripts, these identifiers will not appear. 
 
 
Examples: 
 
"Overworld[#40]" will result in a slant identical to the second screenshot. 
"Underworld[OV]" will resize only the player character to a small size, as if 
seen from high above. 
"Atthelevelworld[OV][#12]" will result in the player being resized, and a modest 
slant of 12% 
"JustPlainWorld" will result in the same old map you've always seen. 
 
To add a sky, simply use the panorama with the tileset. Also, events will not 
be drawn flat with the map. Any vertical objects such as trees should be put 
in events and displayed that way. 
 
You can also add a sky by adding a fog. If you add this, you can make it look 
like the first screenshot. 
 
A note on the $strip_size variable; the default value is 8, however there is 
extremely minimal, almost nonexistant lag with 16. The screen is extremely 
smooth with 4, or even 2. If you're having major problems with lag, you may 
need to use 32, but it won't look too pretty. 
-------------------------------------------------------------------------------- 
* Draw_Tilemap v1.72-0.6 
Fanha Giang, 02/12/2006 (mm/dd/yyyy) 
Edited for Mode07 by mewsterus 08/08/2006 (mm/dd/yyyy) 
=end 
#=============================================================================== 
$width = 640 # Screen width (will not change resolution, 
$height = 480 # Screen height here for compatibility) 
$ov_zoom = 0.6 # Overworld zoom multiplier 
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less. 
# Recommended that this number be a power of 2. 
# Do not make higher than 64. 
$curve = true # Whether the map is curled, for overworlds (old method) 
$data_map = load_data("Data/MapInfos.rxdata") 
#=============================================================================== 
class RPG::MapInfo 
def name # Definition prevents location scripts from reading anything within 
return @name.gsub(/\[.*\]/) {""} # brackets, including the brackets 
end 
#----------------------------------------------------------------------------- 
def original_name 
return @name 
end 
#----------------------------------------------------------------------------- 
def overworld? 
return @name.scan(/[OV]/).size > 0 
end 
#----------------------------------------------------------------------------- 
def pitch 
@name =~ /\[#[ ]*([00-99]+)\]/i 
return $1 
end 
end 
#=============================================================================== 
class Draw_Tilemap # This class controls a set of sprites, with different Z 
# values, arranged into horizontal bars 
attr_accessor :tileset 
attr_accessor :map_data 
attr_accessor :priorities 
attr_accessor :autotiles 
attr_accessor :bitmaps 
attr_accessor :pitch 
attr_accessor :ox 
attr_accessor :oy 
attr_accessor :plus_y 
INDEX = # Autotile definitions 
[ 
26, 27, 32, 33, 4, 27, 32, 33, 26, 5, 32, 33, 4, 5, 32, 33, 
26, 27, 32, 11, 4, 27, 32, 11, 26, 5, 32, 11, 4, 5, 32, 11, 
26, 27, 10, 33, 4, 27, 10, 33, 26, 5, 10, 33, 4, 5, 10, 33, 
26, 27, 10, 11, 4, 27, 10, 11, 26, 5, 10, 11, 4, 5, 10, 11, 
24, 25, 30, 31, 24, 5, 30, 31, 24, 25, 30, 11, 24, 5, 30, 11, 
14, 15, 20, 21, 14, 15, 20, 11, 14, 15, 10, 21, 14, 15, 10, 11, 
28, 29, 34, 35, 28, 29, 10, 35, 4, 29, 34, 35, 4, 29, 10, 35, 
38, 39, 44, 45, 4, 39, 44, 45, 38, 5, 44, 45, 4, 5, 44, 45, 
24, 29, 30, 35, 14, 15, 44, 45, 12, 13, 18 ,19, 12, 13, 18, 11, 
16, 17, 22, 23, 16, 17, 10, 23, 40, 41, 46, 47, 4, 41, 46, 47, 
36, 37, 42, 43, 36, 5, 42, 43, 12, 17, 18, 23, 12, 13, 42, 43, 
36, 41, 42, 47, 16, 17, 46, 47, 12, 17, 42, 47, 0, 1, 6, 7 
] 
X = [0, 1, 0, 1] # Used in 16x16 autotile drawing; left, right, left, right 
Y = [0, 0, 1, 1] # Used in 16x16 autotile drawing; up, up, down, down 
#----------------------------------------------------------------------------- 
def initialize 
# Get initial data from Game_Map 
@tileset = RPG::Cache.tileset($game_map.tileset_name) 
@map_data = $game_map.data 
@priorities = $game_map.priorities 
@autotiles = [] 
for i in 0..6 
@autotiles[i] = RPG::Cache.autotile($game_map.autotile_names[i]) 
end 
# Provide blank data in proper object form 
@ox = 0 
@oy = 0 
# Bitmaps used for each priority's drawing. Priorities 2-5 are combined. 
@bitmaps = [Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size), 
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size), 
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size)] 
# Generate blank sprites 
@sprites = [[], [], []] 
for i in 0..2 # For each layer 
for j in 0..$game_map.height * (32 / $strip_size) - 1 
# For each horizontal strip of $strip_size height, make a blank sprite 
@sprites[i].push(Sprite.new) 
@sprites[i][j].bitmap = Bitmap.new($game_map.width*32, $strip_size*2) 
@sprites[i][j].x = $width / 2 
@sprites[i][j].y = -64 
@sprites[i][j].z = -5 + (i * 10) 
end 
end 
@disposed = false 
draw 
end 
#----------------------------------------------------------------------------- 
def update 
# Retrieve variable values for slant drawing; these values accesible by event 
@pitch = $game_map.pitch.to_f 
@plus_y = $game_map.plus_y 
for i in 0..2 # For each layer 
for j in [0, (($height / 2) - (($height * 60) / 
@pitch) + @oy) / $strip_size].max.to_i..[@sprites[i].size - 1, 
(@oy + $height) / $strip_size].min.to_i 
# For each strip within the visible screen, update OX/Y 
@sprites[i][j].x = $width / 2 
@sprites[i][j].y = j * $strip_size - @oy 
unless @pitch == 0 # Apply X Zoom 
@sprites[i][j].zoom_x = (@sprites[i][j].y - $height / 2) * 
(@pitch / ($height * 25)) + 1 
if $curve # Zoom Y values same as X, and compensate 
@sprites[i][j].zoom_y = @sprites[i][j].zoom_x 
@sprites[i][j].y += $strip_size * (1 - @sprites[i][j].zoom_y) * 
((1 - @sprites[i][j].zoom_y) / 
(2 * ((@pitch / 100) / 
($height / ($strip_size * 2)))) + 0.5) 
end 
end 
@sprites[i][j].ox = @ox + $width / 2 
# Add plus_y value; used in airship script 
@sprites[i][j].y += @plus_y 
end 
end 
end 
#----------------------------------------------------------------------------- 
def dispose 
# Dispose all sprites 
for i in 0..2 
for j in @sprites[i] 
j.bitmap.dispose 
j.dispose 
end 
end 
for i in @bitmaps 
i.dispose 
end 
@tileset.dispose 
for i in 0..6 
@autotiles[i].dispose 
end 
@disposed = true 
end 
#----------------------------------------------------------------------------- 
def disposed? 
return @disposed 
end 
#----------------------------------------------------------------------------- 
def draw 
# Draw each individual position by XY value 
for x in 0...@map_data.xsize 
for y in 0...@map_data.ysize 
draw_position(x, y) 
end 
end 
for i in 0..2 # For each priority 
for j in 0..@sprites[i].size - 1 
# For each horizontal strip, transfer the bitmap appropriately 
@sprites[i][j].bitmap.blt(0, 0, @bitmaps[i], 
Rect.new(0, j * $strip_size, $game_map.width * 32, $strip_size * 2)) 
end 
end 
end 
#----------------------------------------------------------------------------- 
def draw_position(x, y) 
for layer in 0..2 
pos = @map_data[x, y, layer] 
@priorities[pos] = 2 if @priorities[pos] > 2 # Round priorities down to 2 
if pos >= 384 # If it is a tile 
# src_rect = 32x32 Rect on the tileset for source bitmap 
src_rect = Rect.new(((pos-384)%8)*32, ((pos-384)/8)*32, 32, 32) 
# Transfer source bitmap on the tileset to the current map tile 
@bitmaps[@priorities[pos]].blt(x * 32, y * 32, @tileset, src_rect) 
elsif pos >= 48 and pos < 384 # If it is an autotile 
id = pos / 48 - 1 # Which autotile is used (0-6) 
# plus_x is in development for animated autotiles 
plus_x = 0 #((@anim / 4) % (@autotiles[id].width / 96)) * 96 
for corner in 0..3 
h = 4 * (pos % 48) + corner # Used to access INDEX 
# src_rect = 16x16 Rect on the autotile for source bitmap 
src_rect = Rect.new((INDEX[h]%6)*16+plus_x, (INDEX[h]/6)*16, 16, 16) 
# Transfer source bitmap on the autotile to the current 16x16 tile 
@bitmaps[@priorities[pos]].blt(x*32+X[corner]*16, y*32+Y[corner]*16, 
@autotiles[id], src_rect) 
end 
end 
end 
end 
end 
#=============================================================================== 
class Game_Map 
attr_accessor :pitch 
attr_accessor :plus_y 
#----------------------------------------------------------------------------- 
alias setup_or :setup 
def setup(map_id) 
setup_or(map_id) 
@pitch = $data_map[$game_map.map_id].pitch 
@plus_y = 0 
end 
#----------------------------------------------------------------------------- 
def name 
return $data_map[@map_id].name 
end 
end 
#=============================================================================== 
class Sprite_Character < RPG::Sprite 
attr_accessor :character 
#----------------------------------------------------------------------------- 
def initialize(character = nil) 
super() 
@character = character 
update 
end 
#----------------------------------------------------------------------------- 
alias update_or :update 
def update 
update_or 
# Update pitch value, and update zoom values to match 
@pitch = $data_map[$game_map.map_id].pitch.to_f 
self.zoom_x = 
self.zoom_y = ((@character.screen_y - 16) - ($height / 2)) * 
(@pitch / ($height * 25)) + 1 
# Set sprite coordinates. X value is multiplied by zoom value from the center 
self.x = ($width / 2) + ((@character.screen_x - ($width / 2)) * self.zoom_x) 
self.y = @character.screen_y 
# Add Y value for zoom compensation while in curve mode 
if $curve and @pitch != 0 
self.y += (8 * (1 - self.zoom_y) * ((1 - self.zoom_y) / 
(2 * ((@pitch / 100) / ($height / 16.0))) + 0.5)) 
end 
# Add plus_y value; used in airship script 
self.y += $game_map.plus_y unless @character.is_a?(Game_Player) 
self.z = @character.screen_z(@ch) - (self.zoom_y < 0.5 ? 1000 : 0) 
if $data_map[$game_map.map_id].overworld? and 
@character.is_a?(Game_Player) # Multiply zoom by Overworld factor if 
self.zoom_x *= $ov_zoom # the map is marked with [OV] and event 
self.zoom_y *= $ov_zoom # is a Game_Player 
end 
end 
end 
#=============================================================================== 
class Spriteset_Map 
def initialize 
# Make viewports 
@viewport1 = Viewport.new(0, 0, 640, 480) 
@viewport2 = Viewport.new(0, 0, 640, 480) 
@viewport3 = Viewport.new(0, 0, 640, 480) 
@viewport2.z = 2000 
@viewport3.z = 5000 
# Make tilemap 
@tilemap = Draw_Tilemap.new 
# Make panorama plane 
@panorama = Plane.new 
@panorama.z = -2000 
# Make fog plane 
@fog = Plane.new 
@fog.z = 3000 
# Make character sprites 
@character_sprites = [] 
for i in $game_map.events.keys.sort 
sprite = Sprite_Character.new($game_map.events[i]) 
@character_sprites.push(sprite) 
end 
@character_sprites.push(Sprite_Character.new($game_player)) 
# Make weather 
@weather = RPG::Weather.new(@viewport1) 
# Make picture sprites 
@picture_sprites = [] 
for i in 1..50 
@picture_sprites.push(Sprite_Picture.new(@viewport2, 
$game_screen.pictures[i])) 
end 
# Make timer sprite 
@timer_sprite = Sprite_Timer.new 
# Frame update 
update 
end 
#----------------------------------------------------------------------------- 
def dispose 
# Dispose of tilemap 
@tilemap.dispose 
# Dispose of panorama plane 
@panorama.dispose 
# Dispose of fog plane 
@fog.dispose 
# Dispose of character sprites 
for sprite in @character_sprites 
sprite.dispose 
end 
# Dispose of weather 
@weather.dispose 
# Dispose of picture sprites 
for sprite in @picture_sprites 
sprite.dispose 
end 
# Dispose of timer sprite 
@timer_sprite.dispose 
# Dispose of viewports 
@viewport1.dispose 
@viewport2.dispose 
@viewport3.dispose 
end 
end




Mis à jour le 18 novembre 2020.






roi de poloterre - posté le 01/08/2008 à 16:23:14 (55 messages postés)

❤ 0

Il y a une erreur je crois...

"undefined local variable or method "langueriorities" for Draw_Tilemap:Class

J'aurais bien corrigé, mais j'ai aucune idée d'où se trouve cette classe et j'ai pas beaucoup de temps^^

EDIT : ligne 89, il manque un ":"

EDIT 2 : ah ben non, c'était les smiley^^ désolé...

EDIT 3 : Mais il est truffé d'erreurs ton script!!! Ben dis donc, tu as du :joint en le corrigeant^^

Tu ne parviens pas à comprendre ce que j'écris? T'inquiète pas, moi non plus!


J'aide ^^ (visiteur non enregistré) - posté le 30/08/2008 à 18:04:37

❤ 0

remplace les " Tirelalangue " par " :p " ^^

Aussi simple que ça :D


dash34 - posté le 06/12/2008 à 15:56:53 (2 messages postés)

❤ 0

voila j'ai corigé le script il marche parfaitement

Portion de code : Tout sélectionner

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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
=begin 
 
Mode07 on the Map! 
Includes: 
Mode07 v0.6 
Overworld Sprite Resize 
Written by mewsterus 
 
Special Thanks: 
Fanha Giang (for a reverse engineered Tilemap class) 
-------------------------------------------------------------------------------- 
Instructions: 
-------------------------------------------------------------------------------- 
To install, just insert this in a descriptive code slot right above Main. 
This is different than previous instructions; please read the next paragraph. 
 
If you had a previous install of this script and need an original version of 
Spriteset_Map, one can be found at: 
http://www.rpg-palace.com/scripts/spriteset_map.txt 
 
To activate Mode07, add [#XX] to the map's name, replacing XX with the 
percentage of Mode07 to apply. Greater numbers will result in a more slanted 
world. 
 
To activate overworld sprite resize, add [OV] to the map's name. This will make 
sprites smaller on that map. 
 
For the purposes of location scripts, these identifiers will not appear. 
 
 
Examples: 
 
"Overworld[#40]" will result in a slant identical to the second screenshot. 
"Underworld[OV]" will resize only the player character to a small size, as if 
seen from high above. 
"Atthelevelworld[OV][#12]" will result in the player being resized, and a modest 
slant of 12% 
"JustPlainWorld" will result in the same old map you've always seen. 
 
To add a sky, simply use the panorama with the tileset. Also, events will not 
be drawn flat with the map. Any vertical objects such as trees should be put 
in events and displayed that way. 
 
You can also add a sky by adding a fog. If you add this, you can make it look 
like the first screenshot. 
 
A note on the $strip_size variable; the default value is 8, however there is 
extremely minimal, almost nonexistant lag with 16. The screen is extremely 
smooth with 4, or even 2. If you're having major problems with lag, you may 
need to use 32, but it won't look too pretty. 
-------------------------------------------------------------------------------- 
* Draw_Tilemap v1.72-0.6 
Fanha Giang, 02/12/2006 (mm/dd/yyyy) 
Edited for Mode07 by mewsterus 08/08/2006 (mm/dd/yyyy) 
=end 
#=============================================================================== 
$width = 640 # Screen width (will not change resolution, 
$height = 480 # Screen height here for compatibility) 
$ov_zoom = 0.6 # Overworld zoom multiplier 
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less. 
# Recommended that this number be a power of 2. 
# Do not make higher than 64. 
$curve = true # Whether the map is curled, for overworlds (old method) 
$data_map = load_data("Data/MapInfos.rxdata") 
#=============================================================================== 
class RPG::MapInfo 
def name # Definition prevents location scripts from reading anything within 
return @name.gsub(/\[.*\]/) {""} # brackets, including the brackets 
end 
#----------------------------------------------------------------------------- 
def original_name 
return @name 
end 
#----------------------------------------------------------------------------- 
def overworld? 
return @name.scan(/[OV]/).size > 0 
end 
#----------------------------------------------------------------------------- 
def pitch 
@name =~ /\[#[ ]*([00-99]+)\]/i 
return $1 
end 
end 
#=============================================================================== 
class Draw_Tilemap # This class controls a set of sprites, with different Z 
# values, arranged into horizontal bars 
attr_accessor :tileset 
attr_accessor :map_data 
attr_accessor :priorities 
attr_accessor :autotiles 
attr_accessor :bitmaps 
attr_accessor :pitch 
attr_accessor :ox 
attr_accessor :oy 
attr_accessor :plus_y 
INDEX = # Autotile definitions 
[ 
26, 27, 32, 33, 4, 27, 32, 33, 26, 5, 32, 33, 4, 5, 32, 33, 
26, 27, 32, 11, 4, 27, 32, 11, 26, 5, 32, 11, 4, 5, 32, 11, 
26, 27, 10, 33, 4, 27, 10, 33, 26, 5, 10, 33, 4, 5, 10, 33, 
26, 27, 10, 11, 4, 27, 10, 11, 26, 5, 10, 11, 4, 5, 10, 11, 
24, 25, 30, 31, 24, 5, 30, 31, 24, 25, 30, 11, 24, 5, 30, 11, 
14, 15, 20, 21, 14, 15, 20, 11, 14, 15, 10, 21, 14, 15, 10, 11, 
28, 29, 34, 35, 28, 29, 10, 35, 4, 29, 34, 35, 4, 29, 10, 35, 
38, 39, 44, 45, 4, 39, 44, 45, 38, 5, 44, 45, 4, 5, 44, 45, 
24, 29, 30, 35, 14, 15, 44, 45, 12, 13, 18 ,19, 12, 13, 18, 11, 
16, 17, 22, 23, 16, 17, 10, 23, 40, 41, 46, 47, 4, 41, 46, 47, 
36, 37, 42, 43, 36, 5, 42, 43, 12, 17, 18, 23, 12, 13, 42, 43, 
36, 41, 42, 47, 16, 17, 46, 47, 12, 17, 42, 47, 0, 1, 6, 7 
] 
X = [0, 1, 0, 1] # Used in 16x16 autotile drawing; left, right, left, right 
Y = [0, 0, 1, 1] # Used in 16x16 autotile drawing; up, up, down, down 
#----------------------------------------------------------------------------- 
def initialize 
# Get initial data from Game_Map 
@tileset = RPG::Cache.tileset($game_map.tileset_name) 
@map_data = $game_map.data 
@priorities = $game_map.priorities 
@autotiles = [] 
for i in 0..6 
@autotiles[i] = RPG::Cache.autotile($game_map.autotile_names[i]) 
end 
# Provide blank data in proper object form 
@ox = 0 
@oy = 0 
# Bitmaps used for each priority's drawing. Priorities 2-5 are combined. 
@bitmaps = [Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size), 
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size), 
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size)] 
# Generate blank sprites 
@sprites = [[], [], []] 
for i in 0..2 # For each layer 
for j in 0..$game_map.height * (32 / $strip_size) - 1 
# For each horizontal strip of $strip_size height, make a blank sprite 
@sprites[i].push(Sprite.new) 
@sprites[i][j].bitmap = Bitmap.new($game_map.width*32, $strip_size*2) 
@sprites[i][j].x = $width / 2 
@sprites[i][j].y = -64 
@sprites[i][j].z = -5 + (i * 10) 
end 
end 
@disposed = false 
draw 
end 
#----------------------------------------------------------------------------- 
def update 
# Retrieve variable values for slant drawing; these values accesible by event 
@pitch = $game_map.pitch.to_f 
@plus_y = $game_map.plus_y 
for i in 0..2 # For each layer 
for j in [0, (($height / 2) - (($height * 60) / 
@pitch) + @oy) / $strip_size].max.to_i..[@sprites[i].size - 1, 
(@oy + $height) / $strip_size].min.to_i 
# For each strip within the visible screen, update OX/Y 
@sprites[i][j].x = $width / 2 
@sprites[i][j].y = j * $strip_size - @oy 
unless @pitch == 0 # Apply X Zoom 
@sprites[i][j].zoom_x = (@sprites[i][j].y - $height / 2) * 
(@pitch / ($height * 25)) + 1 
if $curve # Zoom Y values same as X, and compensate 
@sprites[i][j].zoom_y = @sprites[i][j].zoom_x 
@sprites[i][j].y += $strip_size * (1 - @sprites[i][j].zoom_y) * 
((1 - @sprites[i][j].zoom_y) / 
(2 * ((@pitch / 100) / 
($height / ($strip_size * 2)))) + 0.5) 
end 
end 
@sprites[i][j].ox = @ox + $width / 2 
# Add plus_y value; used in airship script 
@sprites[i][j].y += @plus_y 
end 
end 
end 
#----------------------------------------------------------------------------- 
def dispose 
# Dispose all sprites 
for i in 0..2 
for j in @sprites[i] 
j.bitmap.dispose 
j.dispose 
end 
end 
for i in @bitmaps 
i.dispose 
end 
@tileset.dispose 
for i in 0..6 
@autotiles[i].dispose 
end 
@disposed = true 
end 
#----------------------------------------------------------------------------- 
def disposed? 
return @disposed 
end 
#----------------------------------------------------------------------------- 
def draw 
# Draw each individual position by XY value 
for x in 0...@map_data.xsize 
for y in 0...@map_data.ysize 
draw_position(x, y) 
end 
end 
for i in 0..2 # For each priority 
for j in 0..@sprites[i].size - 1 
# For each horizontal strip, transfer the bitmap appropriately 
@sprites[i][j].bitmap.blt(0, 0, @bitmaps[i], 
Rect.new(0, j * $strip_size, $game_map.width * 32, $strip_size * 2)) 
end 
end 
end 
#----------------------------------------------------------------------------- 
def draw_position(x, y) 
for layer in 0..2 
pos = @map_data[x, y, layer] 
@priorities[pos] = 2 if @priorities[pos] > 2 # Round priorities down to 2 
if pos >= 384 # If it is a tile 
# src_rect = 32x32 Rect on the tileset for source bitmap 
src_rect = Rect.new(((pos-384)%8)*32, ((pos-384)/8)*32, 32, 32) 
# Transfer source bitmap on the tileset to the current map tile 
@bitmaps[@priorities[pos]].blt(x * 32, y * 32, @tileset, src_rect) 
elsif pos >= 48 and pos < 384 # If it is an autotile 
id = pos / 48 - 1 # Which autotile is used (0-6) 
# plus_x is in development for animated autotiles 
plus_x = 0 #((@anim / 4) % (@autotiles[id].width / 96)) * 96 
for corner in 0..3 
h = 4 * (pos % 48) + corner # Used to access INDEX 
# src_rect = 16x16 Rect on the autotile for source bitmap 
src_rect = Rect.new((INDEX[h]%6)*16+plus_x, (INDEX[h]/6)*16, 16, 16) 
# Transfer source bitmap on the autotile to the current 16x16 tile 
@bitmaps[@priorities[pos]].blt(x*32+X[corner]*16, y*32+Y[corner]*16, 
@autotiles[id], src_rect) 
end 
end 
end 
end 
end 
#=============================================================================== 
class Game_Map 
attr_accessor :pitch 
attr_accessor :plus_y 
#----------------------------------------------------------------------------- 
alias setup_or :setup 
def setup(map_id) 
setup_or(map_id) 
@pitch = $data_map[$game_map.map_id].pitch 
@plus_y = 0 
end 
#----------------------------------------------------------------------------- 
def name 
return $data_map[@map_id].name 
end 
end 
#=============================================================================== 
class Sprite_Character < RPG::Sprite 
attr_accessor :character 
#----------------------------------------------------------------------------- 
def initialize(character = nil) 
super() 
@character = character 
update 
end 
#----------------------------------------------------------------------------- 
alias update_or :update 
def update 
update_or 
# Update pitch value, and update zoom values to match 
@pitch = $data_map[$game_map.map_id].pitch.to_f 
self.zoom_x = 
self.zoom_y = ((@character.screen_y - 16) - ($height / 2)) * 
(@pitch / ($height * 25)) + 1 
# Set sprite coordinates. X value is multiplied by zoom value from the center 
self.x = ($width / 2) + ((@character.screen_x - ($width / 2)) * self.zoom_x) 
self.y = @character.screen_y 
# Add Y value for zoom compensation while in curve mode 
if $curve and @pitch != 0 
self.y += (8 * (1 - self.zoom_y) * ((1 - self.zoom_y) / 
(2 * ((@pitch / 100) / ($height / 16.0))) + 0.5)) 
end 
# Add plus_y value; used in airship script 
self.y += $game_map.plus_y unless @character.is_a?(Game_Player) 
self.z = @character.screen_z(@ch) - (self.zoom_y < 0.5 ? 1000 : 0) 
if $data_map[$game_map.map_id].overworld? and 
@character.is_a?(Game_Player) # Multiply zoom by Overworld factor if 
self.zoom_x *= $ov_zoom # the map is marked with [OV] and event 
self.zoom_y *= $ov_zoom # is a Game_Player 
end 
end 
end 
#=============================================================================== 
class Spriteset_Map 
def initialize 
# Make viewports 
@viewport1 = Viewport.new(0, 0, 640, 480) 
@viewport2 = Viewport.new(0, 0, 640, 480) 
@viewport3 = Viewport.new(0, 0, 640, 480) 
@viewport2.z = 2000 
@viewport3.z = 5000 
# Make tilemap 
@tilemap = Draw_Tilemap.new 
# Make panorama plane 
@panorama = Plane.new 
@panorama.z = -2000 
# Make fog plane 
@fog = Plane.new 
@fog.z = 3000 
# Make character sprites 
@character_sprites = [] 
for i in $game_map.events.keys.sort 
sprite = Sprite_Character.new($game_map.events[i]) 
@character_sprites.push(sprite) 
end 
@character_sprites.push(Sprite_Character.new($game_player)) 
# Make weather 
@weather = RPG::Weather.new(@viewport1) 
# Make picture sprites 
@picture_sprites = [] 
for i in 1..50 
@picture_sprites.push(Sprite_Picture.new(@viewport2, 
$game_screen.pictures[i])) 
end 
# Make timer sprite 
@timer_sprite = Sprite_Timer.new 
# Frame update 
update 
end 
#----------------------------------------------------------------------------- 
def dispose 
# Dispose of tilemap 
@tilemap.dispose 
# Dispose of panorama plane 
@panorama.dispose 
# Dispose of fog plane 
@fog.dispose 
# Dispose of character sprites 
for sprite in @character_sprites 
sprite.dispose 
end 
# Dispose of weather 
@weather.dispose 
# Dispose of picture sprites 
for sprite in @picture_sprites 
sprite.dispose 
end 
# Dispose of timer sprite 
@timer_sprite.dispose 
# Dispose of viewports 
@viewport1.dispose 
@viewport2.dispose 
@viewport3.dispose 
end 
end
 




guizmodu64 - posté le 07/01/2009 à 19:58:55 (488 messages postés)

❤ 0

revenant des vivant.

génial le script.
Mais faudrai m'aider:
Je cherchait un script pour faire une map en relief, un peu comme ca,
mais en forme arrondi, c'est à dire que se serai arrondi vers le bas de la map sur les cotés, pour que ca donne l'impression qu'on marche sur une toute petite planète. Et je me suis dit que se serait possible de faire cet effet en modifiant ce script. mais je suis nul en Ruby. esqueu quelqu'un ou l'auteur du script pense que c'est possible? :grossourire

g fait un apercu avec photoshop , c'est un peut ca que je cherche :

image

Galfart.fr || « L'humanité souffre exactement autant aujourd'hui qu'elle a toujours souffert, elle l'a raffiné et s'illusionne sur son état... c'est la seule différence... » R.Steiner


Alemphkujo - posté le 02/03/2009 à 20:03:29 (21 messages postés)

❤ 0

Un cartomancien, c'est pas un vieux qui joue aux cartes, OK ?

Super comme script !(un grand merci surtout à Dash34 de l'avoir corrigé ^^)
C'est juste que ça salope un peu les chipsets et ça fait un peu moche. Moi je trouve qu'il faudrait développer l'idée d'une map 3D comme ça :D

Si vous piquez son coeur au trèfle, tenez vous à carreaux !


hugouest - posté le 27/11/2009 à 22:41:32 (1 messages postés)

❤ 0

Génial,mais se serait bien que les tiles soit en 3D:D


Passage004 - posté le 29/04/2010 à 22:38:31 (95 messages postés)

❤ 0

Projet en cours...

Ce script n'est pas encore fonctionel.

-Il tue une bonne partie des chipsets de la map.
-Les evenements mouvants ne suivent pas leurs mouvement demandés
-Certains objets parmis lesquels on doit passer en dessous nous font passer au dessus...
-Des traces bizzares qui s'incrustent dans l'ecran parfois...

Dommage, ce script a un gros potentiel :o

Créer un RPG c'est bien...le terminer c'est mieux T_T ...


Rienzan - posté le 02/01/2011 à 16:54:39 (2 messages postés)

❤ 0

j'ai vu le même script sur power rpg^^
XD


Ztaitrix - posté le 07/08/2011 à 13:17:31 (7 messages postés)

❤ 0

Je suis un SUPER FRERE SMASHEUR

C'est SUPER!Merci à l'auteur et félicitations à Dash34 qu'il l'a corrigé :biere:sonic:plusun:banane:sonic:banane:sonic;)

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers