[RGSS] Pegadas na Neve

Fórum para a postagem de tutoriais e dúvidas de Rpg Maker XP, VX e VX Ace.
Responder
Regis X
Membro (Soldado)
Mensagens: 76
Registrado em: Qui Jun 29, 2006 12:48 pm
Maker Preferido: Rpg Maker 2003
Contato:

Mensagem por Regis X » Sex Jun 30, 2006 10:55 am

[center]<span style='color:navy'><span style='font-size:21pt;line-height:100%'>Pegadas na Neve</span></span>[/center]

Feito por: <span style='color:purple'>Wachunga</span>
Formatado por: <span style='color:purple'>Darkjouse</span>
Nivel: <span style='color:purple'>Intermediario</span>
Ano: <span style='color:purple'>2005</span>

<span style='color:green'><span style='font-size:12pt;line-height:100%'>Começando</span></span>

Coloque na sua pasta TILESETS:
Imagem
(o nome desse imagem tem q ser "footprints_default")

<span style='color:red'>Coloque o script acima do MAIN:</span>

[codebox]=begin
============
Dynamic Footprints - version 0.95 (2005-11-06)
============
by Wachunga

SETUP:
1) From the database (Tileset tab), give the appropriate tiles of any
tilesets that you want to show footprints (e.g. sand in "Desert",
snow in "Snow Field") the terrain tag 1.
2) Place the footprints file in the Graphics/Tilesets folder.

To prevent an event from having any footprints (e.g. birds), include <nofp>
somewhere in its name.

(If using non-RTP sprites, you may want to create customized footprints.)

FEATURES:
* customizable duration footprint fading (optional)
* direction-specific footprints (optional)
* rounded footprints paths
* overlapping footprints supported
* handles move events (jumping, speed changes, etc) and teleportation

COMPATIBILITY:
1) Cogwheel's Pixel Movement script - unfortunately, pixel movement by its
very nature isn't very compatible with footprints (at least with such
a tile-based approach, though I'm not sure how else you'd ever manage it)
because a character can move part way across a tile without footprints
appearing. Then, as the character crosses the tile boundary, this script
makes the footprints appear fine, but it just doesn't look nice: the
footprints appear to be delayed because of the pixel-by-pixel movement.

2) Fukuyama's Caterpillar script - to only have one set of footprints
for the whole group, no modifications are necessary (just make sure his
script is above this one). To have a separate (overlapping) set of
footprints for each character, uncomment (by moving the "= end") the
following lines:

module Train_Actor
class Game_Party_Actor < Game_Character
def move_down(turn_enabled = true)
if turn_enabled
turn_down
end
if passable?(@x, @y, Input::DOWN)
turn_down
@y += 1
increase_steps
end
end
def move_left(turn_enabled = true)
if turn_enabled
turn_left
end
if passable?(@x, @y, Input::LEFT)
turn_left
@x -= 1
increase_steps
end
end
def move_right(turn_enabled = true)
if turn_enabled
turn_right
end
if passable?(@x, @y, Input::RIGHT)
turn_right
@x += 1
increase_steps
end
end
def move_up(turn_enabled = true)
if turn_enabled
turn_up
end
if passable?(@x, @y, Input::UP)
turn_up
@y -= 1
increase_steps
end
end
end
end

=end

#----------------------------------------------------------------------
# Footprints for six situations (down->up, left->right, down->left,
# left->up, up->right and right->down) are required (twelve for
# directional footprints). See the provided footprints template
# (footprints_template.png) for specific details, noting
# that the right half of the template can be empty if using the default
# of non-directional footprints (i.e. leaving FP_DIRECTIONAL = false).
FP_FILE = "footprints_default"
#----------------------------------------------------------------------
# FP_DIRECTIONAL specifies whether there are direction-specific
# footprints (e.g. footprints from player moving up are different
# from those left when player is moving down)
FP_DIRECTIONAL = false
#----------------------------------------------------------------------
# Terrain tag(s) as set in the database
FP_TAG = 1
#----------------------------------------------------------------------
# How much time elapses before footprints begin to fade
FP_BEFORE_FADE_TIME = 100
# After beginning to fade, how long the fading process actually takes
FP_FADE_TIME = 100
# Note: it's possible to maintain footprints indefinitely (with
# FP_FADE_TIME = 0), but if the player opens a menu or changes maps,
# the footprints won't be saved. To allow them to persist even then,
# use Near's Dynamic Maps script (slight modifications would be needed).
#----------------------------------------------------------------------
# tilemap indexes (do not modify)
# regular:
FP_DU = 384
FP_LR = 385
FP_DL = 386
FP_LU = 387
FP_UR = 388
FP_RD = 389
# directional:
FP_UD = 512
FP_RL = 513
FP_DR = 514
FP_RU = 515
FP_UL = 516
FP_LD = 517

#----------------------------------------------------------------------

class Spriteset_Map

attr_accessor :footprints
attr_accessor :fp_tilemap

def initialize
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names
@tilemap.autotiles = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
@fog = Plane.new(@viewport1)
@fog.z = 3000
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
@weather = RPG::Weather.new(@viewport1)
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures))
end
@timer_sprite = Sprite_Timer.new

# Dynamic Footprints additions begin
@footprints = []
fp_tileset = FP_DIRECTIONAL ? Bitmap.new(256,1024) : Bitmap.new(256,512)
# make a column for each footprint image
# right -> down
fp_tileset.blt(160, 0, RPG::Cache.tileset(FP_FILE), Rect.new(0, 0, 32, 32))
# up -> right
fp_tileset.blt(128, 0, RPG::Cache.tileset(FP_FILE), Rect.new(0, 32, 32, 32))
# left -> right
fp_tileset.blt(32, 0, RPG::Cache.tileset(FP_FILE), Rect.new(0, 64, 32, 32))
# down -> left
fp_tileset.blt(64, 0, RPG::Cache.tileset(FP_FILE), Rect.new(32, 0, 32, 32))
# left -> up
fp_tileset.blt(96, 0, RPG::Cache.tileset(FP_FILE), Rect.new(32, 32, 32, 32))
# down -> up
fp_tileset.blt(0, 0, RPG::Cache.tileset(FP_FILE), Rect.new(32, 64, 32, 32))

# fill out each column, making copies of the image with decreasing opacity
0.step(5*32, 32) do |x|
opacity = 255
0.step(15*32, 32) do |y|
fp_tileset.blt(x, y, fp_tileset, Rect.new(x, 0, 32, 32), opacity)
opacity -= 16
end
end

if FP_DIRECTIONAL
# right -> down
fp_tileset.blt(160, 512, RPG::Cache.tileset(FP_FILE), Rect.new(0, 0, 32, 32))
# up -> right
fp_tileset.blt(128, 512, RPG::Cache.tileset(FP_FILE), Rect.new(0, 32, 32, 32))
# left -> right
fp_tileset.blt(32, 512, RPG::Cache.tileset(FP_FILE), Rect.new(0, 64, 32, 32))
# down -> left
fp_tileset.blt(64, 512, RPG::Cache.tileset(FP_FILE), Rect.new(32, 0, 32, 32))
# left -> up
fp_tileset.blt(96, 512, RPG::Cache.tileset(FP_FILE), Rect.new(32, 32, 32, 32))
# down -> up
fp_tileset.blt(0, 512, RPG::Cache.tileset(FP_FILE), Rect.new(32, 64, 32, 32))

0.step(5*32, 32) do |x|
opacity = 255
512.step(32*32, 32) do |y|
fp_tileset.blt(x, y, fp_tileset, Rect.new(x, 512, 32, 32), opacity)
opacity -= 16
end
end
end

@fp_tilemap = Tilemap.new(@viewport1)
@fp_tilemap.tileset = fp_tileset
@fp_tilemap.map_data = Table.new($game_map.width, $game_map.height, 3)
# end Dynamic Footprints additions

update
end

alias fp_dispose dispose
def dispose
@fp_tilemap.dispose
fp_dispose
end

alias fp_update update
def update
@fp_tilemap.ox = $game_map.display_x / 4
@fp_tilemap.oy = $game_map.display_y / 4
@fp_tilemap.update
unless FP_FADE_TIME == 0
for fp in @footprints
if fp.time > 1
fp.time -= 1
if fp.fade and (FP_FADE_TIME - fp.time) % (FP_FADE_TIME/16.0) < 1
@fp_tilemap.map_data[fp.x,fp.y,fp.z] += 8
end
else
if not fp.fade
# begin fading
fp.time = FP_FADE_TIME
fp.fade = true
else
@fp_tilemap.map_data[fp.x,fp.y,fp.z] = 0
@footprints.delete(fp)
end
end
end
end
fp_update
end

def show_footprints(fp_index,fp_x,fp_y)
# start with first layer, then stack footprints as necessary
fp_z = 0
if @fp_tilemap.map_data[fp_x,fp_y,fp_z] == 0
@fp_tilemap.map_data[fp_x,fp_y,fp_z] = fp_index
else
fp_z = 1
if @fp_tilemap.map_data[fp_x,fp_y,fp_z] == 0
@fp_tilemap.map_data[fp_x,fp_y,fp_z] = fp_index
else
fp_z = 2
if @fp_tilemap.map_data[fp_x,fp_y,fp_z] != 0
# delete the existing footprint at these coords from the list
# (to prevent having multiples)
for[/codebox]

<span style='color:green'><span style='font-size:12pt;line-height:100%'>Scren</span></span>

Imagem
Editado pela última vez por Regis X em Seg Ago 28, 2006 10:14 pm, em um total de 1 vez.
<a href='http://z14.invisionfree.com/Dark_Team/' target='_blank'>Imagem</a>

Darkjouse
Membro (Coronel)
Mensagens: 546
Registrado em: Dom Nov 20, 2005 8:56 pm
Maker Preferido: Rpg Maker 2003
Contato:

Mensagem por Darkjouse » Sex Jul 07, 2006 2:13 am

Retgis simplismente muito massa gostei dimais desse seu script, nota 10...

obs: Coloca o codico em code não em quote..... certo?
<a href='http://imageshack.us' target='_blank'>Imagem</a>
tá podre a sing mas é que num tenho tempo pra fazer!!!

Solid Snake
Super Membro
Mensagens: 389
Registrado em: Sáb Nov 26, 2005 10:10 pm
Maker Preferido: Rpg Maker 2003
Localização: Curitiba-PR
Contato:

Mensagem por Solid Snake » Sex Jul 07, 2006 1:59 pm

esse sim vale a pena deste script eu gostei parabéms esse merece nota 8 parabéms ^^
vou colocar uns scripts do falecido Moghaunter aki.
Todos os Dias após a meia-noite no canal IRC visitem: #casadomaker

Imagem

lucas09
Membro (Recruta)
Mensagens: 33
Registrado em: Qui Nov 16, 2006 8:19 pm
Maker Preferido: Rpg Maker 2003
Localização: Fortaleza-CE

Mensagem por lucas09 » Sáb Nov 18, 2006 2:57 pm

:shock:
AKi num serviu,da erro antes de começar ojogo.

Avatar do usuário
Killer Ghost
Administrador
Mensagens: 10338
Registrado em: Sáb Nov 19, 2005 8:49 pm
Maker Preferido: Outro
Localização: Saint Paul
Contato:

Mensagem por Killer Ghost » Sáb Nov 18, 2006 5:14 pm

Pena que o Regis saiu da Casa, se não poderia te ajudar. :|
A Casa do Maker está de volta. :happy:

Projetos:
Rpg Maker VX Ace:
Student Adventures ACE 21%

Rpg Maker MV:
As Crônicas do Fim do Mundo 44%
Casa do Maker - O Retorno 1%

Solid Snake
Super Membro
Mensagens: 389
Registrado em: Sáb Nov 26, 2005 10:10 pm
Maker Preferido: Rpg Maker 2003
Localização: Curitiba-PR
Contato:

Mensagem por Solid Snake » Dom Nov 19, 2006 10:40 am

Qual é o erro que deu????Explica ele ai que eu te ajudo
Todos os Dias após a meia-noite no canal IRC visitem: #casadomaker

Imagem

lucas09
Membro (Recruta)
Mensagens: 33
Registrado em: Qui Nov 16, 2006 8:19 pm
Maker Preferido: Rpg Maker 2003
Localização: Fortaleza-CE

Mensagem por lucas09 » Seg Nov 20, 2006 1:53 pm

Econtrei o erro!Nâo estava configurando a neve para Terrain 1

Responder