Hola,
small post
I've added ShowEquipScreen event step.
It's a pretty simple event step with no parameter.
It's use is to show the equip interface and it's meant only for that.
In fact items that are not equippable are not shown.
This is useful if you need to change equipment mid-event
For example the slave might be unconfortable in her current dress and ask to be dressed differently before going out.
Remember the previous post about outlaw public nudity?
In that event if a guard stop you will ask to redress the slave before giving you a fine.
He gives you 3 warning if at the third the slave is still nude you will be forced to jail.
Bye bye!
Showing posts with label event. Show all posts
Showing posts with label event. Show all posts
Monday, August 1, 2016
Sunday, July 17, 2016
Activity features
Hello,
I added a new information to week activities.
Just to refresh your memory. What's a week activity?
A week activity is what youre gonna do during the week and that you can select during week planning.
The activities are defined inside an xml file.
And now when you define an activity you can declare a new information called Feature.
So, what's an activity feature?
An activity feature is just a piece of text that describe the activity. This description can be retrieved while the activity is running. This will be mostly useful for generic events and checks that might happen in the game.
But let's take an example,
in the Xmaker world, nudity is not allowed in public.
So, do I have to check in every activity if the slave is nude and if yes react?
Well, yes, if you have some custom event.
But in general you just want a default event to fire.
By default a guard will stop you and give you a fine / send you to jail.
I could easily add this event in the activity start hook, right?
Well, yes and no.
It's correct for this to be executed at the start of an activity, but not all activities are done in public or where guard are available...
I added a new information to week activities.
Just to refresh your memory. What's a week activity?
A week activity is what youre gonna do during the week and that you can select during week planning.
The activities are defined inside an xml file.
And now when you define an activity you can declare a new information called Feature.
So, what's an activity feature?
An activity feature is just a piece of text that describe the activity. This description can be retrieved while the activity is running. This will be mostly useful for generic events and checks that might happen in the game.
But let's take an example,
in the Xmaker world, nudity is not allowed in public.
So, do I have to check in every activity if the slave is nude and if yes react?
Well, yes, if you have some custom event.
But in general you just want a default event to fire.
By default a guard will stop you and give you a fine / send you to jail.
I could easily add this event in the activity start hook, right?
Well, yes and no.
It's correct for this to be executed at the start of an activity, but not all activities are done in public or where guard are available...
Enter the features
The solution can be found by using activity features.
By giving an activity the following features: Public place and Presided by guards (I hope it's correct english because I'm not really sure :/ )
Now in the activity start event we could check if the activity has both these features and in case give a fine or jail the player.
Okay, that it, bye people. Hope this will be useful for other things than the nudity check in the future.
Thursday, July 7, 2016
Finally the weekend arrive
Hi folks,
finally I added hooks for the events.
The hook are fired when a week start or end and when an activity start or end.
What's the idea behind this?
Well, mostly it's needed to do some common checks on the state of the game for example, during the week end (which was actually the only hook already implemented) I check for game over conditions.
The next step will be to add a way to check the current activity data, this will open a world of new opportunity (just exaggerating).
For example, once you know that an activity is done in a public place, before the activity start, I could check whether the slave is nude (public display is against the law in the game) and if so a random event might trigger, were the guard give you a fine or take you to the prison (and you know what will happen in prison to your slave right?)
Anyway that's it for now.
finally I added hooks for the events.
The hook are fired when a week start or end and when an activity start or end.
What's the idea behind this?
Well, mostly it's needed to do some common checks on the state of the game for example, during the week end (which was actually the only hook already implemented) I check for game over conditions.
The next step will be to add a way to check the current activity data, this will open a world of new opportunity (just exaggerating).
For example, once you know that an activity is done in a public place, before the activity start, I could check whether the slave is nude (public display is against the law in the game) and if so a random event might trigger, were the guard give you a fine or take you to the prison (and you know what will happen in prison to your slave right?)
Anyway that's it for now.
Thursday, January 28, 2016
Trainee properties
Hello there,
I added a new event step.
A lot of time ago I added the SetGlobal event step, which let you to set a global variable that can be retrieved in the future.
That lead to have a PlayOnce event step which let you play a event only once during the whole game.
Well, now I added a similar event step but with a smalle scope.
The scope is the trainee and the event step is called SetTraineeProperty.
The event step works exactly as the setGlobal but it clearly require a trainee.
Here's an example:
<SetTraineeProperty Type="Bool" Key="trainee_happy">
[Trainee.Mind.Happiness] > 70
</SetTraineeProperty>
Okay, so to retrieve the value:
<SetText>Is trainee happy? !$expr{[Trainee.Property.Bool.trainee_happy]}</SetText>
This would led (if the trainee happiness is higher than 70) to the following result displayed on screen:
Is trainee happy? true
Anyway this led to add the PlayOncePerTrainee event step too, which has the same sintax as the PlayOnce event step:
<PlayOncePerTrainee CompletionKey="trainee_present_herself">
<SetText>!$trainee: Hello, I'm t!$trainee, pleased to meet you.</SetText>
</PlayOncePerTrainee>
Well, that's it for today.
I added a new event step.
A lot of time ago I added the SetGlobal event step, which let you to set a global variable that can be retrieved in the future.
That lead to have a PlayOnce event step which let you play a event only once during the whole game.
Well, now I added a similar event step but with a smalle scope.
The scope is the trainee and the event step is called SetTraineeProperty.
The event step works exactly as the setGlobal but it clearly require a trainee.
Here's an example:
<SetTraineeProperty Type="Bool" Key="trainee_happy">
[Trainee.Mind.Happiness] > 70
</SetTraineeProperty>
Okay, so to retrieve the value:
<SetText>Is trainee happy? !$expr{[Trainee.Property.Bool.trainee_happy]}</SetText>
This would led (if the trainee happiness is higher than 70) to the following result displayed on screen:
Is trainee happy? true
Anyway this led to add the PlayOncePerTrainee event step too, which has the same sintax as the PlayOnce event step:
<PlayOncePerTrainee CompletionKey="trainee_present_herself">
<SetText>!$trainee: Hello, I'm t!$trainee, pleased to meet you.</SetText>
</PlayOncePerTrainee>
Well, that's it for today.
Friday, January 8, 2016
Ze bank and game time
As anticipated in the previous post I needed a bank in order to make simplier to buy the home.
The bank is now a new location where you can take a mortgage.
You can get a lot of money that you will have pay in a very long period with monthly payments.
The long period as I write is 20 year.
So, since I doubt someone is going to play for a so long period it's more like an infinite time.
Anyway for this I enanched the AddPeriodicMoneyMovement event step.
Adding an optional duration field.
<AddPeriodicMoneyMovement>
<Id>bank_loan</Id>
<Reason>Bank loan</Reason>
<Amount>-Round(55000 / 200, 0)</Amount>
<Period>Month</Period>
<Duration>200</Duration>
</AddPeriodicMoneyMovement>
Did you catch the mistake?
The duration is 200 months while 20 years should be 240.
Well, it's not a mistake.
The game time is different from the real world one a year is made of 10 months and a months is made of exactly 4 weeks.
Weeks will remain as is for simplicity reason, but maybe I'll change the month number to 12. I have still to see whether it's an advantage to have 10 month years.
The bank is now a new location where you can take a mortgage.
You can get a lot of money that you will have pay in a very long period with monthly payments.
The long period as I write is 20 year.
So, since I doubt someone is going to play for a so long period it's more like an infinite time.
Anyway for this I enanched the AddPeriodicMoneyMovement event step.
Adding an optional duration field.
<AddPeriodicMoneyMovement>
<Id>bank_loan</Id>
<Reason>Bank loan</Reason>
<Amount>-Round(55000 / 200, 0)</Amount>
<Period>Month</Period>
<Duration>200</Duration>
</AddPeriodicMoneyMovement>
Did you catch the mistake?
The duration is 200 months while 20 years should be 240.
Well, it's not a mistake.
The game time is different from the real world one a year is made of 10 months and a months is made of exactly 4 weeks.
Weeks will remain as is for simplicity reason, but maybe I'll change the month number to 12. I have still to see whether it's an advantage to have 10 month years.
Tuesday, January 5, 2016
Ze house
Hi,
I added a event where you can actually buy a house.
This will give you the advantage of a lower monthly expense, instead of paying the rent you will just have to pay a own taxes which is lower then rent.
The house at the moment does not provide anything else.
But the idea behind it is to use it similarly to otherworld (an old and for what I know defunct hentai game) where you can build new room that will unlock new events.
The house though (as a real one) cost money, a lot of money.
So, I'll have to add the bank, which will gladly lend you money as long as you pay them interests...
I added a event where you can actually buy a house.
This will give you the advantage of a lower monthly expense, instead of paying the rent you will just have to pay a own taxes which is lower then rent.
The house at the moment does not provide anything else.
But the idea behind it is to use it similarly to otherworld (an old and for what I know defunct hentai game) where you can build new room that will unlock new events.
The house though (as a real one) cost money, a lot of money.
So, I'll have to add the bank, which will gladly lend you money as long as you pay them interests...
Tuesday, December 29, 2015
Selling slaves
I made a few changes at the event where you sell your slave.
Before it was just a kind of place holder.
Now it work in a different way.
When you try to sell your slave, people will approach you and give you a offer that you can either accept or refuse.
Before it was just a kind of place holder.
Now it work in a different way.
When you try to sell your slave, people will approach you and give you a offer that you can either accept or refuse.
Wednesday, May 20, 2015
GameOver event step
Hello there.
I added the GameOver event step this event step will be used to show the game over screen.
As I already said there are two types of GameOver:
1. Trainee gameover which means the slave just died.
2.Player game over, this type of game over will make use of the GameOver event step.
At the moment there's only one way for the player to game over.
When he has a negative amount of money, the player will have 4 turn to return to a positive amount.
If he can't, it's game over babe!
In future other game over could be implemented.
For example I can foresee an event where the player slip on a carpet and decapitate himself.
Maybe that's too random but there could be some event where the player is killed by monsters or by her trainee.
I added the GameOver event step this event step will be used to show the game over screen.
As I already said there are two types of GameOver:
1. Trainee gameover which means the slave just died.
2.Player game over, this type of game over will make use of the GameOver event step.
At the moment there's only one way for the player to game over.
When he has a negative amount of money, the player will have 4 turn to return to a positive amount.
If he can't, it's game over babe!
In future other game over could be implemented.
For example I can foresee an event where the player slip on a carpet and decapitate himself.
Maybe that's too random but there could be some event where the player is killed by monsters or by her trainee.
Friday, April 17, 2015
Validation for event reference
As I already mentioned in this previous post I wanted to add to the event validator a way to validate whether a event reference is valid or not.
What's a event reference?
It's a way to call an event from within another event. (programming metaphore: if an event is a function an event reference is a call to that function)
Anyway, I'll explain that better in a event tutorial.
Anyway, having that check is really useful. In fact there where already 4 bad reference in some older events, that now are fixed.
What's a event reference?
It's a way to call an event from within another event. (programming metaphore: if an event is a function an event reference is a call to that function)
Anyway, I'll explain that better in a event tutorial.
Anyway, having that check is really useful. In fact there where already 4 bad reference in some older events, that now are fixed.
Monday, March 30, 2015
Validator for events
Hello,
in these days I made a great improvement in event creation that should make event creation a little simpler for me and for anyone that in the future might like to try and create one.
I made a validator that can tell you major errors.
What errors can it find at the moment:
It find undefined EventStep for example <SetText> is defined while <SetTxt> or <ABCD> is not. This should prevent mistakes in writing event steps names.
in these days I made a great improvement in event creation that should make event creation a little simpler for me and for anyone that in the future might like to try and create one.
I made a validator that can tell you major errors.
What errors can it find at the moment:
It find undefined EventStep for example <SetText> is defined while <SetTxt> or <ABCD> is not. This should prevent mistakes in writing event steps names.
- It find undefined EventStep for example <SetText> is defined while <SetTxt> or <ABCD> is not. This should prevent mistakes in writing event steps names.
- It tells whether an event step is formed correctly, for example event steps that require attributes or inner elements will fail validation if they're not defined. And will fail too if they have attributes that are not used.
- It tells if a given quest id exist or not.
- Most important it will validate expressions (hopefully if there are not bug on that side :3) for example an expression like [Trainee.Mind.Happiness.VeryHaRpy] will fail since that parameter does not exist, while the correct one [Trainee.Mind.Happiness.VeryHappy] will pass the validation. In part it even check for correct types if an expression require a bool as a return and the expression return a number it will fail validation.
I'd like to add in the future:
- Check whether a <DirectReference> point to a correct file/event
- Check whether a quest is started somewhere or is unused.
- And maybe whehter events themself are used (not sure I could do this at the moment)
- Other that at the moment don't come to mind.
Anyway for every error that find it gives the file and line where the error could be finded.
This should reduce a lot event testing (unfortunately it will never be smart enough to tell grammar error but for that there's the button to report typos)
Monday, March 16, 2015
Introducing how events are written 2: let's go working!
Hi,
here's the second lessons on how the events are written.
Today let's see how to put up a simple working event. This way we can see some new event steps.
So, how a slave in a fantasy hentai world could make money?
What did you say? By being an astronaut? Well, thats... unexpected.
Anyway okay.
So we start with something basic:
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Yeah, very basic...
Anyway here there's already something new.
Have you spotted it?
It's the !$trainee. Okay le'ts start by saying that when you see something that starts with !$ it's called an Alias and inside the game will be replaced with something more meaningfull. For example our !$trainee will be substituted with the name of your slave.
Now, during events your slave stats improve/degrade as a consequence of what she do.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddBody>Fitness ----- There's no way to train in space</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
There are 2 kind of stats: body stats and mind stats.
The body stats represent phisical trait of the girl while mind stats represent mental traits.
Anyway <AddBody> is used to modify body stats while <AddMind> is used to modify mind stats.
A stat that is common to both is Wear. The higher it is the more fatigued the girl is, phisically and mentally.
Both <AddMind> and <AddBody> have the same sintax:
<AddMind>Wear(1) ++++(2) Being inbla bla(3)</AddMind>
here's the second lessons on how the events are written.
Today let's see how to put up a simple working event. This way we can see some new event steps.
So, how a slave in a fantasy hentai world could make money?
What did you say? By being an astronaut? Well, thats... unexpected.
Anyway okay.
So we start with something basic:
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Yeah, very basic...
Anyway here there's already something new.
Have you spotted it?
It's the !$trainee. Okay le'ts start by saying that when you see something that starts with !$ it's called an Alias and inside the game will be replaced with something more meaningfull. For example our !$trainee will be substituted with the name of your slave.
Now, during events your slave stats improve/degrade as a consequence of what she do.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddBody>Fitness ----- There's no way to train in space</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
There are 2 kind of stats: body stats and mind stats.
The body stats represent phisical trait of the girl while mind stats represent mental traits.
Anyway <AddBody> is used to modify body stats while <AddMind> is used to modify mind stats.
A stat that is common to both is Wear. The higher it is the more fatigued the girl is, phisically and mentally.
Both <AddMind> and <AddBody> have the same sintax:
<AddMind>Wear(1) ++++(2) Being inbla bla(3)</AddMind>
- The first part is the name of the stat being modified.
- The second part is the amount the stat will be modified. +++++ mean it will increase a lot, using less plus will increase it but less. ----- will decrease the stat a lot and using less minus will still decrease it but less.
- The third part is the reason the stat changed. This will be displayed to the player.
Now let's add another event step.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<AddMoney>
<Reason>Worked as astronaut</Reason>
<Amount>2000</Amount>
</AddMoney>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Guess, what <AddMoney> do?
Exactly, it make the game crash.
No, I mean it add a given amount to the player money.
The <Amount> is how many money will be added (or removed if it's negative) from the player finance.
The <Reason> is the same as the reason for <AddMind> and it is used to display info to the player.
Now let's fire this bad boy, shall we?
As you can see:
- !$trainee is changed and is now Jeane
- The money are added to player finance as can be seen in the screen.
- You can't see the stats but I assure you they had been added to trainee stats (I would have shown you the stat panel too but currently it doesn't display the reason so let's wait a little)
Okay, hope I have been clear enough.
Thursday, February 19, 2015
New event step
This summary is not available. Please
click here to view the post.
Tuesday, December 30, 2014
Quest handling
Hello!
In the last two days I decided to add a way to handle quest in the game.
Now chapter00 isn't anymore a simple event but a collection of 3 quests.
So what actually change from the point of view of the player?
Nothing much, there's just a new tab that shows the quests and their status. (still need to improve graphics)
In the last two days I decided to add a way to handle quest in the game.
Now chapter00 isn't anymore a simple event but a collection of 3 quests.
So what actually change from the point of view of the player?
Nothing much, there's just a new tab that shows the quests and their status. (still need to improve graphics)
What change from the point of view of someone that should write a quest?
Something more.
-Firstly I added two new event steps:
StartQuest and EndQuest
both take as parameter the id of the quest (e.g. Main.Chapter00.RentHome)
-Secondly I added a way to query the state of a quest
-Lastly I added a quest definition. Which is a xml file that contain all the data pertaining the xml
So if someone would want to write a quest he has to:
1. Define the quest in the xml definition file.
2. Start the quest from an already playable point of the game.
Monday, December 8, 2014
Started working on the story: Chapter 0
I started working a little on the story.
I decided there will be a main story (quest) and that it will be divided in chapters.
I'm now writing at an high level the chapter 0 which is a sort of introduction where it tells you how you started being a slave trainer and what's the city you're in feels like.
It's a small chapter where you've just moved to the city and try to buy your first slave.
This made me think that I need a way to keep track of quests. So in the following days I'll probably write down the events for chapter 0 and while doing so I'll add the new EventStep that will be required for managing the quest.
What's an EventStep? (maybe I already explained that?)
Let's start by defining an event. In the game an event is a piece of story.
For example you decide to go and work to the brothel? An event will start explaining you what happened.
An EventStep is the building block of an event.
For example there's an EventStep for displaying text to the player, one for adding money, one for changing expression etc...
And that's it... From now on if I refer to EventStep you will be able to understand what they are.
I decided there will be a main story (quest) and that it will be divided in chapters.
I'm now writing at an high level the chapter 0 which is a sort of introduction where it tells you how you started being a slave trainer and what's the city you're in feels like.
It's a small chapter where you've just moved to the city and try to buy your first slave.
This made me think that I need a way to keep track of quests. So in the following days I'll probably write down the events for chapter 0 and while doing so I'll add the new EventStep that will be required for managing the quest.
What's an EventStep? (maybe I already explained that?)
Let's start by defining an event. In the game an event is a piece of story.
For example you decide to go and work to the brothel? An event will start explaining you what happened.
An EventStep is the building block of an event.
For example there's an EventStep for displaying text to the player, one for adding money, one for changing expression etc...
And that's it... From now on if I refer to EventStep you will be able to understand what they are.
Tuesday, December 2, 2014
Removed cholesterol from events
Note that this post might be somewhat technical for whoever never seen XML before or an SlaveMaker event.
Today I made a change to the way events are written.
There were two elements that I was not very fond of and I decided to finally eradicate them from the events.
The first element was <Resolveable> element which was needed to "decorate" some elements used to make branch in an event.
For example a piece of an event could be looked like this:
<Resolveable>
<If Expression="true">
<SetText>Fuck off!</SetText>
</If>
</Resolveable>
whereas now look like this:
<If Expression="true">
<SetText>Fuck off!</SetText>
</If>
The other element I removed (kind of it still have a use in one case) is the <Composite> which is just a collection of element. For example the <If> (again) was able a single element inside itself, so for having more than one was necessary to use the composite like this:
<If Expression="true">
<Composite>
<SetText>First node</SetText>
<SetText>Second node</SetText>
</Composite>
</If>
Now this is not needed anymore and can be written without the composite.
But I decided to leave it this node in since there's still use for it. There's in fact an element that can handle "single" elements inside itself which is the <Random> element. I said "single" since in reality the element has multiple elements as children but handle them singularly.
<Random>
<SetText Random.Weight="1">random 1</SetText>
<NoOp Random.Weight="98"/>
<Composite Random.Weight="1">
<SetText>Multiple</SetText>
<AppendText>node</AppendText>
<AppendText>here</AppendText>
</Composite>
</Random>
In this case 98 times out of 100 no operation would be executed.
In 1 case out of 100 the first SetText would be executed.
In the remaining 1 out of 100 the 3 elements in the composite would be executed.
I might decide to remove it later because I'm in an ethical pickle...
But anyway for today I've written to much and probably nobody will read this anyway.
If you've been so mad to read all the way trhough and have question about event and other element that might be used, just drop a comment :)
Today I made a change to the way events are written.
There were two elements that I was not very fond of and I decided to finally eradicate them from the events.
The first element was <Resolveable> element which was needed to "decorate" some elements used to make branch in an event.
For example a piece of an event could be looked like this:
<Resolveable>
<If Expression="true">
<SetText>Fuck off!</SetText>
</If>
</Resolveable>
whereas now look like this:
<If Expression="true">
<SetText>Fuck off!</SetText>
</If>
The other element I removed (kind of it still have a use in one case) is the <Composite> which is just a collection of element. For example the <If> (again) was able a single element inside itself, so for having more than one was necessary to use the composite like this:
<If Expression="true">
<Composite>
<SetText>First node</SetText>
<SetText>Second node</SetText>
</Composite>
</If>
Now this is not needed anymore and can be written without the composite.
But I decided to leave it this node in since there's still use for it. There's in fact an element that can handle "single" elements inside itself which is the <Random> element. I said "single" since in reality the element has multiple elements as children but handle them singularly.
<Random>
<SetText Random.Weight="1">random 1</SetText>
<NoOp Random.Weight="98"/>
<Composite Random.Weight="1">
<SetText>Multiple</SetText>
<AppendText>node</AppendText>
<AppendText>here</AppendText>
</Composite>
</Random>
In this case 98 times out of 100 no operation would be executed.
In 1 case out of 100 the first SetText would be executed.
In the remaining 1 out of 100 the 3 elements in the composite would be executed.
I might decide to remove it later because I'm in an ethical pickle...
But anyway for today I've written to much and probably nobody will read this anyway.
If you've been so mad to read all the way trhough and have question about event and other element that might be used, just drop a comment :)
Subscribe to:
Posts (Atom)