Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

I want to create the following setup:

a. The player must not enter a certain area (airlock) before he found a certain item (explosive).

b. If the player enters the airlock without possessing the explosive, then the objective AND the mission shall fail.

c. If the player enters the airlock and possesses the explosive, then the relevant objective shall be completed and the player can move on to the next area.

 

I have created the following with the objectives editor, but I do not get it working in any way. Maybe I am confusing some things here...

 

objectives.jpg.b38d1de41b6b4d97daeabccd3b7ec7bd.jpg

Share this post


Link to post
Share on other sites

I have a large irregular rock (stock object rubble_large_3.ase with defined skin rubble_mossy) that I scaled up to be even larger with DR rescale. The player sneaks across it to get to a lootpurse, and it occurred to me that this would be easier if the footfalls were quieter. As an experiment, I tried covering it with multiple slab brushes in DR, with a tdm_nodrawsolid_moss texture. This quieted the footfalls, but the inevitable nasty slab collisions, abutments, and protruding edges made walking too weird. Is there some other way to associate a sound shader for walking with a irregular-shaped model?

Other things I tried -

- making a rock copy and applying the sound shader texture to that, but that was ignored. (If it had worked, I would have overlaid the copy and original, with the copy being slightly higher vertically.)

- setting "solid 0" on the slabs (once converted to func_static). That destroyed the quieting effect too, so useless.

This is not real important to solve, so if there's no quick & easy solution, that's OK.

Share this post


Link to post
Share on other sites

Perhaps gift-wrapping the walking surface of the rock with a single moss patch snugged to fit?

Share this post


Link to post
Share on other sites
14 hours ago, Dragofer said:

@JackFarmermight be you need to set the objective as ongoing?

I've tried as per your suggestion, but that does not change anything. :(

I already found one mistake: I used the objective "Entity in info location" instead of "Entity in location", but it is still not working.

I will create a test map for the objective and start from scratch.

UPDATE:

@Dragofer

You've pointed me in the correct direction; the component "DO NOT" needs the flag "Satisfied at start".

Now it works as it should. Thank you!

 

Edited by JackFarmer
  • Like 2

Share this post


Link to post
Share on other sites
11 hours ago, Geep said:

Is there some other way to associate a sound shader for walking with a irregular-shaped model?

The usual way would be to break up the model into two and apply two materials, one for stone, one for moss, while using the same UVs and texture set.

Share this post


Link to post
Share on other sites
15 hours ago, Geep said:

- making a rock copy and applying the sound shader texture to that, but that was ignored. (If it had worked, I would have overlaid the copy and original, with the copy being slightly higher vertically.)

I would have tried this the other way around. You overlay the copy (invisible but solid; the caulk-like one made just for footsounds) and the original with the copy being even or slightly lower vertically, then you make the original non-solid so the player is really walking on the copy thinking they are walking on the original. This also allows you to simplify the geometry to something a bit flatter and AI-friendly and usually the player can't tell as long as the difference is slight. 


What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites

Thanks for the ideas, grayman, peter_spy, demagogue. I'll see what I can do with 'em. Demagogue's is one I could apply with my current skillz, so will try that first. A concern is that there might still be walking difficulties (as with what I tried earlier with the cap slabs), even with more simplified geometry. Peter_spy's method seems like it would involve a roundtrip to Blender. Grayman's I would need to learn how to shape irregular patches (recommended video for that?)

Share this post


Link to post
Share on other sites

@Geep practically speaking, you can implement the general idea of what's already been said before by copy pasting the stone's material (=texture definition) to make a new one with the single difference that it's stated to be moss and not stone, then making a skin with the new material.

  1. Check which material is used by the moss skin of the rock: it's textures/darkmod/stone/natural/rock_grey_mossy
  2. Look this up in the texture browser -> right-click it in the list -> show shader definition -> copy the whole block of text (this is the material)
  3. In your materials folder, find or make an .mtr text file to paste this block of text into
  4. Rename the material to i.e. textures/darkmod/stone/natural/rock_grey_mossy_moss
  5. Change stone to moss, near the top of the material
  6. Make a new skin for the rock that replaces the rock's default texture (textures/darkmod/stone/natural/rock_grey) with your new modified one (textures/darkmod/stone/natural/rock_grey_mossy_moss)

The engine should now treat this model as if it were made of moss instead of stone.

Edited by Dragofer

Share this post


Link to post
Share on other sites
49 minutes ago, Geep said:

Grayman's I would need to learn how to shape irregular patches (recommended video for that?)

No video I know of.

Create a nodraw moss patch to cover the walking surface of the rock.

Give the patch lots of triangles:

patch.jpg.72bb74b359160921859ba4ca59b72822.jpg

 

Select the patch and switch to vertex mode.

Select the individual vertices and pull them down to a couple units above the rock surface below.

See if you and the AI can walk across the patch.

 

Share this post


Link to post
Share on other sites

Tried Dragofer's method, which would have the advantage of no additional vertices (and faster if ever doing multiple rocks). I was able to replace the default skin with the custom skin, but the walking sound was still unmuffled. Same when I used:

    surftype15
    description "moss"

instead of just word "moss" to replace word "stone" in step 5. Sigh.🙁

BTW, when replacing skins in this case, the skins don't show up in the "Matching Skins" folder, instead in the "Other Skins" list. I imagine that this is because I'm using rescaled models, which append _scaledn to the model name (where n is a number, and DR doesn't yet handle this when grouping skins. Guessing this is a known issue.

Probably on to grayman's giftwrapping next.

Share this post


Link to post
Share on other sites

Giftwrapping did the trick. Though after positioning 15x15 = 225 vertices, my index finger is SOOooo numb. Brain too.

Did a first pass to hide all vertices below the rock surface (ideally slightly below), then raised the whole mesh up until roughly 80% of the rock was beneath it. In a second pass, for selected vertices near the 20%, raised them just enough to hide the remaining rock.

No problem walking, and quietly.

Share this post


Link to post
Share on other sites

Alright, I know this has been asked a few times already but I just can't get this to work. Everything I try to use the readable editor, I get the message "Mod path not defined. Using base path". So I went to Project Setup and made sure my WIP was in the fms folder, but when I hit save, DR freezes. No matter what file path I type in, I keep getting "Mod path not defined...." I don't know what to do. Help!

Edit: Every time I try and save a readable, a new folder shows up in my dark mod folder called "base". Then there is an xdata folder in there, but no xd file. I'm very confused as to what the issue is here

Edit 2: And now, when I select the "GUI definitions" icon in the readable editor, DR crashes, every time. I'm using version 2.7.0 btw.

Edited by Amadeus

Share this post


Link to post
Share on other sites

When you select File > Game/Project Setup... you should get a dialog like this:

image.png.aa65c380ba0d0d52c896bc5ea9ed4940.png

DarkMod Path is where DM is installed. "Mission" should be the mission folder you are modifying. You should be able to pick it from the drop down list - it's a list of all of the folders with the /fms folder (within /darkmod). Is this what you see?

Share this post


Link to post
Share on other sites

I've tried this already, but every time I hit "save" Dark Radiant crashes. I simply can't change this without DR crashing. I wonder if I can just copy/paste my WIP into a blank map after configuring the correct darkmod path....

Share this post


Link to post
Share on other sites

When you set the Game/Project setup, DR loads files from the mission. My guess is something about that is causing the crash. The DR log file might have some clues? I found mine in: C:\Users\<user name>\AppData\Roaming\DarkRadiant\DarkRadiant.log (where <user name> the name you're logged into Windows as).

1 hour ago, Amadeus said:

I wonder if I can just copy/paste my WIP into a blank map after configuring the correct darkmod path....

Yeah, try this maybe: make a new, blank WIP (maybe start with the Startpack). Set the Game/Project setup to this WIP,  see if that works. Then try to use the readable editor. If everything works with the "blank" mission, drop in your existing WIP files into the new project, and see if things still work. That might help narrow things down.

Share this post


Link to post
Share on other sites
9 minutes ago, joebarnin said:

My guess is something about that is causing the crash. The DR log file might have some clues?

Thanks Joe, I'll take a look at this later and see what I find

Share this post


Link to post
Share on other sites

Best of luck in this endeavor. Copypasta has saved my WIP 4 or 5 times now. When I forget to back up, I am lucky I send it to my brother to screw around with once a week or so, so I always have a fallback plan B and C. A little backtracking and catch up is better than starting from scratch.

Share this post


Link to post
Share on other sites

@Amadeus while you're already in the AppData/Roaming folder, maybe you could try to backup & delete the the files in there? The last time I've seen an unhandled exception was because users.xml got corrupted, so maybe this is along the same lines. If it fixes the issue it'd be worth uploading the broken files to the bugtracker.

Share this post


Link to post
Share on other sites

Hmm, it's worth checking Dragofer. I managed to successfully copy/paste map into a new file with the correct path, and so far no issues. If the users.xml gets corrupted, do I just reinstall DR?

Edited by Amadeus

Share this post


Link to post
Share on other sites
Quote

If the users.xml gets corrupted, do I just reinstall DR?

That's the tricky thing about it, users.xml stays unchanged when reinstalling DR, so you have to go and find it in that hidden AppData folder. Fortunately Orbweaver fixed that particular unhandled exception in 2.7.0.

Share this post


Link to post
Share on other sites

A general question: Is it possible to playback a "full screen" video clip for a cutscene in a FM, as opposed to a live puppeteering  of AI?

If so, this would have some advantages. The dev could -

- pre-record (using a screen-recording tool) multiple takes of AI action that is a bit unpredicable, selecting the best take

- do rapid, multiple quick edits (using a video editor) that would be tedious to do with TDM scripting and camera placement

- possibly incorporate elements beyond TDM game assets (e.g., models of giraffes, children, dirigibles, etc.; crowd scenes, and so on )

  • Like 1

Share this post


Link to post
Share on other sites
Quote

A general question: Is it possible to playback a "full screen" video clip for a cutscene in a FM, as opposed to a live puppeteering  of AI?

@Geep it is indeed, you need to setup a new GUI material as per these instructions and you'll be able to texture ingame surfaces with that material - note that you should use FFPMEG instead of ROQ video format nowadays. You'd probably want to teleport the player into a dark quiet room, activate a func_camera and let that surface cover the whole view of the camera, but you could even have the video as a fully integrated part of your map (like Greebo did with this laptop in 2007):

Builderlaptop.jpg

 

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...