User Tools

Site Tools


dromed:s_and_r_basics

Sources & Receptron Basics

NOTEME This tutorial was originally written by Sledge for Dromed Central.

:T1: :T2:

This is a tutorial intended to teach some basics of S & R usage. There are several examples at the bottom to get you started once you get past all of the technical stuff.

Special thanks to d0om for answering a couple of my questions on the more elusive receptrons.

Some general things you should know

Rather than teach exclusively by specific example, the aim of this guide is to go over briefly the different functions of the act/react system so that, in theory, you can generalize to get the results that you want. This assumes basic knowledge of Dromed and assumes you have some knowledge of the working within the object hierarchy and saving the Using a Custom Gamesys.

Metaproperties

Metaproperties are properties in Dromed which have two advantages over what you would normally call “properties”. Firstly, metaproperties can be added and removed a little bit easier and more directly than normal properties. Secondly, a metaproperty can actually be a group of properties put together. This is advantageous because it may save time by assigning an object a metaproperty (which contains a group of properties) rather than having to add 6 individual properties to this object.

You can view a list of the existing metaproperties in the object hierarchy. Open up the Object Hierarchy, then from the drop-down menu at the top, switch from Archetypes to Meta Properties. Here is a list of all the metaproperties used by LGS. To add a new one, click Add as you would in adding any other object. Then, assign this new metaproperty its own properties just as you would if you were assigning these properties to a normal object. It will probably be helpful to you to take a look at the existing metaproperties and see what types of things they do. Some metaproperties, such as FrobInert, contain only a single property, while others, such as M-PosedCorpse contains half a dozen. S & R can at times rely heavily on metaproperties so it’s useful to know how to use them. However, don’t limit yourself to using metaproperties alone.

Properties

Receptrons refer to properties in a strange manner. To see how they are referenced, go to the command window and type in list_props. Then look for a file in your Dromed folder called list_props. This has a list of all of the properties and how you can refer to them in a receptron. You can also see the true names of properties in this wiki’s list of properties. The wiki page name for a property is how you refer to it in a receptron.

About the player

The player becomes an object once the game begins. However, S & R can only affect objects existing at the time its effects are created. In other words, it’s difficult to affect Garrett directly with a receptron. There are different methods for getting around this, however.

The first method is to use a conversation. In a conversation, choose an action (such as Add Meta Property) and for the target object type Player.

The second method is to put a receptron directly on “Garrett” in the object hierarchy and save your gamesys. Find the object Garrett in the object hierarchy and have a look at it. There are already receptrons in place here, and you can add whatever new ones you like. Note that Player is a specific representation of the generalized Garrett that manifests once the game actually begins (ie: you go into game mode in Dromed).

Techniques

There are all different kinds of techniques for using S & R, so don’’t limit yourself. Remember that you have such useful objects as emitter traps, markers, AI, and conversations which can enhance your usage of S & R and can help you solve some difficult problems.

==== Definitions ====

A “source” is in a sense a signal. A “receptron” receives a specific signal and creates an effect when it receives that signal.

Open up the Object Hierarchy. Click on the drop-down menu and select Act/React Stimuli. Here is a list of all of the sources which LGS used for the Thief games. Notice that some of these sources are categories.

Naturally, anything under a given category is a subclass of that category. For example, a Weaponstim is a general stimulus (and can be used by itself) while a Bashstim is a specific type of Weaponstim.

Here are some definitions, in case they are not self-explanatory:

Weaponstim
Any weapon has this, including swords, arrows, hammers etc. This will damage AI, the player, and objects.
Pokestim
Broadhead arrows have this.
BugPoke
Insects have this.
Slashstim
Specific to a sword.
Bashstim
Blunt weapons such as a blackjack or a Mechanist mace have this.
Pingstim
This is new to Thief 2. Mines use it to detect the proximity of Garrett or other AI.
Water
Water arrows have these, as does any water in Thief.
Fire
Fires, and fire arrows. Causes damage to the player, AI, or wooden objects, and lights torches.
Touch
I believe this has to do with contact with terrain brushes.
Holy
Holy water arrows have this. Damages undead.
Knockout
A blackjack has this.
Restore
Healing potions have this, as does healing fruit.
KOGas
Gas arrows.
MagicZapStim
Wizard and trap zaps.
LightBright
From flashbombs.
Toxic
Poisonous gas.
Stench
From a burrick’s maw.
Earthstim
From an earth arrow.

When doing your own effects, it is best to create an entirely new source or “stim.” Click on Stimulus in the Act/React Stimuli category and click Add. Type in the name of whatever stimulus you like. Then, save the gamesys and the mission you’re working on. You have to reopen your mission for this particular change to take effect. Make sure you have set the gamesys in your mission (set_gamesys x.gam) before you save and reopen the mission. If you have a new stim to use, whatever new effects you create will in no way affect anything else in the game.

==== Sources ====

Click on an object in your mission and go to its properties. Go to Act/React→Sources. You will now be presented with a window which is blank. This is just a window which will display all of the sources for this object.

To add a new one, click Add. Now you have a new window.

In the Object blank, you always type in the number of the object it is that you’re working on. You could type the number of another object, but then you will be adding the stim to a different object than you selected, and that’s just confusing!

Stimulus is the stim you will be using. For most things, you will want to choose your own custom stimulus. From the drop-down menu, select the name of a stimulus. If you added one previously (see above) and saved your gamesys and reopened your mission, your new stim should appear at the bottom of this menu.

The Propogator is how the stimulus is distributed. For Contact, this means that the object will stim another object every time those objects collide in game. Contact stims are useful for things like arrows. An arrow wouldn’t hurt you if you stood next to it, you would have to collide with it. A Radius propagator means that the object sends out the stim across a radius (in a sphere around the object) at an interval of time that you specify (see below). A Flow propagator means that the stim is specific to flow brushes. In this case, for example, lava has a Firestim source with a Flow propagation. In order to create lava, you need a flow brush over top of a water brush (see tutorials on water). Whenever you step inside this flow brush, you will be “firestimmed”, so to speak. A Firestim hurts Garrett, so whenever you step in lava you take damage. A Script propagator means that the stimulus occurs through a custom script. As an example, a healing potion has a RestoreStim which only goes off when Garrett drinks it. That is a scripted event (although you can change the specifics of it if you wanted).

Intensity is the numerical severity of the stimulus. You change this to suit your needs. Many of the existing stims use logical numbers. A Restorestim of 1 heals Garrett 1 point. A Slashstim of 2 would hurt Garrett 2 points, etc.

Edit Shape

This box is on the right side of your source window. Click on it once you have specified everything else. This box, as well as the Edit Life Cycle box change depending on what you have specified for the propagator. I will list each below based upon what you have chosen.

Contact

There is a box where you can select contact types. Most of the time, Collision is sufficient. Occasionally, you may find the other options useful. Many of the other options are specifically useful in relation to the player. Frob in Inventory and Frob in World of course mean that Garrett uses something by clicking the “use” button either when the object is in the world, or in his inventory. If, for example, you had a potion set inside of a burning fire, you could give the potion a Firestim that was activated through Contact when it is frobbed in world. Then, Garrett would be burned when he tried to grab it, and would take damage equal to that of the Intensity in the previous window. The velocity coefficient is almost always 0, but I think it is the minimum velocity of the object needed for the stim to take effect (although I could be wrong). Likewise, I believe the frob-time coefficient is the time that occurs between the time when you frob an object (if this is specified above as Frob in Inventory or Frob in World) and when you receive this stim.

Radius

The first box indicates, in feet, how far the stim travels.

For Flags, you can either check Line of Sight, which means that terrain blocks the stim, or None, which means that the stim travels through terrain (solid brushes).

For Dispersion, None means that the source stims everything within its radius equally, according to the Intensity which you have specified. Linear Dispersion means that the source is of the Intensity that you specify at the center of the object, but gets increasingly weaker as it travels outwards, ending at 0 at the Radius which you specified above. Intermediate values can be calculated as output = (1.0 - distance/radius) * stim_intensity. Inverse Quadratic is similar, but gets weaker more quickly, so an object that is twice as far from the source of the stim will be stimmed four times weaker than a closer object. Intermediate values are as follows:

if (distance^2 < (radius^2 / 256))

 output = stim_intensity

else

 output = ((radius^2 / 256) / distance^2) * stim_intensity

Quadratic provides a quatric (also known as a biquadratic) function for decreasing the stim over distance: output = (1.0 - (distance^4 / radius^4)) * stim_intensity

Flow

There is no shape to a Flow. You are either within the flow, or you are not. For example, your foot is in the lava or it is not. There is no half-way into the lava.

Script

There is no shape to a Script. The script either activates, or it does not. For example, you can’t drink half of a healing potion in Thief.

Edit Life Cycle

This, in a sense, is the time factor of the stim. This is the other box at the right side of the window. Like Edit Shape, it varies with the propagator, so I will again break it down.

Contact

There is no cycle to Contact. If you have contact with something once, you receive the stim exactly once.

Radius

The Flags box indicates some characteristics about how often the stim fires. No Max Firings means that the stimulus goes off over and over with no end. Destroy Object on Completion does just that after the object has reached it’s max firings (provided you did not check No Max Firings). Period means how often the stimulus fires, in milliseconds. A ‘period of 5000 means the stim fires once every 5 seconds. A period of 50 means the stim fires 20 times every second. Max Firings is the number of times the stim fires before it stops firing. If you checked No Max Firings above, then type in 0. If not, then type in the number of times you want the stim to fire. Note that the stim will begin firing immediately when you start the game or when this object is created from the object hierarchy in game. Intensity Slope allows you to increase the Intensity of the stim each time it fires. If I want a Marker to fire a stim of 10, then after waiting a few seconds fire off a stim of 15, you would make the Intensity of this source 10, then give it an Intensity Slope of 5. This will fire wit the following intensities: 10, 15, 20, 25, 30, … You can make the Intensity Slope number positive or negative.

Flow

The information in this Edit Cycle box should be identical to that of Radius. However, under all but the weirdest of circumstances, you would probably want to leave most of these at the defaults.

Script

Again, these options are basically identical to that of a Radius.

==== Receptrons ====

Receptrons are the effects which are receptive to the stims. I’ll go through these effect by effect. To start out with, click on an object and add Act/React→Receptrons in it’s properties. Now, there is window which will list all of the receptrons for that object once you add them. Click Add.

The Object is the number of the object you are working on. The Stimulus is the stim which you want the current receptron to respond to. Min Intensity and Max Intensity is the interval of sensitivity for the receptron.

It is possible to have a ton of different effects using only one type of stim if you make the sensitivity interval very small for each time the stim is used (try taking a look at all of the different effects in Rogue’s Honor that were created with a totalitystim). Now for the complicated part, the effects.

Abort

This means that a stim will no longer have any effect on the current object. Say for instance you are making lots of guards in a mansion. You want one guard who is tough and cannot be knocked out. You would put a receptron on him for KOGas or a Knockout stim and set the effect to Abort.

Add Meta Property

This adds a metaproperty to an object. The metaproperty must be in the object hierarchy (see above). When you select this, you’ll be presented with two more options. Target Object should be the name of the object you want to receive the metaproperty (in theory), Agent Object is the name of the metaproperty itself. However, this particular receptron is a little buggy in pre-NewDark versions of the editor. Although the Target Object should be the name of the object to receive the metaproperty, for some reason it is always Me. The object with the receptron is always the one to receive it, no matter what you put in the Target Object box. However, there are ways around this problem.

With NewDark versions of DromEd (1.23 and later) you can set a GameSys parameter (Editors > GameSys Parameters > Misc Dark Settings: Custom Metaprop Action Targets = CHECKED) to enable the Target Object to be the name of the object to receive the metaproperty. Once that parameter is set, the Target Object will work as expected.

With DromEd 1.22 and earlier, see the final example at the bottom of this tutorial for a workaround approach.

Amplify

This will increase the effect of the stim. The Edit Effect allows you to specify how much you want to increase or decrease the stim. Say for example, you had a guard with a really tough head, but you wanted him to bleed when cut as normal. You could give him a receptron for a Bashstim which had the effect Amplify set to multiply by 0.5, meaning he would take only half damage from blunt objects.

Awareness Filter

This filters out the awareness of an AI. Set the target object to that of an AI and then edit the effect to your liking. This cancels the awareness of the AI if one of the circumstances under Edit Effect is true.

Change Object Model

This changes the model of the target object to that which you specify under Edit Effect. To find the right model, find the object in the object hierarchy which has the look you want, then look at the Shape→Model Name.

Clone Properties

If you have an object and you want it to inherit all of the properties of another object, put the one that’s to be changed in Target Object and the the one that has the properties you want in Agent Object.

Create Object

This will create an object of your choosing. The Target Object is the object which is to be created (select an archetypal object from the object hierarchy). The Agent Object is the location in which this object will be created. The Agent Object must be an object in the world which you have already created. The Edit Effect allows you to specify how far away from the Agent Object the Target Object will be created.

Damage Object

Delivers damage to the Target Object. The Edit Effect allows you to specify how much damage. If you choose Multiply by a number, it multiplies the intensity of the stim that the object with the receptron is receiving. Therefore, if you have a specific number in mind, perhaps it is best to multiply by 0 and then simply add the desired number. If you’d like the damage to be stimulus-specific (for example you wanted to damage an AI by fire as opposed to a slash), check the Use Stimulus as Type box. The Damage Type is actually a code for specifying the stimulus. A Weaponstim is 1 and every subsequent stim is one number higher (for example, Pokestim is 2, Bugpoke is 3, etc.).

TODO Really? You sure it’s not the object ID of the stimulus? This needs to be verified.

Destroy Object

Destroys the target object utterly.

EnvSound

Plays a schema ambiently on the object; the schema is picked according to the Tags entered. If the object has Class Tags and/or Material Tags properties, they will be used in selecting the schema by WeaponType and Material respectively.

If the reaction was triggered by a collision (e.g. a Contact stim), and the colliding object has Class Tags and/or Material Tags properties, they will also be used in selecting the schema by WeaponType2 and Material2 respectively.

Freeze AI

Freezes an AI for the duration you specify. This is a weird one.

Frob Object

Frobs the target object.

Impact Result

I believe this is used to indicate the result of collision when an object with a contact propogation stim collides with the object with the receptron.

Knockout

Knocks out a Target Object AI.

None

Don’t select this or Dromed will crash. This is a bug and shouldn’t be here.

Permeate into Container

Use on a container to affect all of the objects contained by the container.

Poke Object

This one is pretty useless. Same as Damage Object basically.

Remove Meta Property

Removes a metaproperty. Target Object is the object which has the metaproperty, Agent Object is the name of the metaproperty itself.

Remove Property

Removes a property from a Target Object. Be sure you call the property by the right name. See above (under Properties at the top of this document) for how to get a list of properties referenced by receptrons.

Send to Scripts

This activates scripts when the object receives a certain stim. Torches, for example, are sent to scripts when they receive fire or water stims. Torches are activated and deactivated in part by the script Extinguishable.

Set Property

A very useful one for complicated effects. This effect seems to work better than Add Meta Property or Remove Meta Property under certain circumstances. What this does is to change the property of the Target Object to be the same as the property of the Agent Object. Therefore, at least one object in your level must have the property you want to change. Under Edit Effect, type in the name of the property you want to be changed (again, see above for how to get a list of properties that receptrons recognize). So the property of the Agent Object is copied to that of the Target Object.

Set Quest Variable

You can use this if you do not want to use a Quest Variable Trap. Type in a line at the top to be the name of a quest variable, such as goal_state_0 or goal_visible_5 etc. (The number indicates the number of the goal, see the “convict” document for details on objectives). Then, specify what you are doing to this goal (adding, dividing, etc.) and type in a number to indicate by how much you are adding, dividing by, etc.

Slay Object

“Kills” the target object without destroying it. Using this against an AI would make him crumple and fall down, while if you used Destroy Object he would disappear from existence.

Stimulate Object

If you want to relay a stimulus to a Target Object, you would use this effect. Type the name of the stimulus in under Edit Effect and specify how much you would like to stimulate this object by. Multiplying simply multiplies the intensity of the stim which this current receptron is receiving and relays it (although the type of stim can be completely different).

Teleport Object

Teleports the Target Object to the center of the Agent Object. You can edit how far away from the Agent Object the Target Object goes under Edit Effect. Pitch, Heading, and Bank are factors of rotation, not distance.

Tweq Control

Adds or adjusts a tweq property to the Target Object. Tweq effects are quite complicated, so you probably want to fool with them first before trying out this receptron effect. Listing all of the tweq effects is unfortunately beyond the scope of this tutorial, but the official docs cover them pretty well. I believe they are listed in the document called Object School.

Weak Point

Allows one to target a specific point on an object and amplify a stim. The robot boilers are a weak point for Waterstims, for example, although hitting a robot on the head with a water arrow would do nothing. Anything within the radius specified is multiplied by the multiplier. Have a look at the robots to see how this works. Essentially, the guys at LGS created a sphere around the back of the robot boilers. If a water arrow hits this sphere, then the waterstim is increased greatly and the robot reacts by malfunctioning.

Weapon Block

Doesn’t seem to work.

Weapon Hit

Doesn’t seem to work.

Fun with S & R

Let’s do a few trial effects just to get you more comfortable with the system. We’ll start simple.

All of the following assume you have a few roomed air brushes with gen and convict loaded, and that there is a marker with a PlayerFactory. This also assumes you have given the player a sword and some arrows.

The Holy Sword

Yes, this is a cheesy one (and even I’ve used this being the cheeseball that I am), but a fun one. We only need to fool with the source on this one. Undead already have a vulnerability to a HolyStim.

Create a sword and give it to Garrett. Click on the sword’s properties and give it a source.

Select Stimulus:Holystim. Propogator: Contact. Intensity (and you can change the power of this) to 2. Edit the Shape. Leave Collision and also select Weapon Swing Low.

That will give the sword a default holy power of 2, which is fairly weak. Let’s make it a little more complicated.

Go back in and give the sword a second stim. Make it a Holystim with Propogator: Contact. Now set the intensity to 4. Go into Edit Shape. Now choose Weapon Swing Mid.

You see where this is going?

Give the sword a third stim, only this time set the Intensity to 6 and select Weapon Swing High. Now you have a sword that damages undead a small amount when you give them a back swing, a moderate amount when you give them a forward swing, and a lot when you give them an overhead chop. Now make some zombies and watch them splatter.

Fun with doors

The previous exercise used a source. Let’s try some receptrons.

Create a metal door somewhere in your room. Stick it in front of a passage if you like. Lock it.

Wooden doors you can break down if you hack them enough with your sword, but metal doors are strong and stalwart. Let’s change that. Open up the door’s properties and go to Act/React→Receptrons. Click “Add.”

Fill out the fields so that the Object is the door’s number, the Stimulus is SlashStim (remember this is what a sword has), and no Min or Max Intensity. Now go over to Effect. Pull down Slay Object.

Check Target Object as me and Agent Object as source.

Now go in game. Chop the door once with your sword. Presto! It opens for you.

Let’s try something else. Go back and add another receptron to the metal door. This time, make the Stimulus: Pokestim (this is what broadheads have). Have no Min or Max intensity. For the Effect, put in Destroy Object. Target Object is me.

Now go in game and shoot the door with your bow. A magic, disappearing door!

The auto-door

Delete the last door you made (in the previous exercise) and create 2 new metal doors, side by side. I’ll refer to them as Door #1 and Door #2. Doesn’t matter which is which. Go to Door #1 and open up it’s properties. Add a receptron. For the Stimulus, put in Pokestim, and have no Min or Max Intensity. For the Effect, put in Frob Object. For the Target Object, put in the number of Door #2.

Now go in game. Shooting an arrow at Door #1 should open Door #2, and shooting it again should close it.

Let’s make this practical. Create a button and place it somewhere close to the doors. Now create an EmitterTrap. Place the EmitterTrap so that it is facing Door #1 and is right in front of it. If you’re not sure which direction is which, you’ll know very shortly. Now add a ControlDevice link from your button to the EmitterTrap. Go in game, and frob the button. An arrow should fire from the EmitterTrap into Door #1 and then Door #2 should open. If the arrow fires in the wrong direction, simply go back into Dromed and rotate the EmitterTrap 180 degrees.

You may have noticed one problem, however. The EmitterTrap only works once. We can solve that by going to the EmitterTrap‘s properties and going to S→Scripts. In the second box (where it says Script1) type in ReloadTweqEmit.

You should have a single button which opens and closes a door for you!

AI Foolishness

Let’s try some stuff with AI guys. Delete both of your doors (from the previous exercise) and create a new metal door right in front of your EmitterTrap. Now create a guard somewhere in your room. Make the guard blind and deaf by going to his properties and going to AI→Attributes→Vision and AI→ Attributes→Hearing and setting them both to Null. Now create a TrolPoint in the AI and another one some distance away. Link the TrolPoints together with a ~AIPatrol and an AIPatrol link (as per the Dromed Basic Tutorial). However, don’t add any more properties to the guard.

We’re going to be using some properties in a receptron, so as suggested at the beginning of this document, go the Dromed command window and type in list_props. Now search in your Thief2-folder for a file called list_props. Open it up in Notepad++ and save it as a txt file. Now, we want the guard to be able to patrol. We know the name of the normal property (Does Patrol). Go to “Find” in Notepad++ and type in “Does Patrol.” It should take you down to an entry that looks like this: AI: Ability Settings\Patrol: Does patrol = AI_Patrol. The part we’re interested in is the part to the right of the equals sign, AI_Patrol. Remember this.

Now in Dromed, the button from the previous exercise should still go to the EmitterTrap. Make sure that is still the case. When you press it, an arrow should fire into your new door. Go to the door’s properties and add a receptron. Make it for Pokestim again with no Min or Max Intensity. For the Effect, choose Set Property. For the Target Object, type in the number of your guard. For the Agent Object, choose me. Now go to Edit Effect. Type in exactly “AI_Patrol” (no quotes).

Are you wondering why you chose me for the Agent Object? What you are doing essentially is copying one property from “me” (the door) to the guard. However, the door does not yet have the property (AI_Patrol) that you specified. We’ll fix that.

Open up the door’s properties and click Add→AI→Ability Settings→Patrol: Does Patrol and then check the box so it registers as TRUE. It doesn’t matter that the door is not an AI… for the purposes of Set Property, the property is there.

Now go in game and frob the button. An arrow should fire into the door, and then the guard should start patrolling.

AI Foolishness Part 2

Now let’s make that guard mean. Go to the door’s properties and delete the AI Patrol. Then add this: AI→Attributes→Vision and AI→Attributes→ Hearing and set both to Above Average. Now go to the door’s receptrons and delete the receptron you had in there before. Add a new one. Set it up as normal for Pokestim with no Min or Max Intensity. Set the Effect for Set Property with Target Object as your guard and Agent Object as me. again. However, this time there will be a different Edit Effect. Go to Edit Effect and type in “AI_Hearing” (you’ll find this in the list_props document). Now add a second receptron set up exactly the same as the first, with the one exception being the Edit Effect. On this second receptron, change the Edit Effect to “AI_Vision”. Now go in game and frob the button. Your blind and deaf guard will suddenly become very mean.

Auto-frob signs

Let’s combine everything you’ve learned so far to make easy auto-frob signs. Up until now, you’ve been working with concrete, pre-existing stims of the Contact variety. No longer.

Delete everything from the previous exercises in your mini-level. Create 3 signs and place them fairly far away from one another inside. It doesn’t matter what the signs are, but you’ll find them in the Object Hierarchy under Decorative→Sign. For each sign, give them the following properties:

First off, add S→Scripts and type “StdBook” (no quotes) in the first line. Then, add Engine Features→Frob Info and set WorldAction to Script AND FocusScript. Now add Book→Text. Type in the name of a text that you have in your books folder (see the tutorial on books if you don’t know how to create one). In short, create a folder called “books” in your Thief 2-folder and a folder inside this one called “English”. In the “English” folder place your book str-files. You’ll need 3 of them, one for each sign. I’ll call mine sign1, sign2, and sign3. So anyway, what you add for each sign under Book → Text is the name of the book str-file you want associated with it.

Now from here, you should be able to go in game. Try frobbing one of your signs. You should see text appear at the top of your screen just as if you were reading a plaque. Make sure this first step works before moving on.

Again, see tutorials on books if you haven’t covered them yet.

Now, go into the Object Hierarchy and drag the top menu down from Archetypes to Act/React Stimuli. Hilight Stimulus and then click “Add.” Type in the name of a new stimulus. I’ll call mine “signstim”.

Now close out of the Object Hierarchy. In the command window, type:

set_gamesys sign.gam

Now, save your gamesys as sign.gam into your Thief2-folder. Now save your mission also (pick a name).

RE-OPEN your mission. You should see sign.gam indicated in the lower left corner of the editor, and everything should still be in place. You should still have three signs that are set to read like a book when frobbed.

Now create a Marker. Click on the marker’s properties and go to Act/React → Sources. Add a source. For the Stimulus, select your custom stim, the one I called “signstim”. It should appear at the bottom of the list. If it does not, then you probably did something wrong in the previous steps.

For Propogator, select Radius. For Intensity, choose a number that you like. I’ll pick 10.

Now go to Edit Shape. You want the radius to be small, but not too small. Let’s set it to 2. For Flags, check None; you don’t want this stim limited by terrain. For Dispersion, click None; you want the same intensity present over the entire 2 foot radius.

Now go to Edit Life Cycle. Check No Max Firings under Flags. Make sure both Max Firings and Intensity Slope are set to 0. Now for Period, you want something fairly small. Let’s say 500. That means the stim will fire twice every second. If you have a lot of radial stims going off in your level at small intervals, you can really affect frame rate in a bad way. However, it should be perfectly all right to have a few moderate stims going off at any one time. This one will be going off constantly, but shouldn’t hurt things at all by itself.

Now exit out of the Marker’s properties and go click on one of your sign’s properties. Add a receptron. For the Stimulus, select your custom stim (signstim). Set the Min and Max Intensity appropriately. Because I chose an Intensity of 10 for my stim (above), I would probably set Min to 9 and Max to 11.

Now for the effect. Choose Frob Object with the Target Object being me.

Add a second receptron to this sign. Set it up identically to the first, only this time for an effect choose Teleport Object. For the Target Object, type in the number of the Marker on which you put the stim. For the Agent Object, choose me. Now go to Edit Effect. Heading and Pitch and Bank are not important, but Position is. What you want to do is teleport the marker somewhere very far away. I’ll set mine to have a Z value of 200. That means the marker will be teleported 200 feet straight up from the center of the sign. The reason for this is so that the sign does not continue frobbing itself. If that were the case, the sign would be frobbed every 500 milliseconds and the text would never go away!

Okay, one final step. Create a TeleportTrap and place it right next to your sign, or right in your sign (it must be less than two feet from the center of the sign). Now, create a ControlDevice link from the TeleportTrap to the marker with the stim. Now, create a ControlDevice link from the sign to the TeleportTrap.

For each of the signs, repeat this process.

Now your auto-frob signs should work. This is what happens: when you look at the sign, the FocusScript triggers the TeleportTrap. The TeleportTrap teleports in the marker with the stim. The stim will go off. The receptron on the sign will receive the stim. This receptron will simultaneously frob the sign itself and will teleport the marker far up into space. The next time you look at the sign, the same thing will happen. This is a clean and repeatable system that can be used for any number of signs you like. This technique uses one extra object per sign (the TeleportTrap) but is not difficult to set up once you get the hang of it. Remember that you do not need a new marker for each sign. You use the same marker and specify this marker on the receptron of each sign that you add.

Getting around the metaproperty bug with DromEd 1.22 and earlier

Okay, say you want to add a metaproperty to another object, but are not using NewD ark 1.23 or later and so can’t set the “Custom MetaProp action targets” in the GameSys Parameters. In this case, you’ll need a custom stim of some sort (follow the steps outlined above). I’ll call mine “metastim”.

Say for a moment you have a guard standing in a room, and when you get to a certain point, you want him to start looking around and searching for you. This is done with a metaproperty called Searcher.

Create a guard in a room. Place a BoundsTrigger in an area where the player will go (remember if you only want it to be triggered by the player, add Physics→Misc→AI Collides With = False). Now create a metal door and an EmitterTrap somewhere that the player cannot see or hear. Link the BoundsTrigger to the EmitterTrap via a ControlDevice link (as above). When the player crosses the BoundsTrigger, an arrow should fire from the EmitterTrap into the door.

Now open up the door’s properties and add a receptron to it. As above, add one for a Pokestim with no Min and Max Intensity. Now, ordinarily, you would select Add Meta Property, but we cannot do that because of the bug. Instead, click on Stimulate Object. For the Target Object, select the number of the guard. For Edit Effect, type in “metastim” (or whatever you called your custom stim). Select Multiply by 0, then for Add, choose an arbitrary number. I’ll choose 10. Remember this number.

Now go to your guard. Click on Properties and add a receptron. Make this receptron for “metastim” (or your custom stim) with a Min and Max Intensity just outside of what you selected before on the door. Because I chose 10 for the Stimulate Object previously, I would probably choose 9 and 11 for the current receptron. Now, for the Effect, choose Add Meta Property. Target Object is Me (although it really doesn’t matter what object you type in), Agent Object is “Searcher” (no quotes).

In game, when you cross the BoundsTrigger, an arrow should fire into the door. The door should stimulate the guard, and then the guard should start searching. You could use any metaproperty you like for the guard. If you wanted him to start patrolling, for instance, you would use M-DoesPatrol instead of “Searcher”. But this should give you a way around the metaproperty bug. (Note: with modern scripts like NVScripts, there are simpler ways you can add/remove metaproperties on arbitrary objects without having to fire arrows at doors!)

Thus endeth the Tutorial.

Remember, be creative and always double check your work. If you can generalize these concepts, almost anything is possible!

dromed/s_and_r_basics.txt · Last modified: 2020/06/21 19:56 by vfig