User Tools

Site Tools


dromed:walking_lantern_guard

Walking Lantern Guard Tutorial

NOTEME This tutorial was originally written by Sneaky Acolyte and Thiefs_Pawn and stored at the Dromed Central. The Thief 2 version was originally written by Hidden in shadows. My comments follow the same syntax as this one. Everything else was written by Sneaky Acolyte, Thiefs_Pawn, and Hidden in shadows.

:T1: A tutorial for making a guard that carries a lantern and lights up your visibility gem. T1/Gold only

FIXME This was originally two articles. There is likely redundant information that should be cleaned-up.

The Lantern Guard (T1/G)

This is a tutorial for a guard that carries a lantern and lights up your visibility gem. This was made for Thief: TDP and Thief: Gold. It is not for Thief II as one can use the Renderer→Dynamic Light instead. This was added to by Dan “Thiefs_Pawn” Corder after being originally created by Daniel “Sneaky Acolyte” Garcia. We are not to be held responsible for any damages caused by this document or the following of the directions held within. It is highly recommended that you read a tutorial on Sources and Receptrons prior to reading this document. It is assumed that all preliminary actions of building a level have been implemented.

Background

This tutorial will explain two ways of creating lantern guards, though the second is really just an extension of the first. The default AI→Utility→Visibility Control settings for a Ramirez guard are shown below:

Low light13
Mid light19
High light44
Slow5.49
Fast8.25
Slow mod0
Norm mod5
Fast mod10
Wall dist1.75
Crouch mod3
Wall mod1
Corner lean mod1059481190

We are really only interested in the first three of these settings. It seems that these numbers represent the intensity of light Garrett must be in to be regarded as being in low, medium, or high light by the AI. The other numbers modify the light intensity depending on Garrett’s posture and speed so we can leave them alone. So to make Garrett more visible all we need to do is set the top three numbers to lower values.

Stuff you need for both methods:

  • A room not connected to the rest of your level (a ‘blue room’)
  • At least two guards in the blue room. If you want x levels of light you’ll want x + 1 guards. For the first example we’ll use 3 guards in the blue room. They will be called normal, high, and highest.
  • A guard in your level to hold the lantern (lanternGuard)
  • A lantern (note its ID number, for the purposes of this tutorial we will call it “X”)

The easy way

As we want 2 light levels we need to divide the light level numbers above by 2 and use these numbers as the increments, which we’ll reduce the numbers by. So for ‘highest’ we need to add the property AI→Utility→Visibility Control as below:

highest
Low light0
Mid light0
High light0
Slow5.49
Fast8.25
Slow mod0
Norm mod5
Fast mod10
Wall dist1.75
Crouch mod-3
Wall mod1
Corner lean mod1059481190
high
Low light6
Mid light10
High light22
normal
Low light13
Mid light19
High light44

We can also add AI→State→Current Mode: Asleep to all the guards as a safe-guard.

Now we need to create a custom stim:

  1. Open up the Object Hierarchy
  2. Select Act/React Stimuli from the Show Tree drop-down box
  3. Click on Stimulus, and then click Add, and type in what you want to call your stim (I used LanternStim).
  4. Save the gamesys file. Make sure that you also save the mission and set that mission to use that gamesys with the set_gamesys command.

Next we will set up the lantern:

  1. Open the lantern’s properties.
  2. Add to lantern’s properties:
  3. Return to Main DromEd window
  4. Add to lantern’s properties:
    • Click Add:
      • Object: LanternGuard
      • Stimulus: LanternStim
      • Propagator: Radius
      • Edit Shape:
        • Radius: 50
        • Flags: None
        • Dispersion: Linear
      • Edit Life Cycle:
        • Flags: No Max Firings
        • Period: 100
        • Max Firings: 1
        • Intensity Slope: 0
      • Intensity: 50
  5. Select LanternGuard and click on links:
    • Flavor: CreatureAttachment
    • From: LanternGuard
    • To: “X”
  6. Click OK
  7. Select the link and click Data:
    • Set it to Left Fingers
  8. Return to Main DromEd window

Now we need to make the new stim affect Garrett:

  1. Open up the Object Hierarchy
  2. Go to Physical → Avatar → Garrett and click Edit
  3. Click Add:
    • Object: Garrett (-2099)
    • Stimulus: LanternStim
    • Min intensity: No Min
    • Max intensity: 25
    • Effect: Set Property
    • Edit Effect:
      • Prop Name: AI_VisCtrl
    • Target obj: Me
    • Agent obj: normal
    • Click OK
  4. Click Add:
    • Object: Garrett (-2099)
    • Stimulus: LanternStim
    • Min intensity: 26
    • Max intensity: 38
    • Effect: Set Property
    • Edit Effect:
      • Prop Name: AI_VisCtrl
    • Target obj: Me
    • Agent obj: high
    • Click OK
  5. Click Add:
    • Object: Garrett (-2099)
    • Stimulus: LanternStim
    • Min intensity: 39
    • Max intensity: 50
    • Effect: Set Property
    • Edit Effect:
      • Prop Name: AI_VisCtrl
    • Target obj: Me
    • Agent obj: highest
    • Click OK

That’s it, this method is relatively simple but does have a couple of drawbacks - the extra light doesn’t know about walls or corners and so will pass straight through them. In areas with thick walls and gentle bends this is not a problem and this method is fine. However if you want to make your lantern work in a more realistic manner you’ll need to read on to…

The slightly harder way

Do all the stuff in method 1 using more light levels if you want. E.g. add two more guards (medium and higher) with AI→Utility→Visibility Control set up as below:

higher
Low light3
Mid light5
High light11
medium
Low light9
Mid light15
High light33

And alter the receptrons on Garrett to use these new visibility levels.

The first thing we need to deal with is the light traveling through walls. This is actually surprisingly easy; all we need to do is change the source on the lantern:

  1. Open the lantern’s properties.
  2. Edit the LanternStim source, click the edit shape button and set up the box as follows:
    • Radius: 50
    • Flags: Line of sight (raycast)
    • Dispersion: Linear
  3. Click OK

and voila you can sneak up on guard around a corner and not be lit up until you round the corner. The only problem now is that if you duck back round the corner you’ll still be lit up and will stay that way forever :-( A solution is to add another source to the guard carrying the lantern with a radius a lot larger than the light radius and no ‘Line of sight’ flag set on the shape. To do this:

  1. Open the guard’s properties and add a source set up as follows:
    • Stimulus: LanternStim
    • Propagator: Radius
    • Intensity: -10
    • Click the edit shape button and set up the box as follows:
      • Radius: 50
      • Flags: None
      • Dispersion: None
  2. Click OK
  3. then click edit life cycle and set up the box as follows:
    • Flags: No max firings
    • Period: 500
    • Max firings: 1
    • Intensity slope: 0
  4. Click OK

The reason for adding the source to the guard and not the lantern is that if the guard is knocked out and falls forward and is then picked up and dropped by the player the lantern drops completely below floor level and its sources seem to stop having any effect (even without the ‘Line of Sight’ flag checked). This way the player will always revert to normal visibility.

So there you go working lantern guards, which method you choose depends on whether or not you need the extra realism, as it does cost extra processing power to do the second source and probably to calculate the line of sight for the first source.

Notes: The values used in this tutorial for radii, light intensity and Source strength are only a guide. You can have a much more powerful lantern if you wish, you’ll just need to experiment with the LanternStim‘s range and the Receptron’s intensities until you get an effect that looks right. Just remember that in the second method the stim on the guard must be much larger than radius at which Garrett starts to be lit.

Remember: You must include your custom gamesys in your .zip, so that other Thief players can play your mission.

Daniel “Sneaky Acolyte” Garcia
dgarcia at techie dot com

with additions by Dan “Thiefs_Pawn” Corder
thief at dancorder dot com

Special Thanks to Totality and the TTLG Editors’ Guild.

The Lantern Guard (T2)

Lantern Guard Tutorial by Hidden in shadows, Janne Kahkonen (please note that the Dynamic light ability cannot be used in DromEd 1 only DromEd 2). I know other people have already written a tutorial regarding a guard with a lantern but I feel it my duty to present my own version that I believe is much easier to comprehend and perform. I am not the best tutorial writer in the world but here goes. I assume you already know how to do the basics like creating a starting point, rooms, the necessary scripts etc…

  1. Make an empty room of fair size and place a swordguard to the opposite end from where your starting point is located. “Remember even though you put no lights in the room he can see you with help of the lantern we are yet to give him”
  2. Make a lantern and place it close to the guard so you know where it is. You find it here: Physical –> light –> lantern –> lantern Link the guard to the lantern with the flavor CreatureAttachment. When you have done the linking select the link and push the data button to receive the properties of the link. A window called Link Data should appear on your screen. In the menu that comes up when you click at the arrow that points down you must choose Left Fingers Now you’re almost complete, its just the lantern left.
  3. Now you can already see that the guard carries the lantern in his left hand but there is still something that needs to be done to fulfill the illusion; light. Select the lantern and edit its properties. Click add and find the place that reads renderer. Follow the pop up list till you find a line that reads Dynamic light give it a value of about 60.

Congratulations! Now it’s just to run the level and behold the beauty. Copyright Janne Kahkonen 2002 and onward.

dromed/walking_lantern_guard.txt · Last modified: 2009/03/22 19:40 by r_soul