Difference between revisions of "Abducted story"
Line 2: | Line 2: | ||
It is not really a tutorial, but it is worth reading to gain more knowledge about modding.<br> | It is not really a tutorial, but it is worth reading to gain more knowledge about modding.<br> | ||
An important part of this chapter describes how to get the character to do a (sexual) task. | An important part of this chapter describes how to get the character to do a (sexual) task. | ||
+ | |||
+ | [[file:abducted_story1.jpg|600px]] | ||
===What was added to the story=== | ===What was added to the story=== | ||
Line 39: | Line 41: | ||
</ol> | </ol> | ||
− | + | ===The alien girl opens the door=== | |
+ | |||
+ | <ol> | ||
+ | <li>Open the <code>/init/story/alien/brain/run.dat</code> file.</li> | ||
+ | <li>Take a look at the <code>START1</code> state.<br> | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | loc.so.obj = SPACESHIP1:CELL2; | ||
+ | loc.so.par = DOOR_SET_STATUS; | ||
+ | loc.so.val = DOOR_SETVAL_STATUS_OPEN; | ||
+ | SetObject(loc.so); | ||
+ | </syntaxhighlight> | ||
+ | After the alien girl made a bow like gesture the doors opens using this code. It is the same code we tested at the start of the tutorials. | ||
+ | </li> | ||
+ | </ol> | ||
+ | |||
+ | ===The alien girl gets into a blowjob pose=== | ||
+ | |||
+ | <ol> | ||
+ | <li>Open the <code>/init/story/alien/brain/run.dat</code> file.</li> | ||
+ | <li>Take a look at the <code>START_BLOWJOB</code> state.<br> | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | loc.task.waypoint = SPACESHIP1:INCELL_WP1; | ||
+ | loc.task.mood = DISGUSTED; | ||
+ | start_task_blowjob(loc.task); | ||
+ | </syntaxhighlight> | ||
+ | A task is a subroutine that allows you to perform a complex task without much programming.<br> | ||
+ | The task can often be started using several startup parameters. In this case we want the girl to perform the blowjob at waypoint <code>SPACESHIP1:INCELL_WP1</code>.<br> | ||
+ | Also we want the girl to look somewhat disgusted at your penis during the blowjob.<br> | ||
+ | The task code can be found in the standard libraries of the brain (<code>/init/std/base/char/brain/code/task/task_blowjob.dat</code>).</li> | ||
+ | <li>Because normally the disgusted mode of the blowjob task starts with nodding to the penis, we need to skip that part.<br> | ||
+ | That is why in the <code>GIVING_BLOWJOB</code> state we added the code: | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | [state.dyn.me.task.blowjob.state == MOVEAWAY] | ||
+ | { | ||
+ | set_task_blowjob_state(GIVEHEAD); | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | This will skip the move-away part of the blowjob and directly proceed to action. | ||
+ | </li> | ||
+ | </ol> |
Revision as of 15:16, 21 January 2015
We added some extra code to finish the abducted story. We will walk over the important parts of the code in this chapter.
It is not really a tutorial, but it is worth reading to gain more knowledge about modding.
An important part of this chapter describes how to get the character to do a (sexual) task.
Contents
What was added to the story
- First copy the complete
pack_abducted
directory from the 'Tutorial resource pack' to your./pack
directory.
You may want to rename your own pack directory from the previous tutorials in order to keep the results.
Now start the story from the beginning and play it to the end. - You will notice that several elements have been added:
- The alien girl reacts to your penis being shown.
- The alien girl opens the door.
- The alien girl gets into a blowjob pose.
- The alarm is sounded when you try to escape.
- The alien girl start coughing when you eject in her mouth.
- Most (90%) of the code has been added to the
run.dat
files for both the player and the alien girl.
There are also some small changes to some other files, but if you followed the previous tutorials it should be pretty clear what these changes are.
The alien girl reacts to your penis being shown
- Open the
/init/story/alien/brain/run.dat
file. - Take a look at the
WAIT_REACTION
state.
[state.dyn.me.avatar.penis_mode > 0] { SetFocusElem(PENIS); do_set_timer(5); state.dyn.me.do.state2 = SEE_PENIS; return; }
When the avatar (player) its penis_mode is larger than 0 (3 = erected), the alien girl focuses on the penis and goes into
SEE_PENIS
state.
The alien girl opens the door
- Open the
/init/story/alien/brain/run.dat
file. - Take a look at the
START1
state.
loc.so.obj = SPACESHIP1:CELL2; loc.so.par = DOOR_SET_STATUS; loc.so.val = DOOR_SETVAL_STATUS_OPEN; SetObject(loc.so);
After the alien girl made a bow like gesture the doors opens using this code. It is the same code we tested at the start of the tutorials.
The alien girl gets into a blowjob pose
- Open the
/init/story/alien/brain/run.dat
file. - Take a look at the
START_BLOWJOB
state.
loc.task.waypoint = SPACESHIP1:INCELL_WP1; loc.task.mood = DISGUSTED; start_task_blowjob(loc.task);
A task is a subroutine that allows you to perform a complex task without much programming.
The task code can be found in the standard libraries of the brain (
The task can often be started using several startup parameters. In this case we want the girl to perform the blowjob at waypointSPACESHIP1:INCELL_WP1
.
Also we want the girl to look somewhat disgusted at your penis during the blowjob.
/init/std/base/char/brain/code/task/task_blowjob.dat
). - Because normally the disgusted mode of the blowjob task starts with nodding to the penis, we need to skip that part.
That is why in theGIVING_BLOWJOB
state we added the code:[state.dyn.me.task.blowjob.state == MOVEAWAY] { set_task_blowjob_state(GIVEHEAD); }
This will skip the move-away part of the blowjob and directly proceed to action.