Gameland.Uniogame
Si estas viendo este mensaje, es por que aun no estas registrado en nuestra comunidad Gameland, registrate si buscas descargas, noticias, juegos, etc.
Conectarse

Recuperar mi contraseña

Afiliados
Lylat System - StarFox *: Hyrule Town :* Alogames World RPG Lylat System - StarFox Lylat System - StarFox Raider gamers

scripts para rpg maker xp

Ver el tema anterior Ver el tema siguiente Ir abajo

scripts para rpg maker xp

Mensaje por reylich el 26/10/2010, 7:13 pm

esto lo he encontrado en otras web
ya que me intereso bastante el tema de crear tu propio juego lo que escribire ya lo he probado en mi version de rpg maker xp

primero que es un script?

bueno estos son codigos mediante los cuales se pueden cambiar varias cosas dentro del juego como estilo de batalla, estilo de victoria de derrota, etc

primero deben hacer click sobre la opcion de scripts, ahora veran 2 ventanas en la pantalla de scrpts una de las ventanas es la lista y la otra es la descripcion de todas.
bajar el listado hasta ver la opcion main hacer click derecho y elegir insertar.
aparecera un espacio en blanco en la lista y en el contenido tambien, lo que se hizo en este momento fue crear una nueva clase, ahora poner un nombre en la lista y copiar el codigo de script en el contenido
esto seria suficiente para que funcione

el siguiente script es para darle al juego el modo de dia y noche real (va cambiando de dia y noche segun la hora que tenga el pc)


como dije crear una nueva clase y copiar este codigo tal cual


Spoiler:
]#=================================
# ■ class Game_Title
# written by Deke
# Rewiten by Near Fantastica
#--------------------------------------------------------------------
#======================================
class Game_Time

attr_accessor :minute_length

def initialize
@minute_length=60.0 #length of game minute in real seconds
@hour_length= 60.0 #minute in an hour
@day_length=24.0 #hours in a day
@month_length=30.0 #days in a month
@year_length=12.0 #months in a year
@minutes=0 #starting minute count
start_minute= $t.min
add_minutes(start_minute)
start_hour= $t.hour #starting hour count
add_hours(start_hour)
start_day= 1 #starting day count
add_days(start_day)
start_month=1 #starting month count
add_months(start_month-1)
start_year= 1 #starting year count
add_years(start_year)
end

def add_minutes(minutes)
@minutes +=minutes
end

def add_hours(hours)
@minutes +=hours*@hour_length
end

def add_days(days)
@minutes += days*@hour_length*@day_length
end

def add_months(months)
@minutes +=months * @hour_length*@day_length*@month_length
end

def add_years(years)
@minutes += years * @hour_length*@day_length*@month_length * @year_length
end


def get_year
minutes=get_total_minutes
year=minutes / @hour_length / @day_length / @month_length / @year_length
return year
end

def get_month
minutes=get_total_minutes
month=minutes / @hour_length / @day_length / @month_length % @year_length + 1
return month
end

def get_day
minutes=get_total_minutes
day=minutes / @hour_length / @day_length % @month_length
return day
end

def get_hour
minutes=get_total_minutes
hour=minutes / @hour_length % @day_length
return hour
end

def get_total_minutes
total_sec=Graphics.frame_count / Graphics.frame_rate
minute=(total_sec/@minute_length+@minutes)
return minute
end

def get_minute
minutes=get_total_minutes % @hour_length
return minutes
end

def get_tone
period_length=Math::PI*(get_hour / @day_length)
red_shift= -100+ 115*Math.sin(period_length)
green_shift= -140+ 155*Math.sin(period_length)
blue_shift= -150+ 165*Math.sin(period_length)
return Tone.new(red_shift, green_shift, blue_shift, 0)
end

end # of class Game_Time

#=======================================#
# ■ class Window_Time #
# written by Deke #
#------------------------------------------------------------------------------#
#=======================================#
class Window_Time < Window_Base

#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Time" window font
self.contents.font.size = $defaultfontsize
refresh
end

#--------------------------------------------------------------------------
def refresh
self.contents.clear
@total_sec = Graphics.frame_count / Graphics.frame_rate
@minute=$game_time.get_minute.floor
hour = $game_time.get_hour
pm_flag= hour >=12 ? true : false
hour= hour >= 12 ? hour-12 : hour
day=$game_time.get_day
month=$game_time.get_month
year=$game_time.get_year
if hour.floor==0
text=sprintf("%02d:%02d",12,@minute)
else
text=sprintf("%02d:%02d",hour,@minute)
end
if pm_flag
text += " PM"
else
text += " AM"
end
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, text, 2)
text = sprintf("%02d-%02d-%02d", month, day, year)
self.contents.font.color=system_color
self.contents.draw_text(4,32,120,32,text)
end

#--------------------------------------------------------------------------
def update
if $game_time.get_minute.floor != @minute
refresh
end
end
end # of class

#=======================================
class Game_Temp
#--------------------------------------------------------------------------
# ● Refer setup to Game Temp
#--------------------------------------------------------------------------
alias dns_game_temp_initalize initialize
#--------------------------------------------------------------------------
# ● Refer the Attr
#--------------------------------------------------------------------------
attr_reader :map_infos #Added Lines
attr_reader :outside_array #Added Lines
#--------------------------------------------------------------------------
# ● Refer setup to Scene Map
#--------------------------------------------------------------------------
def initialize
dns_game_temp_initalize
@outside_array = Array.new
@map_infos = load_data("Data/MapInfos.rxdata")
for key in @map_infos.keys
@outside_array[key] = @map_infos[key].name.include?("*")
end
end
end

#=======================================
class Scene_Map
#--------------------------------------------------------------------------
# ● Refer setup to Scene Map
#--------------------------------------------------------------------------
alias dns_scene_map_main main
alias dns_scene_map_update update
#--------------------------------------------------------------------------
# ● Main
#--------------------------------------------------------------------------
def main
if $game_temp.outside_array[$game_map.map_id]
tone=$game_time.get_tone
@minute=$game_time.get_minute.floor
$game_screen.start_tone_change(tone, 0)
end
dns_scene_map_main
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def update
conditional1 =$game_temp.outside_array[$game_map.map_id] and $game_time.get_minute.floor != @minute
conditional2 =$game_temp.outside_array[$game_map.map_id] and @current_id != $game_map.map_id
if conditional1 or conditional2
tone=$game_time.get_tone
$game_screen.start_tone_change(tone, 0)
@minute = $game_time.get_minute.floor
$game_map.need_refresh=true
@current_id=$game_map.map_id
end
if $game_temp.outside_array[$game_map.map_id] == false and @current_id != $game_map.map_id
$game_screen.start_tone_change(Tone.new(0,0,0,0),0)
@current_id=$game_map.map_id
end
dns_scene_map_update
end
end

#======================================================
class Scene_Title
#--------------------------------------------------------------------------
# ● Refer setup to Scene Map
#--------------------------------------------------------------------------
alias dns_scene_title_update update
#--------------------------------------------------------------------------
# ● Refer setup to Scene Map
#--------------------------------------------------------------------------
def update
$game_time=Game_Time.new
#Dubealex Addition (from XRXS) to show Map Name on screen
dns_scene_title_update
end
end

#========================================================
class Scene_Load
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
$game_time =Marshal.load(file) #Added Line
if $game_system.magic_number != $data_system.magic_number
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
end
end # of Scene_Load updates

#=======================================================
class Scene_Save
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
characters.push([actor.character_name, actor.character_hue])
end
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
$game_system.save_count += 1
$game_system.magic_number = $data_system.magic_number
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
Marshal.dump($game_time,file) # Added Line
end
end # of Scene_Save updates

#========================================================

class Game_Map
#--------------------------------------------------------------------------
# ● Refer the attr
#--------------------------------------------------------------------------
attr_reader :outside
attr_reader :map_id
#--------------------------------------------------------------------------
# ● Outside
#--------------------------------------------------------------------------
def outside
return $game_temp.outside_array[@map_id]
end
end

si no lo combinan con el reloj en tiempo real cambian esto

Spoiler:
start_minute= $t.min
add_minutes(start_minute)
start_hour= $t.hour #starting hour count
add_hours(start_hour)
por esto:
Spoiler:
start_minute= 0 #Se puede modificar. Esto dice q se comienza con 0 min.
add_minutes(start_minute)
start_hour= 15 #Modificable. Esto dice q se comenza a las 15
add_hours(start_hour)


script estilo de batalla de GOLDEN SUN cheers

Spoiler:
=============================================================
Golden sun intro script v1.2 By AZZY9
=============================================================
if you would like to use any of my scripts please give credit

Since there have been requests, i have made a Golden Sun
Intro.
Note : the menu only appears if there is a save game, if
there isnt then straight after the intro it would begin a
new game automatically as it does in the real game.

New features
I have created a erase save game script which is working in this
edited window skin to make it more golden sun like
better icon

Problems
When you copy a save game, the duration of you selecting it will be added onto the time of the saved
game that you will create by copying

If you would like yo import this script into your game this is how you do it.
WARNING! MAY INTERFEAR WITH OTHER SCRIPTS
1. Replace scripts "Main" and "Scene_Load" in your game with the one in the script
2. Delete the script called "Scene_title"
3. copy the script "Golden Sun Intro" into your game above main.
4. copy the script "Scene_Copy" and "Scene_Erase" into your game above main.
5. copy the contents of "\Golden sun intro\Graphics\Pictures" into your game's directory
6. copy the contents of "\Golden sun intro\Audio\BGM" into your game's directory
7. copy the contents of "\Golden sun intro\Audio\SE" into your game's directory.
Daniel: este tutorial esta hecho por azzy9




actualizare este post cuando haya probado mas scripts


lol!


Última edición por reylich el 28/10/2010, 5:30 pm, editado 1 vez

reylich
Colaborador
Colaborador

Sexo : Masculino
Mensajes : 147
Reputación : 45
Fecha de inscripción : 16/05/2010

Ver perfil de usuario

Volver arriba Ir abajo

Re: scripts para rpg maker xp

Mensaje por nakedsnake-solid el 26/10/2010, 7:39 pm

y cada vez me esta gustando mas esto
ahora salen con que uno mismo puede cambiar lo que sea del juego incluso dia y noche real xD
entonces lo intentare y me hare el mejor rpg de todos Twisted Evil


entra a Gameotaku click al enlace

nakedsnake-solid
Moderador
Moderador

Sexo : Masculino
Mensajes : 125
Reputación : 38
Videojuegos favoritos : metal gear y juegos de terror
Consolas preferidas : ps3, x360
Fecha de inscripción : 13/10/2010

Ver perfil de usuario

Volver arriba Ir abajo

Re: scripts para rpg maker xp

Mensaje por mayo-666 el 26/10/2010, 9:53 pm

a esto yo le llamo un gran aporte
nada mejor que actualizar tu juego con lo que te gusta
si quieres subes mas scripts
los de modos de batalla estaria bien que los aportaras ya que son los que mas se usan





mayo-666
Administrador
Administrador

Sexo : Masculino
Edad : 24
Mensajes : 155
Reputación : 22
Videojuegos favoritos : peleas, rpg, terror, aventuras
Consolas preferidas : consolas de nintendo, ps1, ps2, x360
Humor : lo gracioso XD
Fecha de inscripción : 04/01/2010

Ver perfil de usuario http://gameland.uniogame.com

Volver arriba Ir abajo

Re: scripts para rpg maker xp

Mensaje por Contenido patrocinado Hoy a las 4:11 pm


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.