Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I have a map that I want to be purchasable from the shop. It works fine in-game when I buy it. But how do I change its name, description, and icon from the default values?shopmap.png.225d635ea69795a7270f07ced6e31f05.png

Edited by thebigh

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

On 2/9/2022 at 9:25 PM, Geep said:

I have a atdm:env_ragdoll_skeleton_white, with a def_head of atdm:ai_head_skeleton_skull. The skeleton is frobbable. When the skeleton is frobbed, the skull doesn't highlight. Is there a relatively easy way to do so?

Make a new head definition with the following code:

entityDef atdm:ai_head_skeleton_skull_frob
{
"inherit"	"atdm:ai_head_skeleton_skull"
"frobable" "1"
}

Then in DR you set def_head to atdm:ai_head_skeleton_skull_frob

It's a bit crappy solution and it also doesn't work when dragged, then the frob higlight turns off. But I post it here in case somebody knows what to do about that.

  • Like 1
Link to comment
Share on other sites

On 2/16/2022 at 6:56 PM, thebigh said:

I have a map that I want to be purchasable from the shop. It works fine in-game when I buy it. But how do I change its name, description, and icon from the default values?

I figured it out. Open your def/custom.def file (or make a new one if you don't already have it) and add the following:

entityDef ShopItem_map_of
{
    "inherit"           "atdm:shopitem_base"
    "itemClassname"     "atdm:map_of"
    "displayName"       "Map"
    "displayDesc"       "A map of Sebastian Creep's hovel"
    "image"             "guis/assets/game_maps/map_shop_icon"
}

The last three lines specify the in-shop name, the description, and the little graphic icon respectively. You'll have to provide your own graphic because TDM doesn't yet have a default one. Otherwise just comment that last line out to omit the icon entirely.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

There may be spawnargs for that but if so I have no idea what they might be.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Sure, I can see what the spawnargs are on the shopitem_map_of. That's not the problem; the problem is that I don't actually place those entities in the map myself. The atdm:shop generates them. I have no idea how I would tell the atdm:shop to change the displayDesc spawnarg on some shopitem_map_of that it created itself and whose name I don't know. But since I can just specify the required information in the custom.def file I don't need to muck about with it at all.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

 

Then in DR you set def_head to atdm:ai_head_skeleton_skull_frob

It's a bit crappy solution and it also doesn't work when dragged, then the frob higlight turns off. But I post it here in case somebody knows what to do about that.

Tried it. It works as advertised, i.e., a bit crappy. To get the skull highlight to stay on when dragged, I tried hard-coding a "frob_peer" spawnarg on ...skull_frob, referring to the ragdoll skeleton body instance by name. Didn't make a difference.

Unless a brainstorm arrives, I'll leave this as it was, on the pile of minor unsolved mysteries.

Link to comment
Share on other sites

Minor followup...

On 2/1/2022 at 2:53 PM, Geep said:

I have a atdm:bonfire and a large surrounding trigger hurt. If the player extinguishes the bonfire, I'd like that shut off the trigger hurt. Possible?

Several folks responded: just target the trigger_hurt from the bonfire.

But when I finally got around to testing that, it didn't work until I also did "set target on flame" "<trigger hurt name>"

Link to comment
Share on other sites

12 minutes ago, Geep said:

But when I finally got around to testing that, it didn't work until I also did "set target on flame" "<trigger hurt name>"

That's strange; the light_bucketflame_small entities throughout Written do not require the "set target on flame" spawnarg, only a target to the trigger hurt. Must be something different with the bonfire entity

  • Like 1
Link to comment
Share on other sites

I noticed I could get stuck when walking over the extinguished bonfire, so threw some playerclip atop it. But then, there's this broader question...

To prevent a player from getting stuck, is an underfoot surface of playerclip and nodraw-solid equivalent?

Equivalent with respect to how walked-on material sounds?

Link to comment
Share on other sites

36 minutes ago, Geep said:

To prevent a player from getting stuck, is an underfoot surface of playerclip and nodraw-solid equivalent?

I dont think it makes a difference - just that playerclip will always make stone sounds.

What I found to be especially prone to getting the player stuck is sloped surfaces with stuff around them, so I try to simplify the collision of surrounding stuff as much as possible by drawing nodrawsolid brushes.

  • Like 1
Link to comment
Share on other sites

Can't you have the trigger_once target a trigger_relay with a "wait" "1.0" spawnarg and have that target your effect?

Alternatively it's probably possible to make a trigger_multiple impersonate a trigger_once by setting

* "wait" "-1"

* "delay" "1.0"

but I haven't tried this.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Sorry, I wasn't clear. The "wait 1.0" on the trigger_once was a mistake by me - I didn't mean to have that spawnarg on the object. What happened was, I had a trigger_multiple with a wait on it, and then I converted it to a trigger_once but forgot to remove the wait. Then I noticed that the trigger_once wasn't behaving like a trigger_once - it was behaving like a trigger_multiple. I removed the "wait" and it starting behaving properly.

So my post was just academic; I'm just wondering if that behavior is expected. Or perhaps this comes under the heading of "If you do something weird, you might be weird results".

Link to comment
Share on other sites

Getting weird results by doing weird things with existing effects is often a great way to discover cool new tricks.

  • Like 2

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

On 2/20/2022 at 7:23 AM, Dragofer said:

I dont think it makes a difference - just that playerclip will always make stone sounds.

 

Is there any such thing as nodraw_silent? I can think of a few niche applications for it.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Didn't see one off the shelf. Speculatively, maybe a custom .mtr with this might work:
 

textures/common/tdm_nodrawsolid_none
{
    none
    noshadows

    qer_editorimage textures/common/nodrawsolid // You could make a custom editor nodrawsolid_none texture too
}

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 4/1/2016 at 8:40 PM, VanishedOne said:

Am I doing something wrong, or does 'set <spawnarg> on <prop>' just not work to stop the prop spawning on a given difficulty level (meaning I'll have either to place a key in DR and bind it instead, or to do something to remove the entity after map load)?

"def_attach6" "atdm:prop_key_simple_steel"
"pos_attach6" "belt_back_right"
"name_attach6" "perimeter_key"
"set name on perimeter_key" "perimeter_key"
"set inv_name on perimeter_key" "the exterior door key"
"set diff_1_nospawn on perimeter_key" "1"
"set diff_2_nospawn on perimeter_key" "1"

The 'Attaching Props to AI' wiki page refers to this post and the follow-up by Obsttorte to state that "You cannot directly vary the presence of a def_attached item by Difficulty Level. A work-around is to clone your AI, then make them differ in their diff_n_nospawn spawnargs and their attached items." The very next reply in the thread after Obsttorte, to my amusement, was me also being unhelpful.

Just about 6 years later (!) I'm in a better position to answer this question. You can use spawnargs to handle the case of props on AI without having to resort to cloning said AI, so if someone wants to edit the wiki with my info I'd appreciate it.

The way to do it is with diff_x_arg_y and diff_x_change_y rather than diff_x_nospawn. You set up the key (or whatever else) to spawn on the AI conditionally per difficulty setting rather than not spawn conditionally after it has already spawned.

image.png.2bbe0dfe0512738cd764e29772dd4af1.png

 

Here is a visual example of the kind of spawnargs you need to put on your AI. This, for instance, will spawn a named, grey key on the belt of the AI only on the easiest difficulty. Do not give any 'default' values to these spawnargs, leave them undefined and only define them like this. The other way around — pre-defining these spawnargs (ie setting them as usual) and then "blanking" them through diff_x_change/arg_y — that doesn't work.

Edited by Spooks
  • Like 1
  • Thanks 3

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

That's pretty cool! But is there even a reason to use the def_attach method instead of placing an actual key and using bind and bind_to-Joint?

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

23 hours ago, Spooks said:

so if someone wants to edit the wiki with my info I'd appreciate it.

I'll do that today.... Done

22 hours ago, thebigh said:

But is there even a reason to use the def_attach method instead of placing an actual key and using bind and bind_to-Joint?

If you bind a key, the AI can't use it to open a door. So mostly best for keys to chests, etc.

Edited by Geep
wiki update done
Link to comment
Share on other sites

Hi all. I'm starting to learn to make my own custom models and I'm having trouble assigning a material to the model.

 

I have a .lwo file of a wooden plank under games/darkmod/fms/ringd/models/darkmod/props/plank1.lwo

Diffuse and normal textures are under ringd/models/darkmod/textures/plank1.tga and plank1_local.tga

The TGA files are not RLE compressed and are oriented to bottom left as always.

 

What do I need to add to the mission's .mtr file to get this to work?

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • 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
×
×
  • Create New...