Ich bin jetzt alles nochmal durchgegangen und der Script ist nicht kompatibel mit dem Tag und Nachtscript von hellMinor:
Kann das an einer benutzten Variable liegen
#===============================================================================
# Simple Day and Night Script
#
# Version : 0.3.2 - 28.03.08
# Created by : hellMinor
# Description : A simple script which tones the screen to emulate a day and
# night system on the basis of your footsteps or a time system.
# Do NOT redistribute without my permission
#
#===============================================================================
#===============================================================================
# Map-Detection F.A.Q.
#===============================================================================
# If you have an interior map on which most likely no day and night effects
# are shown just put [int] to front of the mapname.
# When entering such a map the script will immediately change the screen tone
# to the $daytone and all tone changes done by the script will be ignored.
#
# Sometimes interior maps need to be dark ,i.e. caves, just put [dint]
# to the front of the mapname to mark this map as a dark interior map.
# The script while change the tone to the $nighttone instead of $daytone
#
# While in the interior map the time will still pass and when you leave the
# interior map it will tone the screen to the current game time
#===============================================================================
# Get-Time F.A.Q.
#===============================================================================
# If you need to get current time, you can use this code in a call script.
# to get the current time :
# $game_variables[0001] = $dayandnight.getTime
# to get the current hour :
# $game_variables[0001] = $dayandnight.getHour
# or to get the current minute :
# $game_variables[0001] = $dayandnight.getMinute
#
# $game_variables[0001] will be for example the first variable in your database.
# To use another variable just change the 0001 to something >5000
#
#===============================================================================
class DayAndNight < Game_Screen
#===============================================================================
# Main config
#-------------------------------------------------------------------------------
$active = true # Activates/Deactives the script
$timesystem = 1 # Determines which time system is active
# 0 = Footstep-System
# 1 = Time-System
$fadingtime = 4 # How fast the tone changes (in seconds)
#-------------------------------------------------------------------------------
$dusktone = Tone.new(-68, -51, -9, 25) # Dusk-Screen-Tone
$nighttone = Tone.new(-136, -102, -17, 51) # Night-Screen-Tone
$dawntone = Tone.new(-20, -51, -68, 0) # Dawn-Screen-Tone
$daytone = Tone.new(0, 0, 0, 0) # Day-Screen-Tone
#-------------------------------------------------------------------------------
# Timesystem config
#-------------------------------------------------------------------------------
$starting_time = "dusk" # Determines the starting phase
# "day" for day ,"dusk" for dusk
# "dawn" for dawn and "night" for night
# Notes : The default is "night",
# any other than night will change ALL calculations
# made with Graphics.frame_counter once !!!!!
$divider = 1 # Decides how fast the Time-System runs
# i.e. 2 = twice as fast (30 seconds = 1 hour)
# i.e. 0,5 = twice as slow (2 minutes = 1 hour)
$dawntime = 7 # turns into dawn on $dawntime
$daytime = 8 # turns into day on $daytime
$dusktime = 19 # turns into dusk on $dusktime
$nighttime = 20 # turns into night on $nighttime
#-------------------------------------------------------------------------------
# Footstep config
#-------------------------------------------------------------------------------
$count = 0 # Counter how many steps are made between one period
$maxsteps = 150 # How many footsteps between each phase
#-------------------------------------------------------------------------------
# boolean checks
#-------------------------------------------------------------------------------
$day = false # Checker if its day
$dusk = false # Checker if its dusk
$dawn = false # Checker if its dawn
$night = true # Checker if its night
#-------------------------------------------------------------------------------
def change?
if $count >= $maxsteps
if $day
doDusk
end
if $dusk
doNight
end
if $night
doDawn
end
if $dawn
doDay
end
end
end
#-------------------------------------------------------------------------------
def doNight
if $dayandnight.exterior?
$game_map.screen.start_tone_change($nighttone,$fadingtime*60)
end
$count = 0
$day = false
$dusk = false
$dawn = false
$night = true
end
#-------------------------------------------------------------------------------
def doDay
if $dayandnight.exterior?
$game_map.screen.start_tone_change($daytone,$fadingtime*60)
end
$count = 0
$day = true
$night = false
$dawn = false
$dusk = false
end
#-------------------------------------------------------------------------------
def doDawn
if $dayandnight.exterior?
$game_map.screen.start_tone_change($dawntone,$fadingtime*60)
end
$count = 0
$day = false
$night = false
$dusk = false
$dawn = true
end
#-------------------------------------------------------------------------------
def doDusk
if $dayandnight.exterior?
$game_map.screen.start_tone_change($dusktone,$fadingtime*60)
end
$count = 0
$day = false
$night = false
$dusk = true
$dawn = false
end
#-------------------------------------------------------------------------------
def updateclock
clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
hour = clocktime / 60 % 24
minutes = clocktime % 60
if hour == $dawntime && minutes == 0
doDawn
end
if hour == $daytime && minutes == 0
doDay
end
if hour == $dusktime && minutes == 0
doDusk
end
if hour == $nighttime && minutes == 0
doNight
end
end
#-------------------------------------------------------------------------------
def interior?
if($game_map.name.to_s.index("[int]") != nil)
return true
end
end
#-------------------------------------------------------------------------------
def exterior?
if($game_map.name.to_s.index("[int]") == nil &&
$game_map.name.to_s.index("[dint]") == nil)
return true
end
end
#-------------------------------------------------------------------------------
def dark_interior?
if($game_map.name.to_s.index("[dint]") != nil)
return true
end
end
#-------------------------------------------------------------------------------
def get_state_tone
if $dawn
return $dawntone
end
if $day
return $daytone
end
if $dusk
return $dusktone
end
if $night
return $nighttone
end
end
#-------------------------------------------------------------------------------
def getTime
clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
hour = clocktime / 60 % 24
minutes = clocktime % 60
return hour.to_s+":"+minutes.to_s
end
#-------------------------------------------------------------------------------
def getHour
clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
hour = clocktime / 60 % 24
return hour
end
#-------------------------------------------------------------------------------
def getMinute
clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
minutes = clocktime % 60
return minutes
end
end
#===============================================================================
class Game_Character
#===============================================================================
def increase_steps
@stop_count = 0
if $active && $timesystem == 0
$count += 1
$dayandnight = DayAndNight.new
$dayandnight.change?
end
update_bush_depth
end
end
#===============================================================================
class Game_Map
#===============================================================================
def initialize
@screen = Game_Screen.new
if $active && $timesystem == 1
$dayandnight = DayAndNight.new
end
@interpreter = Game_Interpreter.new(0, true)
@map_id = 0
@display_x = 0
@display_y = 0
create_vehicles
end
#-------------------------------------------------------------------------------
def update
refresh if $game_map.need_refresh
update_scroll
update_events
update_vehicles
update_parallax
if $active && $timesystem == 1
$dayandnight.updateclock
end
@screen.update
end
def name
$data_mapinfos[@map_id]
end
end
#===============================================================================
class Scene_Map
#===============================================================================
def fadein(duration)
Graphics.transition(0)
if $active && $dayandnight.interior?
$game_map.screen.start_tone_change($daytone,1)
else if $active && $dayandnight.dark_interior?
$game_map.screen.start_tone_change($nighttone,1)
else if $active && $dayandnight.exterior?
$game_map.screen.start_tone_change($dayandnight.get_state_tone,1)
end
end
end
for i in 0..duration-1
Graphics.brightness = 255 * i / duration
update_basic
end
Graphics.brightness = 255
end
end
#===============================================================================
class Scene_Title
#===============================================================================
alias load_database_additions load_database
def load_database
load_database_additions
$data_mapinfos = load_data("Data/MapInfos.rvdata")
for key in $data_mapinfos.keys
$data_mapinfos[key] = $data_mapinfos[key].name
end
end
alias command_new_game_additions command_new_game
def command_new_game
command_new_game_additions
Graphics.frame_count += 25200/$divider if $starting_time == "dawn"
Graphics.frame_count += 28800/$divider if $starting_time == "day"
Graphics.frame_count += 68400/$divider if $starting_time == "dusk"
end
end
#===============================================================================
# Game-Time-Hotfix
#===============================================================================
#===============================================================================
class Window_SaveFile < Window_Base
#===============================================================================
def load_gamedata
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
begin
@characters = Marshal.load(file)
@frame_count = Marshal.load(file)
@last_bgm = Marshal.load(file)
@last_bgs = Marshal.load(file)
@game_system = Marshal.load(file)
@game_message = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
case $starting_time
when "night"
@total_sec = @frame_count / Graphics.frame_rate
when "dawn"
@total_sec = @frame_count-(25200/$divider) / Graphics.frame_rate
when "day"
@total_sec = @frame_count-(28800/$divider) / Graphics.frame_rate
when "dusk"
@total_sec = @frame_count-(68400/$divider) / Graphics.frame_rate
end
rescue
@file_exist = false
ensure
file.close
end
end
end
end
Jop, ich habe es auf RPG Revolution gefunden, hier ist das Script:
#==============================================================================
# ** [ERZVX] Tile Substitution (von ERZENGEL am 5. April 2008 um 14:51)
#------------------------------------------------------------------------------
# Erm?glicht es die verschiedenen Tilesets zu wechseln.
#==============================================================================
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * ?ffentliche Instanzvariablen
#--------------------------------------------------------------------------
attr_accessor :tile_a1, :tile_a2, :tile_a3, :tile_a4, :tile_a5,
:tile_b, :tile_c, :tile_d, :tile_e
#--------------------------------------------------------------------------
# * Objektinitialisation
#--------------------------------------------------------------------------
alias erzvx_tilesubst_init initialize
def initialize
erzvx_tilesubst_init
# Namen der Standardtilesets
@tile_a1 = 'TileA1'; @tile_a2 = 'TileA2'; @tile_a3 = 'TileA3';
@tile_a4 = 'TileA4'; @tile_a5 = 'TileA5'; @tile_b = 'TileB';
@tile_c = 'TileC'; @tile_d = 'TileD'; @tile_e = 'TileE'
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Objektinitialisation
#--------------------------------------------------------------------------
alias erzvx_tilesubst_init2 initialize
def initialize
erzvx_tilesubst_init2
@tile_a1 = $game_map.tile_a1; @tile_a2 = $game_map.tile_a2;
@tile_a3 = $game_map.tile_a3; @tile_a4 = $game_map.tile_a4;
@tile_a5 = $game_map.tile_a5; @tile_b = $game_map.tile_b;
@tile_c = $game_map.tile_c; @tile_d = $game_map.tile_d;
@tile_e = $game_map.tile_e
end
#--------------------------------------------------------------------------
# * Create Tilemap
#--------------------------------------------------------------------------
def create_tilemap
@tilemap = Tilemap.new(@viewport1)
# Zuweisung von Variablen statt fester Strings
@tilemap.bitmaps[0] = Cache.system($game_map.tile_a1)
@tilemap.bitmaps[1] = Cache.system($game_map.tile_a2)
@tilemap.bitmaps[2] = Cache.system($game_map.tile_a3)
@tilemap.bitmaps[3] = Cache.system($game_map.tile_a4)
@tilemap.bitmaps[4] = Cache.system($game_map.tile_a5)
@tilemap.bitmaps[5] = Cache.system($game_map.tile_b)
@tilemap.bitmaps[6] = Cache.system($game_map.tile_c)
@tilemap.bitmaps[7] = Cache.system($game_map.tile_d)
@tilemap.bitmaps[8] = Cache.system($game_map.tile_e)
@tilemap.map_data = $game_map.data
@tilemap.passages = $game_map.passages
end
#--------------------------------------------------------------------------
# * Update Tilemap
#--------------------------------------------------------------------------
alias erzvx_tilesubst_upd update_tilemap
def update_tilemap
# Abfrage, ob Tilesets gewechselt wurden
@tilemap.bitmaps[0] =
Cache.system($game_map.tile_a1) if @tile_a1 != $game_map.tile_a1
@tilemap.bitmaps[1] =
Cache.system($game_map.tile_a2) if @tile_a2 != $game_map.tile_a2
@tilemap.bitmaps[2] =
Cache.system($game_map.tile_a3) if @tile_a3 != $game_map.tile_a3
@tilemap.bitmaps[3] =
Cache.system($game_map.tile_a4) if @tile_a4 != $game_map.tile_a4
@tilemap.bitmaps[4] =
Cache.system($game_map.tile_a5) if @tile_a5 != $game_map.tile_a5
@tilemap.bitmaps[5] =
Cache.system($game_map.tile_b) if @tile_b != $game_map.tile_b
@tilemap.bitmaps[6] =
Cache.system($game_map.tile_c) if @tile_c != $game_map.tile_c
@tilemap.bitmaps[7] =
Cache.system($game_map.tile_d) if @tile_d != $game_map.tile_d
@tilemap.bitmaps[8] =
Cache.system($game_map.tile_e) if @tile_e != $game_map.tile_e
# Alter Code
erzvx_tilesubst_upd
end
end
Kyoshiro