Dev:SDK/Slave Girl - Contests
SlaveMaker 3 SDK
Contests
There are a series of functions and variables associated with the contests that happen every 8 days.
All code and graphics are held in a swf file Engine/Contests.swf
and loaded into a MovieClip
_root.Contests
on-demand, but not at the start of game.
________________________________________________________________
- Core Variables
The contests happen when (GameDate % 8) = 0
- _root.WinContest
The placing your slave got in the last contest
- 0 = 4th or worse
- 3 = third place
- 2 = second
- 1 = first
- _root.DifficultyXXXContest
obedience needed to compete in XXX Contest, defaults to 35
- _root.WinXXX
- _root.WinHousework
- _root.WinCourt
- _root.WinBeauty
- _root.WinPonygirl
- _root.WinCustom
- _root.WinDance
- _root.WinGeneralKnowledge
Total times the contest has been won
- _root.TotalContestCustom
- _root.TotalContestXXX
- _root.TotalContestHousework
- _root.TotalContestCourt
- _root.TotalContestBeauty
- _root.TotalContestPonygirl
- _root.TotalContestDance
- _root.TotalContestGeneralKnowledge
Total times competed
- Contests Variables
These are all in the scope
- _root.Contests
eg
}
- _root.Contests.NumContest
This indicates the contest and stage of the contest, see below for values
eg
- 20 = Beauty contest Rival A
- 21 = Beauty contest Rival B
- 24 = end of contest and slaves score announced.
These values differ from contest to contest and the number of stages vary a little.
- _root.Contests.Score
The score your slave gets
- _root.Contests.Placing
For Ponygirl Contest it is your slaves calculated placing 1,2,3 etc
- _root.Contests.RivalAScore
The score the first shown rival gets
- _root.Contests.RivalBScore
The score the second shown rival gets
- _root.Contests.RivalCScore
The score the third shown rival gets
- _root.Contests.RivalDScore
The score the fourth shown rival gets
- _root.Contests.RivalEScore
The score the last shown rival gets
________________________________________________________________
- NumContest Values
- 10 - Lady of the Court Contest Rival A
- 11 - Lady of the Court Contest Rival B
- 12 - Lady of the Court Contest Rival C
- 13 - Lady of the Court Contest Rival D
- 14 - Lady of the Court Contest Rival E
- 15 - Lady of the Court Contest - Slave's score
- 20 - Housework Contest Rival A
- 21 - Housework Contest Rival B
- 22 - Housework Contest Rival C
- 23 - Housework Contest Rival D
- 24 - Housework Contest - Slave's score
- 30 - Beauty Contest Rival A
- 31 - Beauty Contest Rival B
- 32 - Beauty Contest Rival C
- 33 - Beauty Contest Rival D
- 34 - Beauty Contest Rival E
- 35 - Beauty Contest - Slave's score
- 40 - XXX Contest Rival A
- 41 - XXX Contest Rival B
- 42 - XXX Contest Rival C
- 43 - XXX Contest Rival D
- 44 - XXX Contest Rival E
- 45 - XXX Contest - Slave's score
- 50 - Ponygirl Race Rival A
- 51 - Ponygirl Race Rival B
- 52 - Ponygirl Race Rival C
- 53 - Ponygirl Race - Slave's score
- 60 - Dance Contest Rival A
- 61 - Dance Contest Rival B
- 62 - Dance Contest Rival C
- 63 - Dance Contest Rival D
- 64 - Dance Contest Rival E
- 65 - Dance Contest - Slave's score
- 70 - General Knowledge Contest Rival A
- 71 - General Knowledge Contest Rival B
- 72 - General Knowledge Contest Rival C
- 73 - General Knowledge Contest Rival D
- 74 - General Knowledge Contest Rival E
- 75 - General Knowledge Contest - Slave's score
- 90 - Custom Contest start
- 1000 - contest done, show tropies if any won
- 2000 - finished and return home
________________________________________________________________
- Slave Girl Override Functions
These functions can be overloaded for a Slave girl to control or customise the competitions.
- These are mandatory
The following are image selection functions, Show an image appropriate for your slave for the contest. The parameter score is the standard calculated score for the contest. return the score with any changes you wish
eg
{
ClipContestsHousework._visible = true;
return total;
}
eg Ranma is competitive so gets a score bonus
{
_root.Backgrounds.ShowPalace();
ClipContestsCourt._visible = true;
return total + 8;
}
- ShowContestBeauty
function ShowContestBeauty(score:Number) : Number
- ShowContestXXX
function ShowContestXXX(score:Number) : Number
- ShowContestCourt
function ShowContestCourt(score:Number) : Number
- ShowContestHousework
function ShowContestHousework(score:Number) : Number
- These are optional but should be implemented
- ShowContestPonygirl
function ShowContestPonygirl(score:Number) : Number
- ShowContestDance
function ShowContestDance(score:Number) : Number
- ShowContestGeneralKnowledge
function ShowContestGeneralKnowledge(score:Number) : Number
- These are optional and mainly for custom contests but can be used for standard ones
- StartContest
function StartContest(num:Number)
This is called at the start of every contest and num will be set to 10, 20...90
This is designed to alter the values for
- _root.Contests.RivalAScore
- _root.Contests.RivalBScore
- _root.Contests.RivalCScore
- _root.Contests.RivalDScore
- _root.Contests.RivalEScore
and change the difficulty of the contest
You can also change or set the girls calculated score
- _root.Contests.Score
- DoContestsNext
function DoContestsNext(num:Number) : Boolean
- num is the current value of _root.Contests.NumContest
return true to disable the standard processes and do your own thing. For the custom contests the values are 90+ there is no standard effect. Note the value of _root.Contests.NumContest is automatically incremented by 1 for every call. To end the contest change _root.Contests.NumContest to 1000
________________________________________________________________
- Custom Contests
These are core fuctions in _root scope
- SetCustomContestDetails
function SetCustomContestDetails(clabel:String, desc:String)
- clabel - the name of the contest that appears on the button
Call any time, in Initialise() etc
eg
- ShowCustomContest
function ShowCustomContest(cshow:Boolean)
- cshow - true to show, false to hide
Show the custom contest button on the list of contests when the next contest happens call anytime
So to create a custom contest
a) In Initialise()
_root.ShowCustomContest();
b) Implement StartContest
{
if (num == 90) {
_root.Contests.RivalAScore = 243 + (_root.Difficulty * 5);
_root.Contests.RivalBScore = 310 + (_root.Difficulty * 5);
_root.Contests.RivalCScore = 194 + (_root.Difficulty * 5);
_root.Contests.RivalDScore = 141 + (_root.Difficulty * 5);
_root.Contests.RivalEScore = 115 + (_root.Difficulty * 5);
_root.Score = _root.Score + _root.VarBlowJob + _root.VarFuck; // _root.Score is a base number based on reputation and a few other
}
}
Note Pick whatever scores for your rivals and your slave as needed. This is optional you can do anything or nothing here, as you like, or do everything on DoContestsNext
c) Implement DoContestsNext
Note: most of this is a variation of the code for the Lady of the Court contest, slightly adapted
{
if (num == 90) {
// show first rival and show thier score. Note Backgrounds are automatically hidden before this function is called
ClipRivalA._visible = true; // or use ShowMovie as always
_root.SetText("This girl got " + _root.Contests.RivalAScore + " points.");
return true;
} else if (num == 91) {
// same for second girl, note hide last graphics.
ClipRivalB._visible = true;
ClipRivalA._visible = false;
_root.SetText("This girl got " + _root.Contests.RivalBScore + " points.");
return true;
} else if (num == 92) {
// same for third girl
ClipRivalC._visible = true;
ClipRivalB._visible = true;
_root.SetText("This girl got " + _root.Contests.RivalCScore + " points.");
return true;
} else if (num == 93) {
// same for fourth girl
ClipRivalD._visible = true;
ClipRivalC._visible = true;
_root.SetText("This girl got " + _root.Contests.RivalDScore + " points.");
return true;
} else if (num == 94) {
// same for fifth girl
ClipRivalE._visible = true;
ClipRivalD._visible = true;
_root.SetText("This girl got " + _root.Contests.RivalEScore + " points.");
return true;
} else if (num == 95) {
// handle end of contest and report who won
_root.Contests.NumContest = 1000; // Contest over
ClipRivalECourt._visible = false;
// Show your slaves image
CustomContestClip._visible = true; // or use ShowMovie as always
// handle Lady Faruns favour, score already adjusted by 10000
if (_root.CheckBitFlag1(19)) _root.AddText("The contest was fixed so " + _root.SlaveName + " came ");
else _root.AddText(_root.SlaveName + " obtained : " + _root.Score + "pts and came ");
_root.ClearBitFlag1(19);
// report placing. Note order here depends on what you set in StartContest()
if (_root.Score < _root.Contests.RivalBScore) {
_root.Diary.AddEntry(_root.SlaveName + " came last place in the Flower Arranging contest.");
_root.AddText("last place.\r\r");
} else if (_root.Score < _root.Contests.RivalEScore) {
_root.Diary.AddEntry(_root.SlaveName + "came fifth place in the Flower Arranging contest.");
_root.AddText("5th place.\r\r");
} else if (_root.Score < _root.Contests.RivalAScore) {
_root.Diary.AddEntry(_root.SlaveName + " came fourth place in the Flower Arranging contest.");
_root.AddText("4th place.\r\r");
} else if (_root.Score < _root.Contests.RivalCScore) {
_root.AddText("3rd place.\r\rYou win 500GP");
_root.Money(330);
_root.SMMoney(170);
_root.VarJoy = _root.VarJoy + 5;
_root.WinContest = 3;
_root.Diary.AddEntry(_root.SlaveName + " placed third in the Flower Arranging contest.", false, 3);
}
else if (_root.Score < _root.Contests.RivalDScore)
{
_root.AddText("2nd place.\r\rYou win 700GP");
_root.Money(525);
_root.SMMoney(175);
_root.VarJoy = _root.VarJoy + 10;
_root.VarReputation = _root.VarReputation + 5;
_root.WinContest = 2;
_root.Diary.AddEntry(_root.SlaveName + " placed second in the Flower Arranging contest.", false, 2);
}
else
{
_root.AddText("1st place!\r\rYou win 1500GP");
_root.Money(1125);
_root.SMMoney(375);
_root.VarJoy = _root.VarJoy + 10;
_root.VarReputation = _root.VarReputation + 10;
_root.VarRefinement = _root.VarRefinement + 10;
_root.WinCustom++;
_root.WinContest = 1;
_root.Diary.AddEntry(_root.SlaveName + " won the Flower Arranging Contest!", false, 1);
}
return true;
}
}
Note:
You only need to set _root.Contests.NumContest once to end the contest. Do not change it otherwise
You may have as few or many rounds as you like, but there are only 5 standard rival variables provided. You can use your own if you want. The game does nothing with them for a custom contest.
See the division of money (3/4 slave, 1/4 slave maker)
- _root.Money(1125);
- _root.SMMoney(375);
Also see stat rewards
- _root.WinContest = placing in contest, only 1-3