Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Alright, now that I got the light squared away, onto my next question: I want to trigger the churchbell02 sound so that it rings maybe twice or three times. So far, the church bells will only ring once, or they will ring forever. How can I fix this? 

Link to comment
Share on other sites

You'd need to trigger the speaker once for every time it should ring, don't think there's a way to make a speaker loop for a limited number of times. The sound file is almost 5.5s long, so you'd need to wait at least 5.5s between each trigger.

One way to get that timing is to make a trigger_timer and a trigger_count. Give the trigger_timer the spawnarg "wait" "6" and target both speaker and trigger_count. Give the trigger_count the spawnarg "count" "3" and target back to the trigger_timer. To start the ringing trigger the trigger_timer, after 3 rings the trigger_timer will be stopped by the trigger_count.

Edited by Dragofer
Link to comment
Share on other sites

Thanks, Dragofer, I'll give this a try. I should clarify this by saying that I want the bells to right right when the player walks out of a building. And of course, the bells shouldn't keep going on and off should the player keep going in and out of that building

Link to comment
Share on other sites

@Amadeus

This is actually quite simple. Thought Dragofers setup would work, I would do it a bit different.

Have trigger_timer and set "wait" to 4 seconds or something. Have the trigger-timer trigger a trigger_sequencer and have 2 speakers with the same bell sound. Have the trigger_sequencer target first speaker1 then speaker2 then speaker one again, if you want to hear the bell 3 times, and if you want 4 bell rings, target speaker1 again etc. This way it doesnt get totally silent before the next bell rings, and will sound more natural.

You have to trigger the trigger_timer with the door or make a trigger_once to trigger the trigger_timer. I can put up a .map file like yesterday if you wish ..

Edited by STRUNK
Link to comment
Share on other sites

Map files are always welcome :) after having read all of the sound and trigger pages on the wiki my brain is a little fried, ha. Plus, it's always easier for me to take things apart in a map and figure things out that way

Edited by Amadeus
Link to comment
Share on other sites

@Amadeus

Here you go. It's next to the grill light setup. I made a trigger_once for the triggering by the player. To make this trigger just draw a brush, keep it selected, rightclick and choose create entity, there choose trigger_once and click add.

https://filebin.net/0z4nf4miml7jo77n

 

Edited by STRUNK
  • Thanks 1
Link to comment
Share on other sites

@Amadeus

Lol. I have been there. Once you understand triggers they are very simple tools to make all sorts of things happen. But I think for more complex things, like the doors I made that open only from the inside, the stim/response editor would be easyer, so I'm trying to understand how that works by looking at springheels Trap tutorials, but ist's still not clear what the basics are : )

I set this video to where the stim/respons part starts in the first Trap video

Somehow the Wiki about this editor doesn't make a lot of sence to me ... probably because I lack some basic understanding about game development. It's all very new to me, but that is the challenge ofcourse: learning new things ... I wish I had this when I was a teen : )

Link to comment
Share on other sites

About Stim/Response.

There is a Response effect "Set Light Color", so I guess it can change the "color" value  of a light .. but I don't get how to trigger it with a simple switch.                                                                                                                                                                                                                                                                                                                                                             The switch should be selected, then open the Stim/Response editor, make a custom stim, and make the response  "Set Light Color", and fill in the info needed ... right?

But what should be the stim?

Edited by STRUNK
Link to comment
Share on other sites

In the simplest case: frobbing already is a stim, so give the switch a response to STIM_FROB (that is, the Frob stim type).

The catch here is that S/R alone doesn't give you a way to do one thing when a switch is frobbed 'on' and another when it's frobbed 'off'. The dining room in ITB has switches that fade the lights but I just used two switches.

Edited by VanishedOne
  • Thanks 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

6 hours ago, STRUNK said:

About Stim/Response.

But what should be the stim?

One thing that took me a while to understand was that you only need to define a response in 90% of cases. The stim is the info the entity needs to activate the response. I.e. if you frob something, the player emits a frob stim and the frob response on the entity is activated. If you want an entity to react to fire, you need a fire response etc. The stim part is only needed if you want an entity to emit a stim. E.g. the short match (player tool) emits a fire stim at its glowing end, so anything that has a response to a fire stim will react to it, when the slow match gets close. Another example would be a damage stim on an entity. This will damage anything in a certain radius around the entity. That way you can create stuff like toxic fumes etc. The S/R system is quite versatile. Not quite as powerful as scripting (as it is restrivted to certain effects), but more user friendly. Yet, it may help if you think of it as a little script: The stim is the requirement "if Stim happens" and the effect is ... well ... the effect "do stuff". The downside is that you only have the stim as a requirement and cannot define more like "if Stim happens AND light is green, set light colour to red". If you want to do that you would need a script or a more complex setup like VanishedOne suggested.

  • Thanks 1
Link to comment
Share on other sites

I'm experimenting with adding some fog to a section of the sewers in my FM, but I'm getting an unfortunately sharp drop off between the section with and without fog. Is there a way to  soften up the edges here instead of having an unrealistic line?

judge_2019-10-09_23.59.25-2.jpg

Link to comment
Share on other sites

Afaik TDM engine (idtech 4) Fog works inside a box volume, so you need to encapsulate the entire area that you want to have fogged, in a way that you don't see the volume edges or you need to tweek the fog material texture gradient to hide the edges.  

Things I would try, play with the fog alpha, shaderParm3 keyword in DR if i'm recalling well (give it a big value like 1000 ).

Try other existing fog materials.

Make a custom fog material that has a smooth round gradient, stronger in the middle less at the edges. 

If that doesn't work in the way you want, you could try putting another fog volume at the border of the other, with much less fog to simulate the fog becoming less and less dense, but I never tried that so I don't know if the edges will go away.

Hopes this helps. 

Link to comment
Share on other sites

IIRC there's a spawnarg relating to boundaries of fog. I don't remember how it goes, though, and whether it achieves what you're looking for.

Another idea is to adapt a script fragment from Obsttorte to fade the fog's density over time as the player changes between locations. But it doesn't seem like fog entities respond to their shaderParm3 getting changed, unfortunately, so this wouldn't work. Had a test map where I just flat out called $fog.setShaderParm(3,10000); on a dense foglight.

void fade_fog(entity location_name)		//reduces the density of a foglight with the name 'fog' by increasing shaderParm3 when entering a location with the name 'location_name'
{
    float i;
    for (i=0;i<100;i++)				//for the next 100 frames (i = iteration)...
    {
        $fog.setShaderParm(3,1000+(i*10));	//add 10 to shaderParm3, from a starting value of 1000
        sys.waitFrame();			//repeat next frame
    }
}

//this is a start - would require variants to increase & reduce density and be called by moving to specific locations                       
                     

 

Edited by Dragofer
Link to comment
Share on other sites

On 10/4/2019 at 7:58 PM, duzenko said:

@JackFarmer

Do you think you can try this?

@duzenko This should be applied on the roof section to the left in your picture? If so, sure,

I have applied the other changes (func_statics without shadows) already and have removed a fatal setting I included with certain AI patrolling outside the building which disabled a vital script grayman did for me. :(:(:(

I will get back to you with a new dmap asap. After that, I will ask nb to upload this new version (if ok for you).

  • Like 1
Link to comment
Share on other sites

11 hours ago, krrg said:

I'm experimenting with adding some fog to a section of the sewers in my FM, but I'm getting an unfortunately sharp drop off between the section with and without fog. Is there a way to  soften up the edges here instead of having an unrealistic line?

 

It's time to revisit our fog implementation. It looks like ad-hoc, last-ditch effort by id to create an effect they never really cared about. It's non-linear in Z-direction and is plain unnatural.

 

Quote

This should be applied on the roof section to the left in your picture? If so, sure,

It should be pretty obvious. The disjointed parts are better off as separate surfaces here because they are high-tri and touch many lights. I know this goes against what you did in HH:I with merging models. But you should see that those were many dozens of models 'around' the room and this is just few models in the 'middle'.

Link to comment
Share on other sites

What is causing this shadow across the ceiling? As you can see in the bottom image, which is the same spot, there's

a monster clip over a wall light fitting, but nothing else. 

7YJBuad.jpg

lHd68cI.jpg

Edited by NeonsStyle
Fixing images

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

@VanishedOne  @Destined

I've made Springheels trap and ofcourse that works. Then I started eperimenting with other responses and it seems that a lot of them just don't work. For instance the set spawnarg does't do anything, the frob acts really weird on a door, the set Model makes te model disappear (maybe the new model, that would be the response appears in an other place because the model I tested was not made on the zero point of the editorfield), and there were some more things. The set color works on a basic light source, but not on the grill light .. but the set spawnarg doesn't work, so I cant change the color of that light.

Is this stim/response editor "broken" or something? Did it all work before?

 

Link to comment
Share on other sites

Set spawnarg has the problem that it sets a spawnarg, i.e. an argument that is set, when the entity is spawned. After spawning this does not do anything anymore (with very few exceptions). In order to work better, you would need set keyVal (this is possible via script), but even that does not work for everything.

Frob acting weird on doors may be, because doors use a frob action script on their own. It may be that there is some interference there (though I am not sure why; some people with more knowledge about the code would have to chime in here). For this to work better you could try to target a trigger with the door and let the trigger trigger a response. At least, I think that a trigger entity gets activated, when it is targeted by a door.

For set model, I am not sure why it does not work for you. I am currently using it in my WIP and it works fine. Maybe you have the path of the model wrong, so it uses a nodraw model instead? In my case, I am replacing a filled quiver with an empty one and the path for the new model is "models/darkmod/wearables/quiver.lwo". Note that you have to include the whole "models/darkmod/[subfolders]" part, when you choose the model.

I am not sure what the problem with the grill light is. Maybe you could elaborate, what you want to achieve and which response and response effects you have used.

So to summarize, at least most (don't want to say all, because I don't know for sure) of the response effects work, but many have some restrictions that are not that evident or need a specific format in which the arguments have to be set (like the model case). As said before, with scripts you can do a lot more, but these are also harder to grasp.

  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Dragofer said:

IIRC there's a spawnarg relating to boundaries of fog. I don't remember how it goes, though, and whether it achieves what you're looking for.

noFogBoundary stops foglights painting on the boundaries of their volumes, but they'll still paint on geometry inside the volume, so I'm pessimistic about its being a complete solution in this case.

3 hours ago, duzenko said:

It's time to revisit our fog implementation. It looks like ad-hoc, last-ditch effort by id to create an effect they never really cared about. It's non-linear in Z-direction and is plain unnatural.

 

I'm not even sure whether id Tech 4 foglights work the way id intended to make them work: there's a Doom 3 file with a lengthy comment indicating they can be manipulated via the light texture's alpha channel, but my experiments got nowhere.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

@Destined

Ok, the spawnarg is clear now, but I don't really understand what the benefit is over setting this value via a stim/response, instead of in the entity window. Do you have an example in what scenario this would be applicable?

The frob action made the door open and close a little bit for like 10 times in a short time .. it was ratteling and stayed closed. To trigger a door to open I would use triggers anyway, but this was a testing setup. I found that the frobable response did work on the same door, and I could make it un-frobable.

I tried the same door model, but the reversed one and copied the whole path .. and tried the same size model wita different skin ... didn't try other models.

I Would like the light to change color, but the Set Light Color response doesn't work on the model, but does work on a light source. Something that is probably obvious for people who understand it all : )

I got to understand triggers. They are simple blocks but you can make complex things happen with them, because there is a lot of types with different functions. But I still do not understand why/how the Trap 1 works ... why does the touching of the entity with te responses defined, the tile, trigger these responses when it touches the stem/trigger? What is the relationship between the stem/trigger and the falling tile?

How to make a light turn of by shooting a fire arrow at something else .. for example?

 

 

Link to comment
Share on other sites

5 hours ago, VanishedOne said:

I'm not even sure whether id Tech 4 foglights work the way id intended to make them work: there's a Doom 3 file with a lengthy comment indicating they can be manipulated via the light texture's alpha channel, but my experiments got nowhere.

I misremembered this somewhat; here's what it actually says:

// If you replace the default internal fog projection image with your own
// texture, make sure that the alpha starts at 0 in the center, reaches
// 255 at the borders, and is generally radially symetrical.
// The color channel can be left solid white, or it can have additional
// color changes with position.

I messed about with both RGB and alpha channels to no apparent effect. I think I tried the same on the falloff image too.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

2 hours ago, VanishedOne said:

I misremembered this somewhat; here's what it actually says:


// If you replace the default internal fog projection image with your own
// texture, make sure that the alpha starts at 0 in the center, reaches
// 255 at the borders, and is generally radially symetrical.
// The color channel can be left solid white, or it can have additional
// color changes with position.

I messed about with both RGB and alpha channels to no apparent effect. I think I tried the same on the falloff image too.

I suppose the fog lights textures are ATM fixed. Not sure about vanilla d3.

Link to comment
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.


  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...