Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Custom scripts - Colliding, Nyah, help please
MajinBangFlash
post Jul 7 2010, 12:23 AM
Post #1


Retro-console lover
Group Icon

Group: Revolutionary
Posts: 195
Type: Writer
RM Skill: Skilled




I am currently working on a side-project whilst waiting for the Magin tilesets, and have found a treasury of nifty scripts tongue.gif

Bad part is, some of them collide with each other.

The ones which collide :

Day/Night System by Jet10985 | Causes Rei's actor resize to not work. Script works whether or not there are any others alongside it.
Spoiler
#=========================================================================
======
# Time System
# By Jet10985 (Jet)
# Slight Help by: Mr. Anonymous
#===============================================================================
# This script is my time system. Time System: A system of tracking in-game "time"
# which in-turn contain more systems relating to time. Used for visual effects,
# the novelty, and eventing purposes. My Time System: see Time system +
# see ultimate.
# This script has: 50 customization option.
#===============================================================================

#===============================================================================
# Features
#===============================================================================
# CHECK means the script has the feature
# WIP means it is a future feature
#-------------------------------------------------------------------------------
# Thomas Edison Compat. CHECK
# Auto-Tint CHECK
# Auto-Weather CHECK
# Auto-Season CHECK
# Time to variable/switch CHECK
# Weather to switch CHECK
# Changable Days/Months CHECK
# Military time CHECK
# Real time option CHECK
# Resting CHECK
# Map/Menu Windows CHECK
# Changable map encounters WIP
# Map labels CHECK
# Alignment System compat. CHECK
# Tile set Changes WIP
# Skill damage differences depending on time of day. WIP
# Update only on Map feature. CHECK
#===============================================================================

=begin
Built-in script commands:

freeze_time(option) <--------------- Script-time command only
option = true/false. true freeze's time, false unfreeze's it.

add_time(type, amount) <------------------- Script-time command only
type = "minute", "hour", "day", "month", "year" according to what you want to add
amount = amount of that time you want to add.

jump_to_hour(hour) <-------------------------- Script-time command only
hour = the hour you want to jump to. Be below 25 and above 0.
--------------------------------------------------------------------------------
Compatability Instructions:

If you want compatability with Jet's Alignment system and/or Thomas Edison VX,
place this script below both of them and toggle the configuration for them below

=end

#===============================================================================
# BEGIN CONFIGURATION
#===============================================================================

module Jet_DayNight # Don't Touch.

#===============================================================================
# Detail Configuration
#===============================================================================

# Use computer time or script time? false is script, true is computer.
REAL_TIME = false

# Hour script time will start at.
STARTING_HOUR = 1

# Minute script time will start at.
STARTING_MINUTE = 0

# Day script time will start at.
STARTING_DAY = 0

# Year script time will start at.
STARTING_YEAR = 300

# This is how many frames it takes for a Script time minute to pass.
# 60 frames = 1 Real life second. So 120 would be 2 real life seconds, etc.
MINUTE_LENGTH = 120

# Military time or AM/PM time? false is AM/PM, true is military.
MILITARY_TIME = false

# Should time only update on the map, and no where else?
UPDATE_ONLY_ON_MAP = true

# Automaticly change seasons? (This is auto-weather as well)
AUTO_SEASONS = true

# Automaticly tint according to time of day/weather?
AUTO_TINT = true

# Allows resting? Resting is the ability to call a scene that will allow
# the player to "rest" for a certain amount of hours. Script time only.
ALLOW_REST = true

# The button to call the resting menu.
REST_BUTTON = Input::F7

# Include a window showing time of day, month, and day name in the menu?
MENU_TIME_WINDOW = true

# Include a window showing time of day and day name on the map?
MAP_TIME_WINDOW = true

# These are the X and Y coordinates of the map time window if you choose to
# display the window on the map.
MAP_TIME_WINDOW_COORDS = [384, 360]

# This will add compatability with Thomas Edison VX the same as if you were
# using KGC's day/night.
# Meaning, lights will be on during night and off during day.
THOMAS_EDISON_COMPATABILITY = true

# This will add Jet's Alignment System compatability. Meaning, if you
# have negative alignment, dusk and night will give bonus stats, and
# vice versa for dawn and day if you're good.
ALIGNMENT_SYSTEM_COMPATABILITY = true

# This is the positive alignment bonus in dawn/day. These are in decimals.
# By default, all bonuses are 1.2, meaning 20% bonus.
# ATK DEF SPI AGI
GOOD_BONUSES = [1.2, 1.2, 1.2, 1.2]

# This is the negative alignment bonus in dusk/night. These are in decimals.
# By default, all bonuses are 1.2, meaning 20% bonus.
# ATK DEF SPI AGI
BAD_BONUSES = [1.2, 1.2, 1.2, 1.2]


#===============================================================================
# Calendar Configuration (Script time only)
#===============================================================================

# These are the months in a 3-4 letter form that will be used.
MONTHS = {

0 => ["Jan", 31], # month number => ["Month name", days in month],
1 => ["Feb", 28], # month number => ["Month name", days in month],
2 => ["Mar", 31], # month number => ["Month name", days in month],
3 => ["Apr", 30],
4 => ["May", 31],
5 => ["June", 30],
6 => ["July", 31],
7 => ["Aug", 31],
8 => ["Sept", 30],
9 => ["Oct", 31],
10 => ["Nov", 30],
11 => ["Dec", 31] }

# These are the days in the month in a 3-4 letter form for window space.
DAYS = {

0 => "Sun", # day number => day name
1 => "Mon", # day number => day name
2 => "Tues", # day number => day name
3 => "Wed",
4 => "Thu",
5 => "Fri",
6 => "Sat" }

#===============================================================================
# Switches Configuration (Script time and Real time)
#===============================================================================

# The switch that will turn on when it is Autumn.
AUTUMN_SWITCH = 50

# The switch that will turn on when it is Winter.
WINTER_SWITCH = 51

# The switch that will turn on when it is Summer.
SUMMER_SWITCH = 52

# The switch that will turn on when it is Spring.
SPRING_SWITCH = 53

# The switch that will turn on when it is Raining.
RAIN_SWITCH = 54

# The switch that will turn on when it is Snowing.
SNOW_SWITCH = 55

# The switch that will turn on when it is Stormy.
STORM_SWITCH = 56

# The switch that will turn on when it is Night.
NIGHT_SWITCH = 57

# The switch that will turn on when it is Dawn.
DAWN_SWITCH = 58

# The switch that will turn on when it is Day.
DAY_SWITCH = 59

# The switch that will turn on when it is Dusk.
DUSK_SWITCH = 60

#===============================================================================
# Variable Configuration (Script time and Real time)
#===============================================================================

# Variable hour will be stored in.
HOUR_VARIABLE = 50

# Variable minute will be stored in.
MINUTE_VARIABLE = 51

# Variable day will be stored in.
DAY_VARIABLE = 52

# Variable month will be stored in.
MONTH_VARIABLE = 53

# Variable year will be stored in.
YEAR_VARIABLE = 54

#===============================================================================
# Weather Configuration (Script time and Real time)
#-------------------------------------------------------------------------------
# Seasonal Numbers:
# 0 = Winter
# 1 = Autumn
# 2 = Summer
# 3 = Spring
#===============================================================================

# Seasons that rain will occur in randomly.
RAIN_SEASONS = [0, 1, 3]

# Seasons that snow will occur in randomly.
SNOW_SEASONS = [0, 1]

# Seasons that storms will occur in randomly.
STORM_SEASONS = [0, 1, 3]

#===============================================================================
# Season Configuration (Script time only)
#===============================================================================

# These months will be in the summer season.
SUMMER_MONTHS = [5, 6, 7]

# These months will be in the summer season.
WINTER_MONTHS = [11, 0, 1]

# These months will be in the summer season.
AUTUMN_MONTHS = [8, 9, 10]

# These months will be in the summer season.
SPRING_MONTHS = [2, 3, 4]

#===============================================================================
# Tint Configuration (Hours config for Script time only, tint for both.)
#===============================================================================

# These hours will be considered dusk.
DUSK_HOURS = [18, 19, 20, 21]

# These hours will be considered night.
NIGHT_HOURS = [22, 23, 24, 1, 2, 3]

# These hours are considered dawn.
DAWN_HOURS = [4, 5, 6, 7]

# These hours are considered day.
DAY_HOURS = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]

# This is the tint that will be applied for dusk.
DUSK_TINT = Tone.new(17, -51, -102, 0)

# This is the tint that will be applied for night.
NIGHT_TINT = Tone.new(-187, -119, -17, 68)

# This is the tint that will be applied for dawn.
DAWN_TINT = Tone.new(17, -51, -102, 0)

# This is the tint that will be applied for day.
DAY_TINT = Tone.new(0, 0, 0, 0)

# This is the amount of time it takes for tone to change from one to another.
FADE_LENGTH = 240

end

#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class RPG::MapInfo

def name
return @name.gsub(/\[.*\]/) {""}
end

def indoors?
return @name.scan(/\[JDN\]/).size > 0
end
end

class Game_Time

include Jet_DayNight

attr_accessor :day
attr_accessor :day_name
attr_accessor :days_passed
attr_accessor :month
attr_accessor :month_name
attr_accessor :month_day
attr_accessor :hour
attr_accessor :minute
attr_accessor :second
attr_accessor :minute_length
attr_accessor :year
attr_accessor :frozen_time
attr_accessor :map_infos

def initialize
if REAL_TIME
@day = Time.now.strftime("%j").to_i
@day_name = Time.now.strftime('%a')
@month = Time.now.strftime("%m").to_i
@month_name = Time.now.strftime("%b")
@month_day = Time.now.strftime("%d")
@hour = Time.now.hour
@minute = Time.now.min
@year = Time.now.strftime("%Y").to_i
else
@day = STARTING_DAY % DAYS.keys.size
@day_name = DAYS[@day]
@days_passed = STARTING_DAY
@hour = STARTING_HOUR
@month = 0
@minute = STARTING_MINUTE
@second = 0
@year = STARTING_YEAR
end
@frozen_time = false
@map_infos = load_data("Data/MapInfos.rvdata")
@minute_length = 0
end

def screen
if $game_temp.in_battle
return $game_troop.screen
else
return $game_map.screen
end
end

def update_time
@day_name = DAYS[@day]
@map_infos = load_data("Data/MapInfos.rvdata")
time_of_day = get_time_of_day
unless @map_infos[$game_map.map_id].indoors?
case time_of_day
when "Dusk"
if !$instant_tint
screen.start_tone_change(DUSK_TINT, FADE_LENGTH) unless screen.tone == DUSK_TINT || !AUTO_TINT
else
screen.start_tone_change(DUSK_TINT, 0)
end
when "Night"
if !$instant_tint
screen.start_tone_change(NIGHT_TINT, FADE_LENGTH) unless screen.tone == NIGHT_TINT || !AUTO_TINT
else
screen.start_tone_change(NIGHT_TINT, 0)
end
when "Dawn"
if !$instant_tint
screen.start_tone_change(DAWN_TINT, FADE_LENGTH) unless screen.tone == DAWN_TINT || !AUTO_TINT
else
screen.start_tone_change(DAWN_TINT, 0)
end
when "Day"
if !$instant_tint
screen.start_tone_change(DAY_TINT, FADE_LENGTH) unless screen.tone == DAY_TINT || !AUTO_TINT
else
screen.start_tone_change(DAY_TINT, 0)
end
end
get_weather
end
if REAL_TIME
@day = Time.now.strftime("%j").to_i
@day_name = Time.now.strftime('%a')
@month = Time.now.strftime("%m").to_i
@month_name = Time.now.strftime("%b")
@month_day = Time.now.strftime("%d")
@hour = Time.now.hour
@minute = Time.now.min
@second = Time.now.sec
@year = Time.now.strftime("%Y").to_i
else
@second += 1
@minute_length += 1 unless @frozen_time
if @minute_length == MINUTE_LENGTH
@minute += 1
@minute_length = 0
end
if @minute == 60
@hour += 1
@minute = 0
end
if @hour == 25
@day += 1
@hour = 1
end
if @day == DAYS.keys.size
@day = 0
@days_passed += DAYS.keys.size
end
if @days_passed > MONTHS[@month][1]
@month += 1
end
if @month == MONTHS.keys.size
@year += 1
@month = 0
@days_passed = 0
end
end
$game_variables[MINUTE_VARIABLE] = @minute
$game_variables[HOUR_VARIABLE] = @hour
$game_variables[YEAR_VARIABLE] = @year
$game_variables[DAY_VARIABLE] = @day
$game_variables[MONTH_VARIABLE] = @month
get_season
if @seconds == 1000
@seconds = 0
end
end

def get_month_data(type)
case type
when 0
return @month
when 1
return @month_name
when 2
return @month_day
end
end

def get_day_data(type)
case type
when 0
return @day
when 1
return @day_name
end
end

def get_time_data(type)
case type
when 0
return @second
when 1
return @minute
when 2
return @hour
when 3
return @year
end
end

def get_season
if REAL_TIME
if @month == 12 || 1 || 2
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = true
return "Winter"
elsif @month == 3 || 4 || 5
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SPRING_SWITCH] = true
return "Spring"
elsif @month == 6 || 7 || 8
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SUMMER_SWITCH] = true
return "Summer"
elsif @month == 9 || 10 || 11
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[AUTUMN_SWITCH] = true
return "Autumn"
end
else
if SUMMER_MONTHS.include?(@month)
$game_switches[SUMMER_SWITCH] = true
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
return "Summer"
elsif WINTER_MONTHS.include?(@month)
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = true
return "Winter"
elsif AUTUMN_MONTHS.include?(@month)
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[AUTUMN_SWITCH] = true
return "Autumn"
elsif SPRING_MONTHS.include?(@month)
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SPRING_SWITCH] = true
return "Spring"
end
end
end

def get_weather
random_weather = get_season
new_weather = []
case random_weather
when "Winter"
new_weather.push("Clear")
if RAIN_SEASONS.include?(0)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(0)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(0)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Autumn"
new_weather.push("Clear")
if RAIN_SEASONS.include?(1)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(1)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(1)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Summer"
new_weather.push("Clear")
if RAIN_SEASONS.include?(2)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(2)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(2)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Spring"
new_weather.push("Clear")
if RAIN_SEASONS.include?(3)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(3)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(3)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
end
case @more_stuff
when "Clear"
screen.weather(0, 0, 0)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = false
when "Rain"
screen.weather(1, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = true
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = false
when "Storm"
screen.weather(2, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = true
$game_switches[SNOW_SWITCH] = false
when "Snow"
screen.weather(3, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = true
end
end

def get_time_of_day
if REAL_TIME
if (18..21) === @hour
$game_switches[DUSK_SWITCH] = true
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = true
return "Dusk"
elsif (22..24) === @hour || (1..3) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = true
$light_switch = true
return "Night"
elsif (4..7) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = true
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Dawn"
elsif (8..17) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = true
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Day"
end
else
if DUSK_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = true
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = true
return "Dusk"
elsif DAWN_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = true
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Dawn"
elsif NIGHT_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = true
$light_switch = true
return "Night"
elsif DAY_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = true
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Day"
end
end
end
end

$game_time = Game_Time.new

class Window_DayNight < Window_Base

include Jet_DayNight

def initialize
super(0, 360, 160, 56)
refresh
end

def refresh
self.contents.clear
$game_time.update_time unless UPDATE_ONLY_ON_MAP
if MILITARY_TIME
if $game_time.minute < 10
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + 0.to_s + $game_time.minute.to_s)
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + $game_time.minute.to_s)
end
else
if $game_time.minute < 10
if $game_time.hour > 12
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + ($game_time.hour - 12).to_s + ":" + 0.to_s + $game_time.minute.to_s + " " + "PM")
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + 0.to_s + $game_time.minute.to_s + " " + "AM")
end
else
if $game_time.hour > 12
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + ($game_time.hour - 12).to_s + ":" + $game_time.minute.to_s + " " + "PM")
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + $game_time.minute.to_s + " " + "AM")
end
end
end
end

def update
refresh
end
end

class Scene_Base

include Jet_DayNight

alias jet8922_update update unless $@
def update
jet8922_update
if UPDATE_ONLY_ON_MAP
$game_time.update_time if $scene.is_a?(Scene_Map)
else
$game_time.update_time unless $scene.is_a?(Scene_Title)
end
end
end

class Scene_Menu

alias jet3922_start start unless $@
def start
jet3922_start
@time_window = Window_DayNight.new if MENU_TIME_WINDOW
@time_window.y = 304 if MENU_TIME_WINDOW
end

alias jet3022_terminate terminate unless $@
def terminate
@time_window.dispose if MENU_TIME_WINDOW
jet3022_terminate
end

alias jet3026_update update unless $@
def update
jet3026_update
@time_window.update if MENU_TIME_WINDOW
end
end

class Game_Interpreter

def jump_to_hour(hour)
if hour < 24
if hour > 0
$game_time.hour = hour
else
p "Hour must be above 0 and below 25, please edit the command."
end
else
p "Hour must be above 0 and below 25, please edit the command."
end
end

def add_time(time, amount)
case time
when "minute"
loop do
$game_time.minute += 1
amount -= 1
if amount == 0
break
end
end
when "hour"
loop do
$game_time.hour += 1
amount -= 1
if amount == 0
break
end
end
when "day"
loop do
$game_time.day += 1
amount -= 1
if amount == 0
break
end
end
when "month"
loop do
$game_time.month += 1
amount -= 1
if amount == 0
break
end
end
when "year"
loop do
$game_time.year += 1
amount -= 1
if amount == 0
break
end
end
end
end

def freeze_time(option)
if option == true
$game_time.frozen_time = true
elsif option == false
$game_time.frozen_time = false
elsif
p "The option you chose was neither true or false. Please error check and try again"
end
end
end

class Window_NumberInput

def index=(new_index)
@index = new_index
end
end

class Scene_Rest < Scene_Base

def start
super
create_menu_background
if $game_time.frozen_time
@notification_window = Window_Help.new
@notification_window.y = 188
@notification_window.set_text("Time is frozen, so you may not rest. Press enter to continue.", 1)
else
@number_window = Window_NumberInput.new
@number_window.digits_max = 3
@number_window.x = 210
@number_window.y = 190
@number_window.index = 2
@number_window.active = true
@description_window = Window_Help.new
@description_window.set_text("How many hours would you like to rest?", 1)
@decoration_window = Window_Base.new(210, 190, 120, 56)
end
end

def terminate
super
if $game_time.frozen_time
@notification_window.dispose
dispose_menu_background
else
@number_window.dispose
@description_window.dispose
@decoration_window.dispose
dispose_menu_background
end
end

def update
if $game_time.frozen_time
if Input.trigger?(Input::C)
$scene = Scene_Map.new
end
else
@number_window.update
if Input.trigger?(Input::C)
loop do
$game_time.hour += 1
$game_time.update_time
@number_window.number -= 1
@number_window.update
Graphics.wait(10)
if @number_window.number == 0
break
end
$scene = Scene_Map.new
end
end
if Input.trigger?(Input::cool.gif
$scene = Scene_Map.new
end
end
end
end

class Scene_Map

include Jet_DayNight

alias jet3829_start start unless $@
def start
unless $game_time.map_infos[$game_map.map_id].indoors?
$instant_tint = true
$game_time.get_weather unless $first_weather
$first_weather = true
end
@time_window = Window_DayNight.new if MAP_TIME_WINDOW
@time_window.x = MAP_TIME_WINDOW_COORDS[0] if MAP_TIME_WINDOW
@time_window.y = MAP_TIME_WINDOW_COORDS[1] if MAP_TIME_WINDOW
jet3829_start
end

alias jet3023_update update unless $@
def update
if @message_window.openness > 0 && MAP_TIME_WINDOW
@time_window.visible = false
elsif MAP_TIME_WINDOW
@time_window.visible = true
end
@time_window.update if MAP_TIME_WINDOW
update_rest if ALLOW_REST
jet3023_update
end

alias jet6454_terminate terminate unless $@
def terminate
@time_window.dispose if MAP_TIME_WINDOW
jet6454_terminate
end

def update_rest
if Input.trigger?(REST_BUTTON)
snapshot_for_background
$scene = Scene_Rest.new
end
end
end

class Scene_File

alias jet3890_write_save_data write_save_data unless $@
def write_save_data(file)
jet3890_write_save_data(file)
Marshal.dump($game_time, file)
end

alias jet5935_read_save_data read_save_data unless $@
def read_save_data(file)
jet5935_read_save_data(file)
$game_time = Marshal.load(file)
end
end

class Spriteset_Map

include Jet_DayNight

if THOMAS_EDISON_COMPATABILITY
alias jet3422_update_light_effects update_light_effects unless $@
def update_light_effects
if $light_switch || $game_time.map_infos[$game_map.map_id].indoors?
jet3422_update_light_effects
else
for effect in @light_effects
effect.light.visible = false
end
end
end
end
end

class Game_Battler

include Jet_DayNight

if ALIGNMENT_SYSTEM_COMPATABILITY

def atk
n = [[base_atk + @atk_plus, 1].max, 999].min
for state in states do n *= state.atk_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[0]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[0]
end
return n
end

def def
n = [[base_def + @def_plus, 1].max, 999].min
for state in states do n *= state.def_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[1]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[1]
end
return n
end

def spi
n = [[base_spi + @spi_plus, 1].max, 999].min
for state in states do n *= state.spi_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[2]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[2]
end
return n
end

def agi
n = [[base_agi + @agi_plus, 1].max, 999].min
for state in states do n *= state.agi_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[3]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[3]
end
return n
end
end
end

class Game_Map

alias jet5044_setup setup unless $@
def setup(*args)
jet5044_setup(*args)
@map_infos = load_data("Data/MapInfos.rvdata")
if @map_infos[@map_id].indoors?
@screen.start_tone_change(Tone.new(0, 0, 0), 0)
@screen.weather(0, 0, 0)
end
end
end

unless $engine_scripts.nil?
JetEngine.active("DayNight System", "v1.2.1")
end

Equipment skills by Reedo
Jukebox by Crazyninjaguy & Piejamas | Collides with Omega7's quest system. Meant to show a slot in the menu which shows quests to be done/completed
Reborn! by Woratana | Collides with all. Meant to restart game with finished save's equipment and stats
Omega Quest System by Omega7 | Collides with Jukebox. Enables creation of quests with ease.
Rei's Actor Resize System by reijubv. | Collides with Day/Night system. Allows you to resize events/players, like in Legend of Zelda. Great in ABSs.
Spoiler
#=========================================================================
======
# Time System
# By Jet10985 (Jet)
# Slight Help by: Mr. Anonymous
#===============================================================================
# This script is my time system. Time System: A system of tracking in-game "time"
# which in-turn contain more systems relating to time. Used for visual effects,
# the novelty, and eventing purposes. My Time System: see Time system +
# see ultimate.
# This script has: 50 customization option.
#===============================================================================

#===============================================================================
# Features
#===============================================================================
# CHECK means the script has the feature
# WIP means it is a future feature
#-------------------------------------------------------------------------------
# Thomas Edison Compat. CHECK
# Auto-Tint CHECK
# Auto-Weather CHECK
# Auto-Season CHECK
# Time to variable/switch CHECK
# Weather to switch CHECK
# Changable Days/Months CHECK
# Military time CHECK
# Real time option CHECK
# Resting CHECK
# Map/Menu Windows CHECK
# Changable map encounters WIP
# Map labels CHECK
# Alignment System compat. CHECK
# Tile set Changes WIP
# Skill damage differences depending on time of day. WIP
# Update only on Map feature. CHECK
#===============================================================================

=begin
Built-in script commands:

freeze_time(option) <--------------- Script-time command only
option = true/false. true freeze's time, false unfreeze's it.

add_time(type, amount) <------------------- Script-time command only
type = "minute", "hour", "day", "month", "year" according to what you want to add
amount = amount of that time you want to add.

jump_to_hour(hour) <-------------------------- Script-time command only
hour = the hour you want to jump to. Be below 25 and above 0.
--------------------------------------------------------------------------------
Compatability Instructions:

If you want compatability with Jet's Alignment system and/or Thomas Edison VX,
place this script below both of them and toggle the configuration for them below

=end

#===============================================================================
# BEGIN CONFIGURATION
#===============================================================================

module Jet_DayNight # Don't Touch.

#===============================================================================
# Detail Configuration
#===============================================================================

# Use computer time or script time? false is script, true is computer.
REAL_TIME = false

# Hour script time will start at.
STARTING_HOUR = 1

# Minute script time will start at.
STARTING_MINUTE = 0

# Day script time will start at.
STARTING_DAY = 0

# Year script time will start at.
STARTING_YEAR = 300

# This is how many frames it takes for a Script time minute to pass.
# 60 frames = 1 Real life second. So 120 would be 2 real life seconds, etc.
MINUTE_LENGTH = 120

# Military time or AM/PM time? false is AM/PM, true is military.
MILITARY_TIME = false

# Should time only update on the map, and no where else?
UPDATE_ONLY_ON_MAP = true

# Automaticly change seasons? (This is auto-weather as well)
AUTO_SEASONS = true

# Automaticly tint according to time of day/weather?
AUTO_TINT = true

# Allows resting? Resting is the ability to call a scene that will allow
# the player to "rest" for a certain amount of hours. Script time only.
ALLOW_REST = true

# The button to call the resting menu.
REST_BUTTON = Input::F7

# Include a window showing time of day, month, and day name in the menu?
MENU_TIME_WINDOW = true

# Include a window showing time of day and day name on the map?
MAP_TIME_WINDOW = true

# These are the X and Y coordinates of the map time window if you choose to
# display the window on the map.
MAP_TIME_WINDOW_COORDS = [384, 360]

# This will add compatability with Thomas Edison VX the same as if you were
# using KGC's day/night.
# Meaning, lights will be on during night and off during day.
THOMAS_EDISON_COMPATABILITY = true

# This will add Jet's Alignment System compatability. Meaning, if you
# have negative alignment, dusk and night will give bonus stats, and
# vice versa for dawn and day if you're good.
ALIGNMENT_SYSTEM_COMPATABILITY = true

# This is the positive alignment bonus in dawn/day. These are in decimals.
# By default, all bonuses are 1.2, meaning 20% bonus.
# ATK DEF SPI AGI
GOOD_BONUSES = [1.2, 1.2, 1.2, 1.2]

# This is the negative alignment bonus in dusk/night. These are in decimals.
# By default, all bonuses are 1.2, meaning 20% bonus.
# ATK DEF SPI AGI
BAD_BONUSES = [1.2, 1.2, 1.2, 1.2]


#===============================================================================
# Calendar Configuration (Script time only)
#===============================================================================

# These are the months in a 3-4 letter form that will be used.
MONTHS = {

0 => ["Jan", 31], # month number => ["Month name", days in month],
1 => ["Feb", 28], # month number => ["Month name", days in month],
2 => ["Mar", 31], # month number => ["Month name", days in month],
3 => ["Apr", 30],
4 => ["May", 31],
5 => ["June", 30],
6 => ["July", 31],
7 => ["Aug", 31],
8 => ["Sept", 30],
9 => ["Oct", 31],
10 => ["Nov", 30],
11 => ["Dec", 31] }

# These are the days in the month in a 3-4 letter form for window space.
DAYS = {

0 => "Sun", # day number => day name
1 => "Mon", # day number => day name
2 => "Tues", # day number => day name
3 => "Wed",
4 => "Thu",
5 => "Fri",
6 => "Sat" }

#===============================================================================
# Switches Configuration (Script time and Real time)
#===============================================================================

# The switch that will turn on when it is Autumn.
AUTUMN_SWITCH = 50

# The switch that will turn on when it is Winter.
WINTER_SWITCH = 51

# The switch that will turn on when it is Summer.
SUMMER_SWITCH = 52

# The switch that will turn on when it is Spring.
SPRING_SWITCH = 53

# The switch that will turn on when it is Raining.
RAIN_SWITCH = 54

# The switch that will turn on when it is Snowing.
SNOW_SWITCH = 55

# The switch that will turn on when it is Stormy.
STORM_SWITCH = 56

# The switch that will turn on when it is Night.
NIGHT_SWITCH = 57

# The switch that will turn on when it is Dawn.
DAWN_SWITCH = 58

# The switch that will turn on when it is Day.
DAY_SWITCH = 59

# The switch that will turn on when it is Dusk.
DUSK_SWITCH = 60

#===============================================================================
# Variable Configuration (Script time and Real time)
#===============================================================================

# Variable hour will be stored in.
HOUR_VARIABLE = 50

# Variable minute will be stored in.
MINUTE_VARIABLE = 51

# Variable day will be stored in.
DAY_VARIABLE = 52

# Variable month will be stored in.
MONTH_VARIABLE = 53

# Variable year will be stored in.
YEAR_VARIABLE = 54

#===============================================================================
# Weather Configuration (Script time and Real time)
#-------------------------------------------------------------------------------
# Seasonal Numbers:
# 0 = Winter
# 1 = Autumn
# 2 = Summer
# 3 = Spring
#===============================================================================

# Seasons that rain will occur in randomly.
RAIN_SEASONS = [0, 1, 3]

# Seasons that snow will occur in randomly.
SNOW_SEASONS = [0, 1]

# Seasons that storms will occur in randomly.
STORM_SEASONS = [0, 1, 3]

#===============================================================================
# Season Configuration (Script time only)
#===============================================================================

# These months will be in the summer season.
SUMMER_MONTHS = [5, 6, 7]

# These months will be in the summer season.
WINTER_MONTHS = [11, 0, 1]

# These months will be in the summer season.
AUTUMN_MONTHS = [8, 9, 10]

# These months will be in the summer season.
SPRING_MONTHS = [2, 3, 4]

#===============================================================================
# Tint Configuration (Hours config for Script time only, tint for both.)
#===============================================================================

# These hours will be considered dusk.
DUSK_HOURS = [18, 19, 20, 21]

# These hours will be considered night.
NIGHT_HOURS = [22, 23, 24, 1, 2, 3]

# These hours are considered dawn.
DAWN_HOURS = [4, 5, 6, 7]

# These hours are considered day.
DAY_HOURS = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]

# This is the tint that will be applied for dusk.
DUSK_TINT = Tone.new(17, -51, -102, 0)

# This is the tint that will be applied for night.
NIGHT_TINT = Tone.new(-187, -119, -17, 68)

# This is the tint that will be applied for dawn.
DAWN_TINT = Tone.new(17, -51, -102, 0)

# This is the tint that will be applied for day.
DAY_TINT = Tone.new(0, 0, 0, 0)

# This is the amount of time it takes for tone to change from one to another.
FADE_LENGTH = 240

end

#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class RPG::MapInfo

def name
return @name.gsub(/\[.*\]/) {""}
end

def indoors?
return @name.scan(/\[JDN\]/).size > 0
end
end

class Game_Time

include Jet_DayNight

attr_accessor :day
attr_accessor :day_name
attr_accessor :days_passed
attr_accessor :month
attr_accessor :month_name
attr_accessor :month_day
attr_accessor :hour
attr_accessor :minute
attr_accessor :second
attr_accessor :minute_length
attr_accessor :year
attr_accessor :frozen_time
attr_accessor :map_infos

def initialize
if REAL_TIME
@day = Time.now.strftime("%j").to_i
@day_name = Time.now.strftime('%a')
@month = Time.now.strftime("%m").to_i
@month_name = Time.now.strftime("%b")
@month_day = Time.now.strftime("%d")
@hour = Time.now.hour
@minute = Time.now.min
@year = Time.now.strftime("%Y").to_i
else
@day = STARTING_DAY % DAYS.keys.size
@day_name = DAYS[@day]
@days_passed = STARTING_DAY
@hour = STARTING_HOUR
@month = 0
@minute = STARTING_MINUTE
@second = 0
@year = STARTING_YEAR
end
@frozen_time = false
@map_infos = load_data("Data/MapInfos.rvdata")
@minute_length = 0
end

def screen
if $game_temp.in_battle
return $game_troop.screen
else
return $game_map.screen
end
end

def update_time
@day_name = DAYS[@day]
@map_infos = load_data("Data/MapInfos.rvdata")
time_of_day = get_time_of_day
unless @map_infos[$game_map.map_id].indoors?
case time_of_day
when "Dusk"
if !$instant_tint
screen.start_tone_change(DUSK_TINT, FADE_LENGTH) unless screen.tone == DUSK_TINT || !AUTO_TINT
else
screen.start_tone_change(DUSK_TINT, 0)
end
when "Night"
if !$instant_tint
screen.start_tone_change(NIGHT_TINT, FADE_LENGTH) unless screen.tone == NIGHT_TINT || !AUTO_TINT
else
screen.start_tone_change(NIGHT_TINT, 0)
end
when "Dawn"
if !$instant_tint
screen.start_tone_change(DAWN_TINT, FADE_LENGTH) unless screen.tone == DAWN_TINT || !AUTO_TINT
else
screen.start_tone_change(DAWN_TINT, 0)
end
when "Day"
if !$instant_tint
screen.start_tone_change(DAY_TINT, FADE_LENGTH) unless screen.tone == DAY_TINT || !AUTO_TINT
else
screen.start_tone_change(DAY_TINT, 0)
end
end
get_weather
end
if REAL_TIME
@day = Time.now.strftime("%j").to_i
@day_name = Time.now.strftime('%a')
@month = Time.now.strftime("%m").to_i
@month_name = Time.now.strftime("%b")
@month_day = Time.now.strftime("%d")
@hour = Time.now.hour
@minute = Time.now.min
@second = Time.now.sec
@year = Time.now.strftime("%Y").to_i
else
@second += 1
@minute_length += 1 unless @frozen_time
if @minute_length == MINUTE_LENGTH
@minute += 1
@minute_length = 0
end
if @minute == 60
@hour += 1
@minute = 0
end
if @hour == 25
@day += 1
@hour = 1
end
if @day == DAYS.keys.size
@day = 0
@days_passed += DAYS.keys.size
end
if @days_passed > MONTHS[@month][1]
@month += 1
end
if @month == MONTHS.keys.size
@year += 1
@month = 0
@days_passed = 0
end
end
$game_variables[MINUTE_VARIABLE] = @minute
$game_variables[HOUR_VARIABLE] = @hour
$game_variables[YEAR_VARIABLE] = @year
$game_variables[DAY_VARIABLE] = @day
$game_variables[MONTH_VARIABLE] = @month
get_season
if @seconds == 1000
@seconds = 0
end
end

def get_month_data(type)
case type
when 0
return @month
when 1
return @month_name
when 2
return @month_day
end
end

def get_day_data(type)
case type
when 0
return @day
when 1
return @day_name
end
end

def get_time_data(type)
case type
when 0
return @second
when 1
return @minute
when 2
return @hour
when 3
return @year
end
end

def get_season
if REAL_TIME
if @month == 12 || 1 || 2
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = true
return "Winter"
elsif @month == 3 || 4 || 5
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SPRING_SWITCH] = true
return "Spring"
elsif @month == 6 || 7 || 8
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SUMMER_SWITCH] = true
return "Summer"
elsif @month == 9 || 10 || 11
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[AUTUMN_SWITCH] = true
return "Autumn"
end
else
if SUMMER_MONTHS.include?(@month)
$game_switches[SUMMER_SWITCH] = true
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
return "Summer"
elsif WINTER_MONTHS.include?(@month)
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = true
return "Winter"
elsif AUTUMN_MONTHS.include?(@month)
$game_switches[SPRING_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[AUTUMN_SWITCH] = true
return "Autumn"
elsif SPRING_MONTHS.include?(@month)
$game_switches[AUTUMN_SWITCH] = false
$game_switches[SUMMER_SWITCH] = false
$game_switches[WINTER_SWITCH] = false
$game_switches[SPRING_SWITCH] = true
return "Spring"
end
end
end

def get_weather
random_weather = get_season
new_weather = []
case random_weather
when "Winter"
new_weather.push("Clear")
if RAIN_SEASONS.include?(0)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(0)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(0)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Autumn"
new_weather.push("Clear")
if RAIN_SEASONS.include?(1)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(1)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(1)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Summer"
new_weather.push("Clear")
if RAIN_SEASONS.include?(2)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(2)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(2)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
when "Spring"
new_weather.push("Clear")
if RAIN_SEASONS.include?(3)
new_weather.push("Rain")
end
if SNOW_SEASONS.include?(3)
new_weather.push("Snow")
end
if STORM_SEASONS.include?(3)
new_weather.push("Storm")
end
stuff = rand(new_weather.size - 1)
@more_stuff = new_weather[stuff]
end
case @more_stuff
when "Clear"
screen.weather(0, 0, 0)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = false
when "Rain"
screen.weather(1, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = true
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = false
when "Storm"
screen.weather(2, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = true
$game_switches[SNOW_SWITCH] = false
when "Snow"
screen.weather(3, 4 || 5, 999)
$game_switches[RAIN_SWITCH] = false
$game_switches[STORM_SWITCH] = false
$game_switches[SNOW_SWITCH] = true
end
end

def get_time_of_day
if REAL_TIME
if (18..21) === @hour
$game_switches[DUSK_SWITCH] = true
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = true
return "Dusk"
elsif (22..24) === @hour || (1..3) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = true
$light_switch = true
return "Night"
elsif (4..7) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = true
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Dawn"
elsif (8..17) === @hour
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = true
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Day"
end
else
if DUSK_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = true
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = true
return "Dusk"
elsif DAWN_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = true
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Dawn"
elsif NIGHT_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = false
$game_switches[NIGHT_SWITCH] = true
$light_switch = true
return "Night"
elsif DAY_HOURS.include?(@hour)
$game_switches[DUSK_SWITCH] = false
$game_switches[DAWN_SWITCH] = false
$game_switches[DAY_SWITCH] = true
$game_switches[NIGHT_SWITCH] = false
$light_switch = false
return "Day"
end
end
end
end

$game_time = Game_Time.new

class Window_DayNight < Window_Base

include Jet_DayNight

def initialize
super(0, 360, 160, 56)
refresh
end

def refresh
self.contents.clear
$game_time.update_time unless UPDATE_ONLY_ON_MAP
if MILITARY_TIME
if $game_time.minute < 10
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + 0.to_s + $game_time.minute.to_s)
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + $game_time.minute.to_s)
end
else
if $game_time.minute < 10
if $game_time.hour > 12
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + ($game_time.hour - 12).to_s + ":" + 0.to_s + $game_time.minute.to_s + " " + "PM")
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + 0.to_s + $game_time.minute.to_s + " " + "AM")
end
else
if $game_time.hour > 12
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + ($game_time.hour - 12).to_s + ":" + $game_time.minute.to_s + " " + "PM")
else
self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + " " + $game_time.hour.to_s + ":" + $game_time.minute.to_s + " " + "AM")
end
end
end
end

def update
refresh
end
end

class Scene_Base

include Jet_DayNight

alias jet8922_update update unless $@
def update
jet8922_update
if UPDATE_ONLY_ON_MAP
$game_time.update_time if $scene.is_a?(Scene_Map)
else
$game_time.update_time unless $scene.is_a?(Scene_Title)
end
end
end

class Scene_Menu

alias jet3922_start start unless $@
def start
jet3922_start
@time_window = Window_DayNight.new if MENU_TIME_WINDOW
@time_window.y = 304 if MENU_TIME_WINDOW
end

alias jet3022_terminate terminate unless $@
def terminate
@time_window.dispose if MENU_TIME_WINDOW
jet3022_terminate
end

alias jet3026_update update unless $@
def update
jet3026_update
@time_window.update if MENU_TIME_WINDOW
end
end

class Game_Interpreter

def jump_to_hour(hour)
if hour < 24
if hour > 0
$game_time.hour = hour
else
p "Hour must be above 0 and below 25, please edit the command."
end
else
p "Hour must be above 0 and below 25, please edit the command."
end
end

def add_time(time, amount)
case time
when "minute"
loop do
$game_time.minute += 1
amount -= 1
if amount == 0
break
end
end
when "hour"
loop do
$game_time.hour += 1
amount -= 1
if amount == 0
break
end
end
when "day"
loop do
$game_time.day += 1
amount -= 1
if amount == 0
break
end
end
when "month"
loop do
$game_time.month += 1
amount -= 1
if amount == 0
break
end
end
when "year"
loop do
$game_time.year += 1
amount -= 1
if amount == 0
break
end
end
end
end

def freeze_time(option)
if option == true
$game_time.frozen_time = true
elsif option == false
$game_time.frozen_time = false
elsif
p "The option you chose was neither true or false. Please error check and try again"
end
end
end

class Window_NumberInput

def index=(new_index)
@index = new_index
end
end

class Scene_Rest < Scene_Base

def start
super
create_menu_background
if $game_time.frozen_time
@notification_window = Window_Help.new
@notification_window.y = 188
@notification_window.set_text("Time is frozen, so you may not rest. Press enter to continue.", 1)
else
@number_window = Window_NumberInput.new
@number_window.digits_max = 3
@number_window.x = 210
@number_window.y = 190
@number_window.index = 2
@number_window.active = true
@description_window = Window_Help.new
@description_window.set_text("How many hours would you like to rest?", 1)
@decoration_window = Window_Base.new(210, 190, 120, 56)
end
end

def terminate
super
if $game_time.frozen_time
@notification_window.dispose
dispose_menu_background
else
@number_window.dispose
@description_window.dispose
@decoration_window.dispose
dispose_menu_background
end
end

def update
if $game_time.frozen_time
if Input.trigger?(Input::C)
$scene = Scene_Map.new
end
else
@number_window.update
if Input.trigger?(Input::C)
loop do
$game_time.hour += 1
$game_time.update_time
@number_window.number -= 1
@number_window.update
Graphics.wait(10)
if @number_window.number == 0
break
end
$scene = Scene_Map.new
end
end
if Input.trigger?(Input::cool.gif
$scene = Scene_Map.new
end
end
end
end

class Scene_Map

include Jet_DayNight

alias jet3829_start start unless $@
def start
unless $game_time.map_infos[$game_map.map_id].indoors?
$instant_tint = true
$game_time.get_weather unless $first_weather
$first_weather = true
end
@time_window = Window_DayNight.new if MAP_TIME_WINDOW
@time_window.x = MAP_TIME_WINDOW_COORDS[0] if MAP_TIME_WINDOW
@time_window.y = MAP_TIME_WINDOW_COORDS[1] if MAP_TIME_WINDOW
jet3829_start
end

alias jet3023_update update unless $@
def update
if @message_window.openness > 0 && MAP_TIME_WINDOW
@time_window.visible = false
elsif MAP_TIME_WINDOW
@time_window.visible = true
end
@time_window.update if MAP_TIME_WINDOW
update_rest if ALLOW_REST
jet3023_update
end

alias jet6454_terminate terminate unless $@
def terminate
@time_window.dispose if MAP_TIME_WINDOW
jet6454_terminate
end

def update_rest
if Input.trigger?(REST_BUTTON)
snapshot_for_background
$scene = Scene_Rest.new
end
end
end

class Scene_File

alias jet3890_write_save_data write_save_data unless $@
def write_save_data(file)
jet3890_write_save_data(file)
Marshal.dump($game_time, file)
end

alias jet5935_read_save_data read_save_data unless $@
def read_save_data(file)
jet5935_read_save_data(file)
$game_time = Marshal.load(file)
end
end

class Spriteset_Map

include Jet_DayNight

if THOMAS_EDISON_COMPATABILITY
alias jet3422_update_light_effects update_light_effects unless $@
def update_light_effects
if $light_switch || $game_time.map_infos[$game_map.map_id].indoors?
jet3422_update_light_effects
else
for effect in @light_effects
effect.light.visible = false
end
end
end
end
end

class Game_Battler

include Jet_DayNight

if ALIGNMENT_SYSTEM_COMPATABILITY

def atk
n = [[base_atk + @atk_plus, 1].max, 999].min
for state in states do n *= state.atk_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[0]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[0]
end
return n
end

def def
n = [[base_def + @def_plus, 1].max, 999].min
for state in states do n *= state.def_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[1]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[1]
end
return n
end

def spi
n = [[base_spi + @spi_plus, 1].max, 999].min
for state in states do n *= state.spi_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[2]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[2]
end
return n
end

def agi
n = [[base_agi + @agi_plus, 1].max, 999].min
for state in states do n *= state.agi_rate / 100.0 end
n = [[Integer(n), 1].max, 999].min
if $game_system.alignment < 0 && $light_switch
n *= BAD_BONUS[3]
elsif $game_system.alignment > 0 && !$light_switch
n *= GOOD_BONUS[3]
end
return n
end
end
end

class Game_Map

alias jet5044_setup setup unless $@
def setup(*args)
jet5044_setup(*args)
@map_infos = load_data("Data/MapInfos.rvdata")
if @map_infos[@map_id].indoors?
@screen.start_tone_change(Tone.new(0, 0, 0), 0)
@screen.weather(0, 0, 0)
end
end
end

unless $engine_scripts.nil?
JetEngine.active("DayNight System", "v1.2.1")
end


I've given several attempts to fix them myself, but to no avail.

If someone could identify the problems and, preferably, fix out the chinks, that'd be supreme biggrin.gif

Link to files : http://www.mediafire.com/?tkmjzlrnhgn

Edit : So really, it's only the day/night system and the resize script which collide with each other now.

This post has been edited by MajinBangFlash: Jul 9 2010, 04:00 AM


__________________________
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Jul 7 2010, 02:02 AM
Post #2


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




what are you implying pal? i dont think this thing belong here.... hey MODS move please


__________________________

Go to the top of the page
 
+Quote Post
   
Speed@
post Jul 7 2010, 03:50 AM
Post #3


Level 12
Group Icon

Group: Revolutionary
Posts: 203
Type: None
RM Skill: Undisclosed




QUOTE (ASCIIgod @ Jul 7 2010, 02:02 AM) *
what are you implying pal? i dont think this thing does not belong here.... hey MODS move please

Instead of making a useless post, which mods may ont see, you could just use the report feature.
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Jul 7 2010, 04:49 AM
Post #4


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (Speed@ @ Jul 7 2010, 08:50 PM) *
QUOTE (ASCIIgod @ Jul 7 2010, 02:02 AM) *
what are you implying pal? i dont think this thing does not belong here.... hey MODS move please

Instead of making a useless post, which mods may ont see, you could just use the report feature.


i just did it for my post count.... i already reported this thing


__________________________

Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Jul 7 2010, 08:41 AM
Post #5


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




All of them clash with each other or is it that you installed all six and all of a sudden the game started getting errors? If you haven't tested yet, try to narrow it down to one that clashes with the others.

Do this by installing one script, then testing the game. Uninstall then do the next. Repeat until all six are done.
This tests if any of the scripts clash with anything in your game.

Next, Install two scripts.
Test the game.
Install a third script
Test the game.
repeat until you get an error.

This will narrow it down to whether one script is clashing with the set.

You can do this while waiting for replies and post the results just to help out people that are trying to solve the issue for you. This may be useful to getting it resolved quicker.
Go to the top of the page
 
+Quote Post
   
MajinBangFlash
post Jul 7 2010, 11:02 AM
Post #6


Retro-console lover
Group Icon

Group: Revolutionary
Posts: 195
Type: Writer
RM Skill: Skilled




QUOTE (LordHeinrich @ Jul 7 2010, 05:41 PM) *
All of them clash with each other or is it that you installed all six and all of a sudden the game started getting errors? If you haven't tested yet, try to narrow it down to one that clashes with the others.

Do this by installing one script, then testing the game. Uninstall then do the next. Repeat until all six are done.
This tests if any of the scripts clash with anything in your game.

Next, Install two scripts.
Test the game.
Install a third script
Test the game.
repeat until you get an error.

This will narrow it down to whether one script is clashing with the set.

You can do this while waiting for replies and post the results just to help out people that are trying to solve the issue for you. This may be useful to getting it resolved quicker.


Yeah, I've done that. The quest system is meant to open a slot in the menu, but it doesn't appear when the scripts are alongside it. On it's own, it works. I believe it collides with the jukebox system, which is also meant to make a slot in the menu which allows players to play tracks from the game anytime, anyplace.
The Rei resize script works without the Day/Night system, but not with it. The Day/Night system works whether or not the resize script is along side it.
I already configured the equipment skills one, that was just variables colliding.
Though with Reborn!, I haven't a clue with which that collides with, as it does not work with any of the scripts along side it.


__________________________
Go to the top of the page
 
+Quote Post
   
Speed@
post Jul 7 2010, 02:20 PM
Post #7


Level 12
Group Icon

Group: Revolutionary
Posts: 203
Type: None
RM Skill: Undisclosed




QUOTE (ASCIIgod @ Jul 7 2010, 05:49 AM) *
QUOTE (Speed@ @ Jul 7 2010, 08:50 PM) *
QUOTE (ASCIIgod @ Jul 7 2010, 02:02 AM) *
what are you implying pal? i dont think this thing does not belong here.... hey MODS move please

Instead of making a useless post, which mods may ont see, you could just use the report feature.


i just did it for my post count.... i already reported this thing

Well that could be called spamming then. wink.gif
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Jul 7 2010, 02:39 PM
Post #8


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




Do you mean that there are no errors, they just don't show up on the menu so you can't use them?
Go to the top of the page
 
+Quote Post
   
Speed@
post Jul 7 2010, 03:29 PM
Post #9


Level 12
Group Icon

Group: Revolutionary
Posts: 203
Type: None
RM Skill: Undisclosed




I'm guessing the methods from scripts for the menu overwrite itself, the menu index and all. I had the same problem quite some time ago, the solution is to manually script that part. If you give me all the scripts that are colliding, I can do it for you. (Tomorrow, going to bed now.)
~Speed
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Jul 7 2010, 04:27 PM
Post #10


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




If that's the case, I'll just do it so I can see how upgraded internet speed performs tongue.gif

Answer: 83 KB/s .. that's about double smile.gif

Two Custom Menus
http://www.megaupload.com/?d=FX3WZF75


What I did was modify the Default Menu to Show both Quest Journal and Juke Box in it.

Also, I included Main Menu Melody in the Demo.

I customized Main Menu Melody for you in order to show both options as well.

You can decide which one to use by editing Main Menu Melody.

If you set

$imported["MainMenuMelody"] = true

it will turn OFF The Default Menu and turn ON Main Menu Melody.

If you set

$imported["MainMenuMelody"] = false

It will turn OFF Main Menu Melody and Turn ON the Default Menu.

I had to do this, because Main Menu Melody Clashed with the Menu Mod I made. I also took the liberty of changing a couple of Menu Icons for you when using Main Menu Melody (god... you have like 30,000 icons in your game tongue.gif)
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Jul 8 2010, 12:33 AM
Post #11


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (Speed@ @ Jul 8 2010, 07:20 AM) *
QUOTE (ASCIIgod @ Jul 7 2010, 05:49 AM) *
QUOTE (Speed@ @ Jul 7 2010, 08:50 PM) *
QUOTE (ASCIIgod @ Jul 7 2010, 02:02 AM) *
what are you implying pal? i dont think this thing does not belong here.... hey MODS move please

Instead of making a useless post, which mods may ont see, you could just use the report feature.


i just did it for my post count.... i already reported this thing

Well that could be called spamming then. wink.gif


if it is i will get another warn pal.... but since not it is considered proper post ^^.... besides maybe some mod will open this thread and read my report and move this.... ph34r.gif


__________________________

Go to the top of the page
 
+Quote Post
   
MajinBangFlash
post Jul 8 2010, 02:36 AM
Post #12


Retro-console lover
Group Icon

Group: Revolutionary
Posts: 195
Type: Writer
RM Skill: Skilled




QUOTE (LordHeinrich @ Jul 8 2010, 01:27 AM) *
If that's the case, I'll just do it so I can see how upgraded internet speed performs tongue.gif

Answer: 83 KB/s .. that's about double smile.gif

Two Custom Menus
http://www.megaupload.com/?d=FX3WZF75


What I did was modify the Default Menu to Show both Quest Journal and Juke Box in it.

Also, I included Main Menu Melody in the Demo.

I customized Main Menu Melody for you in order to show both options as well.

You can decide which one to use by editing Main Menu Melody.

If you set

$imported["MainMenuMelody"] = true

it will turn OFF The Default Menu and turn ON Main Menu Melody.

If you set

$imported["MainMenuMelody"] = false

It will turn OFF Main Menu Melody and Turn ON the Default Menu.

I had to do this, because Main Menu Melody Clashed with the Menu Mod I made. I also took the liberty of changing a couple of Menu Icons for you when using Main Menu Melody (god... you have like 30,000 icons in your game tongue.gif)


Ah, dude, I owe you a ton! I can't thank you enough..


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 11:10 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker