Dev:SDK/Core - Functions

From Slavemaker Wiki
Jump to: navigation, search
<<first <prev SDK/Core - Functions next> last>>


SlaveMaker 3 SDK Core Support Functions

These functions in _root scope

If a parameter is noted to have a default, then the parameter can be omitted eg

_root.ShowSlaveMaker(true);
_root.ShowSlaveMaker();
_root.PersonSpeak("Cow Girl", "Moo!");
_root.PersonSpeak("Puppy Girl", Woof", true);

Note if you omit a parameter you must also omit all following parameters. If you wish to only default a parameter and not the following then pass the value undefined.


See

Statistics[edit]

Points
Increase or decrease the slavegirl stats
function Points(Charisma:Number, Sensibility:Number, Refinement:Number,

Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Fatigue:Number, Joy:Number, Love:Number, Special:Number)

each value is the number of points to change the stat by, 0 for no

change, negative to decrease, fractional values like 0.5 are fine

Stats are automatically capped based on their Max values and limited to 0

to 300 (based on Slave Trainer skill), so you could do a value like 1000 to max out a stat

eg
Points(1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0, 0, 0, 0, 0);
PointsIndexed
Increase or decrease a slavegirl/slave makers stats
function PointsIndexed(Charisma:Number, Sensibility:Number,

Refinement:Number, Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Fatigue:Number, Joy:Number, Love:Number, Special:Number)

Updates the slave indexed by _root.PersonIndex
where this value
-100 - Slave Maker
-99 - assistant
0+ - index value into SlavesArray
eg
PersonIndex = -99;
Points(1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0, 0, 0, 0, 0);
PersonIndex = 2;
Points(1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0, 0, 0, 0, 0);
PointsAssistant
Increase or decrease your assistants stats
function PointsAssistant(Charisma:Number, Sensibility:Number,

Refinement:Number, Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Fatigue:Number, Joy:Number, Love:Number, Special:Number)

otherwise as for Points()
PointsMod
Increase or decrease the slavegirl stats modifier (generally used when

wearing dresses or items)

function PointsMod(Charisma:Number, Sensibility:Number,

Refinement:Number, Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Joy:Number, Special:Number)

PointsExact
Increase or decrease the slavegirl stats ignoring difficulty or slave

girl limitations effects

function PointsExact(Charisma:Number, Sensibility:Number,

Refinement:Number, Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Fatigue:Number, Joy:Number, Love:Number, Special:Number)

NoTalentPoints
Increase or decrease the slavegirl stats ignoring slave maker talent effects
function NoTalentPoints(Charisma:Number, Sensibility:Number,

Refinement:Number, Intelligence:Number, Morality:Number, Constitution:Number, Cooking:Number, Cleaning:Number, Conversation:Number, BlowJob:Number, Fuck:Number, Temperament:Number, Nymphomania:Number, Obedience:Number, Libido:Number, Reputation:Number, Fatigue:Number, Joy:Number, Love:Number, Special:Number)

SMPoints
Increase or decrease the slavemaker's stats
function SMPoints(attack:Number, defence:Number, arousaldef:Number,

constitution:Number, conversation:Number, libido:Number, corrupt:Number, renown:Number, dominance:Number)

ShowSpecialStat
show a custom stat for the girl
function ShowSpecialStat(slabel:String)
slabel - the short label of the stat
eg
_root.ShowSpecialStat("Femininity :");
ChangeSpecial
function ChangeSpecial(num:Number)
Simple function to only change the girls special stat
ChangePath
function ChangePath(path1, path2, path3)
Change her three path values (see variables Path1, Path2, Path3, MaxPath)
UpdateCurrentPath
function UpdateCurrentPath()
Updates CurrentPath based on Path1, Path2, Path3
AlterSexuality
function AlterSexuality(sex:Number)
sex = amount to change (postive or negative value)
Alters her sexuality up or down, lesbian = 0, straight = 100. This

function will not change from bi-sexual to lesbian or straight. Special intervention needed. Internally use SetSexuality to set an arbitray value

Note < 25 = lesbian/gay, > 75 = straight
Note default sexuality 100
SetSexuality
function SetSexuality(newsexuality:Number)
newsexuality - the new value
Changes the slaves sexuality to any value, generally use in your slaves

StartGame() function to make them something other than straight (100)

SetGirlsVitals
function SetGirlsVitals(sname:String, desc:String, bust:Number,

waist:Number, hips:Number, age:Number, bloodtype:String, tall:Number, weight:Number, clitcock:Number)

sname = the girls name (stored in to _root.SlaveName)
desc = a short description (2-3 words) of the slave "abandoned daughter",

"cursed dickgirl"

bust = bust size in centimeters. - Note the values shown in the

statistics screen will vary if she has taken the milk drug

waist = waist in centimeters
hips = hips in centimeters
age = age in years - note not bothering with birthdays so this is constant
bloodtype = "O" "A" "B" "AB"
tall = height in centimeters
weight = weight in kilograms
clitcock = size in cm of her clit, when they have a cock it is clitcock *

33 in cm

NOTE: this is optional and some default values will be given if not

called, but PLEASE do use this

NOTE: you can call this again to alter values, for bust there is a

separate function. All the paramters are optional, the values are not altered if not passed or you pass undefined

Call this in StartGame() to initialse her stats
SetBustSize
function SetBustSize(bust:Number)
bust = new bust size in centimeters
Arbitrarily change her bust size
eg set to 93cm
_root.SetBustSize(93);
ChangeBustSize
function ChangeBustSize(val:Number)
val = bust is multiplied by val
eg a 5% increase
_root.ChangeBustSize(1.05);
SetClitCockSize
function SetClitCockSize(clitcock:Number)
clitcock = new size in centimeters
Arbitrarily change her cock size or clit size
eg set to 0.9 cm
_root.SetClitCockSize(0.9);
ChangeClitCockSize
function ChangeClitCockSize(val:Number)
val = size is multiplied by this value
eg 10% increase
_root.ChangeClitCockSize(1.1);

Event and Image Selection[edit]

IsCatgirl
function IsCatgirl() : Boolean
Is she a cat slave
IsPonygirl
function IsPonygirl() : Boolean
Is she a ponygirl
IsDickgirl
function IsDickgirl() : Boolean
Is she permanently or temporarily a dickgirl
basically does
return SlaveGirl.IsDickgirl() || DickgirlXF > 0 || SlaveGender == 3 ||

SlaveGender == 6 || DickgirlChanged

IsPermanentDickgirl
function IsPermanentDickgirl() : Boolean
Is she permanently a dickgirl
basically does
return DickgirlXF > 0 || SlaveGender == 3 || SlaveGender == 6
IsDickgirlEvent
function IsDickgirlEvent() : Boolean
If an event has a dickgirl option and a non-dickgirl option, use this

fuction to choose which happens. This takes the options dickgirl settings into account

returns true to show the dickgirl verision, false for the non-dickgirl
DoDickgirlChange

handles temporary dickgirl changes and also generic images

function DoDickgirlChange(chance:Number) : Boolean
chance - chance a generic dickgirl image will be shown, 0 for never, 100

for always

returns true if she spontaneously changes to a dickgirl.
Remember to check after if _root.UseGeneric == true
_root.IsDickgirl()) will be true if she has spontanously changed or is

permanently changed. In that case show an appropriate graphic

eg
        if (_root.DoDickgirlChange(40)) {
                if (_root.UseGeneric) return;
        }
        if (_root.IsDickgirl())  AnalClip.gotoAndStop(4);
She will spontaneously change based on _root.DickgirlRate and this

function will make her change based on that. If she does then 40% of the time use a generic image.

If she is permanently a dickgirl 40% of the time use a generic image.
DoDickgirlChangeGeneric
handles temporary dickgirl changes and also generic images
function DoDickgirlChangeGeneric(chance:Number) : Boolean
as above but returns true if she spontaneously changes and a generic

image is to be used

after you can check _root.DickgirlChanged == true or just use

_root.IsDickgirl() to se eif she spontaneously changed but will use a custom graphic

eg
        if (_root.DoDickgirlChangeGeneric(30)) return;
        if (_root.IsDickgirl())  AnalClip.gotoAndStop(4);
or
        if (_root.DoDickgirlChangeGeneric(30)) return;
        if (_root.DickgirlChanged) {
                AnalClip.gotoAndStop(4);
                _root.AddText("Amazingly you see a cock grow from her clit as you fuck
her ass."
);
        }
DefaultDickgirl
if permanently changed to a dickgirl use generic graphics chance% of the

time. Ignores spontaneous changes.

function DefaultDickgirl(chance:Number) : Boolean
chance - chance a generic dickgirl image will be shown, 0 for never, 100

for always

returns true if generic image is used
DefaultLesbian
if under lesbian training use generic graphics chance% of the time.
function DefaultLesbian(chance:Number) : Boolean
chance - chance a generic lesbian image will be shown, 0 for never, 100

for always

returns true if generic image is used
DefaultGeneric
use generic graphics chance% of the time. Normally 20% but use this the

change, say to 100 or 0 to suppress

function DefaultGeneric(chance:Number) : Boolean
chance - chance a generic image will be shown, 0 for never, 100 for always
returns true if generic image is used
ChoiceNaked
sets the variable _root.NakeChoice to a random value to set the naked

image shown. If a naked image is already chosen this function does nothing

function ChoiceNaked(range:Number, offset:Number) : Number
range - number of values
offset - base number
calculates offset + (random number between 0 and range - 1)
eg
_root.ChoiceNaked(4, 1);
generate a number from 1 to 4 and save into _root.NakedChoice

Money[edit]

Money
Update the amount of gold your slave has,
function Money(diff:Number, quiet:Boolean, nodebt:Boolean)
diff = amount to add (can be negative to decrease
quiet - true = no sound effect, default true
nodebt - true = will not go into debt, default false (can go into debt),

As much money as possible is deducted

eg
_root.Money(100); //add 100 GP, with sound effect
_root.Money(-500); // spend 500GP, sound effect and will go into debt
_root.Money(-100, false, false); //pay 100 GP, with no sound effect, will
not go into debt
If there is insufficient money in your slaves gold, it is then deducted

from your personal gold, depending on the nodebt parameter

SMMoney
Update the amount of gold you personally has,
function SMMoney(diff:Number, quiet:Boolean, nodebt:Boolean)
diff = amount to add (can be negative to decrease
quiet - true = no sound effect, default true
nodebt - true = will not go into debt, default false (can go into debt)
eg
_root.SMMoney(100); //add 100 GP, with sound effect
_root.SMMoney(-500); // spend 500GP, sound effect and will go into debt
Note will never affect your slaves gold
EarnMoney
function EarnMoney(income:Number) : Number
When your slave works a job (say a custom job) this function applies

effects to their income like the salary cap, background effects, doubling for twins.

SMEarnMoney
function SMEarnMoney(income:Number) : Number
When you work a job this function applies effects to their income like

the salary cap, background effects. Income added to your personal gold.

Skills[edit]

AddSlaveSkill
function AddSlaveSkill(sname:String, desc:String) : Number
Adds a custom skill, returns an index number for use in UpdateSlaveSkill
Note: call this in Initialise() or later functions, do not call in

StartGame()

eg
flowerindex = _root.AddSlaveSkill("Flower Arranging", "basic ability")
UpdateSlaveSkill
function UpdateSlaveSkill(num:Number, slevel:String)
Updates a custom skill
eg
_root.UpdateSlaveSkill(flowerindex, "skilled");
SetSlaveCombatSkill
function SetSlaveCombatSkill(desc:String)
Initialises your slaves combat skill, naming it
Note call in Initialise()
eg
_root.SetSlaveCombatSkill("Ninjitsu");
_root.slCombat = 20;
SlaveSkillHintRollOver
SlaveSkillHintRollOver(num:Number) : Boolean
Displays the skill hint for a custom skill when you mouse over the skill.

Similar to the stat hint rollover

return true to override the default description
eg
function ShowSkillHint(skill:Number) : Boolean
{
        if (skill == flowerindex) {
                _root.SetText("<b>Flower Arranging:</b> Her skill arranging flowers");
                return true;
        }
        return false;
}
ChangeFairyXF
function ChangeFairyXF(val:Number)
alter (increase or decrease) her fairy transformation by val points. No

effect if the transformation has not started or is complete

SetFairyXF
function SetFairyXF(val:Number)
Set the transformation to an arbitrary value. Can be used anytime, take care
ChangeCatTraining
function ChangeCatTraining(val:Number)
Change catgirl training by val points
Similarly
function ChangePonyTraining(val:Number)
function ChangeDancing(val:Number)
function ChangeSinging(val:Number)
function ChangeSwimming(val:Number)
function ChangeCombat(val:Number)
function ChangeSlutTraining(val:Number)
function ChangeCourtesan(val:Number)


<<first <prev SDK/Core - Functions next> last>>