Dev:SDK/Start Here

From Slavemaker Wiki
Jump to: navigation, search
<<first <prev SDK/Start Here next> last>>

This is work-in-progress code for the SDK. The version found on this page has not been officially released, use at your own risk. If you need a stable version, please download the official release.


Adobe Flash CS3 or later Graphic editing program, I use ImageJ and Paint.Net, two quite good free editors

Basic Concepts[edit]

The game works on this structure

a) Core game engine - handles all game-play and common events and images. Ths is contained mainly in SlaveMaker2.swf but also others like Tentacles.swf, Contests.swf. These additional files are discrete parts of the game, separated to simplify game development but mainly to lessen resource use when programming, I have reach times with 4+Gb of memory being used. There are many support functions that can be used for programming the slave girls and these are documented in Dev:SDK/Core - Functions.

All functions and variable for the Core game are in _root scope eg

_root.ShowMovie(_root.PeopleNun, true, 1, 4);
_root.SMFaith = 3;
if (_root.Naked) {

b) SlaveGirl files - All slavegirl specific images and code is present in the file Slave-xxxx.swf, eg Slave-Akane.swf

The general model of game-play is the Core game is it will call functions of the slave girl to show graphics or update.

For instance to show the dance school image the game calls


where SlaveGirl is the general movieclip the slavegirl is loaded into.

Many slavegirl functions are optional, but many need to be defined, also referred here are overridden (they are not class members now, but I am a c++ programmer, and they may become members eventually)

Most commonly for a slave girl there are a series of movieclips, one for each sex act, school, event etc In the function the movieclip is shown and an appropriate alternative is selected. I generally make each clip with several frames, one per alternative and show say

function ShowSexActTitFuck()
	if (_root.DickgirlXF > 0) TitsFuckClip.gotoAndStop(2);
	else if (_root.Lesbian) TitsFuckClip.gotoAndStop(3);
	else TitsFuckClip.gotoAndStop(1);
	TitsFuckClip._visible = true;

Remeber naked versions where possible


function ShowSexActCumBath() : Boolean {
	if (_root.DickgirlXF > 0) CumBathClip.gotoAndStop(5);
	else CumBathClip.gotoAndStop(int(Math.random()*4) + 1);
	CumBathClip._visible = true;
	return true;
c) Screen and Text Areas

Images and text are shown in 4 areas

  1. Main Window - the large window, upper left. It is 4x3 aspect ratio and is 448x336 pixels now
  2. People Window - the smaller window on the lower left. It is square 1x1 aspect ratio, 153x153 pixels, and is used to show people, your assistant etc
  3. General Text field - the central text area, about 18 lines
  4. Larger Text field - the area that can replace the statistics box, as of version 16/Slave Maker 3 it is scrollable and unlimited in length

Starting - To create your own girl[edit]

1) rename the files


to match the name of your girl. For ease from now on I'll assume the girl will be named Ifurita. So rename to


2) Update the png file to be an image of your girl. Resolution does not matter, but it must have a transparent background

3) Edit SlaveGirl4.txt to change the name and description information. Rename it to the next sequential number available in your game installation,

rename to SlaveGirl14.txt
and edit new contents

girlname=Ifurita&girldesc=Ifurita : This girl is lost, claiming to have travelled many dimensions.&image=Slave-Ifurita.png&gamefile=Slave-Ifurita.swf

Note the variables liisted
girlname - the name of the girl
girldesc - a description of the girl
image - filename of the image to appear on the slave selection screen. Should be a png with transparency
gamefile - the name of the swf file for the slave girl

optional ones
Dickgirls=true and the girl required dickgirls to be enabled
Tentacles=true and the girl required tentacles to be enabled
Furries=true and the girl required furries to be enabled

none = no slavemaker reputation needed (0) - default
low = reputation 10 needed
medium = reputation 30
high = reputation 60
max = reputation 100

mode= a general guide to how difficult the girl is to train

normal (default)


girlname=Ifurita&girldesc=This girl is lost, claiming to have travelled many dimensions.&image=Slave-Ifurita.png&gamefile=Slave-Ifurita.swf&Dickgirls=true&renown=medium&mode=hard

4) Open the fla file using Adobe Flash. Please note this will not be a tutorial on how to program flash. On the top layer in the timeline (labelled ActionLayer) edit the actions of frame 1 and change the include statement to the new actionscript file eg

#include ""

5) Rename the folder Slavegirl to Ifurita if you like (not needed)

6) The fla file uses Actionscript 2 and is set to only export visible layers. Any hidden layers are not saved into the swf file. Only the layers ActionLayer Slavegirl Dresses should be shown when exporting.

By default the fla file exports only a swf file into the folder .. Check the publish settings and rename the exported swf file to Slave-Ifurita.swf

The layers Background Grid, Background, Girls Story are provided for layout - hide on export Girls Story - is the introduction screen or screens background Background Grid/Background is the normal main screen of the game

7) Edit images and action script.

8) Publish and copy the swf, png, txt files into your game installation

Programming Girls[edit]

First and foremost use ActionScript 2, do not use the more recent Actionscript 3.

My strong guideline for girls is

  1. no black and white images
  2. no speech bubbles or sound effect text
  3. decensor all images
  4. any image dimension above 640x480 is fine, I commonly use 800x600 or 1068x800. The main window is 4x3 aspect ratio (448x336 pixels)
  5. provide at least two variants for all sex acts, actually for all acts where possible

A couple of general notes on programming flash

a) all functions must have less than 500 lines of code, You can get very odd things happen if you do not. This is purely what is in function xxxxxx() { } not the total lines in an actionscript file

b) I have seen reports that switch statements should have less than 20 terms as you can get odd issues. This may be related to a)

c) Careful of floating point arithmetic. The variable of type Number is a floating pont number. So you can get cases where 0.1 + 0.1 + 0.1 + 0.1 != 0.4

d) Stats like VarObedience are not integer and do not include dress and jewelry, makeup etc effects. To use the integer versions, with the items included use VarObedienceRounded

d) Careful of typos. The compiler will not tell you that a function or variable you use does not exist eg AddTexT("hi") compiles fine but does nothing at run-time

Similarly using a wrong variable _root.VarOBedience works fine but will have a value undefined

Similarly for any object, movieclip etc Also the same if you leave off _root. when accessing a global/base object

e) Event numbers as used in _root.NumEvent, if you use an invalid one the game will generall hang (next button will do nothing)

Global/Core Variables

Actualy root stage variables, use as _root.SlaveName etc. I will leave off the _root from now on. Almost all are of type Number but a few are Boolean shoud be obvious by context

See Dev:SDK/Core - Variables for more details

Support Functions

also in _root scope

See Dev:SDK/Core - Functions for more details

Slavegirl Override Functions

These functions an be defined in the Slave Girl actionscript and are called by the main engine when certain actions are taken. Most of these are duplicated in _root scope and call these. To prevent infinite loops do not call say _root.HideImages() from within a local override of HideImages()

See Dev:SDK/Slave Girl - Override Functions for more details

<<first <prev SDK/Start Here next> last>>