Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


Recommended Posts

Yes, but snapping to grid doesn't seem to do anything at all when I do that.

Link to post
Share on other sites
  • Replies 10.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

So I have this gigantic scorpion, it is made out of pendulums bound together. I had an idea about dragging whole thing through a piled up crates (pretending to be stone blocks in a wall), but it looks

I'm just going to make the lute player an undead immortal skeleton called Ralph who is eternally bound to play his lute in the tavern, the residents are used to him now so they just happily co-exist a

So I just did a little test because I was curious to know this as well.   So far i've figured out that the mesh we see in the mirror is located as "models\md5\chars\thief\tdm_ai_thief.md5mesh" and if

Posted Images

When snapping a fs to grid, it snaps the rigin to grid. If you want to snap a prefab to grid, I would try this one a very low grid size and than move it by hand. In addition, it works better if you go to vertex mode and align the vertices instead of the brushes/patches themselves.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

I have an outdoor area of my map that lags and I was wondering what would be a good way to tackle this. Is it doing visportals?

 

I remember reading that you could place visportals basically near the walls which should improve performance.

Link to post
Share on other sites

You visportal so that architecture beyond closed portals isn't rendered, so the architecture should be designed so that big chunks of it are regularly getting put behind closed portals, i.e., somewhat maze-like. Another thing you can try is having fewer lights and making sure lights don't overlap, through reducing the light count, moving lights or reducing their radius, etc. Each time a light hits a surface it runs another render pass. You might find some other ideas in this wiki entry: http://wiki.thedarkmod.com/index.php?title=Performance:_Essential_Must-Knows

  • Like 1

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

Link to post
Share on other sites

I have device similar to periscope: button-ocular triggering func_cameraview ("trigger : 1" "cameraTarget : target_null_1").

I'm able to turn it on, but after that mouse buttons do nothing, and after hitting Esc game freezes.

Also I would like to add guis/playertools/spyglass.gui, but don't know how to apply it.

S2wtMNl.gif

Link to post
Share on other sites

You need to retrigger the camera again to return control to the player. I would do it with a script, i.e. activating the ocular starts a script, which:

 

turns on the camera, paints gui, waits some time, then returns control the the player.

 

void camera_view()
{
 sys.println("cam active");
  $head_camera.activate($player1);   // Switch view
  sys.wait(10);		  // Wait for 10s
  $head_camera.activate($player1);   // Return control to the player
}

 

 

And the gui overlays are painted with:

float overlayHandle = $player1.createOverlay( "guis/mygui.gui", 100 );
sys.wait(5);
$player1.destroyOverlay( overlayHandle );

 

Note that everything the camera looks at (entities), must have "cinematic" "1" spawnargs set on it. While the camera is active entities without Cinematic 1 don't do anything. AI would just stand there doing nothing.

  • Like 1

Clipper

-The mapper's best friend.

Link to post
Share on other sites

Is there a way to play a video inside TDM? Like say place the video on a wall and use that? Or is there a way to animate textures? Sort of like a gif if that makes sense

Link to post
Share on other sites

Do you know how resource heavy it is?

 

Could it be used in a skybox for example?

Link to post
Share on other sites

OK, I've set up to have the player drop copies of things from inventory to discrete locations to complete an objective. (IE, place one here, another there, and another over there, but not all three in one spot, and it doesn't matter which goes where.)

 

I can do this via objectives, with the typical item drop (to group), and NOT near another of the drop items. But that requires as many NOT components as there are items to drop! For each objective! So all those distance checks continuously running (less frequent checks would slow feedback to the player...who might be in a rush).

 

It also means it has to be designed to the worst case scenario (largest size possible destination), and objective destinations can't be closer than that to each other (probably not an issue).

 

Might there be alternate ways of setting this up with less impact?

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to post
Share on other sites

You could do this with a script that runs every N seconds. The script would check for the presence of one of each of the three items in the drop areas and trigger the "objective complete" when each drop area contains an item.

 

Some questions ...

 

1 - Does something happen as each item is dropped, or does something only happen when the last item is dropped?

 

2 - How much time passes after dropping the last item before the objective is satisfied (and possibly triggers something else)?

 

3 - Are there more than three of these items?

  • Like 1
Link to post
Share on other sites

You can use ROQ videos as a cube map. Here's the relevant information copy/pasted from a cached version of modwiki...

 

{
  blend add
  texgen skybox
  videoMap loop video/mysky.roq
}

  • The video can be no larger than 256x1536 pixels.
  • Each of the 6 sides of the cubemap are stacked from top to bottom like so...
    • PX
    • NX
    • PY
    • NY
    • PZ
    • NZ

    [*]The PX and NX sides must be rotated so the orientation is the same as if it were a cubemap

Link to post
Share on other sites
1 - Does something happen as each item is dropped, or does something only happen when the last item is dropped?

 

2 - How much time passes after dropping the last item before the objective is satisfied (and possibly triggers something else)?

 

3 - Are there more than three of these items?

 

I was guessing scripting would be an alternative. I don't know if it's worth it though, depending how taxing the objective distance checks might be?

 

Yes, more than three items, but fewer than the amount of potential drop zones (perhaps imagine it like reverse loot? It's too burdensome for the player to have to get every single location, just want folks to be able to place what they are aware of and have options/choices). I won't know the exact number until finishing building the map, and it might be changed based upon testing feedback.

 

Only the "objective complete" currently occurs as feedback for the player at each successful drop. After the final one a new objective should pop up. That timing isn't critical as far as I see at this point, but having feedback within a second for players seems good, or I start to react that it might not be correctly placed.

 

My guess is it'll be easiest to use the objective system as I have, unless someone else has another alternative implementation, then switch to a scripted solution if I, or testers, see negative performance results when there are multiple.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to post
Share on other sites

The objective location entity is going to repeatedly check whether an item is w/in its boundaries. This takes a bit of time, but not much, since the item that it's looking for is marked in a special way, which rules out all other entities w/in the boundaries. If you have to have multiple objective location entities, this increases the amount of time spent looking for these things.

 

Another way to do it--and this could be considered an alternate way if beta testing shows using multiple objective locations is confusing and/or a performance problem--is to have a single threaded script routine that wakes up every second and checks how far away the items are from dummy entities that mark the "center" of the locations. This wouldn't use objective locations, so they wouldn't be thinking every second. The code only has to measure the distance from the "center" of an area to each of the special entities. If any are w/in the desired radius, then flags can be set, or you can complete an objective and use that to say that particular area is "satisfied". Ditto for the other areas. If on a particular check, the code finds that all three areas (or N areas) have been "satisfied" (either by checking flags or objective states), then the routine declares the final objective as complete and the code can quit checking.

 

The advantages of using a script in this way are:

 

1 - no need for multiple objective location entities to wake up and ask for a list of all entities w/in their bounds, and then run through the list looking for special entities (a single script wakes up and just measures distances from an area's "center" to a short list of items)

 

2 - no need to tie specific items to specific objective locations (the script allows any item to be dropped into any area)

  • Like 1
Link to post
Share on other sites

I'm trying to add a custom ambient to my map and it has me stumped.

 

I've got a file called purple.ogg in darkmod/sound/goneinsmoke/

 

In the folder darkmod/sound/ I've got a soundshader file with the following:

 

ambient_purple

{

description "fill in later"

global

omnidirectional

looping

volume 10

sound/goneinsmoke/purple.ogg

}

 

I first tried adding a speaker in-game with s_shader set to "ambient_purple". After that I tried setting s_shader to "goneinsmoke.pk4/sound/goneinsmoke/purple.ogg" and "sound/goneinsmoke/purple.ogg" but nothing seems to work. I can't hear a thing!

 

What am I not getting here?

 

edit: fixed the file extensions. I've actually tried with both .ogg and .wav just to see if the problem was in the sound format

Edited by kyyrma
Link to post
Share on other sites

I'm trying to add a custom ambient to my map and it has me stumped.

 

I've got a file called purple.ogg in darkmod/sound/goneinsmoke/

 

In the folder darkmod/sound/ I've got a soundshader file with the following:

 

 

 

I first tried adding a speaker in-game with s_shader set to "ambient_purple". After that I tried setting s_shader to "goneinsmoke.pk4/sound/goneinsmoke/purple.ogg" and "sound/goneinsmoke/purple.ogg" but nothing seems to work. I can't hear a thing!

 

What am I not getting here?

 

edit: fixed the file extensions. I've actually tried with both .ogg and .wav just to see if the problem was in the sound format

 

Have you reset TDM? For whatever reason if you load in sounds whilst it's still running it wont work but after closing the application and then running it again it should work.

 

Edit: Oh and I forgot to mention that when you are editing your soundshader file (which needs to be the same name as your mapname btw) I usually use the following format because those other settings can be changed in Dark Radiant on the fly

 

Here is an example of one

For my example if I wanted it to play in the game I would setup a speaker which has the s_shader set to "waterdrip"

waterdrip
{
 description ""

sound/sfx/waterdrip.ogg
}

Edited by Goldwell
Link to post
Share on other sites

@Goldwell: Unfortunately I have. Wish it was something as simple, but that didn't seem to do the trick.

 

However I did figure it out!

 

The issue was in the sample rate of the file. My audio was at 48000Hz while the files supported by TDM should be 44100Hz. I had thought I had resampled the files in Audacity, but I hadn't realized you have to change the project sample rate as well before exporting or else the file will revert to 48000Hz while saving.

Link to post
Share on other sites

Also careful with the file name. I spend once a decade toubleshooting, only to find out the audio files are not allowed to have a '-' in their file name. '_' is okay.

 

I dunno if this has been fixed, though.

Clipper

-The mapper's best friend.

Link to post
Share on other sites

I don't think so, as that tripped me up on the last vocal set.

Link to post
Share on other sites

Is there any way to evaluate CPU stress for AI path finding? I have a big city section and planned to make all city guards a random choose for path nodes. Recently deleted most of AI (for dmaping speed) and wonder if difference is due model tris count, or multiple AI thinking how to get from random point A to random point B.

 

edit: is there any key for moving 3d view to selected object?

Edited by ERH+

S2wtMNl.gif

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