Dev:SDK/Core - Date, Time & the Diary

From Slavemaker Wiki
Jump to: navigation, search
<<first <prev SDK/Core - Date, Time & the Diary next> last>>

SlaveMaker 3 SDK Date, Time & the Diary

There are a series of functions and variables that control the passage of time in the game.


Core Variables[edit]

true - daytime action
false - night time action
date, starts from 1 and increase 1 per day, continues increasing over girls
eg 1252/1 is GameDate 1
time of day, 24hr clock, 1.5 = 1:30 am, 22 = 10pm
_root.MoonPhaseDate - day of moon cycle
New moon = 15, but tentacles more active 14, 15, 16
Full 0,1
29 days in a month

_root.TrainingStart - date she started training - READ ONLY

_root.Elapsed - number of days since training started, READ ONLY

_root.TrainingTime - days to train her - should be read only, but you can change it if you want

0 = not pregnant with something
> 0 she is pregnant and the number of days until she gives birth
-1 = will not become pregnant

_root.AntidoteDays - days remaining to Astrid's antidote is available - should be READ ONLY, but you can change if you really want

_root.Prostitute.CustomFlag - days remaining to the party with Miss.N. Only valid if _root.Prostitute.CheckBitFlag(32) == true

        if (_root.Prostitute.CheckBitFlag(32)) {
                _root.SetText("You remember the party with Miss.N is in " + _root.Prostitute.CustomFlag + " days time");

_root.HighClassProstitute.CustomFlag - days remaining to the party with Lady Okyanu. Only valid if _root.HighClassProstitute.CheckBitFlag(32) == true


Core Functions[edit]

These functions are used to control the time and date.


function DecodeDate(gdate:Number) : String

Decodes a date in units of GameDate to a display calendar date. Note a year is 400 days long.
gdate defaults to GameDate


_root.SetText("The party is due on " + _root.DecodeDate(_root.GameDate + _root.Prostitute.CustomFlag);

shows The party is due on 1252/42


_root.SetText("Today is " + _root.DecodeDate());

function DecodeTime(gtime:Number) : String

Decodes a time in units of GameTime to a display a proper time of day like "1pm" or "Midnight"
gtime defaults to GameTime.


function AddTime(gtime:Number)

Adds x hours to the current time. Mainly used for morning events via Events() or PreEvent() that take time


function Events()
        if (_root.GameDate = 21) {
                _root.SetText(SlaveName + "'s owner borrows her for a few hours to introduce her to his family.");

function SetTime(gtime:Number)

Sets the current time to a specific time. Use cautiously


function UpdateDateAndItems(NumDays:Number, free:Boolean)

Move to a new day. Rarely use this, mainly use NewDay below


function NewDay(NumDays:Number, NewTime:Number, free:Boolean, tired:Boolean)

NumDays - update the date by this many days
NewTime - the time at the start of the new day, default 6
free - if your slave has escaped and not in your house or under supervision then set to true, default false
tired - set to true to prevent any morning events

Use this to start a new day or to skip some days and start a new day

eg to skip 2 days


function StartNewDay()

Start a new day, but bypass all morning events and any standard messages. Similar to NewDay(1, 6, false, true); but also bypasses PreEvents() and allows you to show a message after

eg from the first milking

        case 4081:
                AddText(SlaveVerb("recover") + " from " + SlaveHisHer + " experience and a full day has passed. " + NameCase(SlaveHisHer) + " breasts have returned to normal, but maybe a little larger. Sometimes though they leak a little milk.\r\r" + SlaveHeSheUC + NonPlural(" remember") + " little of the experience but sometimes in " + SlaveHisHer + " sleep " + SlaveHisHer + " breasts swell and milk stains " + SlaveHisHer + " sheets.");


Diary Functions[edit]

The Diary or Training Log is stored in an object in _root scope

var Diary

These functions are used add entries to the diary


function AddEntry(desc:String, tent:Boolean, win:Number, test:Boolean)

desc - text description of the event
tent - true if tentacle monsters were involved, default false
win - if your slave won a contest, 1 first place, 2 second, 3 third, defaul 0
test - true if your slaves owner tested her, default false

Adds an entry for the current day

_root.Diary.AddEntry(SlaveName + " met a nun and was given a holy item.");

_root.Diary.AddEntry(SlaveName + " was assaulted by a tentacle monster and after found a glowing stone.", true);

function AddEntryFull(desc:String, gdate:Number, tent:Boolean, win:Number, test:Boolean)

As above but adds an entry to an arbitrary date, gdate is the date to add the entry to
_root.Diary.AddEntryFull(SlaveName + " has an appointment with the Lord.", _root.GameDate + 14);

<<first <prev SDK/Core - Date, Time & the Diary next> last>>