Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

On 9/29/2019 at 6:57 PM, joebarnin said:

Here's something I did - maybe it'll work for you. Create a thin no draw brush (e.g., tdm_nodrawsolid_wood) that lays on top of the door (in front of it). Convert it to func_static. Set frobable=1. You may have to set frob_distance to a value too. This will 'catch' the frob and prevent the door from getting it. At least, that's what I think happens. Anyway, it worked for me.

Specifically, I was having trouble with a user frobbing a switch from the other side of a wall. The switch was on side A of the way, but the player could frob it from side B. So I put the frobable brush on side B, and it blocked the switch from getting frobed from side B.

Thanks Joebarnin.

It seemed like a good and simple solution, and it is in your case, but frobability for a large suface does't really work, and it didn't work for my situation.

But I hava found a solution!

Onesided-frobability.png

 I have 3 large double doors opening into a garden. These doors typically only have a latch on the inside, and thus I wanted them  to be opend from the inside only.

The Inside trigger binds to Sliding Door 1, and is set to be open at gamestart: the trigger will be under the surface .

The Outside trigger binds to Sliding Door 2, and is set to be closed (default) at gamestart: the trigger will be above the surface , and triggerable.

Since the In- and Out-side trigger target both Sliding Doors, one starts open, one closed, there is always one up and one down, like a seesaw.

The Sliding Doors (not on open, not on close but on "triggered_when_opened"), trigger the "atdm_target_set_frobability"  "Frob 1, 2 & 3"  to on and off. 

When a door is open, you should always be able to close it, and the  "atdm_target_set_frobability" brush only works when the whole door is inside.

Having the "trigger_on_close" argument set, the door targets the "atdm_target_set_frobability" aswel as TR (the "trigger relay").  It "refreshes" the frobabillity on/off state, because the "trigger_relay" has a very short delay:   The door closing triggers the Frob on/off and immediately triggers it again via the relay, so on will be on, and off will be off, after the "refresh".

Edited by STRUNK

Share this post


Link to post
Share on other sites

This sounds rather complicated, but as long as it works, it is fine. And while I am sure you have a good reason for a one way door, I agree with peter_spy that you should somehow communicate to the player that this is the case (and not just via readables; expect not everyone to read those). I am a player that always closes doors behind him (there is the possibility that guards get alarmed by doors left ajar, if the spawnarg is set) and it would be frustrating to get out, close the door and the notice that I have to backtrack or reload, because I have forgotten to do something inside and cannot open the door from the outside.

Share this post


Link to post
Share on other sites
1 hour ago, Destined said:

This sounds rather complicated, but as long as it works, it is fine. And while I am sure you have a good reason for a one way door, I agree with peter_spy that you should somehow communicate to the player that this is the case (and not just via readables; expect not everyone to read those). I am a player that always closes doors behind him (there is the possibility that guards get alarmed by doors left ajar, if the spawnarg is set) and it would be frustrating to get out, close the door and the notice that I have to backtrack or reload, because I have forgotten to do something inside and cannot open the door from the outside.

I understand your and Peter's concern, but these doors are not key to the gameplay, but mainly for looks. They have a lot off glass so you can look from the garden into the livingroom and vice versa. Just around the corner there is a window you can get into the same room, and there are 2 other doors where you can enter the house.

 

 

Share this post


Link to post
Share on other sites

I'd vote for something as simple as possible, e.g. doors barred with a plank, blocked with several crates. Since this is a garden, maybe use a barred (see-through) gate, so the player has gets clear message that this opens from the other side. Games from old-school era had a screen message displaying when certain doors were openable from the other side, although this is a bit immersion-breaking.

Share this post


Link to post
Share on other sites
42 minutes ago, peter_spy said:

I'd vote for something as simple as possible, e.g. doors barred with a plank, blocked with several crates. Since this is a garden, maybe use a barred (see-through) gate, so the player has gets clear message that this opens from the other side. Games from old-school era had a screen message displaying when certain doors were openable from the other side, although this is a bit immersion-breaking.

The doors are see through and have the function of windows. If they were windows that could not be opened, it wouldn't affect gameplay. That they can open is an extra, just because it looks good, and because I like to do things differently : )

Share this post


Link to post
Share on other sites

peter_spy, Destined

I made you a screenshot. I think it looks very nice : )

 

Doors.png

 

 

Edited by STRUNK
  • Like 2

Share this post


Link to post
Share on other sites

It looks nice. A simple way of comunicating that these are openable only from the inside would be to let them open to the outsied (which I assume they already do, bacause of the curtains) and let them have a  handle only on the inside. This might suffice to suggest that once they are closed from the outside, you cannot open them anymore, because you have no handhold with which to pull them open.

Share this post


Link to post
Share on other sites
On 10/2/2019 at 7:39 AM, Destined said:

It looks nice. A simple way of comunicating that these are openable only from the inside would be to let them open to the outsied (which I assume they already do, bacause of the curtains) and let them have a  handle only on the inside. This might suffice to suggest that once they are closed from the outside, you cannot open them anymore, because you have no handhold with which to pull them open.

That was the exacly the reason why I wanted them to be opend only from the inside: there is only a handle on the inside, and they open to the outside : )

I made the latch on the door handle to move also when the door is closed , and replaced the standard sound to one that sounds like it locks again with i click.

Door-Latch.png

 

 

Edited by STRUNK
  • Like 1

Share this post


Link to post
Share on other sites

Something about making model.

I make models now in dark radiant but I saw posts about using blender for that.

Does blender give a lot more posabilities and is it hard to learn? -- Does anyone know about good beginners video tutorials for that, and/or a tutorial that shows in short what you can do with it?

Share this post


Link to post
Share on other sites
On 9/29/2019 at 7:36 PM, joebarnin said:

#1 - I found this in tdm_events.script:

/**
 * Initiates a translation back and forth along the given vector with the given speed and phase.
 */
scriptEvent void        bob(float speed, float phase, vector distance);
 

So maybe that's a way to get things to bob or stop bobbing? I tried a few experiments but couldn't get it to work, but maybe you'll have better luck.

Thanks Jeff,

Sorry, but I do not understand what you mean.

Do you think there is no fitting "start/stop" spawnarg defined for that entity?

Share this post


Link to post
Share on other sites

@STRUNKI'm a mapper first and foremost who's literate in Blender, which I'd say has made my life easier. Not only because some modelling steps (i.e. punching a hole in a cylinder for a door, working with mirrored meshes, or modelling by tracing a reference picture) are considerably easier in Blender, but also because I'm able to modify existing models to fit my map.

Blender also offers more advanced features, like a proper UV tool for custom model textures and baking from high-poly meshes, so that you can make 'real' models. However, I found that kind of work to be time consuming and distracting from my actual mapping (at one point I was so busy modelling for my maps that I was given the 'Modeller' title in the forum), so in my experience I'd advise a mapper to stick to 'simpler' modeling that just reuses existing textures. You don't need Blender for that kind of modeling - DR can in most cases get similar results, just that DR would usually be more time consuming. You can make fairly elaborate stuff in DR: ERH+ has made multiple gigantic highly detailed submarines, while I've made carriages and ships entirely out of brushes and patches.

I think a good basic level of Blender skill to aim for as a mapper would be to make a wheel from scratch and get it ingame. That'd put you in a position where you've got a feeling for the various ways to manipulate vertices and can make or modify models on that basis.

Blender is typically considered difficult to learn, but I found it was alright when I focused on it for a week or two, watching tutorials and noting down all hotkey combinations I come across. What I used personally to get a foothold in Blender was this very generic teacup tutorial (don't need the renderer stuff at the end), then numerous short videos on various aspects as I needed them (how to mirror, how to set a reference picture as background, how to restrict editing to an axis, how to change the origin etc.). One video I remember quite well was this sword timelapse, showing how you can draw irregular shapes by hand - that possibility really got me motivated to learn more about Blender.

Edited by Dragofer

Share this post


Link to post
Share on other sites

DarkRadiant, as most game editors, isn't meant to be a modeling tool, it's an integration tool for all your assets (models, textures, materials, sounds, text, everything that your map consists of). It does have more tools to make shapes than an average game editor though. If you want to make models faster, with full control over all aspects of what you do, proper modeling software is a way to go. It requires some time investment first, and making good models always takes time.

But that was always kind of natural path for one mapper projects in all game editing communities. First you learn the editor and game design basics with stock assets, then you start creating your first textures and materials, then you jump into modeling.

 

Edited by peter_spy

Share this post


Link to post
Share on other sites

Dragofer, peter_spy,

Thanks for the reply. Making custom models is timeconsuming indeed, but somehow I alway want things at some point that are different from what is already available, so I try to make them myself. After skipping through the tutorial I think I stick to making models in DR for now : ) It seems rather complicated to work with blender, and I'm afraid I would make models that are far too smooth, and wouldn't really fit with the given models in DR ...

One thing I have been thinking I might need for what I am building now is a custom backrop/skybox. I saw one that Springheel made with a city backround, and sky above. I need one with a background of trees and bushes and a sky above ... but how to make it?

 

Share this post


Link to post
Share on other sites

@STRUNK a skybox is just a map area in miniature (1/16th scale) with a camera in the middle. You can take one of the existing skyboxes and add a forest floor as well as downscaled trees and bushes.

My suggestion in this case would be to give the vegetation models the spawnarg "rotation" "0.0625 0 0 0 0.0625 0 0 0 0.0625", this is the so-called rotation hack that'll reduce their scale to 1/16th (0.0625) in all 3 dimensions (normally you'd use the model scaler but in this case I'd imagine it to be less cumbersome).

Another suggestion is to place the forest skybox outside of your ambient light so that the vegetation is dark like in Down by the Riverside or Vitalic Fever. When you're happy with your skybox you can export all the vegetation as a single model to save drawcalls.

  • Like 1

Share this post


Link to post
Share on other sites

How do you prevent brushes with the same material from being merged during dmap? E.g. Vitalic Fever has this wooden mega-surfaces that spans almost across the entire map and touches dozens of small lights. It's killing fps.

Untitled.jpg

Untitled2.jpg


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites
31 minutes ago, Dragofer said:

@STRUNK a skybox is just a map area in miniature (1/16th scale) with a camera in the middle. You can take one of the existing skyboxes and add a forest floor as well as downscaled trees and bushes.

My suggestion in this case would be to give the vegetation models the spawnarg "rotation" "0.0625 0 0 0 0.0625 0 0 0 0.0625", this is the so-called rotation hack that'll reduce their scale to 1/16th (0.0625) in all 3 dimensions (normally you'd use the model scaler but in this case I'd imagine it to be less cumbersome).

Another suggestion is to place the forest skybox outside of your ambient light so that the vegetation is dark like in Down by the Riverside or Vitalic Fever. When you're happy with your skybox you can export all the vegetation as a single model to save drawcalls.

Wow, that sounds like super easy to do and completely finetuneable : )

Great! I like this. Thanx a lot Dragofer : )

Share this post


Link to post
Share on other sites
38 minutes ago, Dragofer said:

Another suggestion is to place the forest skybox outside of your ambient light so that the vegetation is dark like in Down by the Riverside or Vitalic Fever

So, wait, should all skyboxes be outside of the ambient world light? Is this typically done for most skyboxes?

Share this post


Link to post
Share on other sites

@STRUNKit sure is easy, that's how I did it in Down by the Riverside, if you need an example. I haven't merged the vegetation into a single model there though because that DR feature didn't exist yet.

@Amadeusnot at all, it was just a trick I used to turn the vegetation in the skybox into black silhouettes. When the skybox was still lit up the vegetation looked very off in my opinion, you could see all the details and all the colours even though it was night.

@duzenko as a mapper you can do it by slightly translating the textures on the various brushes so they're no longer aligned with each other, or making some of the brushes a little thicker or thinner than their neighbours. Preventing brush merges is necessary for very large areas because gigantic single-piece brushes tend to delay dmap massively.

  • Thanks 1

Share this post


Link to post
Share on other sites

@Dragofer

I tried with a large brush fitst to see how it works and found out I cant use it for this map, for it's a small map an the trees have to be near, not in the distance ... and my map has a tower ... if I climb it the brush goes up as well ... if it were trees they would look like floating in the sky : D

But still I like that I know a bit how these skyboxes work now ... I could like see birds flying .. or some weird fenomenons in the sky at a key moment.

I figured for now I'd better know how to import a texture into darkradiant, so I can make a "backdrop"  from a screeshot of a row trees of and bushes I make also in darkradiant, so it fit's the game. Do you also know how to do that?

 

 

Edited by STRUNK

Share this post


Link to post
Share on other sites
1 hour ago, Amadeus said:

So, wait, should all skyboxes be outside of the ambient world light? Is this typically done for most skyboxes?

Skyboxes typically need to have their own lights and foglights, so they match the look of the mission. Some distance fog and ambient light within the mission area, and a pitch black skybox is one of the common (and newbie) mistakes I see in FMs.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Dragofer said:

@duzenko as a mapper you can do it by slightly translating the textures on the various brushes so they're no longer aligned with each other, or making some of the brushes a little thicker or thinner than their neighbours. Preventing brush merges is necessary for very large areas because gigantic single-piece brushes tend to delay dmap massively.

@JackFarmer

Do you think you can try this?


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites
31 minutes ago, peter_spy said:

Skyboxes typically need to have their own lights and foglights, so they match the look of the mission. Some distance fog and ambient light within the mission area, and a pitch black skybox is one of the common (and newbie) mistakes I see in FMs.

What I've begun doing with 2.07+ is to have ambient_world covering the mission area, and a separate ambient_world1 that exactly matches ambient_world, but only covers the skybox. I don't know if it'll still be the case with 2.08+, but duzenko and I found that trying to cover both the mission area and the skybox with the same ambient entity led to problems debugging visportals with the r_showportals/1 console command. By splitting the work, visportals show up just fine.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

It's possible to let the skybox camera follow the player's movement , so that it flies in a miniature representation of your map and its boundaries in your skybox. This way the trees won't rise with the player when climbing the tower, and the player would be able to climb up and look out over the tree canopies (advisable to use fog to limit the amount of trees visible). Also, you can get the trees to look quite near by placing them closer to the centre of the skybox. Grayman is the expert with this kind of skybox, he's used them in Home Again. Might also be worthwhile to look at Exhumed's Skybox, because it contains a landscape that's contiguous with the play area.

An issue I had with this kind of skybox is that you can come close to the ceiling of stars. Binding the stars to the camera to keep a fixed distance isn't suitable because the stars will rotate with the player. This remains an open question for me - only way I see is to use a repeating script to move the ceiling to a fixed vertical distance from the camera.

If you want to make textures from screenshots you can use F12 to save a .jpg of your screen, saved in darkmod/screenshots. After that you can with the help of the wiki convert it into a TDM texture (you only need to make a diffusemap for this kind of texture). You'll need GIMP and a plugin for it that can export to .dds.

Edit: what is it with this new forum's autoformat........ quotes, urls, formating, pictures all screwy

Quote
Edited by Dragofer

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.


×
×
  • Create New...