PDA

View Full Version : Inverse Quadratic Radius Stim



goldsla
26th Jan 2009, 04:04
This is just to check that I undersand how a radius stim is supposed to work.

Imagine a radius stim with the radius set to 100, say, flags set to [None], and Dispersion set to Inverse Quadratic. If the Life Cycle Data is No Max Firings, Period=5000, Intensity Slope is 0.0, and the Intensity is set to 10,000, then the following should be the the stims recieved every 5 seconds based on DromEd units from the source:


Units Stim Intensity
1 10000 = 10000 / 1^2
2 2500 = 10000/ 2^2
4 625 = 10000/4^2
5 400 = 10000/5^2
10 100 = 10000/10^2
20 25 = 10000/20^2
25 16 = 10000/25^
50 4 = 10000/50^2
100 1 = 10000 / 100^2

Does that look right?

goldsla
26th Jan 2009, 12:29
I'm trying to set up a "Geiger Counter" object, one that changes color in your inventory as you approach the stim source. To do this, I established a new stim, called DistanceStim. I made an object the source for a radius stim with the radius set to 100, flags set to [None], and Dispersion set to Inverse Quadratic. The Life Cycle Data is No Max Firings, Period=5000, Intensity Slope is 0.0, and the Intensity is set to 10,000.

The receptrons I set were:


Min Max Effect Target Edit Effect
Object DistanceStim [None] 1 Change Object Model Me Object00
Object DistanceStim 1 4 Change Object Model Me Object10
Object DistanceStim 4 16 Change Object Model Me Object20
Object DistanceStim 16 25 Change Object Model Me Object30
Object DistanceStim 25 100 Change Object Model Me Object40
Object DistanceStim 100 400 Change Object Model Me Object50
Object DistanceStim 400 625 Change Object Model Me Object60
Object DistanceStim 625 2500 Change Object Model Me Object70
Object DistanceStim 2500 10000 Change Object Model Me Object80
Object DistanceStim 10000 [None] Change Object Model Me Object90
Unfortunately, in the game, it seems to have no effect. I also tried with SetProperty, where the property was ModelName, and I had 10 equivalent PropertySets established in fnord. No workee.

Oh, each object (Object00 through Object90) has the same shape, but colored to progress in stages from deep blue (Object00) through bright white (Object90) ).

Any guesses?

Vlad Midnight
26th Jan 2009, 16:35
LarryGoldsta by chance???
Anyway I dont think object me will work if you have it in inventory. Me would refer to garrett but I may be wrong.
You might try dropping it at different distances to see if its working that way.


Or..
give garrett the stim and change object model target [positive # of object]?

goldsla
26th Jan 2009, 16:51
Hey Vlad! It is no secret that LarryG on TTLG and goldsla on Eidos are the same. I wanted to change goldsla to LarryG on Eidos, but the moderators never responded to my request to do so And having two ids on the forum is verboten. Oh well.

The idea is to have the object change color in Garrett's inventory based on the stims it receives. But it never receives them. I can't tell if the source is not functioning or the receiver is not functioning, but either in world or in inventory the model does not change with distance from the source. Any suggestion is welcome.

Vlad Midnight
26th Jan 2009, 17:11
I played around with this for a bit and getting strange results.
If I place the object (in my case wood bowl)
next to the
marker (450)

Stimulus LarryG
Propogator Radius
Intensity 1

Edit shape
shape data
radius 10
flags none
dispersion inverse quadratic
It chages shape right away.
If I place it away, pick it up and walk towards the marker nothing happens as expected. I dont think objects "exist" when you hold them.
Upon dropping nothing happened either until I modified life cycle on the stim marker
flags no max firings
sometimes would take 5 seconds to change shape due to
period 5000
1000 didnt seem to bad.

Having a hard time making two objects maybe there needs to be two markers two stims two radius

Yandros
26th Jan 2009, 19:54
Without some trickery, this won't work, Larry. The reason is that when an object is contained by the player, it doesn't actually move with the player, it stays where it was but becomes unrendered. The only thing I can think to try is to have the the object teleport itself to the player every second or so if it's contained. You could probably do it with NVRelayTrap and a receptron - the Relay would trigger on "Contained" and would stim itself, and the receptron would teleport Me to Player. It might work, but I'm not holding my breath. And by that I mean both that that setup might not work to keep the object at the player's location, and also that even if that works, the object changing may not work when the item is in the player's inventory. I seem to recall a thread recently about model changes while in inventory (even triggered directly, ie not taking your radius stim issue into consideration) don't appear until the object has been cycled out and back as the active inventory object.

R_Soul
26th Jan 2009, 20:54
If the Garrett has the receptron, with the effect as Permeate into Container, everything the player contains will be stimmed directly.

Reselecting the object can also be done. Objects recieve InvSelect and InvDeSelect messages, so you could use them to activate/deactivate an NVRelayTrap.

The Geiger counter object can also be an NVRelayTrap, activated by DistanceStimStimulus. Link it to a RevertTrap (so it's only active when a new stim is received). The first NVRelayTrap and the RevertTrap can be linked to a RequireAllTrap, which can be linked to a CommandControl (tnhScript), which can run the commands clear_item and inv_select ObjectName

goldsla
26th Jan 2009, 21:36
I need to think through what you are suggesting.

If the Garrett has the receptron, with the effect as Permeate into Container, everything the player contains will be stimmed directly.By "Garrett" do you mean the starting point marker, or a change to the Garrett archetype?


Reselecting the object can also be done. Objects recieve InvSelect and InvDeSelect messages, so you could use them to activate/deactivate an NVRelayTrap.You are suggesting a reaction to the InvSelect which would update the model used based on the stim intensity at the time of the inventory focus? Can you explain this better?


The Geiger counter object can also be an NVRelayTrap, activated by DistanceStimStimulus. Link it to a RevertTrap (so it's only active when a new stim is received). The first NVRelayTrap and the RevertTrap can be linked to a RequireAllTrap, which can be linked to a CommandControl (tnhScript), which can run the commands clear_item and inv_select ObjectName.I don't understand this. The Geiger object currently has the receptrons for the stimulus with the reaction to change the model. You are suggesting instead that the object get the NVRelayTrap script? The script would relay the stim to a RevertTrap ... and that's where I get lost. Can you expand on "what" you think needs to happen and then explain the "how" it needs to be implemented to achieve the "what." I'm lost figuring out "what" you are proposing, most likely because of my inexperience with scripts and traps in particular.

goldsla
26th Jan 2009, 21:51
What about:

1) When the object is put in Garrett's inventory, adding the receptrons to Garrett (how would that be done in a way that moves with his location? The starting point doesn't move ... ???)
2) When the object in the inventory is given focus, the object is destroyed and recreated in his inventory using the appropriate model based on the last recieved stim intensity (is there a script that could be used whenever the stim is recieved by Garrett to set a value indicating which model is to be used later on when displaying the object in the inventory?

or B

Require that Garrett drop the object to get it to update. Could I have the object display as though covered in a black satin bag, and explain that the object needs to be taken out of the bag to effect the colort change ... ??

R_Soul
26th Jan 2009, 22:30
By "Garrett" do you mean the starting point marker, or a change to the Garrett archetype?The archetype.


The permeate into container effect allows the counter to receive the stim, so you still need the receptrons that change the object model. The other things I suggested were purely to handle the problem of the player's view of the model only updating if it's re-selected.

Say the radioactive object emits a DistanceStim every 5 seconds. If the player doesn't have the counter selected, there's no problem. When they next look at it, they'll see the correct model.

If it is currently selected, and it receives the stim, you want something to force it's re-selection.

Whenever you have an "If" and an "and", you know you're going to need a RequireAllTrap. Change it's object name to UpdateModel.

So, you can put the NVRelayTrap script on the counter.
Design Note: NVRelayTrapOn="InvSelect";NVRelayTrapOff="InvDeSelect"
Give the counter a CD link to the RAT.
So that sends TurnOn to the RAT when the counter is selected, and TurnOff when deselected.


Give the counter another script: NVRelayTrap2
Add this to the above design note:
NVRelayTrap2On="DistanceStimStimulus";NVRelayTrap2Off="null";NVRelayTrap2TDest="JustBeenStimmed"

Now create a RevertTrap, and call it JustBeenStimmed. Add the property Script > Timing, and enter a very low number, say, 100.
Then give it a CD link to the RAT.

So now the RAT will be turned on if the counter is selected when it receives the stim.

You then need to create another object with the CommandControl script.
Design note: clear_item; inv_select CounterObjectName

Give the RAT a CD link to the CommandControl object. So when the RAT is active, it will force the counter to be deselected and selected again.

goldsla
26th Jan 2009, 22:45
I think I may be understanding this better ... let me work it though in DromEd & I'll get back to you.

If it is currently selected, and it receives the stim, you want something to force it's re-selection.I think that should also include another and: AND the displayed model is incorrect. No? So I need some way to store the stim recieved last time and compare to this time to see if it crossed a threshold ... or do I? Maybe reloading the model is so fast that I can do it everytime regardless of actual need to change to a different model?

R_Soul
26th Jan 2009, 22:51
If the delay between deselect and select is too short for someone to see then it won't matter about the model being right or wrong.

goldsla
26th Jan 2009, 23:11
So far Ihave it such that the Geiger object changes ONCE and once only, both in inventory and in the world if moved and dropped. (The inventory change happens via the Permeate into Container with the Garrett archetype for the stim.) But why just one change?? I'm not changing to a different object which does not have the receptrons, I'm changing the BIN and keeping the same object ... but for some reason I only get one change ... if I can't fix that, everything else is moot.

My setup:

The SOURCE object Archetype:

Stimulus: DistanceStim
Propigator: Radius stim
Intensity: 10000
Shape Data: Radius = 100; Flags = [None]; Dispersion = Inverse Quadratic
Life Cycle Data: No Max Firings; Period=1000; Max Firing=1.0; Intensity Slope = 0.0


Garrett Archetype Receptron:

Stimulus: DistanceStim
No Min
No Max
Effect: Permiate into Container
Target Object: Me
Effect Data: Coefficient = 1.0; Minimum Magnitude = 0.0


Geiger Object Archetype -- 10 receptrons, each for a different threshold pair (i.e. [no min, 0.25], [0.25, 1], [1, 4] ... [625, 2500], [2500, no max]) such that:

Stimulus: DistanceStim
Min / Max per desired threshold for replacement object model BIN
Effect: Change Object Model
Target: Me
Effect Data: Model Name = name of the BIN to use


So why do I get just one change??

Vlad Midnight
26th Jan 2009, 23:17
Was thinking, do custom arms have the ability to have receptrons on them. Have an arm model holding the geiger counter, but then there would be a need for 10 arms:eek: ...or not.

I think dropping the item for the update isnt a bad idea just as long as it has a quiet landing. Maybe make it float in air, might seem odd but that wouldnt alert the guards.

Queue2
26th Jan 2009, 23:27
I just wonder what Larry is doing with a Geiger Counter. What are you making over there, Thief: Days of the Apocalypse?

...but God knows, if you get it to work, I'd love to see it. :thumb:

a Geiger Counter--that's so freakin' cool!

Vlad Midnight
26th Jan 2009, 23:31
I too couldnt get two changes, maybe the object needs to be slain and corpse drop the new object that in itself has 10 stims on it.
But if you lets say, go from your 100 and skip 90 and straight to 80 would that mean the 100 slays to 90 and then immediately slays to 80?
Then the problem would be once you get close it can never read "cold"

Still wondering about arm model question.

goldsla
26th Jan 2009, 23:35
I just wonder what Larry is doing with a Geiger Counter. What are you making over there, Thief: Days of the Apocalypse?

...but God knows, if you get it to work, I'd love to see it. :thumb:

a Geiger Counter--that's so freakin' cool!IF I get it to work (with a LOT of help from my friends), AND IF I finish my mission, THEN you'll get to see it! (i.e. RAT required --- Am I learning RSoul?)

Queue2
26th Jan 2009, 23:40
Oh secrets, secrets!! :p

:D

goldsla
26th Jan 2009, 23:41
I think dropping the item for the update isnt a bad idea just as long as it has a quiet landing. Maybe make it float in air, might seem odd but that wouldnt alert the guards.Currently, I'm THROWING the blasted thing around for not cooperating. I'm hoping that one of these times I'll knock some sense into it. :mad2:

R_Soul
26th Jan 2009, 23:52
(i.e. RAT required --- Am I learning RSoul?)You have the right idea there.


I can't see why it would only work once. Try creating two solid objects, like tables, and giving them the source (prop: Contact), and with different intensities. Then try dropping the counter on each of them.


I set up a test mission, using NVRelayTraps to send the stims, and I could change the model lots of times.
I also found that the inv_select command doesn't update the object model :/
Only genuinely re-selecting does that.

edit:
The following commands will allow the model change to be seen:
prev_item
next_item

Use them instead of clear_item and inv_select.

I also had to use two separate CommandControl objects, with a timer to delay the second by a small amount.

goldsla
27th Jan 2009, 00:08
I can't see why it would only work once. Try creating two solid objects, like tables, and giving them the source (prop: Contact), and with different intensities. Then try dropping the counter on each of them.That works, even with the object in my inventory, if I bump the table with Garrett and then display the object, it has changed, and changes repeatedly. This makes me think there is something about the SOURCE object that causes it to stop emitting ...

goldsla
27th Jan 2009, 00:24
If I bump a table to reset the object, the radius stim will work again for one time only again. The radius stim only seems to cause a change from object00 to object90 I'm not getting any intermediate changes ... or changes in the other direction with the radius stim. With the table, I can get the object to change to any of the intermediate objects. This again points to the "source" as the source of the problem ...

When I change the source to emit different intensities along the radius, I get different models, but still only the one change. I'm going to see if linear behaves differently. Maybe the problem is with inverse quadratic ...

goldsla
27th Jan 2009, 00:42
The wierdest thing just happened: I was walking around with the object dispayed in my inventory, and when I passed a Nice Torch, the inventory display switched to the Nice Torch model! I have seen this twice now at different locations, but cannot make it happen consistently. Both time were with the Nice Torch model. Wierd!

R_Soul
27th Jan 2009, 00:44
That happened in my test too. Only when I sorted out the prev_item and next_item commands did it cease to be a problem.

goldsla
27th Jan 2009, 00:50
Do you have the radius stim working properly, or "only" contact stims?

R_Soul
27th Jan 2009, 00:53
Not even that. I was using two NVRealyTraps to send the stims directly to the Player.

Vlad Midnight
27th Jan 2009, 01:12
This makes me think there is something about the SOURCE object that causes it to stop emitting


Have you checked no max firings for the source radius? That may be why it only works in the beginning.

goldsla
27th Jan 2009, 01:38
I tried to follow your directions but they did not work for me, so I must have done something wrong. (Always one to state the glaringly obvious, that's me!)

What I did:

1) I added the scripts NvRelayTrap and NVRelayTrap2 to GeigerCounter
2) I added the following Design Note to GeigerCounter (CRLF used here for clarity, but not in the actual Design Note)
NVRelayTrapOn="prev_item";
NVRelayTrapOff="next_item";
NVRelayTrap2On="DistanceStimStimulus";
NVRelayTrap2Off="null";
NVRelayTrap2TDest="JustBeenStimmed"
3) Created a RAT called UpdateModel
4) Created a RevertTrap called JustBeenStimmed
5) Added the property Script > Timing to JustBeenStimmed with 100 as the Timing
6) Created a CD link from JustBeenStimmed to UpdateModel
7) Created a CD link from GeigerCounter to UpdateModel
8) Added the CommandControl script to the DistanceStimSource object
8) Added the Design Note to DistanceStimSource:
clear_item; inv_select GeigerCounter
9) Created a CD link from UpdateModel to DistanceStimSource

And ... nothing happens.

goldsla
27th Jan 2009, 01:39
Have you checked no max firings for the source radius? That may be why it only works in the beginning.Yep. No Max Firings is checked. I just double checked. Maybe I should uncheck it?

goldsla
27th Jan 2009, 01:45
So far the only things that are constant is that the stim detected via radius is always the minimum value and only works once, and the object is correctly interpreting the stims it recieves via contact (I now have a new hobby: trying to bounce the object from one table to the next to effect two color changes for one toss. Got it down pretty good!)

R_Soul
27th Jan 2009, 01:53
NVRelayTrapOn="prev_item";
NVRelayTrapOff="next_item";
InvSelect and InvDeSelect.


Added the CommandControl script to the DistanceStimSource object
I suppose you can do that. What I had in mind was that you'd create a marker with that script.


Added the Design Note to DistanceStimSource:
clear_item; inv_select GeigerCounter
Those commands didn't work properly for me. I had to use next_item and prev_item. I also had to use two CommandControl objects with each of those commands, using a timer to delay the second one.

goldsla
27th Jan 2009, 02:34
OK. Now what I did is:

1) I added the scripts NvRelayTrap and NVRelayTrap2 to GeigerCounter
2) I added the following Design Note to GeigerCounter (CRLF used here for clarity, but not in the actual Design Note)
NVRelayTrapOn="InvSelect";
NVRelayTrapOff="InvDeSelect";
NVRelayTrap2On="DistanceStimStimulus";
NVRelayTrap2Off="null";
NVRelayTrap2TDest="JustBeenStimmed"
3) Created a RAT called UpdateModel
4) Created a RevertTrap called JustBeenStimmed
5) Added the property Script > Timing to JustBeenStimmed with 100 as the Timing
6) Created a CD link from JustBeenStimmed to UpdateModel
7) Created a CD link from GeigerCounter to UpdateModel
8) Added a marker called CmdCtrl0 and another marker called CmdCtrl1
9) Added the CommandControl script to both CmdCtrl0 and CmdCtrl1
10) Added the NVRelayTrap script to CmdCtrl0
11) Added the Design Note to CmdCtrl0:
next_item;NVRelayTrapTDest="CmdCtrl1";NVRelayDelay=20
11) Added the Design Note to CmdCtrl1:
prev_item
12) Created a CD link from UpdateModel to CmdCtrl0
13) Created a CD link from CmdCtrl0 to CmdCtrl1

And ... nothing happens.

goldsla
27th Jan 2009, 03:23
Spy and NVspy don't seem to report on stims. Is there any way to detect the stims being generated? It seems clear that the receiver is functioning correctly, but what is the sender doing?

R_Soul
27th Jan 2009, 13:57
Add a receptron whose effect is Send to scripts, then that stim will be reported.

Try removing everything to do with NVRelayTrap2, and just adding a DistanceStim receptron (no min, no max) that frobs a button which is CD linked to JustBeenStimmed.

goldsla
27th Jan 2009, 15:21
I received the following suggestions from NV

Two things you might try:
1. Have the inventory item the source and the receptron on the object - that way, if you have more than one such object, you'll only have one source instead of two anyway, and you don't have to worry about Permeate Into Container. Use the "Source" option to affect the model of the inventory object.
2. Try using the Set Property ("ModelName") receptron instead of Change Object Model.

Oh, and if you add the Send to Scripts receptron to your object for the stim in question, then NVSpy will report it.

I can report that his first suggestion (which changes the concept from a Geiger counter to a RADAR screen) does not seem to work at all. I'm not certain why. It seems reasonable, but I don't even get the first change in model anymore.

The second suggestion when used with the RADAR setup did not help, and when used with the Geiger setup had the same results as before: one change only no matter what.

I put NVspy on the RADAR setup. The target object never reports getting a DistanceStim. So I added a receptron to the inventory object with SendToScripts. Garrett still had PermiateContainer for DistanceStim, and now the inventory object is reporting getting its own stims via Garrett. So the stims are being sent, just the receptrons are not receiving them on the intended target. It does not matter how close the source is put, either in inventory or world. The target does not detect the stims. I have triple checked the receptrons, and they are all correct. In particular the Send to Scripts one is correct. So I have no idea what is happening here.

I put NVspy on the Geiger setup. This detects the stims all the time. It works great, except it only reports that the stim was received, and not the intensity. It is the intensity which I want to know about. Oh well.

This idea may just fall by the wayside as not possible ....

Is there no way to add to the HUD, next to the lightgem, another item like the light gem for this? Somehow the lightgem keeps getting varying intensities of a stim. How does that work, and why can't I emulate that with the distance stim? Or does that only work Raycast??

R_Soul
27th Jan 2009, 15:59
When you have a complex system that isn't working, you have to test each part in order to work out where the failures are.

Add another CD link from the counter to a BigFloorLever, which will check that select and deselect is triggering as necessary.

Link a button to CmdCtrl0, and shoot it with an arrow to press it. If you're close enough to frob, the inv selection won't be in focus and won't change. That can check that the two commands are being sent.

Create some NVRelayTraps which send DistanceStims of various intensities. e.g. NVRelayTrapTOn="[1.00]DistanceStim];NVRelayTrapTDest="Player"
With a few of these you can see if the object is responding to the stim.

Create some WoodCrateSealed objects, with receptrons to slay themselves at various DistanceStim intensities, and check that they are indeed slain where you'd expect them to be.

There are other things like RATs which can also be given the spy or NVSpy scripts to see if they're receiving the expected messages.

goldsla
27th Jan 2009, 16:29
I'm most concerned about the model not changing. Getting it to display automatically in the inventory is my lesser concern. I can live with dropping the bloody thing in the world and looking at it there, IF I can get it to change based on the radius stim. So far I can't get that to happen, and I don't know how to tell what intensity of the DistanceStim is being recieved by the counter object. I can tell that the stim is recieved, but not the intensity.

I know that the reciever works correctly, thanks to your table test. But I can't get a radius propigation to have the same consistent effect that the contact propigation has. That, I think is really the key. Why isn't that working correctly?

R_Soul
27th Jan 2009, 17:17
11) Added the Design Note to CmdCtrl0:
next_item;NVRelayTrapTDest="CmdCtrl1";NVRelayDelay=20
13) Created a CD link from CmdCtrl0 to CmdCtrl1
You don't need both of those, since they are effectively the same.

I created a very similar setup and things work reasonably well. There is a slight flicker when the object is changed. If the counter is at the 'end' of your inventory, the two commands need to be ordered so that it doesn't select 'nothing'.

What sort of object is the source placed on? Can you be sure it's not being killed by something, or falling through the floor and into infinity?

goldsla
27th Jan 2009, 19:53
I deleted 13, and that had no effect. I still don't see the change in inventory. If I manually tab forward and back (or backward and fore) I see the change, but never whilst the counter is displayed.

I'm still more worried about why the radius propigation doesn't work. Any ideas on that?

goldsla
27th Jan 2009, 19:55
What sort of object is the source placed on? Can you be sure it's not being killed by something, or falling through the floor and into infinity?I am using a skull which is just sitting there on the floor, happy as a skull can be. I can place the counter right next to the skull and it does not chang in the world. I know it is getting stimmed because of NVspy, but I don't know the intensity.

R_Soul
27th Jan 2009, 22:57
I can't see why it won't work, so here is my demo mission:
http://www.megaupload.com/?d=4F9JRYOZ

Perhaps there's a small but significant difference.

goldsla
27th Jan 2009, 23:31
Thanks. I'll look at it. I just got the object changing through 10 models and back thanks to help from NV. I ended up scrapping everything I had put into the hierarchy for this and redoing them from scratch. That got me working with his RADAR approach. Now I'll see if I can get your inventory updating to work when combined with the RADAR model.

I think I'll restart this at TTLG now that it is back if I have any troubles. But with your demo mission in hand, I think I'll be OK. Knock wood. Thanks!