View unanswered posts | View active topics It is currently Thu Mar 28, 2024 9:07 pm



Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4, 5  Next
 Example: Customizable responses 
Author Message
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
Attachment:
blowjob_script.jpg
blowjob_script.jpg [ 97.71 KiB | Viewed 31829 times ]


An interesting mini-game is the blowjob simulation.

Here are two movies showing it:
1) Girl likes you: Blowjob Simulation Movie
2) Girl dislikes you: Blowjob Simulation Movie

It contains a lot of different emotions/features namely:
- Repelling when seeing something that the character dislikes
- Attracting when seeing something the character likes
- Cum threads
- Licking
- Sucking
- Panic expression when in too deep
- Fast/heavy breathing

The Brain:

Before I show you some detailed scripts for things like licking and the sucking, first some basic info.

Each character has a brain. This brain contains code and a state.
The state contains the data of the brain. It has a static part and a dynamic part. The static part contains data that is not changed during the game.
The dynamic part contains data that is changed during the game. Only the dynamic part is saved when saving.
This is how they are defined in the script.

char_objecti:CHAR_BASE SAMANTHA
{
brain
{
state
{
const:

stat {#include "init/brain/chars/state/test_samantha.dat"}

dynamic:

dyn {}
}

code
{
#include "init/brain/chars/code/test_samantha.dat"
}
}

}


Events:

The code part contains the code that makes the character do things and react on things.
It is constantly being fed events during the game. These events can be:

- talks events (when someone talks to the character)
- environment events (when another character is in view)
- touch events (when being touched)
- collision events (when colliding with other objects)
- etc...

Talk events are already transformed by the NLP into more simple commands. But I will describe that into more detail another time.
With the blowjob simulation collision events are very important.

The dynamic variable 'state.dyn.me.coll' contains the collision values that can be polled. It is also possible to react on the event, but we will use polling in most cases.
The collision with the mouth can result in data for the following variables:

- state.dyn.me.coll.mouth_pen.obj_type : contain the object that is colliding
- state.dyn.me.coll.mouth_deep.obj_par: contains how deep the object is
- state.dyn.me.coll.mouth_speed.obj_par: contains how fast the object moves
- state.dyn.me.coll.mouth_wide.obj_par: contains how wide the mouth is

Callback functions:

To let the character 'do' things you can use callback functions in the script. These callback functions control the character. So the events are the input and the callback are the output for the brain. There are a lot of callback functions. For the blowjob simulation useful callback functions are:
- SetExp: gives the character a specific facial expression
- SetFocusObj: focusses on an object (like the penis)
- SetFocusMode: makes the character attract or repel to the object it is focussing on
- SetMouthMucus: creates mucus when penis is in/near mouth
- SetMouthState: opens or closes mouth. When mouth is closed it cannot be penetrated and tongue can collide with penis.

Ok, that is all the info you need to understand the basics for the blowjob scripting. Now for some scripting.


Licking:

// If avatar has penis out
[state.dyn.me.avatar.penis_mode > 0]
{
// Focus on penis
SetFocusObj(PENIS);

// Close mouth so it cannot be penetrated, and tongue collides with penis
SetMouthState(CLOSED);
}
// Focus on avatar instead
else SetFocusObj(NONE);

// When penis object touches mouth
[state.dyn.me.coll.mouth_pen.obj_type == PENIS_OBJ]
{
// If not already licking (licking is done same way as talking)
[!IsTalking()]
{
// Choose random type of licking
loc.v = Rnd(3);
case (loc.v)
{
[0] loc.s = "#totuti"; // tongue out, tongue up, tongue in
[1] loc.s = "#totutotuti"; // out, up, out, up, in
[2] loc.s = "#totutotutotuti"; // out, up, out, up, out, up, in
}

// Talk the licking command (starts with #)
loc.text = false; // Dont show text in window
loc.scale = 100; // Mouth scale 100%
loc.speed = 15; // Mouth speed
Talk(loc); // Talk callback function

// Focus on penis its top
SetFocusObj(PENIS_TOP);

// Attract to focus object (penis top)
SetFocusMode(ATTRACT);
}

// Create some mucus
SetMouthMucus(40);
}


Sucking (pushing in and out):

// When penis object touches mouth
[state.dyn.me.coll.mouth_pen.obj_type == PENIS_OBJ]
{
// If penis in deep
[state.dyn.me.coll.mouth_deep.obj_par >= 3]
{
// Move back
loc.mode = REPEL;
loc.speed = 70;
SetFocusMode(loc);
}

// If penis moves out
else [state.dyn.me.coll.mouth_deep.obj_par <= 1]
{
// Move forward
loc.mode = ATTRACT;
loc.speed = 70;
SetFocusMode(loc);
}

// Create some mucus when penis in mouth
SetMouthMucus(20);
}


Gagging:

GAGGING_STATE:

// When penis to long in
[state.dyn.task.blowjob.count >= 120]
{
// Move back fast (8x)
loc.mode = REPEL;
loc.speed = 800;
SetFocusMode(loc);

state.dyn.task.blowjob.state = OUTOFBREATH_STATE;
return;
}

// When penis object touches mouth
[state.dyn.me.coll.mouth_pen.obj_type == PENIS_OBJ]
{
// If deep
[state.dyn.me.coll.mouth_deep.obj_par >= 3]
{
// Show surprised facial expression (large eyes)
loc.exp = SURPRISED;
loc.scale = 90;
SetExp(loc);

// Count gagging
state.dyn.task.blowjob.count += 1;
}
else
{
// Move in on penis
SetFocusMode(ATTRACT);
}

// Create some mucus
SetMouthMucus(40);
}
else
{
// Do not focus
SetFocusMode(NONE);
}


OUTOFBREATH_STATE:

// Heavy breathing
loc.speed = 160;
loc.scale = 75;
SetBreath(loc);


As you can see you can program the responses on a very detailed level. It contains a lot of options to create low level gameplay. Its also pretty readable and easy to change.
We have tried to keep a middle ground between the amount of options you have and the ease to write scripts.

Thank you for reading!

:geek:


Sun Oct 06, 2013 3:33 pm
Profile
Rank 7
Rank 7

Joined: Thu Jun 20, 2013 11:28 am
Posts: 32
Very cool. That already shows that more is scriptable than I assumed. The stories I want to realize should be no problem in this regard as long as I don't give the brains the conversational IQs of gerbils.


Sun Oct 06, 2013 5:07 pm
Profile
Rank 17
Rank 17
User avatar

Joined: Wed Apr 17, 2013 10:59 am
Posts: 509
Location: Cursed Pickle Jar
You linked to the same movie twice xpadmin.
(Both videos found on the update)

I must say, I find myself impressed. And also jealous because your computer can not only run XSP at 60fps but also record it at the same time... ;_;

_________________
Please follow me on Tumblr and Twitter.
XStoryPlayer discussion over at DigitalEro forums.
How to make easy MOD installers.
HOW TO START MODDING


Sun Oct 06, 2013 6:56 pm
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
@ Pickled Cow

Thank you, I corrected the movie links. :)


Sun Oct 06, 2013 7:04 pm
Profile
Rank 17
Rank 17
User avatar

Joined: Wed Apr 17, 2013 10:59 am
Posts: 509
Location: Cursed Pickle Jar
Do they have reactions to when you cum in their mouths? Or is that not done yet? I was expecting the videos to end with that.

_________________
Please follow me on Tumblr and Twitter.
XStoryPlayer discussion over at DigitalEro forums.
How to make easy MOD installers.
HOW TO START MODDING


Sun Oct 06, 2013 9:30 pm
Profile
Rank 15
Rank 15

Joined: Wed Apr 10, 2013 5:49 pm
Posts: 230
Egads! What a wonderful display for an update! I love it. And the scripting looks like fun. I can certainly see myself spending time working on some of it. :) I was quite happy with the NPCs being able to move and have a little more life put into them with little animations, but the feeling of being able to communicate with them is something I'm extremely happy to see.

However, I can see the animations need a little tweaking to look a little more realistic. When moving back she tends to look a little robotic. Personally, I'd like to see her do something with her hands. Perhaps even lay them in her lap when she performs oral. It's nothing big, but it's just a little thing that distracts me. Though I'm sure such things will be taken care of in the future. I can see a lot of reworking has been done already.

In my opinion, you're heading down the right path for the Ultimate 3D Sex Game. Looking forward to more updates.


Mon Oct 07, 2013 6:34 am
Profile
Rank 6
Rank 6

Joined: Sat Aug 17, 2013 4:38 pm
Posts: 21
Malachai wrote:
Egads! What a wonderful display for an update! I love it. And the scripting looks like fun. I can certainly see myself spending time working on some of it. :) I was quite happy with the NPCs being able to move and have a little more life put into them with little animations, but the feeling of being able to communicate with them is something I'm extremely happy to see.

However, I can see the animations need a little tweaking to look a little more realistic. When moving back she tends to look a little robotic. Personally, I'd like to see her do something with her hands. Perhaps even lay them in her lap when she performs oral. It's nothing big, but it's just a little thing that distracts me. Though I'm sure such things will be taken care of in the future. I can see a lot of reworking has been done already.

In my opinion, you're heading down the right path for the Ultimate 3D Sex Game. Looking forward to more updates.


Like :mrgreen:


Mon Oct 07, 2013 7:22 pm
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
@Pickled Cow

The girl can detect when you come into her mouth. The variable: state.dyn.me.avatar.fluid_type can be used to detect if fluid is ejected from the penis. If you use that in combination with state.dyn.me.coll.mouth_pen.obj_type, you can react on it. (I forgot to record a happy ending in the video)


Tue Oct 08, 2013 10:52 am
Profile
Rank 13
Rank 13
User avatar

Joined: Sun Mar 31, 2013 2:37 pm
Posts: 117
Location: Ordo Malleus
wow, I think that the response scripting is awesome! I can't really find words to describe it because you guys seem to surprise us with the scale you aim for and simply outdo yourselves all the time. I have had dreams about something like this for many years. xD

The detailed response scripting will make it possible to create some really deep stories and I'm sure that there will be a flood of storytellers wanting to give it a try. >.>

I agree with Malachai that the animations could be improved and it looks a little uncanny at times, but what you have already looks acceptable and I think it can safely be postponed.

Things to think about to overcome uncanny valley: Is she breathing? The Japanese has found that a tiny detail as subtle movements of the neck and chest to indicate breathing helps reduce the uncanny feeling. ^^


Tue Oct 08, 2013 2:52 pm
Profile
Rank 10
Rank 10
User avatar

Joined: Wed Mar 27, 2013 8:31 pm
Posts: 60
Devs with huge budgets don't go through the amount of work you folks do to provide us with this kind of modding information. Glad to see you're still going above and beyond in all areas.

I definitely agree with Inquisitor. Some breathing animations would bring a lot of life to the girls.


Fri Oct 11, 2013 3:08 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 46 posts ]  Go to page 1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group.
Designed by X-Moon Productions.