~[Day/Night System]~, Not made by me, just translated. |
|
|
|
|
Aug 14 2008, 04:26 PM
|

Level 20

Group: Revolutionary
Posts: 407
Type: Musician
RM Skill: Advanced

|
QUOTE (kccarmea @ Aug 14 2008, 02:18 PM)  My days don't change help me!
My days don't change help me! One time would have been enough ...
__________________________
|
|
|
|
|
|
|
|
|
Aug 21 2008, 08:45 PM
|

Level 19

Group: Revolutionary
Posts: 371
Type: Event Designer
RM Skill: Beginner

|
QUOTE (VerifyedRasta @ Aug 14 2008, 07:48 PM)  QUOTE (kccarmea @ Aug 14 2008, 02:18 PM)  My days don't change help me!
My days don't change help me! One time would have been enough ... Was that really necessary to say? Anyway...you're skilled aren't you? Can you help any of us with this script until the author returns?
__________________________
Fall to the power of the Emo! We have cookies!Notice!! Check out my topic (http://www.rpgrevolution.com/forums/index.php?showtopic=45736&st=0#entry454175) if you're interested in helping me make a script that limits the number of characters & items you use in battle AND also an item durability feature! Thanks for any help in advance!
|
|
|
|
|
|
|
|
|
Aug 21 2008, 10:58 PM
|

芸術家

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled

|
Have you tried using an updated version of the script on the KGC site?
__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting Current Project[VX]: Obsidian Trilogy just started 08/12/2008 Current Project[XP&RM2K3]: none
|
|
|
|
|
|
|
|
|
Sep 3 2008, 10:44 PM
|

Group: Member
Posts: 4
Type: Developer
RM Skill: Skilled

|
QUOTE (Netto @ Jun 25 2008, 12:39 PM)  QUOTE (drebenk @ Jun 24 2008, 06:12 PM)  Ok I put the script above Main but what do I need to do in order to start this scirpt? When I start my game and wait for a while nothing happens. Do you need to set up some events in order for the script to work or what? There is no explanation on what do you need to do so that the script can work. At least with Kylocks script you just put it above Main and add [KTS] to the map name and the script starts to work. Can somebody give some directions on how to start this script? If you chose method 1, the script is running according to your game time, play around for about 5mins and the time of day should change, also put [DN_VOID] in map names of which you do not wish the day/night system to apply to. mmm...  maybe you should read the instruction manual first
__________________________
uuuh...
what kind of script it is??
Is it Java??
Pascal??
or Visual Basic??
or Delphi??
or C++??
or what??
|
|
|
|
|
|
|
|
|
Dec 3 2008, 08:10 PM
|
Level 9

Group: Revolutionary
Posts: 142
Type: Event Designer
RM Skill: Undisclosed

|
i cant get this script to work, i added it above main, but it stays day(i waited 15min for it to change) when i play the game. Is there a way to see the time so you know if the game is working.
__________________________
Click here to find out your IQ
|
|
|
|
|
|
|
|
|
Dec 11 2008, 06:07 AM
|

Level 1

Group: Member
Posts: 14
Type: Event Designer
RM Skill: Advanced

|
As for making events happen at specific times.... I have a theory I haven't tried it yet, but since the script (i think (I'm no good with scripts either)) seems to use variables... you can use those variables in the event conditions... this is a theory, I'll try it now...
what would be nice is some sort of pop-up window that says "Noon", "Evening" ect....
also, if this script dose use actual variables... you can use those varibles for other things as well to add stuff outside of just "Days" and "Phases" such as with mine, I'm tinkering with the idea of "moon phases" and that'll effect somethings as well... those can be an event if my theory is right... like after every couple of days the moon phase changes (full moon, no moon, red moon, harvest moon (orange/yellow))
though it would be more helpful if that were included in the script, if some nice person could figure out a way to modify it to do so, then specific enemy groups could show up during the different moon phases...
judging from how the script looks, it doesn't seem too hard but what do I know...
__________________________
DEAD KLAM PRODUCTIONS
Go to DeadKlam.com or not to learn more about us or not. Projects Ethereal Gate - RMXP - Temporarly Suspened A Mercenary's Tale - RMVX - meh...
|
|
|
|
|
|
|
|
|
Jan 2 2009, 12:51 PM
|
Level 1

Group: Member
Posts: 6
Type: Musician
RM Skill: Skilled

|
QUOTE (karu89 @ Jul 20 2008, 09:38 AM)  I get the same error, and my game can't run properly if i don't get it fixed same here
|
|
|
|
|
|
|
|
|
Jun 25 2009, 09:08 AM
|

Level 3

Group: Member
Posts: 39
Type: Event Designer
RM Skill: Advanced

|
so, this works throughout the game, by itself involuntarily? you don't have to set it to do it in certain maps, but you can right? I don't mean to be a bother, I'm just not an experienced scriptor, (Too many variables and coefficients) so I don't know how to do anything script related. As long as it does it by itself, i'm fine. its not hard to make sure it doesn't happen inside a house with that DN_VOID thing, but everything else is baffling lol
__________________________
Life=Honor Honor=God God=Life Soldier of John 3:16 XD     ~spoiler'd by HylaGSORBY FOR LIFE!!!
|
|
|
|
|
|
|
|
|
Jun 27 2009, 03:32 PM
|

Group: Member
Posts: 1
Type: None
RM Skill: Skilled

|
I was having that error, but i managed to fix it by using the Japanese version of the script on the site here and it worked fine. As for setting events up for certain times, use the variables number 11 (which is the day phase) and 12 (the number of days) as a branch conditon for anything you want to happen depending on those variables. So if i wanted someone to appear at night, i would use the variable number 11, and make the game check for it to be phase 3, which you would make it check for variable 11 to be set to 3. Also, it seems that when the script is set to option 1, it counts the steps before changing phases, so if you sit there it wont change. I think option 2 changes regardless, though. Hope this helps.
|
|
|
|
|
|
|
|
|
Jan 8 2010, 03:02 AM
|

Leongon of the Village of Awesome

Group: Revolutionary
Posts: 1,006
Type: Developer
RM Skill: Skilled

|
Im not good at english, but I'll try to comment something that may be useful for those who are looking for a time system script like me:
Analyzing a bit into this script, I can say that in the "METHOD=" option, you have 3 possibilities as follows:
METHOD=0 for a time system based on game playtime METHOD=1 for a time system based on steps walked METHOD=2 for a time system based on pc clock
The above bold lines must be in the first post description, It will save much pain!!!!!!!!!!!! Specially cuz the "translation" is saying that 1=game playtime and 2=steps and that is not true.
I see that most people in this thread abandon this script due to the lack on good translation(Yes, I also barely got to understand what the comments in the script are really supposed to mean) and support from the used that posted it. But comparing it with Kylock's time script features I think this script has more possibilities than his has, but lacks in support.
For those who only can use scripts that are well explained, organized and supported by his autor, use Kylock's. Im starting to understand scripts now, so I will use this one.
This post has been edited by leongon: Jan 8 2010, 03:11 AM
__________________________
Leon's Basic VX Scripts of Awesome: Step 1. Passive Skills - Create skills that add passive bonuses. (shitty) Step 2. Learning from Everyone - Learn skills from enemies, or allies, without being the target of the skill. (nice)Step 3. Dual Battle Landscapes - Set background and foreground image for your battles. (nice)Step 4. State Details - Add description to states, and allow viewing them on menu, and in battle. (nice)Step 5. Item Quality Colors - Colourize item, weapon, armor and skill's name according their quality or affinity. (very nice)Step 6. Skill Trees - Your actors can have talent trees now, like in the MMORPGs. (extremely nice)Step 7. Main Menu Manager - Easy, straight, and intuitive total control of commands for the main menu. (very nice)
Drawing commissions are open. Facesets... monsters... anything: click here.
 ---------------------------------------------------------------------------------------------------------------------------------  Second place again xD Deadly Christmas setup. 8.04 score... this one was not so fail. Yay! Twist of Fate. Worst game in the competition... Yay! Tie with two more guys out of 6 participants, so fail... Yay!
|
|
|
|
|
|
|
|
|
Jul 26 2010, 09:36 PM
|

Level 4

Group: Member
Posts: 47
Type: Writer
RM Skill: Intermediate

|
Hey guys, I read through the topic and I know a lot of you are confused at the particular translation this guy used, (Yahoo babel fish) and decided to try translating it with google, the result was slightly better. Though, I'm no expert on japanese to english translations, I've heard that google has better grammar.
Here you go.
Sorry about not including a "spoiler" button, but the damned thing doesn't work in my browser. If that's a problem, I'll come back and fix it when I get google chrome reinstalled.
Hope this helps.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/ # _ / Day-night switch ◆ - KGC_DayNight ◆ VX ◆ # _ / ◇ Last update: 2009/01/18 ◇ #_/----------------------------------------------- ----------------------------- # _ / Create the concept of day and night during the game. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#================================================= ============================= Item # customize ★ - Customize BEGIN ★ #================================================= =============================
module KGC module DayNight #, Day and night switching scheme ◆ 0 .. 1 .. 2 # number of steps over time .. real time (exactly) METHOD = 1
# Number of variables to save the phase ◆ # Variables that you specify here to store the current phase. PHASE_VARIABLE = 11 # Number of variables to save the days ◆ # Variables that you specify here to store the number of days elapsed. PASS_DAYS_VARIABLE = 12
# Does not change during the event phase ◆ STOP_ON_EVENT = true # Apply color range when fighting ◆ 2 .. 1 .. 0 # not only the background behind + enemy .. # ※ Generally used as a background for the map itself, but only the background color is set to 0 # Seems to have been applied. BG_TONE_IN_BATTLE = 0
# Set each phase ◆ # Phases # ["Name", color (Tone), switching time] # Create the format. # You can also increase the phase of the unfamiliar is not recommended. # # [Name] # The name of the phase. # The name itself is not meaningful. # [Color] # Color the whole screen. # If unsure, please do not change. # [Time switch] # Time to move on to the next phase. # If the second switching system over time, not just the number of steps if the number of steps. # For real time, time to switch the next state (Scheme 24). PHASE = [ ["Day", Tone.new (0, 0, 0), 300], # 0 phase ["Evening", Tone.new (-32, -96, -96), 100], # 1 Phase ["Night", Tone.new (-128, -128, -32), 250], # 2 Phase ["Morning", Tone.new (-48, -48, -16), 100], # 3 Phase ] # This can not delete ←!
# When the real time, # ["Day", Tone.new (0, 0, 0), 16], # 0 phase (16 at night) # ["Evening", Tone.new (0, -96, -96), 20], # 1 phase (20 at night) # ["Night", Tone.new (-96, -96, -64), 6], # 2 Phase (6:00 am) # ["Am", Tone.new (-48, -48, -16), 10], # 3 Phase (10:00 noon) # Something like this.
◆ Date # Phase changes # Specified here when the phase, adding the number of days. If the initial state # 0 .. 1 .. last night .. 2 .. 3 Morning Evening For real time # ※, the same number of days not real careful. PASS_DAY_PHASE = 3
# Fade time when the state switched ◆ (frame) Use # this default value. PHASE_DURATION = 60
◆ Time # Name # Start from the beginning the first day, go back to the first day of last week. Time itself does not mean #. # If you use a real time ※ Please make seven. WEEK_NAME = ["Sun", "month", "fire", "water", "wood", "gold", "Sat"] end end
#================================================= ============================= # End customizations ☆ - Customize END ☆ #================================================= =============================
$ Imported = () if $ imported == nil $ Imported ["DayNight"] = true
if $ data_mapinfos == nil $ Data_mapinfos = load_data ("Data / MapInfos.rvdata") end
module KGC:: DayNight BATTLE_TONE_NONE = 0 # shades of battle: None BATTLE_TONE_BG = 1 # Color of combat: body background Combat BATTLE_TONE_FULL = 2 # color: background + enemy
METHOD_TIME = 0 # elapsed time METHOD_STEP = 1 # number of steps Real time METHOD_RTIME = 2 #
module Regexp module MapInfo # Stop the transition DAYNIGHT_STOP = / \ [DN_STOP \] / i # Disable effect day and night DAYNIGHT_VOID = / \ [DN_VOID \] / i end
module Event # Light LUMINOUS = / \ [(?: LUMINOUS | emission) \] / i end
module Troop # Phase appearance APPEAR_PHASE = / \ [DN ((?: \ S * [\ -]? \ D + (?: \ S *,)?)+) \] / i end end #------------------------------------------------- ------------------------- # Group appeared determined enemy ○ # Troop: for the enemy group decision # Phase: determining phase #------------------------------------------------- ------------------------- def self.troop_appear? (troop, phase = $ game_system.daynight_phase) # Determine the emergence unless troop.appear_daynight_phase.empty? return false unless troop.appear_daynight_phase.include? (phase) end # Non-occurrence determination unless troop.nonappear_daynight_phase.empty? return false if troop.nonappear_daynight_phase.include? (phase) end
return true end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # □ KGC:: Commands #================================================= =============================
module KGC module Commands module_function #------------------------------------------------- ------------------------- # Stop day and night switching ○ #------------------------------------------------- ------------------------- def stop_daynight $ Game_system.daynight_change_enabled = false end #------------------------------------------------- ------------------------- # Start the day and night switching ○ #------------------------------------------------- ------------------------- def start_daynight $ Game_system.daynight_change_enabled = true end #------------------------------------------------- ------------------------- # Get the current Fezu名 ○ #------------------------------------------------- ------------------------- def get_daynight_name return KGC:: DayNight:: PHASE [get_daynight_phase] [0] end #------------------------------------------------- ------------------------- # Get the current day ○ # Variable_id: variable to assign ID #------------------------------------------------- ------------------------- def get_daynight_week (variable_id = 0) if KGC:: DayNight:: METHOD == KGC:: DayNight:: METHOD_RTIME week = Time.now.wday else days = $ game_variables [KGC:: DayNight:: PASS_DAYS_VARIABLE] week = (days% KGC:: DayNight:: WEEK_NAME.size) end
if variable_id> 0 $ Game_variables [variable_id] = week end return week end #------------------------------------------------- ------------------------- # Get the name of the current day ○ #------------------------------------------------- ------------------------- def get_daynight_week_name return KGC:: DayNight:: WEEK_NAME [get_daynight_week] end #------------------------------------------------- ------------------------- ○ Phase Switch # # Phase: phase of the switched # Duration: switching time (frame) # Pass_days: number of days elapsed to (default: 0) #------------------------------------------------- ------------------------- def change_daynight_phase (phase, duration = KGC:: DayNight:: PHASE_DURATION, pass_days = 0) $ Game_temp.manual_daynight_duration = duration $ Game_system.daynight_counter = 0 $ Game_system.daynight_phase = phase $ Game_variables [KGC:: DayNight:: PASS_DAYS_VARIABLE] + = pass_days $ Game_map.need_refresh = true end #------------------------------------------------- ------------------------- # Transition to the next phase ○ # Duration: switching time (frame) #------------------------------------------------- ------------------------- def transit_daynight_phase (duration = KGC:: DayNight:: PHASE_DURATION) $ Game_screen.transit_daynight_phase (duration) $ Game_map.need_refresh = true end #------------------------------------------------- ------------------------- # Restore default colors ○ # Duration: switching time (frame) #------------------------------------------------- ------------------------- def set_daynight_default (duration = KGC:: DayNight:: PHASE_DURATION) $ Game_screen.set_daynight_default (duration) $ Game_map.need_refresh = true end #------------------------------------------------- ------------------------- # Restore the current phase ○ # Duration: switching time (frame) #------------------------------------------------- ------------------------- def restore_daynight_phase (duration = KGC:: DayNight:: PHASE_DURATION) $ Game_screen.restore_daynight_phase (duration) $ Game_map.need_refresh = true end end end
class Game_Interpreter include KGC:: Commands end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ RPG:: MapInfo #================================================= =============================
class RPG:: MapInfo #------------------------------------------------- ------------------------- ● Get Map # Name #------------------------------------------------- ------------------------- def name return@name.gsub (/ \ [.* \] /) ("") end #------------------------------------------------- ------------------------- # Get original map name ○ #------------------------------------------------- ------------------------- def original_name return @ name end #------------------------------------------------- ------------------------- # Stop day and night switching ○ #------------------------------------------------- ------------------------- def daynight_stop return @ name = ~ KGC:: DayNight:: Regexp:: MapInfo:: DAYNIGHT_STOP end #------------------------------------------------- ------------------------- # Disable ○ effect day and night #------------------------------------------------- ------------------------- def daynight_void return @ name = ~ KGC:: DayNight:: Regexp:: MapInfo:: DAYNIGHT_VOID end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ RPG:: Area #================================================= =============================
unless $ @ class RPG:: Area #------------------------------------------------- ------------------------- # Get ○ Enkauntorisuto #------------------------------------------------- ------------------------- alias encounter_list_KGC_DayNight encounter_list def encounter_list list = encounter_list_KGC_DayNight.clone
# Conditional appearance list.each_index (| i | list [i] = nil unless KGC:: DayNight.troop_appear? ($ data_troops [list [i]]) ) return list.compact end end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ RPG:: Troop #================================================= =============================
class RPG:: Troop #------------------------------------------------- ------------------------- # Generate cash day and night switching ○ #------------------------------------------------- ------------------------- def create_daynight_cache @ __appear_daynight_phase = [] @ __nonappear_daynight_phase = []
# Emerge Phase if @ name = ~ KGC:: DayNight:: Regexp:: Troop:: APPEAR_PHASE $ 1.scan (/ [\ -]? \ D + /). Each (| num | phase = num.to_i if phase <0 # Does not appear @ __nonappear_daynight_phase <<Phase.abs else # Occurrences @ __appear_daynight_phase <<Phase end ) end end #------------------------------------------------- ------------------------- Phase # emerge ○ #------------------------------------------------- ------------------------- def appear_daynight_phase create_daynight_cache if @ __appear_daynight_phase == nil return @ __appear_daynight_phase end #------------------------------------------------- ------------------------- # Phase does not appear ○ #------------------------------------------------- ------------------------- def nonappear_daynight_phase create_daynight_cache if @ __nonappear_daynight_phase == nil return @ __nonappear_daynight_phase end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_Temp #================================================= =============================
class Game_Temp #------------------------------------------------- ------------------------- # Public instance variables ● #------------------------------------------------- ------------------------- attr_accessor: manual_daynight_duration # manual phase change flag #------------------------------------------------- ------------------------- # Object initialization ● #------------------------------------------------- ------------------------- alias initialize_KGC_DayNight initialize def initialize initialize_KGC_DayNight
@ Manual_daynight_duration = nil end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_System #================================================= =============================
class Game_System #------------------------------------------------- ------------------------- # Public instance variables ● #------------------------------------------------- ------------------------- attr_writer: daynight_counter # counter phase transition attr_writer: daynight_change_enabled # effective day and night change #------------------------------------------------- ------------------------- # Object initialization ● #------------------------------------------------- ------------------------- alias initialize_KGC_DayNight initialize def initialize initialize_KGC_DayNight
@ Daynight_counter = 0 @ Daynight_change_enabled = true end #------------------------------------------------- ------------------------- # Get the phase transition counter ○ #------------------------------------------------- ------------------------- def daynight_counter @ Daynight_counter = 0 if @ daynight_counter == nil return @ daynight_counter end #------------------------------------------------- ------------------------- # Get the current phase ○ #------------------------------------------------- ------------------------- def daynight_phase return $ game_variables [KGC:: DayNight:: PHASE_VARIABLE] end #------------------------------------------------- ------------------------- # Change the current phase ○ #------------------------------------------------- ------------------------- def daynight_phase = (value) $ Game_variables [KGC:: DayNight:: PHASE_VARIABLE] = value end #------------------------------------------------- ------------------------- # Get the valid flag day and night switching ○ #------------------------------------------------- ------------------------- def daynight_change_enabled @ Daynight_change_enabled = 0 if @ daynight_change_enabled == nil return @ daynight_change_enabled end #------------------------------------------------- ------------------------- # Ongoing Phase ○ #------------------------------------------------- ------------------------- def progress_daynight_phase self.daynight_phase + = 1 if self.daynight_phase> = KGC:: DayNight:: PHASE.size self.daynight_phase = 0 end $ Game_map.need_refresh = true end #------------------------------------------------- ------------------------- # Get the current phase object ○ #------------------------------------------------- ------------------------- def daynight_phase_object return KGC:: DayNight:: PHASE [daynight_phase] end #------------------------------------------------- ------------------------- # Get the object of previous phases ○ #------------------------------------------------- ------------------------- def previous_daynight_phase_object return KGC:: DayNight:: PHASE [daynight_phase - 1] end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_Screen #================================================= =============================
class Game_Screen DEFAULT_TONE = Tone.new (0, 0, 0) #------------------------------------------------- ------------------------- # Public instance variables ● #------------------------------------------------- ------------------------- attr_reader: daynight_tone # shades of night and day #------------------------------------------------- ------------------------- ● Clear # #------------------------------------------------- ------------------------- alias clear_KGC_DayNight clear def clear clear_KGC_DayNight
clear_daynight end #------------------------------------------------- ------------------------- # Clear variables for day and night switching ○ #------------------------------------------------- ------------------------- def clear_daynight @ Daynight_tone = DEFAULT_TONE.clone @ Daynight_x = 0 @ Daynight_y = 0
@ Frame_count = Graphics.frame_count @ Daynight_tone_duration = 0
apply_daynight end #------------------------------------------------- ------------------------- # Apply day and night colors ○ #------------------------------------------------- ------------------------- def apply_daynight return if $ game_map == nil if $ game_temp.in_battle if KGC:: DayNight:: BG_TONE_IN_BATTLE == KGC:: DayNight:: BATTLE_TONE_NONE return end end
# If you switch to disable the map if $ game_map.daynight_void? if @ daynight_tone_changed # Restore the initial color @ Tone = DEFAULT_TONE.clone @ Daynight_tone_changed = false end @ Daynight_tone = @ tone.clone return end
# Repairs Okashikere phase if $ game_system.daynight_phase_object == nil $ Game_system.daynight_phase = 0 end
# Apply the current color @ Tone = $ game_system.daynight_phase_object [1]. Clone @ Daynight_tone = @ tone.clone
# If the real time transient if KGC:: DayNight:: METHOD == KGC:: DayNight:: METHOD_RTIME time = Time.now # Transition to phase match KGC:: DayNight:: PHASE.each_with_index (| phase, i | if phase [2] <= time.hour start_tone_change (phase [1], 1) $ Game_system.daynight_phase = i break end ) end
@ Daynight_tone_changed = true end #------------------------------------------------- ------------------------- # Get the color ○ #------------------------------------------------- ------------------------- def tone if $ game_temp.in_battle if KGC:: DayNight:: BG_TONE_IN_BATTLE <= KGC:: DayNight:: BATTLE_TONE_BG return DEFAULT_TONE end end return @ tone end #------------------------------------------------- ------------------------- ● starts to change color # # Tone: tone # Duration: Time #------------------------------------------------- ------------------------- alias start_tone_change_KGC_DayNight start_tone_change def start_tone_change (tone, duration) duration = [duration, 1]. max start_tone_change_KGC_DayNight (tone, duration)
@ Daynight_tone_target = tone.clone @ Daynight_tone_duration = duration end #------------------------------------------------- ------------------------- Frame # ● Update #------------------------------------------------- ------------------------- alias update_KGC_DayNight update def update update_KGC_DayNight
update_daynight_transit end #------------------------------------------------- ------------------------- Color # ● Update #------------------------------------------------- ------------------------- alias update_tone_KGC_DayNight update_tone def update_tone update_tone_KGC_DayNight
if @ daynight_tone_duration> = 1 d = @ daynight_tone_duration target = @ daynight_tone_target @ Daynight_tone.red = (@ daynight_tone.red * (d - 1) + target.red) / d @ Daynight_tone.green = (@ daynight_tone.green * (d - 1) + target.green) / d @ Daynight_tone.blue = (@ daynight_tone.blue * (d - 1) + target.blue) / d @ Daynight_tone.gray = (@ daynight_tone.gray * (d - 1) + target.gray) / d @ Daynight_tone_duration -= 1 end end #------------------------------------------------- ------------------------- # Update phase transition ○ #------------------------------------------------- ------------------------- def update_daynight_transit # If the manual switch is made if $ game_temp.manual_daynight_duration start_tone_change ($ game_system.daynight_phase_object [1], $ Game_temp.manual_daynight_duration) $ Game_temp.manual_daynight_duration = nil @ Daynight_tone_changed = true end
return unless $ game_system.daynight_change_enabled # to switch return if $ game_map.daynight_stop? # stopped
if KGC:: DayNight:: STOP_ON_EVENT interpreter = ($ game_temp.in_battle? $ game_troop.interpreter: $ Game_map.interpreter) return if interpreter.running? # during event end
case KGC:: DayNight:: METHOD when KGC:: DayNight:: METHOD_TIME # hours update_daynight_pass_time when KGC:: DayNight:: METHOD_STEP # Pedometer update_daynight_step when KGC:: DayNight:: METHOD_RTIME # real time update_daynight_real_time end end #------------------------------------------------- ------------------------- # Transition ○: after hours #------------------------------------------------- ------------------------- def update_daynight_pass_time # Increment count calculation inc_count = Graphics.frame_count - @ frame_count # If you add the wrong amount back if inc_count> = 100 @ Frame_count = Graphics.frame_count return end # Add count $ Game_system.daynight_counter + = inc_count @ Frame_count = Graphics.frame_count
# Determine the state transition count = $ game_system.daynight_counter / Graphics.frame_rate if count> = $ game_system.daynight_phase_object [2] transit_daynight_next end end #------------------------------------------------- ------------------------- # Transition ○: Pedometer #------------------------------------------------- ------------------------- def update_daynight_step # If you do not go back return if @ daynight_x == $ game_player.x & & @ daynight_y == $ game_player.y
@ Daynight_x = $ game_player.x @ Daynight_y = $ game_player.y # Add count $ Game_system.daynight_counter + = 1 # Determine the state transition count = $ game_system.daynight_counter if count> = $ game_system.daynight_phase_object [2] transit_daynight_next end end #------------------------------------------------- ------------------------- # Transition ○: real time #------------------------------------------------- ------------------------- def update_daynight_real_time time = Time.now # Determine the state transition time1 = $ game_system.daynight_phase_object [2] transit = (time1 <= time.hour) if $ game_system.previous_daynight_phase_object! = nil time2 = $ game_system.previous_daynight_phase_object [2] if time1 <time2 transit & = (time.hour <time2) end end
if transit transit_daynight_next end end #------------------------------------------------- ------------------------- ○ transition to the next state # # Duration: Transition Time #------------------------------------------------- ------------------------- def transit_daynight_next (duration = KGC:: DayNight:: PHASE_DURATION) $ Game_system.daynight_counter = 0 $ Game_system.progress_daynight_phase # Determine the number of days elapsed if $ game_system.daynight_phase == KGC:: DayNight:: PASS_DAY_PHASE $ Game_variables [KGC:: DayNight:: PASS_DAYS_VARIABLE] + = 1 end # Change color start_tone_change ($ game_system.daynight_phase_object [1], duration) @ Daynight_tone_changed = true end #------------------------------------------------- ------------------------- # Default state ○ (0, 0, 0) return # Duration: Transition Time #------------------------------------------------- ------------------------- def set_daynight_default (duration) start_tone_change (DEFAULT_TONE, duration) end #------------------------------------------------- ------------------------- # Restore the current phase ○ # Duration: Transition Time #------------------------------------------------- ------------------------- def restore_daynight_phase (duration) start_tone_change ($ game_system.daynight_phase_object [1], duration) @ Daynight_tone_changed = true end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_Map #================================================= =============================
class Game_Map #------------------------------------------------- ------------------------- # Setup ● # Map_id: Map ID #------------------------------------------------- ------------------------- alias setup_KGC_DayNight setup def setup (map_id) setup_KGC_DayNight (map_id)
@ Screen.apply_daynight end #------------------------------------------------- ------------------------- ○ You can stop the switch # nights #------------------------------------------------- ------------------------- def daynight_stop? info = $ data_mapinfos [map_id] return false if info == nil return (info.daynight_stop | | info.daynight_void) end #------------------------------------------------- ------------------------- ○ invalid switch # nights #------------------------------------------------- ------------------------- def daynight_void? info = $ data_mapinfos [map_id] return false if info == nil return info.daynight_void end #------------------------------------------------- ------------------------- # Get Enkauntorisuto ● #------------------------------------------------- ------------------------- alias encounter_list_KGC_DayNight encounter_list def encounter_list list = encounter_list_KGC_DayNight.clone
# Conditional appearance list.each_index (| i | list [i] = nil unless KGC:: DayNight.troop_appear? ($ data_troops [list [i]]) ) return list.compact end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_Character #================================================= =============================
class Game_Character #------------------------------------------------- ------------------------- ○ # or emission #------------------------------------------------- ------------------------- def luminous? return false end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Game_Event #================================================= =============================
class Game_Event <Game_Character #------------------------------------------------- ------------------------- ○ # or emission #------------------------------------------------- ------------------------- def luminous? return (@ event.name = ~ KGC:: DayNight:: Regexp:: Event:: LUMINOUS) end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Spriteset_Map #================================================= =============================
class Spriteset_Map #------------------------------------------------- ------------------------- # Create a viewport ● #------------------------------------------------- ------------------------- alias create_viewports_KGC_DayNight create_viewports def create_viewports create_viewports_KGC_DayNight
@ Viewport1_2 = Viewport.new (0, 0, @ Viewport1.rect.width, @ viewport1.rect.height) end #------------------------------------------------- ------------------------- ● Create Kyarakutasupuraito # #------------------------------------------------- ------------------------- alias create_characters_KGC_DayNight create_characters def create_characters create_characters_KGC_DayNight
# @ Viewport1_2 move light objects @ Character_sprites.each (| sprite | sprite.viewport = @ viewport1_2 if sprite.character.luminous? ) end #------------------------------------------------- ------------------------- ● release of viewport # #------------------------------------------------- ------------------------- alias dispose_viewports_KGC_DayNight dispose_viewports def dispose_viewports dispose_viewports_KGC_DayNight
@ Viewport1_2.dispose end #------------------------------------------------- ------------------------- # ● Update the viewport #------------------------------------------------- ------------------------- alias update_viewports_KGC_DayNight update_viewports def update_viewports update_viewports_KGC_DayNight
@ Viewport1_2.ox = $ game_map.screen.shake @ Viewport1_2.update end end
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Spriteset_Battle #================================================= =============================
if KGC:: DayNight:: BG_TONE_IN_BATTLE == KGC:: DayNight:: BATTLE_TONE_BG
class Spriteset_Battle #------------------------------------------------- ------------------------- ● Create Batorubakkusupuraito # #------------------------------------------------- ------------------------- alias create_battleback_KGC_DayNight create_battleback def create_battleback create_battleback_KGC_DayNight
if@battleback_sprite.wave_amp == 0 @ Battleback_sprite.tone = $ game_troop.screen.daynight_tone end end #------------------------------------------------- ------------------------- ● Create Batorufuroasupuraito # #------------------------------------------------- ------------------------- alias create_battlefloor_KGC_DayNight create_battlefloor def create_battlefloor create_battlefloor_KGC_DayNight
@ Battlefloor_sprite.tone = $ game_troop.screen.daynight_tone end end
end # <== if KGC:: DayNight:: BG_TONE_IN_BATTLE == KGC:: DayNight:: BATTLE_TONE_BG
# ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★
#================================================= ============================= # ■ Scene_Map #================================================= =============================
class Scene_Map <Scene_Base #------------------------------------------------- ------------------------- # Start processing ● #------------------------------------------------- ------------------------- alias start_KGC_DayNight start def start $ Game_map.screen.clear_daynight
start_KGC_DayNight end end
__________________________
"You can choose a ready guide in some celestial voice. If you choose not to decide, you still have made a choice. You can choose from phantom fears and kindness that can kill; I will choose a path that's clear. I will choose Free Will."
-RUSH
|
|
|
|
|
|
|
|
|
Aug 12 2010, 11:19 AM
|
Level 2

Group: Member
Posts: 18
Type: Mapper
RM Skill: Skilled

|
QUOTE (DNova1202 @ Jul 26 2010, 10:36 PM)  Hey guys, I read through the topic and I know a lot of you are confused at the particular translation this guy used, (Yahoo babel fish) and decided to try translating it with google, the result was slightly better. Though, I'm no expert on japanese to english translations, I've heard that google has better grammar.
Here you go.
Sorry about not including a "spoiler" button, but the damned thing doesn't work in my browser. If that's a problem, I'll come back and fix it when I get google chrome reinstalled.
Hope this helps. Sorry, but your script does not help. An error occurs that says "Error syntax on line (whatever). Also, anyone else not getting a tinted screen at night?
|
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|