Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

One idea: open your <mission>.map file in a text editor (e.g., notepad). Search for "atdm:map_of" and see if there is more than one entity of that type. That will at least confirm that there is only one map_of entity.

 

I remember having to make my lute player stone deaf and blind as a bat in my first mission to pull it off haha.

 

I'm now beta testing my newest mission, and we've run into a bug where the player spawns with two area maps. One called "map" and the one that I have defined in the game with an "atdm:map_of" entity. Does anybody know what the issue could be? I've looked through my entity list and it doesn't appear that I have two map_of entities in the editor. It's also not an item that can be bought in the store. I'm completely stumped on this one, even though it does sound kind of familiar like I had the same or similar problem with my first map. -_-

 

  • Like 1

Share this post


Link to post
Share on other sites

One idea: open your <mission>.map file in a text editor (e.g., notepad). Search for "atdm:map_of" and see if there is more than one entity of that type. That will at least confirm that there is only one map_of entity.

 

 

 

That's a nifty trick! I was just thinking to myself earlier that's it's a shame that the entity list only shows things by name and isn't sortable by classname.

 

Unfortunately however, I did a search and confirmed that there is indeed only one atdm:map_of entity in my map. Where should I look next? Could it be a problem in some definition file or something?

Share this post


Link to post
Share on other sites

I don't know what's causing this. In similar situations, when I'm desperate, what I usually do is search all of the mission text files for the string in question. For example, use Textpad, Find in Files feature, search for "map", include subfolders, files with these extensions: *.vfp *.skin *.map *.pfb *.mtr *.def *.script *.gui *.xd. You'll get a bunch of hits but maybe one will explain what is going on?

Share this post


Link to post
Share on other sites

I don't know what's causing this. In similar situations, when I'm desperate, what I usually do is search all of the mission text files for the string in question. For example, use Textpad, Find in Files feature, search for "map", include subfolders, files with these extensions: *.vfp *.skin *.map *.pfb *.mtr *.def *.script *.gui *.xd. You'll get a bunch of hits but maybe one will explain what is going on?

 

I actually found the problem now, just browsing through the files. Turns out the startmap pack that I always use to get the basics in my map comes with a custom definition to add the map into the game and calls it "map", whereas my atdm:map_of has a customized name, the conflict must have caused TDM to create two separate maps. Thanks for the help!

Share this post


Link to post
Share on other sites

I want to use a skybox with a moon in my next mission, and since artificial lights will be sparse I wanted to actually have it cast light onto the map. This is not something I've played with before and I couldn't find any solid information on the wiki about it. Can somebody point me in the right direction or give me the step-by-step please?

Share this post


Link to post
Share on other sites

If you aren't just using a blue-tinted ambient light for it, I'm guessing a parallel light is what you're after. (Or maybe multiple ones in practice, since they're reputed to have trouble with light volumes' covering multiple visleafs (visleaves?). An ambient cubic light might also suit moonlight but I don't know whether anyone's tried...) This may be of interest, though: http://forums.thedarkmod.com/topic/16046-dynamic-moonlight/


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

If you aren't just using a blue-tinted ambient light for it, I'm guessing a parallel light is what you're after. (Or maybe multiple ones in practice, since they're reputed to have trouble with light volumes' covering multiple visleafs (visleaves?). An ambient cubic light might also suit moonlight but I don't know whether anyone's tried...) This may be of interest, though: http://forums.thedarkmod.com/topic/16046-dynamic-moonlight/

 

Thanks! It seems the parallel light was what I was looking for. It remains to be seen if I run in to other problems once I properly VP my area, but for now it seems to do the trick!

Share this post


Link to post
Share on other sites

What would be the easiest way to modify the candle flame particle to make it a different color instead of the natural orangey-yellow? I was hoping to have some spooky, supernatural lights in my mission. Is there an easy way to do this? Ex. change a few lines in a definition or similar?

Share this post


Link to post
Share on other sites

What would be the easiest way to modify the candle flame particle to make it a different color instead of the natural orangey-yellow? I was hoping to have some spooky, supernatural lights in my mission. Is there an easy way to do this? Ex. change a few lines in a definition or similar?

 

Put this spawnarg on the candle:

 

"set _color on flame" "0.89 0.06 0.13"

  • Like 1

Share this post


Link to post
Share on other sites

 

Put this spawnarg on the candle:

 

"set _color on flame" "0.89 0.06 0.13"

 

That worked to change the color of the light, but the flame itself is still yellow-ish which makes it look goofy. The flame itself needs to change color. I feel like that isn't as easy as changing a spawnarg, but I may be mistaken.

Share this post


Link to post
Share on other sites

It sounds as though you'll need to make a customised version of the flame particles. If you don't want to affect every instance in the FM, you can copy the existing flame particle set-up in DR's particle editor, save the custom one under a new name, and then I think it's the model spawnarg you'd set on the flame to use the custom particles. Edit: model_lit, joebarnin is right.

 

If you're lucky, just changing the particles' RGB in the particle editor will be enough (see the tdm_fire_torch_* family for examples) and you won't need custom textures. Or you could check Use Entity Colour, which I think should let _color work on the particles.

Edited by VanishedOne
  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

I'm doing something similar in my mission. What I found is that you have to create a new particle definition. Let's say you want to make a green candle flame (based on light_candleflame). First, in your custom def file, define:

 

entitydef light_candleflame_green
{
"inherit" "light_candleflame"
"model_lit" "tdm_fire_candle_glare_green.prt"
"_color" "0.10 0.8 0.1"
}
_color will make the light that is cast green. The "model_lit" is the key to making the flame itself a different color. It needs to point to a new particle definition (the default is "tdm_fire_candle_glare.prt", which is yellow-orange). You can use the Particle Editor in DR (Entity > Particle Editor) to clone tdm_fire_candle_glare to tdm_fire_candle_glare_green (you'll need to create a custom .prt file). Then you can modify each of the Stages of the new particle (the Shader tab lets you mess with the color). You probably want to Toggle Visibility of the stages to see each one individually.
Hope this helps.
  • Like 1

Share this post


Link to post
Share on other sites

It sounds as though you'll need to make a customised version of the flame particles. If you don't want to affect every instance in the FM, you can copy the existing flame particle set-up in DR's particle editor, save the custom one under a new name, and then I think it's the model spawnarg you'd set on the flame to use the custom particles. Edit: model_lit, joebarnin is right.

 

If you're lucky, just changing the particles' RGB in the particle editor will be enough (see the tdm_fire_torch_* family for examples) and you won't need custom textures. Or you could check Use Entity Colour, which I think should let _color work on the particles.

 

 

 

I'm doing something similar in my mission. What I found is that you have to create a new particle definition. Let's say you want to make a green candle flame (based on light_candleflame). First, in your custom def file, define:

 

entitydef light_candleflame_green
{
"inherit" "light_candleflame"
"model_lit" "tdm_fire_candle_glare_green.prt"
"_color" "0.10 0.8 0.1"
}
_color will make the light that is cast green. The "model_lit" is the key to making the flame itself a different color. It needs to point to a new particle definition (the default is "tdm_fire_candle_glare.prt", which is yellow-orange). You can use the Particle Editor in DR (Entity > Particle Editor) to clone tdm_fire_candle_glare to tdm_fire_candle_glare_green (you'll need to create a custom .prt file). Then you can modify each of the Stages of the new particle (the Shader tab lets you mess with the color). You probably want to Toggle Visibility of the stages to see each one individually.
Hope this helps.

 

 

Thanks guys! Now I've learned a bit about the particle editor! :) Got it working just the way I wanted it after tweaking the color on each stage separately a bit. Would be handy to have an actual color slider in there though, as it comes down to a bit of trial and error as it is now, unless you are fluent in decimal RGB haha

6fr0qu.jpg

Edited by Bienie

Share this post


Link to post
Share on other sites

Would be handy to have an actual color slider in there though, as it comes down to a bit of trial and error as it is now, unless you are fluent in decimal RGB haha

You can use any picture editing software (even paint) for that. They should all be able to give you the RGB values of colours you set with a slider. I think it would still be a bit of trial and error (as the colour will most likely look different on the particle), but it may help.

Share this post


Link to post
Share on other sites

You can create a light, use the light colour selector to get the colour you want, and then just copy the color values to your candle.

  • Like 2

Share this post


Link to post
Share on other sites

There's also a little cool free color picker called colorCop, for me that is a time saver and it can pick colors from anywhere.

Share this post


Link to post
Share on other sites

Not sure where to best to post this, but here's a recent experience with dmap causing a crash. I was working on a map, and all of a sudden, dmap started crashing (TDM vaporized, no error dialog or anything). I turned on qconsole.log (seta logFile "2" in darkmod.cfg), and the last entry in the qconsole.log was:

 

[store AAS]
This made me think it had something to do with pathfinding/AAS. Luckily I had a backup version of my map from a few hours earlier. I compared the two, and one of the big changes in the 'bad' map was that I added a bunch of Monster Clips (which of course affects AAS). Though a tedious process of elimination, I determined that one specific Monster Clip was causing the crash. I have no idea why; it was more-or-less identical to several others in the same area (each surrounding a bench in row of benches). I remembered reading something about this, so I made the brush one unit larger in each direction, and the crash went away. Go figure.
Anyway, just thought I put this out there for future searching.

Share this post


Link to post
Share on other sites

 

Not sure where to best to post this, but here's a recent experience with dmap causing a crash. I was working on a map, and all of a sudden, dmap started crashing (TDM vaporized, no error dialog or anything). I turned on qconsole.log (seta logFile "2" in darkmod.cfg), and the last entry in the qconsole.log was:

 

[store AAS]
This made me think it had something to do with pathfinding/AAS. Luckily I had a backup version of my map from a few hours earlier. I compared the two, and one of the big changes in the 'bad' map was that I added a bunch of Monster Clips (which of course affects AAS). Though a tedious process of elimination, I determined that one specific Monster Clip was causing the crash. I have no idea why; it was more-or-less identical to several others in the same area (each surrounding a bench in row of benches). I remembered reading something about this, so I made the brush one unit larger in each direction, and the crash went away. Go figure.
Anyway, just thought I put this out there for future searching.

 

 

You should file a bug report if not this will get lost.

  • Like 1

Share this post


Link to post
Share on other sites

I'm trying to work out how to set up a combination lock, and I'm running into a bit of an odd problem when I try to load my map after placing a `combination_lock_small` in the world.

ERROR:Script object 'numberwheel' not found on entity 'idMover_atdm:numberwheel_small_1574'.

This is probably just me not understanding how this entity (the `combination_lock_small`) is supposed to work. I was hoping that the combination lock would automatically spawn the numberwheels at runtime, similarly to how a candle holder entity works, but it isn't clear whether that is the case. The error message certainly seems to suggest this, since there is suddenly an entity called "idMover_atdm:numberwheel_small_1574", but maybe there is something more I need to do to get this hooked up?

 

(I don't know if this will help, but I've attached a picture of the entity window for the combination lock)

 

post-38430-0-61137100-1559508955_thumb.png

Share this post


Link to post
Share on other sites

It's telling you the entity def is set up to use some scripting that's missing. I don't know why TDM has the entity def without the script, but you could try copying the script files from A New Job and see whether that fixes things.


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

After doing some more searching around, I finally came across a post in 2018 from Obsttorte that provides a few more details:

 

http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/?p=418498

 

(bold added by me)

 

 

The safe in 'A New Job' has a bar that nneds to be opened before the actual safe door can open (the bar is part of the door). As I have stated before the script was designed for that mission specifically and was never intented to be part of the tdm stock files and never intented to be available for general purpose (but iirc tdm 2.05 was out the door when I mentioned this). The script should be located in the 'A New Job' fm folder. Of course everyone is free to look at the setup and adopt it for their own FM, although I would appreciate it if mappers would take the time to try and understand how the setup actually work instead of just 'using' it and than wonder why it doesn't work or complain about errors they get (especially as the error message in the console is pretty clear in this case on what the actual problem is).

 

I'm sort of reading between the lines here, but it sounds like the script referenced used to be distributed as part of the base pk4 file...probably on accident more than on purpose. At some point, the script must have been moved into the mission folder and taken out of the base distribution because it was never intended for general mapper consumption. All the same, after reading through the script, it seems like it would take only minimal modification to work for my case.

 

Previous to the post I linked to, there is some discussion about making this a prefab. Now, I fully admit that I'm coming in completely new to this, but it seems like the only thing stopping this from being a prefab is the one line in `tdm_numberwheel_lock.script` that references the much talked about `closeBar`. Just a cursory glance over the rest of script, and the related `tdm_numberwheel.script`, and it seems like the script is localized (i.e., doesn't reference a hardcoded global name). I wasn't terribly thorough, so someone might correct me on that point.

 

But after all this, I'm left debating whether the combination lock actually fits into my storyline, or whether a simpler key-based safe would suffice :unsure:

Share this post


Link to post
Share on other sites

I'm trying to make an Objective of having the player put an object in a certain location. I've been banging my head against the wall for 3 hours on this, I just can't get it to work. I followed these instructions, and I also looked at several other FMs. For the life of me I can't figure out what I'm not doing right. I've got an entity with "objective_ent" "1", and a nice big info_tdm_objective_location, and the Objectives set up just the way the documentation says. But when I put the object in the location, nothing happens (the objective is not met).

 

Has anybody run into any 'gotchas' trying to get this to work?

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