Jump to content
The Dark Mod Forums
Sign in to follow this  
greebo

Stim/response Editor

Recommended Posts

I think so as well. :)

 

First I feared that it would be more complicated code-wise, but it turned out to be the opposite eventually. Both tab pages use the same data structures and even derive from a common base class which handles all the shared stuff.

Share this post


Link to post
Share on other sites

Yes, it's definitely starting to look great. Very nice. I like also that in DR you do all these stretchy resizable dialogs where the content resizes itself as far as possible to fit. Not all programmers bother and just have one rigid dialog, often with a lot of waste space. The tabs give you more room - be nice to see it when the other fields are added.

 

Still adds a frob which then has to be changed but I assume you are going to change that to a selector from the add button or merge with the type button as an add/edit button? So the user will click that button, if an existing stim or response is highlighted then selecting a stim name will change it but if no existing stim is selected then a new one is created from the selector.

 

Hope also to see the properties of the inherited stims and responses even if they can't be changed. That is planned isn't it?

Share this post


Link to post
Share on other sites

I uploaded a new build on FTP with the following changes, get it here:

http://208.49.149.118/TheDarkMod/DarkRadia..._latest_SVN.zip

  • The list items are clickable now (but still greyed out). This should enable you to see the inherited properties. Editing is still restricted to non-inherited stims (with the exception of activation/inactivation).
  • Activate/Deactivate context menu items: works for both inherited and non-inherited S/R.
  • Duplicate command
  • Add/Duplicate commands highlight the newly added stim automatically
  • Manually overridden entity key/values (set via the entity inspector) are recognised and preserved on save. This was non-trivial (they got deleted before) and ensures that "spawnarg hackers" don't lose their custom overruling spawnargs when using the S/R Editor.
  • Some bugfixes etc.

In case you haven't downloaded the mod or the def/ folder yet, I have zipped the response_effects.def file and uploaded it as well. You should be able to see all the possible effects if you drop that .def file in your darkmod/def folder. Get them here: http://208.49.149.118/TheDarkMod/DarkRadia...nse_effects.zip

 

What's not yet done: I haven't got around to implement the pop-up list for adding new stims/responses. Will do that soon.

Share this post


Link to post
Share on other sites

Did you already have chance to have a look at that build?

Share this post


Link to post
Share on other sites

I had looked at this before briefly but just had another session with the s & r interface. Just to confirm this is DR v.0.8.1 dated 12 Apr 07. And the file tdm_response_effects.def dated 10 Apr 07 I have extracted into the doom3\darkmod\def folder.

 

The following is what I can and cannot do as is, and I assume this is as it should be at this stage...

 

Selecting an existing entity which already has inherited s & r now allows normal click selection to highlight.

 

Selected inherited stims now shows stim properties feinted out.

 

Selected inherited responses show the active field checked but nothing else and no effects information.

 

I can add an existing stim, eg, fire, to an entity eg, a barrel, set it active and adjust its radius, magnitude, etc, but not yet been able to detect it in game. That is, the player receives no damage from it in game. I don't know if the fire damage response has been added to the player. Looking at info player start does not show any stims or responses.

 

I can add an existing response to an entity, eg, add water stim to a cart, set it active (and chance and random effects can be checked) and add the single effect 'let react to stim' but nothing else.

 

So it's looking good, I had no problems with it. The tabbing works great and seems the perfect way to separate stims and responses while keeping them together if you see what I mean!

Share this post


Link to post
Share on other sites
Selected inherited responses show the active field checked but nothing else and no effects information.

That's probably because no response effect is defined for this response. It's probably using a script to handle the response.

 

I can add an existing stim, eg, fire, to an entity eg, a barrel, set it active and adjust its radius, magnitude, etc, but not yet been able to detect it in game. That is, the player receives no damage from it in game. I don't know if the fire damage response has been added to the player. Looking at info player start does not show any stims or responses.

We decided to ditch the burn damage on the player entity when a fire stim is encountered so that the player is able to carry torches without burning himself. You can setup a Damage stim to test this though.

Share this post


Link to post
Share on other sites

Tried the damage stim on a couple of objects, made active and with large radius and magnitude but no effect on the player. What am I doing wrong? I've tried it with and without 'use bounds' checked though I don't know what it means unless it enables radius when checked and contact when not. Also tried it with and without 'timer restarts after firing' which again I am not sure what it means unless it means the stim only fires once at the start of the mission when unchecked?

 

Regarding fire, now you have the magnitude qualifier is it possible to add a response to the player with a large enough magnitude so the player is not harmed by carrying a low magnitude torch but at least cannot walk though a raging inferno?

Share this post


Link to post
Share on other sites

It may be possible that you player's def file is still from the beta mapper release 0.004? The damage response on the player is of course not included in that package. You might want to check out the whole def/ folder from SVN.

 

The threshold magnitude is not in yet. I might do that in my next S/R SDK coding session, but I'm busy with the S/R editor currently (am working on letting you define custom stims).

Share this post


Link to post
Share on other sites

OK, looking through the new s & r interface on DR v.0.8.1 of 15 Apr 2007 (see link in 'itches' thread)

 

On the stims tab:

 

The h,m,s,ms boxes want moving a couple of characters to the right to allow room for the heading 'Activation Time' with large Windows fonts dpi. On mine it is truncated to 'Activation Tin'. For the same reason the milliseconds box wants to be one digit wider as I can only squeeze in two digits.

 

Can you explain what the following actually are...

 

'Activation Time' - I presume this is the time to elapse from mission start before the stim starts firing?

 

'Timer restarts after firing' - Does this mean if UNchecked then it fires only once? So it needs checking to enable the timer interval (cycle)?

 

'Timer reloads' ... n times' - Dunno

 

'Timer waits for start' - Is this the timer for start of the intervals so if checked it actually starts the timing of the firing cycles from the Activation time? If UNchecked - is 'spawn time' what I call mission start?

 

'Use bounds' - Is this for an actual contact stim? What do you get if Radius is UNchecked?

 

What would be an example of a falloff Exponent value?

 

'Duration' is presumably the time it keeps firing so if UNchecked it will fire indefinitely through the mission or until the stim entity is destroyed.

 

'Chance' ? Some kind of random firing? How is it defined? Once in n? So if you enter 5 it will fire once in 5 times but randomly?

 

 

Response Tab:

 

'Chance' - same for stim above?

 

'Random effects' Note the left side of this box too wants moving to the right two or three characters as I see it truncated to 'Random Effec' - Presumably a selection of effects will be entered here and chosen at random each time triggered?

 

'Response Effects' - Still baffled how this will look when finished and how all the various effects fields will be entered in one box? Or are you going to add more fields later?

 

Custom stims tab :

 

Can't fault this - it works fine. Can't think of anything to add unless you put an advert for coca cola in the blank space! This is now better than Dromed where you have to put new names in elsewhere then reload the mission!

 

It's looking better and better and the tabbed panels absolutely perfect.

Share this post


Link to post
Share on other sites

It appears that you haven't seen the wiki article on the S/R spawnargs yet: http://www.thirdfilms.com/darkwiki/index.p...onse_Key/Values

The spawnargs have nearly the same name as the labels in the editor, so this might clear things up a bit. Please go through them to learn about them and ask me again if things are still unclear afterwards. Not that I don't wan't to explain them to you, but I typed most of the information in already. ;)

 

Could you post a screenshot of what the S/R editor tabs look like on your system, so that I can adjust/correct the widgets. My desktop is a bit non-standard (1680x1050 with the fonts set to 120%), so I'd appreciate that.

 

When the interface is done, I also plan to extend the article a bit with a screenshot-assisted explanation of the S/R editor so that all of your questions above will be answered.

 

Thanks for looking at it so far!

Share this post


Link to post
Share on other sites

Yes, for reference I have a desktop res of 1152 x 864 (bit odd but it means I can have Dromed at 1024 x 768. Dromed is VERY non-standard and.. well, it's a long story. And I have a DPI setting of 150. Here are the screen shots...

 

stim

response

custom

 

I'll take a look at the wiki. I was there earlier looking for DR controls to find a button for snap to grid. I found the shortcut but no button (because my mouse covered the popups!) But I couldn't find the wiki DR controls so it kinda put me off. That's my story and I'm sticking to it.

Share this post


Link to post
Share on other sites

I put the link to the DarkRadiant hub article to the front page yesterday, so it should be a bit easier to find it.

 

I can add a button for the Snap to Grid command if you like?

 

Thanks for the screenshots, it looks like you're using a really large bold font. I'll have to see how I can handle this. :)

Share this post


Link to post
Share on other sites

Yes, I'd recommend a snap to grid button and also add it to the grid menu. Those are the two places I searched first so probably most users would.

 

The Dark Radiant link on the wiki is fine.

Share this post


Link to post
Share on other sites

Ok, I've rearranged the widgets a bit, so this should solve the issue with the labels being cut off.

 

In case you're wondering how to edit the response effects: just add a response effect and double-click on it, this opens the response effect editor.

 

The new build is here (in 2 min.):

http://208.49.149.118/TheDarkMod/DarkRadia..._latest_SVN.zip

 

I also added the "Snap to grid" command to the toolbar on the left and to the grid menu.

Share this post


Link to post
Share on other sites

OK - Just about to get some sleep so I'll download this in the morning. But did a quick check and see that double click to edit response effects is already there in the previous one! Maybe add it also to the right click menu?

Share this post


Link to post
Share on other sites

Dark Radiant v.0.8.1 of 18 Apr 07, S & R interface....

 

Stim tab:

All text spacing shows fine now and can get 99999 visible in milliseconds box! Won't quibble but what happens if the timer is set to 0 9 999 99999 ? No wait, I can just see another 9 so at least 999999 milliseconds. Maybe you plan capping those last three.

 

I read through the wiki s & r yesterday but will need to study it a bit more. One thing, 'use bounds' seems to be equivalent to what I call 'contact' yet it can only be enabled if the radius box is checked. If the radius box is checked then what do you get? Or if you set a radius of 10 and set the 'use bounds' box? If the radius extends beyond the bounds here and there? Is the bounds box on say a broken cart, all the outline we see in DR which seems to be the physics contacts limits in-game? Wish I could test these to see what happens.

 

As an aside, what is the equivalent of a Dromed 'marker' in DM? I mean an entity with no properties at all except coordinates and dimensions? To which one might add a stim. Is it just a matter of creating a brush and adding now draw texture? No! - to answer my own question as a stim has to add to an entity.

 

Regarding the auto default of frob when you click the add button, what would happen if you just duplicate the type button, rename it 'add' and move it down to replace the current add, then make it point to the next free place in the list? Sounds like it wouldn't take more than a couple of minutes to set up. It still niggles me to ask for the menu and get a default meal.

 

Response tab :

All text spacing fine.

 

Now I see how the effects are added and it's great. Never thought of that. Yes, really good. And all the fields change according to the effect chosen. Nice. I like that you can select any entity in the map from a list (though how it will be in a big map with hundreds of entities I don't know!)

 

What would be the format/separators for coordinates in say teleport? x,y,z ? In teleport I see what you mean by 'origin' but it does sound a bit odd in this context; maybe 'new origin'?

 

And you can have multiple effects from the one response so you could teleport in a new entity and triggeer it to start doing something and throw the player back four feet and play a sound. Fantastic. This is virtually a Dromed conversation except they all trigger 'together'. Actually in the code they must be carried out one after the other even if it's only a few milliseconds? I mean, once the response is triggered then each effect is 'started' one after the other? But each one would not wait for the previous to complete its operation. Is there any way to introduce a 'wait n milliseconds till next effect' effect that the mapper could put between different effects? This would be really powerful. Or even 'wait till last effect has completed' but I doubt that would be possible. Does DM have an equivalent to the Dromed conversation? Must have I guess.

 

Custom stim tab :

Still fine, no problem.

 

Overall now it's looking really good and all the main features are in place.

 

Snap to grid button and menu looking fine too.

Share this post


Link to post
Share on other sites
All text spacing shows fine now and can get 99999 visible in milliseconds box! Won't quibble but what happens if the timer is set to 0 9 999 99999 ? No wait, I can just see another 9 so at least 999999 milliseconds. Maybe you plan capping those last three.

I agree, it really doesn't make sense to have more than three digits for the milliseconds entry, I'll limit that.

 

One thing, 'use bounds' seems to be equivalent to what I call 'contact' yet it can only be enabled if the radius box is checked. If the radius box is checked then what do you get? Or if you set a radius of 10 and set the 'use bounds' box? If the radius extends beyond the bounds here and there? Is the bounds box on say a broken cart, all the outline we see in DR which seems to be the physics contacts limits in-game? Wish I could test these to see what happens.

I'll have to look at the code for this, but I think it goes like this: If you choose the stim radius it is measured from the very origin of that stimming entity. If "use bounds" is toggled, the radius is measured from the boundary box of the entity, which would sometimes make more sense for large objects, as the origin may be "deep" within the model's geometry.

 

As an aside, what is the equivalent of a Dromed 'marker' in DM? I mean an entity with no properties at all except coordinates and dimensions? To which one might add a stim. Is it just a matter of creating a brush and adding now draw texture? No! - to answer my own question as a stim has to add to an entity.

You can create a (small) brush textured with "nodraw" and convert it to a func_static. A func_static basically does nothing apart from being an entity (including having an origin). This would be the nearest solution I have in mind.

 

In fact, it would even be possible to define a "marker" entityDef that inherits from func_static and may be used for such "stim-only" entities. It's just a matter of nomenclature.

 

Regarding the auto default of frob when you click the add button, what would happen if you just duplicate the type button, rename it 'add' and move it down to replace the current add, then make it point to the next free place in the list? Sounds like it wouldn't take more than a couple of minutes to set up. It still niggles me to ask for the menu and get a default meal.

I'll try that. I'm a bit afraid that the combo box won't fit well below the list because of its large width. I also think that a distinct "Add" button will still be necessary, this isn't a web browser after all where selecting list items automatically fires an action. :)

 

What would be the format/separators for coordinates in say teleport? x,y,z ? In teleport I see what you mean by 'origin' but it does sound a bit odd in this context; maybe 'new origin'?

The string representation of a vector (location, origin) in Doom3 has to be space-separated (for example 123 45 78.7). "New Origin" as description sounds fine to me, these texts are easily changed as they are defined in the .def files.

 

Actually in the code they must be carried out one after the other even if it's only a few milliseconds? I mean, once the response is triggered then each effect is 'started' one after the other?

The effects are traversed and their script functions are started one after the other. Note that several script functions in Doom3 can be active at the same time. As soon as a script calls "wait(4)" for instance, the engine knows that it can look for other things that are pending and will come back to that script when the 4 seconds have passed.

 

So in short, it's probably not easily possible to define a effect_wait, this would require some careful design. That's not working currently. An alternative would be to start a stim timer of another stim that triggers another response when the timer has elapsed. angua used this in the bonehoard to "script" a timed effect.

Share this post


Link to post
Share on other sites

Steady on! Here's a bit more on the previous one to chew on while I get the new one! :) ......

 

If I drag the interface down to the bottom of the screen I see the type button then pops up the list above it and with its start pointing at frob, the first entry in the list but with a huge gap above to scroll up into if you see what I mean. Guess that's how the add would be. Maybe the add and remove buttons could go above the entity stims list on the same line as the type button. Also that very wide type button and selector list with a lengthy narrow list on it seems not the nicest display. What other options are there? If that width is retained then it would be nice to have columns: 6 x 5 is neater than a long list of 30. What kind of selectors are available? There is no obvious grouping of stim types so a 'start menu' type of sub-menuing system doesn't make much sense. I'd be inclined to make the button half the width. Come to think why are some of the stim inputs so wide? The time interval is like big enough to last till the universe collapses. I'm being picky now but you probably just set them all default to begin with till you sorted out what went where.

 

Spaces as separators - I've got a horrible deja vu feeling somebody already told me that the other day - probably you!

 

The 'wait' between effects is probably not worth pursuing then - it's excellent anyway that one can trigger multiple effects.

Share this post


Link to post
Share on other sites
Steady on! Here's a bit more on the previous one to chew on while I get the new one! :) ......

 

If I drag the interface down to the bottom of the screen I see the type button then pops up the list above it and with its start pointing at frob, the first entry in the list but with a huge gap above to scroll up into if you see what I mean.

I don't get the part with the gap - screenshot?

 

Also that very wide type button and selector list with a lengthy narrow list on it seems not the nicest display. What other options are there?

It's a two-column list now. :)

 

Come to think why are some of the stim inputs so wide? The time interval is like big enough to last till the universe collapses. I'm being picky now but you probably just set them all default to begin with till you sorted out what went where.

They are admittedly wide, but I intend to create a clear interface that allows a quick overview. Cramped, space-saving widgets aren't always userfriendly. I try to stick with the gnome HIG (Human Interface Guidelines as closely as possible while still being practical.

 

Spaces as separators - I've got a horrible deja vu feeling somebody already told me that the other day - probably you!

In case you didn't notice yet, there is a tooltip help when moving the mouse cursor over the question marks in the effect editor with a short description. It works with the label of the effect argument as well:

 

srcontexthelpxw1.th.jpg

 

(oh my, this discussion should really be going on in the other threads, but so what...)

 

edit: Here's YAB (yet another build): http://208.49.149.118/TheDarkMod/DarkRadia..._latest_SVN.zip

Share this post


Link to post
Share on other sites

greebo - this in response to the previous post - I'll read your last one next...

 

Not sure what... Oh I see, a separate type button to select and then the add button adds that type. Does this mean the selector button itself cannot trigger a new entry but only change an existing one? Why can it not just be pointed at the blank next space? That could already be set up with default values so effectively is it not just changing the name from [blank] to something and moving a pointer up? But you're saying these things can't move a pointer up or anything else they are just linked to change an entry in a list and nothing more? Mmmm....

 

If so, I know this is a messy programming fix but if you use a timer to read the entry in the 'next position' and when it is no longer empty then trigger the changes needed, set default values, move the pointer up? You've probably already got timers set up and can piggy back this, eg, if stimlist[endpos+1] <> "" then etc...

 

Otherwise, if not and you go with this separate button then conceptually I would maybe remove the word 'type' and move the add button in there so it 'reads' along the row: [Add:] [(name)] so it might then kinda read as [Add:] [Frob] or [Add:] [sound] then maybe move the Remove stim button to the left under add or centre?

 

One solution is a mild bodge for the programmer but extra neat for the user; the other is a quick fix for the programmer but acceptable even for a nit-picking soandso like me!

Share this post


Link to post
Share on other sites
Not sure what... Oh I see, a separate type button to select and then the add button adds that type. Does this mean the selector button itself cannot trigger a new entry but only change an existing one? Why can it not just be pointed at the blank next space?

The selector could perfectly do that, but I really dislike the concept of having a combo box selection automatically adding a new stim/response to the list. You'd just have to miss a click and a wrong type gets added to the list. That'd be like having pointing your finger at a menu and immediately ordering that meal, to use your analogy. :) This is really non-standard for windows/linux apps and the only place where this is happening is on various websites. What if you want to setup another response for the same stim type? You wouldn't easily be able to add that.

 

That could already be set up with default values so effectively is it not just changing the name from [blank] to something and moving a pointer up? But you're saying these things can't move a pointer up or anything else they are just linked to change an entry in a list and nothing more? Mmmm....

What do you mean by "pointer" here? I'm afraid I don't understand your way of thinking here. :)

 

If so, I know this is a messy programming fix but if you use a timer to read the entry in the 'next position' and when it is no longer empty then trigger the changes needed, set default values, move the pointer up? You've probably already got timers set up and can piggy back this, eg, if stimlist[endpos+1] "" then etc...

I've no timers whatsoever setup in this GUI and I'd strongly vote against using any timed events in an interface. This would turn out to be a video game rather than an editor. Unless I misread your suggestion, that is.

 

Otherwise, if not and you go with this separate button then conceptually I would maybe remove the word 'type' and move the add button in there so it 'reads' along the row: [Add:] [(name)] so it might then kinda read as [Add:] [Frob] or [Add:] [sound] then maybe move the Remove stim button to the left under add or centre?

I can do that, although the add button will further reduce the horizontal space available for the type selector list (it's already at its limit, I'm afraid). The remove button will be a bit of lonesome if this is taking up two rows, so I could also add a duplicate button. I'll have to think about that.

Share this post


Link to post
Share on other sites
I don't get the part with the gap - screenshot?
Probably ignore this - it changes anyway depending on the last selection. What I meant was... well screenshot HERE

 

It's a two-column list now. :)
OK - looks MUCH better! Hope you can get that on the add selector too. I won't quibble the button widths etc. Better big than microscopic.

 

Tooltips? I'd noticed the question mark and thought you were going to add something later! Very useful. Mind you my mouse covers part! This is the Standard Windows (extra large) pointer I'm using if you want to try it. I'll try another. Now there's an alternative selector box, waits politely for selection; don't know if it can scroll a big list though. OK, I've changed my mouse to 'Windows Standard Large' which is a bit better. Even the standard mouse seems to obscure those tooltips somewhat but at least now I can move about sufficient to make out the tooltip.

 

Hang on - here's a bug... If you click the 'Apply' button in the 'Edit Response Effect' dialog when all fields are still empty then it crashes out DR with a bad memory reference. Wait... I got this even when I left an optional field. For example, I selected the effect 'Apply Stim' then _SELF in the target box then stim type 16. The tooltip for 'source' says 'optional, defaults to self' so I left it. Click Apply and bad memory reference closes down DR. I can give you more info but you should be able to duplicate it.

 

OK, on to your next post...

 

I see what you mean about the instant selection as unlike say, a normal menu selection, there is no confirming mouse click but just a release - well, the release is the confirm I guess. What about a combo box instead for the add selector?

 

BTW, by 'pointer' I didn't mean a C pointer but just a generic use of the word meaning a variable holding the value of the last used position in the array or whatever structure you're using to hold the list. Maybe you don't need one and it is sorted for you by a function that just links the selector to the end of the list.

 

Anyway if not, on to the positioning with separate buttons. I hadn't appreciated that the selector list can't be wider then the button! I was thinking a wide list could pop up from a narrow button like giant menus can drop down from tiny text. Maybe you can pinch space here and there. Slightly widen the overal minimum dialog size, slightly narrow the width of the editing section. Even then it might be a victim of large font dpi.

 

If not, leave it as one column. I think it better as one column with the add button the left than two column with the add button below. But both work, I just think the former is immediately obvious; the latter needs a head scratch the first time or two. BTW, is there a max stim name length? Target Reached seems to be about the biggest at the moment.

Share this post


Link to post
Share on other sites
Probably ignore this - it changes anyway depending on the last selection. What I meant was... well screenshot HERE

This is certainly GTK related. SneaksieDave got that as well, so we should really update the GTK binaries with the next release.

 

Hang on - here's a bug... If you click the 'Apply' button in the 'Edit Response Effect' dialog when all fields are still empty then it crashes out DR with a bad memory reference. Wait... I got this even when I left an optional field. For example, I selected the effect 'Apply Stim' then _SELF in the target box then stim type 16. The tooltip for 'source' says 'optional, defaults to self' so I left it. Click Apply and bad memory reference closes down DR. I can give you more info but you should be able to duplicate it.

Can't reproduce that, maybe it's related to your .def files? Please try that one: http://208.49.149.118/TheDarkMod/DarkRadia...nse_effects.zip

 

What about a combo box instead for the add selector?

? The add selector is already a combo box, which is a drop-down field for me (and GTK).

 

BTW, by 'pointer' I didn't mean a C pointer but just a generic use of the word meaning a variable holding the value of the last used position in the array or whatever structure you're using to hold the list. Maybe you don't need one and it is sorted for you by a function that just links the selector to the end of the list.

I'm using a GtkListStore as backend data storage structure. There are iterators (pointers) into that liststore but I don't store any of them. Just the currently selected item counts, I don't need to know more. New items are added with the according GTK commands, so I don't have to mess around with pointers to the end of the list.

 

Anyway if not, on to the positioning with separate buttons. I hadn't appreciated that the selector list can't be wider then the button! I was thinking a wide list could pop up from a narrow button like giant menus can drop down from tiny text. Maybe you can pinch space here and there. Slightly widen the overal minimum dialog size, slightly narrow the width of the editing section. Even then it might be a victim of large font dpi.

Perhaps it's possible to use just the drop-down part of a combo-box as pop-up menu when clicking on a button (I know you suggested that before). I don't know how much of a hassle this is to implement in GTK.

 

I'll report back with a new build when I've come up with something. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...