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]

_root.Day
true - daytime action
false - night time action
_root.GameDate
date, starts from 1 and increase 1 per day, continues increasing over girls
eg 1252/1 is GameDate 1
_root.GameTime
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

_root.PregnancyGestation
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
eg

        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.


DecodeDate

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

eg

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

shows The party is due on 1252/42

eg

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

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.


AddTime

function AddTime(gtime:Number)

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

eg

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

function SetTime(gtime:Number)

Sets the current time to a specific time. Use cautiously


UpdateDateAndItems

function UpdateDateAndItems(NumDays:Number, free:Boolean)

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


NewDay

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

NewDay(2);
StartNewDay

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:
                StartNewDay();
                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.");
                return;

________________________________________________________________


Diary Functions[edit]

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

var Diary
TrainingLog;

These functions are used add entries to the diary


AddEntry

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


eg
_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);
AddEntryFull

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
eg
_root.Diary.AddEntryFull(SlaveName + " has an appointment with the Lord.", _root.GameDate + 14);


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