grodenglaive Posted December 15, 2023 Report Share Posted December 15, 2023 Thanks, that should come on useful. Quote Link to comment Share on other sites More sharing options...
Dragofer Posted December 15, 2023 Report Share Posted December 15, 2023 The breakdown of the stim/response system is that entities can be set to emit stims around themselves, like a signal. If the stim reaches another entity that has a response to that type of stim, that entity will perform various response effects. For example a fire arrow emits a fire stim in a radius of x units every y milliseconds, so if an unlit candle with a fire response comes within that distance it'll perform the "relight self" response effect. The key part is that the stim is on one entity while the response is on a different entity. You can also create your own custom stims, for example the audiographs consist of stim-emitting tapes and machines that respond to that stim type. If you bring them close enough together a script is called to insert the tape and start playing the sound. Most stims are distance-based, but there are special cases such as frobbing and collision-based. Most of the stim types (fire, holy, visual etc.) only differ in name and ID #, and work the same way. 2 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
grodenglaive Posted December 15, 2023 Report Share Posted December 15, 2023 Interesting. It would be fun to take some time and play around with it. Quote Link to comment Share on other sites More sharing options...
Geep Posted December 15, 2023 Report Share Posted December 15, 2023 Regarding the earlier discussion about telling when an objective is complete from script, I just added a brief entry under the wiki's "Objective Editor/FAQ & Examples" called "Determining an Objective's Current State from a Script" As for as Stim/Response... I often find it hard to wrap my head around too. I don't recall writing anything very authoritative about it, but maybe in some narrow context? Or maybe @JackFarmer, you were remembering someone else's explanation? So, I can put it on my list of possible wiki topics for 2024, but it would require a lot of research by me, and likely @Dragofer or others could do it better & quicker. 1 Quote Link to comment Share on other sites More sharing options...
Frost_Salamander Posted December 20, 2023 Report Share Posted December 20, 2023 On 12/15/2023 at 4:36 PM, JackFarmer said: I know what you mean. Springheel used this once in a tutorial for traps, but in the end I just copied his methods and didn't understand much. However, there is a different S/R application I understood and I find very handy. If you pick a random frobable entity, go to S/R and click on responses, you can select the Stim "Frob". If you then press the right mouse button in the response effects area, you can activate effects such as: clear/add targets on AI turn off/on lights play sounds remove items run scripts change frobability set skin trigger entities set light color Unfortunately, the last one (changing the light color) doesn't work so well. I have noticed that this effect is reset when you save and reload the game. However, I have not yet noticed this with the other effects (and frobability/remove works perfectly, I use them all the time. But that's only one of the possibilities, certain stims, as I understand it, work on approximation, and you can do cool things with them. There's also a Wiki entry written by Sparhawk, who coded it. Unfortunately I don't understand much there either. I don't even dare to ask, because Geep has already done so much, if he could revise this section and provide understandable examples for both stims/responses. @Geep Didn't you once open a topic in which you explained the use of stims? That was very informative, but unfortunately I can no longer find it. This is really useful and should be added to the examples section on this page. I recently added the one for the burn damage, as that seems like the type of thing a new mapper might want to try and do. it took me a while to figure out how to do it and I felt quite dense, but after hearing that others didn't find it straightforward either I don't feel so bad now 1 Quote TDM Community Github: https://github.com/thedarkmodcommunity My fan missions: The Hare in the Snare, Part 1, The Lieutenant Series: In Plain Sight High Expectations Foreign Affairs Link to comment Share on other sites More sharing options...
JackFarmer Posted December 20, 2023 Report Share Posted December 20, 2023 @grodenglaive@Frost_Salamander When you've understood the system in general, then this is a very good tutorial when you want to understand how to basically set up custom stims. Springheel used it for pressure plate traps: 2 1 Quote Link to comment Share on other sites More sharing options...
JackFarmer Posted December 20, 2023 Report Share Posted December 20, 2023 So, I wanted to build on my good experiences with the "Frob" stim/responses that are attached to all entities and find another use for them...and I failed again. Task: If the player extinguishes a certain flame (A) with a water arrow, a script should be started and A should be completely removed from the map (so that it cannot be ignited again with a fire arrow). Solution idea: Every flame has an inherited response to water/water arrows. You can also see this in the S/R editor. So I thought, I'll just add another response to water on the flame and add the desired commands. Result: It doesn't work, the script won't start and A does not get removed. What am I doing wrong? @Dragofer: Sorry for being such a pain, but this drives me crazy. @grodenglaive@Frost_Salamander: For your information...Maybe we should start an extra topic for the the whole subject...? 1 Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted December 20, 2023 Report Share Posted December 20, 2023 (edited) It's working for me. (edit) oh, wait. I put the Response on the torch itself and the whole torch obviously disappeared. Let me try on just the flame. Edited December 20, 2023 by grodenglaive Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted December 20, 2023 Report Share Posted December 20, 2023 (edited) OK, if I put the response on just a torch flame, it doesn't work (the script doesn't run). Maybe the inherited water response is overriding it. Edited December 20, 2023 by grodenglaive 1 Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted December 20, 2023 Report Share Posted December 20, 2023 I also tried to deactivate the inherited water S/R (right-click on it to select that option), but that didn't have any effect. For a workaround, I guess you could apply the S/R to the whole torch and then add a third response to spawn an unlit torch model in it's place. Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted December 20, 2023 Report Share Posted December 20, 2023 I couldn't figure out how to use the S/R spawn function, but Teleport worked fine. https://youtu.be/E856ePPCyMQ 1 Quote Link to comment Share on other sites More sharing options...
JackFarmer Posted December 20, 2023 Report Share Posted December 20, 2023 (edited) 3 hours ago, grodenglaive said: I also tried to deactivate the inherited water S/R (right-click on it to select that option), but that didn't have any effect. For a workaround, I guess you could apply the S/R to the whole torch and then add a third response to spawn an unlit torch model in it's place. I really wish it had been my stupidity and that you could confirm that it works exactly as I described. I don't have a torch by the way. I have a magic light, but then I should be able to just create an invisible dummy func-static with the S/R properties...? Even worse is that you can't seem to turn off the response to water. In addition I need a flame that can't be extinguished with water. To achieve that, I thought I could simply deactivate the water stim. (EDIT: this seems to work fine). Edited December 20, 2023 by JackFarmer Quote Link to comment Share on other sites More sharing options...
Dragofer Posted December 20, 2023 Report Share Posted December 20, 2023 @JackFarmeryour new water response might be getting counted as a separate response. Something I'd try is to transfer your new response effects to the inherited version of the water response. To do so, look at the spawnargs that mention your new effects (maybe something like "sr_response_effect6" "run_script") and change the number to the same ID as the inherited water response. Delete your own water response afterwards. 2 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
JackFarmer Posted December 20, 2023 Report Share Posted December 20, 2023 1 hour ago, Dragofer said: @JackFarmeryour new water response might be getting counted as a separate response. Something I'd try is to transfer your new response effects to the inherited version of the water response. To do so, look at the spawnargs that mention your new effects (maybe something like "sr_response_effect6" "run_script") and change the number to the same ID as the inherited water response. Delete your own water response afterwards. You are right; this works! 2 Quote Link to comment Share on other sites More sharing options...
JackFarmer Posted December 29, 2023 Report Share Posted December 29, 2023 Is there a way to reduce the sound of the thunder? (s_volume on the entity does not work) put the "ai_see - 0" property on the lightening? Quote Link to comment Share on other sites More sharing options...
Dragofer Posted December 29, 2023 Report Share Posted December 29, 2023 52 minutes ago, JackFarmer said: Is there a way to reduce the sound of the thunder? (s_volume on the entity does not work) put the "ai_see - 0" property on the lightening? Id try calling a script event to fade the entity's volume to something lower than 0. Otherwise youll probably have to copy and modify the .fx definition. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
cvlw Posted December 31, 2023 Report Share Posted December 31, 2023 Hello again, TDMers. I am at a point where I need to lay monsterclip below uneven terrain to ensure sensible AI pathfinding. Consider three methods that produce the same top surface profile, though I imagine more are possible: 1) Flat layers one on top of another but not overlapping. 2) Blocks that intersect through each other/overlap. 3) Big central block with non-overlapping "steps" around that block. Is there any best way to do this? Any worst way? No real difference? #1 and #2 use only two brushes while #3 uses more, so, I imagine fewer brushes is better. Advice? Clint Quote Link to comment Share on other sites More sharing options...
Dragofer Posted December 31, 2023 Report Share Posted December 31, 2023 I've wikified this approach, it should be as systematic as it gets to avoid gaps in pathfinding. https://wiki.thedarkmod.com/index.php?title=Systematic_Method_for_Adding_Pathfinding_to_Uneven_Terrain 1 2 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
JackFarmer Posted January 1 Report Share Posted January 1 On 12/29/2023 at 5:44 PM, Dragofer said: Otherwise youll probably have to copy and modify the .fx definition. Went for the thunder def file and added the last lines as follows: fx fx/thunder { { //creates light delay 0 name "thunderlight1" duration 0.4 restart 0 light "lights/biground1", 0.35, 0.35, 0.7, 99999 ai_see 0 } ... { // sound delay 1.5 name "thundersound" sound "thunder" duration 10 s_volume -15 } } Repeated this for every other thunder/lightening def in the relevant file, but the added lines at the end do not work... 1 Quote Link to comment Share on other sites More sharing options...
datiswous Posted January 1 Report Share Posted January 1 (edited) 3 hours ago, JackFarmer said: sound "thunder" This should be a sound shader. In the soundshader, you can define the volume I think. https://iddevnet.dhewm3.org/doom3/sounds.html https://wiki.thedarkmod.com/index.php?title=Adding_ambient_Sounds_to_your_Map So copy this file to your mission in the same path and edit the volume in the file. Just my assumption. Sorry if it's nonsense. Edited January 2 by datiswous 1 Quote Link to comment Share on other sites More sharing options...
joebarnin Posted January 2 Report Share Posted January 2 s_volume or volume are not valid tokens in an FX file. So I think you have to do as @datiswous suggests, and clone (and modify) the soundshader. 1 Quote Link to comment Share on other sites More sharing options...
JackFarmer Posted January 2 Report Share Posted January 2 5 hours ago, joebarnin said: s_volume or volume are not valid tokens in an FX file. So I think you have to do as @datiswous suggests, and clone (and modify) the soundshader. Thank you for the info. What can I do about the lightening affecting the light gem? Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted January 3 Report Share Posted January 3 fwiw, I tried cloning the material def for lightbiground1 (materials/lights.mtr) and added ai_see 0, but that gives an unknown token error. lights/biground1 { description "Round point light." { forceHighQuality map lights/biground1.tga colored zeroClamp ai_see 0 } } Quote Link to comment Share on other sites More sharing options...
HMart Posted January 3 Report Share Posted January 3 (edited) 1 hour ago, grodenglaive said: fwiw, I tried cloning the material def for lightbiground1 (materials/lights.mtr) and added ai_see 0, but that gives an unknown token error. lights/biground1 { description "Round point light." { forceHighQuality map lights/biground1.tga colored zeroClamp ai_see 0 } } Not a TDM developer so perhaps that is how it works but why would such a thing as "ai_see 0" be a surface/material token?! That to me sounds more like something that should be on the light entity definition the .def file not the .mtr file, but I don't really know. Also if it is a real material token, try putting it at material global section, where the description is, outside the second pair of brackets. Edited January 3 by HMart 2 Quote Link to comment Share on other sites More sharing options...
peter_spy Posted January 3 Report Share Posted January 3 It's not a material token. It's a property, so you can use in light entity def (using this light material). 1 Quote Misc. assets for TDM | Artstation stuff Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.