Dev:SDK/Core - XML Events - Common
SlaveMaker 3 SDK
XML Event Parser
There is an event parser that allows events to be processed without any flash coding. These can be considered in several broad categories
Slave Initialisation and Images - see Dev:SDK/Core - XML Slaves, but first read this document for fundamental things like conditionals and file structure
Assistant Initialisation - as above see Dev:SDK/Core - XML Slaves
Pure text fields used for on screen messages and labels
Events that occur during walk events, visits, actions like chores, schools, sex acts. Also daily and morning events.
A quick note on terminology
<AttachMovie movie='ClipFortuneTelling' place='1' align='0'/>
<ShowPerson person='Fortune Teller' place='0' align='2'/>
<PersonSpeak person='Fortune Teller'>I can predict the future of #slave and do a reading for you for just 10GP.</PersonSpeak>
<YesNoQuestion eventno='8'>Do you want to see the future?</YesNoQuestion>
- In the above <Event> is referred to as a node and <Daily> is a subnode of <Event> (and is a node as well). The text Events is called a tag
- movie='ClipFortuneTelling' movie is an attribute and ClipFortuneTelling is it's value
- the text "Do you want to see the future?" is effectively a subnode of <YesNoQuestion> but it is also referred to as element data or as a text node
- you may optionally use ' or " at all times but you must pair them appropriately
- You cannot use a number of characters in element data (or text nodes). Basically any xml markup like <> for instance. Instead use terms like < for < and > for > &
apos; for '. There are more but you would seldom need them.
this is a comment and is ignored by the parser as all comments are.
- in most cases the parser is case insensitive, with the exception of pure text nodes. For almost all cases in the event parser you may use AttachMovie or attachmovie. Just make sure the opening and closing tags match
Any typos or mismatched tags will result in the entire XML file failing to load. To verify your changes open the xml file in your browser. It will report any errors in the file. There are also a lot of other programs to edit and validate XML.
The meta nodes like <xml> are not required here.
Lastly in general save all xml files using UTF-8
XML Files in the game
All XML files used by the game are in several locations
This folder contains all events and pure text fields
- Base.xml - pure text used by the game, no event code. General messages
- SlaveMaker.xml - Slave Maker specific pure text
- Slaves.xml - minor slaves in the game, format detailed in Core - XML Slaves.rtf
Translations are stored in folders like
Twins have special files like Base (Twins).xml. These files should be exact copies of their non-twin version altered so text makes sense for a set of twins. Only the nodes that differ need to be present the the xml. All other nodes can be deleted.
All slave specific xml is stored in files like
These files are optional.
For translation copy this file and create for Russian
and similarly for other languages. Note these are in the same folder, not a subfolder like above.
Note for translations you again do not need to repeat nodes that are not changed, like stats or other numeric nodes. These can be deleted from the translated version.
As for slaves but instead for slave maker assistants,
Note: All xml files are logically loaded into the one xml tree and are merged at runtime. The base node in
with major subnodes
- <Gender> gender differences like he/she
- <Statistics> slave statictics
- <Equipment> equipment names and decriptions, and text when wearing/removing them
- <Shopping> messages with shopping
- <Other> miscellaneous
- <SlaveMaker> slave maker specific messages, including advantages etc
- <Slaves> minor slaves statistics
- <Slave> your current slave (optional)
- <Assistant> assistant specific messages
- <Events> event nodes
and other lesser nodes
The system allows you to overwrite/replace standard messages in your slave/assistant xml, and thus customise messages. This is detailed in DEV:SDK/Core - XML Slaves
Pure Text Nodes
These nodes are stored in Base.xml, SlaveMaker.xml and are detailed in Dev:SDK/Guide to translating.
These contain various nodes broken into categories like <Shopping> and have nodes like
Note 1) DO NOT add new nodes to these files, they are for core game use. To use text nodes for your slave add them to your slave's xml file
- into the <Slave> node
2) the node's tags are case sensitive. but they should NEVER be changed
All events are stored in the
node and this is stored in the file
All nodes are parsed event nodes, but some will appear to be pure text like
This is still a full event node but in this case it only displays text
- General Structure of the Events Node
There are a series of standard events used by the core game and are explicitly used in code (see functions list below) eg
<Diary>#slave fell ill due to exhaustion</Diary>
<AddText>#slave fell sick because of exhaustion, and #slaveheshe will need one day to rest and get better.</AddText>
The remaining nodes are collections of events the game will choose when certain events happen. Your custom events are added as new nodes, you may specify any name, as long as it is unique for the current node.
- These are events that happen early in the morning. In the standard methods, this is equivallent to the
- These are events that happen at the start of the day. In the standard methods, this is equivalent to the
- These are events that happen when you send your slave (or take them) for a walk to a city/country location using the 'Take A Walk' action.
Each location has specific subnodes
- Happens when you leave the morning screen and start daily planning
- Happens when you start night time planning
All events are added as nodes in one one the above nodes like <EarlyMorning>.
The general structure
Where .... is more xml statements and nodename1..n is your chosen name. See below for valid conditionals.
The game will scan this list from the first to last and will pick an event based on the supplied conditionals. All conditional are optional and in that case the event will never happen randomly but you can still invoke it using code or xml statements (ie call it from another event) eg
This uses the conditional chance (a percentage chance of the event happening). If the conditionals are met then the statements of the node are executed. See below for a list of the valid statements and conditionals
For your node names make sure they are unique for it's parent node (ie in EarlyMorning). Case does not matter but you must be consistent in it's usage.
There are some special namings
- eg <Day-PedlerVisit>
- Events with the Day- prefix will only happen in the daytime and will be ignored otherwise.
- eg <Night-WolfHowl>
- Events with the Night- prefix will only happen in the nighttime and will be ignored in the daytime.