PDA

View Full Version : Sleeping guard...



Thief13x
17th Feb 2003, 20:16
I used to have a tut for this but i don't know where i can get one. If somone could tell me what to do to make a guard sleeping, without refering me to DromEd Central (my browser doesn't work with it), i would appriciate it.

Schwaa2
17th Feb 2003, 20:18
I used this system in TrainSpotting,
Its an exclelent way to do it :
=================================
================================
How create a sleeping servant
By Thiefs_Pawn.

--------------------------------------------------------------------------------
Sleeping Servants:
This tutorial is the result of a thread on Thief Editors Guild.
http://www.ttlg.com/forums/ubb/Forum17/HTML/001385.html
Credit goes to all members who contributed to it (and especially to Despot for writing the first version
of this tutorial).

This is an alternate method of implementing sleeping servants in Thief. It is not used in any of the
original levels, so may have bugs other than the ones noted at the end of this tutorial.

If you are starting a new level and do not have your own custom gamesys or you have not modified the
gamesys of your current level you can simply use the one in this zip. Extract the file sleep.gam and
rename it if you want. Place this file in the same directory as your level, then go into Dromed, open
your level and type 'set_gamesys sleep.gam' (without the quotes). If you make further changes to the
gamesys remeber to save it (NOTE: Dromed doesn't automatically change the file extension to *.gam in
the save dialogue box)
If you use this gamesys, or modify your existing one, remember you must distribute it with your mission.

Gamesys contents:
M-Blind Sleeper Metaproperties>AI_Behaviours>Custom behaviours
M-Awake Metaproperties>AI_Behaviours>custom behaviours
NewBunk Object>Physical>Furniture>Bedparts>Bunk
NewFancyBed Object>Physical>Furniture>Bedparts>FancyBed
NewConBed Object>Physical>Furniture>Bedparts>ConBed

If you want to add this behaviour to an existing gamesys follow the steps below.

* Open the object hierachy and in the top drop-down box choose MetaProperties

* Click on 'AI_Behaviours (-1631)' and then on the button marked New, type 'Custom Behaviours' in the
box that appears and click OK.

* Click on 'Custom Behaviours (-x)' (where x is a number assigned by Dromed) and then on the button
marked New, type 'M-Blind Sleeper' in the box that appears and click OK.

* Double click 'M-Blind Sleeper (-y)' (where y is another number) This should bring up a window with
a box on the left containing 'M-Blind Sleeper (-y)' and 'Custom Behaviours (-x)' and buttons on the
right marked; Add, Delete, Edit, Expand, Refresh, Hide (may be greyed out) and Done.

* Click on 'M-Blind Sleeper (-y)' then click Add>AI>Responses>Sense Combat Response.
Configure it like this;
Response: Step 1 : Add/Remove Meta-property
Argument 1 : Remove
Argument 2 : M-Blind Sleeper
Response: Step 2 :Add/Remove Meta-property
Argument 1 : Add
Argument 2 : M-Awake

* Click on 'M-Blind Sleeper (-y)' then click Add>AI>Responses>Alert Response. In the drop-down box
next to Alert Level choose '(2) Moderate' and in the drop-down box next to Priority choose 'Very High'.
Fill in response steps 1 and 2 exactly as before then click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>Ability Settings>Inform: Response Options.
Fill in Response Steps 1 and 2 as before, leave the other boxes blank and click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>Ability Settings>Idling: Should Fidget.
Leave the check box blank and click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>Attributes>Hearing. Select 'Below Average' or
'Well Below Average' and click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>Attributes>Vision. Select 'Null' and click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>AI Core>Broadcast customization. Configure it like this;
Custom 1: Broadcast : Alert zero broadcast
Type : Custom concept
Custom concept : Sleeping

*Click on 'M-Blind Sleeper (-y)' then click Add>AI>AI Core>Standing Motion Tags. Leave the box blank and click OK.

*Click on 'M-Blind Sleeper (-y)' then click Add>Creature>Current Pose.
Configure it like this;
Type : Tags
Motion : crumple, die
Frac : 1.00
Model Scale : 1.00
Ballistic : Unchecked

*Click done

* Click on 'Custom Behaviours (-x)' and then on the button marked New, type 'M-Awake' in the box that appears and click OK.

* Double click 'M-Awake (-z)' (where z is another number)

*Click on 'M-Awake (-z)' then click Add>AI>Ability Settings>Idle: Returns to origin. Leave the check box blank and click OK.

*Click on 'M-Awake (-z)' then click Add>AI>Ability Settings>Idling: Should fidget. Tick the check box and click OK.

*Click Done and then Close and don't forget to save the gamesys.


To put a human to sleep (this hasn't been tested on animals ;) open their properties and click
Add>MetaProperty>Custom Behaviours>M-Blind Sleeper


Note: If you have an AI sleeping on a bed and it gets stuck in the bed when woken you need to add the property
AI>Utility>Path Avoid>none then rebuild the pathfinding database. The three modified beds included in the
gamesys have this property added. The NewConBed and the NewFancyBed also have their physics dimensions changed
so that the player can jump up on them.

Note: M-Awake performs two functions both of which are optional. It stops the sleeper returning to the middle
of their bed when they loose Garrett, and it causes them to fidget once woken. If you don't want or need these
functions M-Awake can be removed (along with any mentions of it in M-Blind Sleeper).

Known problems: Breaking an object near the sleeping AI wakes them up blind. Also changing the HP of the
creature can make it wake up blind after being hit with an arrow. This problem can be solved using Stims &
Receptrons, however (see below).


Optional: To get the servant to lie face up, change the property Creature>Current Pose.
Motion: crumple, zombie
This makes it lie face up, however, the sleeper's orientation will change somewhat, so you may need to change
their heading.

Optional: To wake up a sleeper by damaging them (assuming you don't kill them outright) follow these additional
steps for each sleeper.

*Create a marker outside your level.
*Use an AIWatchObj link to link the sleeper to the marker.
*Edit the data of the link as follows
Watch kind : Self entry
Trigger: Radius: 5
Height : 5
Required awareness : (0) None
Line requirement : None
Minimum alertness : (0) None
Maximum alertness : (3) High
Exit: link kill option : After completion
kill like links : unchecked
no test once triggered : unchecked
reuse delay : 0
reset delay : 0
Response steps 1 and 2 as above

*Open the sleeper's properties and Add>Act/React>receptrons
*Click add then fill in the boxes as follows
Object : object number of the sleeper
Stimulus : Pokestim
Min intensity : 0
Max intensity : No max
Effect : teleport object
Target object : object number of the marker
Agent object : Me
Click OK
*Repeat the step above except substitute Weaponstim for Pokestim

Download the cutsom GameSys


Back to top...

Thief13x
17th Feb 2003, 20:30
thanks!:D :D :D

Thief13x
17th Feb 2003, 22:31
aight, i know that this is an alternate way to do this, and i would use it, but.....i have to do it on about 30 diff ai's (part of the story). Can't you just add like 2 or 3 properties and be on with it? anyone?

Thief13x
18th Feb 2003, 13:23
Maybe even a TUT from DromEd central, could somone copy and paste one here cuz my browser doesn't work....plllz?

R_Soul
18th Feb 2003, 21:32
The original way to send an AI to sleep is simply to add the M-Sleeping Servant Meta-Property.

It's in MetaProperty > AI_Behaviours > AI_B_m2.

There are a couple, M-Sleeping Servant, and M-NewSleeper. The second one simply had the AI faced up, and in a more dignified position.

For each AI that you want to put to sleep, you would have to add the MetaPropery.

But:
There is a way to make it slightly easier to create loads of sleeping AIs.

Think about which type of AI you'll be using in your level (e.g which guards, which servants, which nobles etc). Find each one in the Object Heirarchy, and click on Add.

Give the AI a sensible name, such as SleepingSwdGrd, SleepingMaleServ1 etc (ie something that tells you what type of AI they are, and that they're asleep). Then press OK.

Now, withe the new AI type still selected, click on Edit. Now add the sleeping MetaProp and click on OK.

Do this for each type of AI in your mission.

Then save your GameSys, which had already been explained.

Now, if you have 20 sword-guards, 5 archers, and 5 servants, you will still have to create each one as normal, but you would only have to add the MetaProp 3 times.

Thief13x
18th Feb 2003, 22:12
Thanks man, that should work gr8