Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Thanks.
You will need a hell load of scripting for that.
First of all you need a main class to programm in ("Game_Clock" or something like that). It probably needs an initialize method and definitely an update method. Let's say you have 24 hours per day and one hour equals one ingame minute. If you save your time information in game variables, you can easily use them in game events. Also note that XP runs with 30fps but the intern script runs with 60fps. It should look somehow like this:
class Game_Clock
def initialize
@counter = 0
@minute_id = 1
@hour_id = 2
@hours_per_day = 24
end
def update
@counter += 1
if @counter == 60 # Frames
@counter = 0
$game_variables[@minute_id] += 1
if $game_variables[@minute_id] == 60 # Seconds
$game_variables[@minute_id] = 0
$game_variables[@hour_id] = $game_variables[@hour_id] + 1 % @hours_per_day
end
end
end
end
I suggest you declare a clock object inside of the Game_Map class, so your clock will automatically pause in the menu etc. Just put "@clock = Game_Clock.new" (or whatever your class is called) in the initialize method of Game_Map and then "@clock.update" somewhere in the update method of Game_Map (somewhere under the first loop). So now you have your basis but it will get really complicated.
PS: I have no idea how to layout this correctly in a steam comment, sorry qwq