Dev:SDK/Core - Custom Events
SlaveMaker 3 SDK Custom Events
- Custom Events for the Core Game
There are a series of standard events in the game, detailed in SDK/SlaveGirl - Events(.rtf). Additional events can be added by the developer of a new slave girl and this is documented elsewhere.
You can also add a custom event that will happen for all slaves
- a) you can submit it to be added to the core game. This is the most efficient way but is slower to get put in
- b) you can write your own, using a similar system to Assistants and Slaves
- Create The Event or Events
In the SDK in the Examples/Events folders are examples for events, using both Adobe Flash and FlashDevelop. These are simplified slavegirl/assistants using only the class structure, derived from the SlaveModule class.
a) rename the class to a unique name, and set flash to export a swf file Event-classname.swf into the folder Events
b) change the main function to use the new class name, just rename nothing else needed. Also if using the fla file edit the actionscript in the top layer to rename the class
c) These files use the assistant interfaces so now implement functions like
and so on.
Please note event numbers 10000-10999 are reserved for these custom events, but care should be taken, if another custom event uses the same number then conflicts can happen. Ideally you should post the numbers you want to use so other developers will not conflict with them.
d) if you need to save information to remember the state of an event, to allow progressive events, implement LoadGame() , SaveGame() and StartEvent() methods
- Implement StartGame() to reset/set variables when a new slave is trained
- implement StartSlaveMaker() to reset/set variables at the start of the campaign
- For the first slave trained BOTH will be called
e) lastly create a file like Events/Events1.txt and add the name of your swf file (no folder, just the filename). Multiple can be added with an & between them
The game supports Events.txt, Events1.txt to Events9.txt
Otherwise everything works the same as for an assistant. Most of the same functions can be overridden. Some are not implemented at this time, notably - custom endings