Jump to content
The Dark Mod Forums

Recommended Posts

  • 2 weeks later...
Posted (edited)

I have problem with unintentionally translucent models in gui:

[img]https://imgur.com/a/ctxvu6P[/img]

windowDef Desktop {
  rect 0, 0, 640, 480
  backcolor 0 ,0 ,0 ,0
  visible  1                          
  nocursor 1


    renderDef rosary_cord1
  {
    rect           0, 0, 640, 480
    visible        1
    model          "models/erh_rosary_cord_bow_b.ase"
    needsRender    1
    modelRotate    "gui::Offset_vert"/4, "gui::Offset_horz"-22.5, 0, 1
    modelOrigin    0, 0, 0, 1
    viewOffset     ("gui::cord_horz1"*250)+50, "gui::cord_vert1"*250, 80, 1
    lightOrigin    -200, ("gui::light_Offset_vert"*100), "gui::light_Offset_horz"*100, 1
    lightColor     0.8, 0.8, 0.8, 1
  }

    renderDef dice1
  {
    rect           0, 0, 640, 480
    visible        1
    model          "models/erh_rosary_dice.ase"
    needsRender    1
    modelRotate    "gui::Offset_vert"*2, "gui::Offset_horz"+45, 0, 1             //+135
    modelOrigin     0, 0, 0, 1
    viewOffset     ("gui::dice_horz1_n"*250)+50, "gui::dice_vert1_n"*250, 80, 1
    lightOrigin    -200, "gui::light_Offset_vert"*100, "gui::light_Offset_horz"*100, 1
    lightColor     0.5, 0.0, 1.0, 1   //purple
  }

}

(-there are 8 models of cord and 8 of bead.)

This is a rosary, reacting to the player's viewing angles. But you can see the model's back. Sometimes it goes away at some angles of the player's rotations. In some arrangements of renderDef bracelets, a few models work fine, the rest don't.

rosary bug1.jpg

Edited by ERH+

S2wtMNl.gif

Posted (edited)

Maybe it's nothing, but I saw on other renderdef example that

backcolor 0 ,0 ,0 ,0

was also applied inside the renderdef as well.

 

For example:

image.png.31bc261fe52c7968c9fb8843932dc385.png

 

Maybe backcolor 0,0,0,0 means transparent?

 

Here it says backcolor 0,0,0,0 means black but transparent:

https://wiki.thedarkmod.com/index.php?title=GUI_Scripting:_Syntax,_Semantics,_%26_Usage

I don't really understand all the code, so can't see if it's related.

Edited by datiswous
Posted

I've added a bit to the Wiki to show how to automatically remove single-use keys from the player inventory after they are used.  I've seen a lot of players ask for this as some don't like loads of keys clogging up their inventory. I know some authors have done this already, but I didn't see anything in the Wiki about it.

https://wiki.thedarkmod.com/index.php?title=Doors#Automatically_Removing_Keys_from_Player_Inventory_After_Use

If someone has a simpler method, I'd be happy to update or change the Wiki entry.

  • Thanks 4

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions:

With Kerry000: The Hare in the Snare, Part 1, 

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs A Reciprocal Gambit

Posted
5 minutes ago, Frost_Salamander said:

I've added a bit to the Wiki to show how to automatically remove single-use keys from the player inventory after they are used.  I've seen a lot of players ask for this as some don't like loads of keys clogging up their inventory. I know some authors have done this already, but I didn't see anything in the Wiki about it.

https://wiki.thedarkmod.com/index.php?title=Doors#Automatically_Removing_Keys_from_Player_Inventory_After_Use

If someone has a simpler method, I'd be happy to update or change the Wiki entry.

What if you give the relevant door a frob response via S/R which removes the key in question?

Posted
1 minute ago, JackFarmer said:

What if you give the relevant door a frob response via S/R which removes the key in question?

I'm not sure that will work - initially I tried using frob_action_script, but when you are unlocking a door with a key you aren't actually frobbing it, so that script never gets invoked.  I then tried used_action_script, but apparently that works for everything BUT doors.  So I ended up using the triggers.

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions:

With Kerry000: The Hare in the Snare, Part 1, 

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs A Reciprocal Gambit

Posted
12 minutes ago, Frost_Salamander said:

I'm not sure that will work - initially I tried using frob_action_script, but when you are unlocking a door with a key you aren't actually frobbing it, so that script never gets invoked.  I then tried used_action_script, but apparently that works for everything BUT doors.  So I ended up using the triggers.

You are right; it does not work (I vaguely recall that I tried this for the first mission of HHBAM).

  • 1 month later...
Posted (edited)

Hi, so my FM's map file is currently just named "j.map" for quick command typing. However, as I prepare to pack up the mission to share with others, it seems cleaner to rename the map file to something a bit longer and more specific.

To rename it I think I just need to do the following:

1. Change name of j.map (obviously).
2. Change name of j.xd to the same new name.
3. Within that xd file, correct the path "maps/j/mission_briefing" for the briefing data to reflect the new name.
4. Edit startingmap.txt to replace j with the new name.
5. Dmap, test, then eventually clear out previous files from the maps folder.

Is that all that should be needed? Or maybe I'm missing something? Thought I'd ask now instead of barreling ahead and having to fix something later.

Here are screenshots of the folders if it helps (in spoiler):

Spoiler

jt_folder_root.png.e04f8058abc3471b442c0de1af7eb8f3.png

jt_folder_maps.png.c0d8b72e302860e5058d889f947b8b28.png

jt_folder_xdata.png.cf9a2dcb36370decc638bab114fb5c6a.png

(I also want to rename the jump_training folder to something else before packing and sharing, but as far as I can tell that shouldn't be an issue at this stage.)

Edited by sullium
Posted
On 12/16/2025 at 8:38 AM, sullium said:

Is that all that should be needed? Or maybe I'm missing something? Thought I'd ask now instead of barreling ahead and having to fix something later.

So from my own personal experience, I recommend naming your map file (and the relevant files) something that uses three letters at least. I don't know why, but TDM doesn't like map file names with two letters or less, but only sometimes, so you're kind of playing with fire here.

When I was working on A Good Neighbor, my map file was name was "gn.map" and for some reason, TDM just wouldn't accept my pk4 when I packaged it up. It took me way too long to realize that it was the short file name. I renamed it to "good.map" and voila! All of my packaging problems disappeared.

and it seems like you have everything listed. If your map had a map script, then it would need to be "(whatever your map name is).script", but you don't have one so you're good to go there

  • Like 1
Posted
1 hour ago, sullium said:

Hi, so my FM's map file is currently just named "j.map" for quick command typing. However, as I prepare to pack up the mission to share with others, it seems cleaner to rename the map file to something a bit longer and more specific.

To rename it I think I just need to do the following:

1. Change name of j.map (obviously).
2. Change name of j.xd to the same new name.
3. Within that xd file, correct the path "maps/j/mission_briefing" for the briefing data to reflect the new name.
4. Edit startingmap.txt to replace j with the new name.
5. Dmap, test, then eventually clear out previous files from the maps folder.

Is that all that should be needed? Or maybe I'm missing something? Thought I'd ask now instead of barreling ahead and having to fix something later.

Here are screenshots of the folders if it helps (in spoiler):

  Reveal hidden contents

jt_folder_root.png.e04f8058abc3471b442c0de1af7eb8f3.png

jt_folder_maps.png.c0d8b72e302860e5058d889f947b8b28.png

jt_folder_xdata.png.cf9a2dcb36370decc638bab114fb5c6a.png

(I also want to rename the jump_training folder to something else before packing and sharing, but as far as I can tell that shouldn't be an issue at this stage.)

.xd files can have any name (and there can be multiple files in that folder), so I don't think you need to rename yours

  • Like 1
  • 1 month later...
Posted

I want to make one of my first FMs (a fairly small one) set during the winter, with plenty of snow (think Sotha's Mandrasola mission and the countless other FMs with snow), but I'm not quite sure how to make a convincing snowdrift. Should I first create a patch of terrain in Dark Radiant, resize it to the appropriate size, and the just texture it and place it in a manner where it doesn't interfere with other 3D models too much ? Do I need to make the terrain patch for a snow drift clippable through objects, if I want to prop it against a wall or similar ?

On 11/6/2025 at 9:09 PM, Frost_Salamander said:

I've added a bit to the Wiki to show how to automatically remove single-use keys from the player inventory after they are used.  I've seen a lot of players ask for this as some don't like loads of keys clogging up their inventory. I know some authors have done this already, but I didn't see anything in the Wiki about it.

https://wiki.thedarkmod.com/index.php?title=Doors#Automatically_Removing_Keys_from_Player_Inventory_After_Use

If someone has a simpler method, I'd be happy to update or change the Wiki entry.

Thank you. This will prove useful. 

Though I personally also like to make the gathered keys removable in a "take them out of the inventory and drop them" manner.

Posted
8 hours ago, Petike the Taffer said:

Should I first create a patch of terrain in Dark Radiant, resize it to the appropriate size, and the just texture it and place it in a manner where it doesn't interfere with other 3D models too much ? Do I need to make the terrain patch for a snow drift clippable through objects, if I want to prop it against a wall or similar ?

I wouldn't overthink it too much. A solid snow material will go a long way in making simple patches look believable. Once you get the desired shape of your patch, just texture it with the same scale you used as your ground brush and you'll be good to go. As for whether or not they should have collision, that should be determined on a case by case basis, but use "solid" "0" over "noclipmodel" "1" if you do decide to remove the collision. There are several snow drifts throughout Written in Stone, so you are welcome to take a look there

  • Thanks 1
Posted
On 1/20/2026 at 6:11 PM, Amadeus said:

I wouldn't overthink it too much. A solid snow material will go a long way in making simple patches look believable. Once you get the desired shape of your patch, just texture it with the same scale you used as your ground brush and you'll be good to go. As for whether or not they should have collision, that should be determined on a case by case basis, but use "solid" "0" over "noclipmodel" "1" if you do decide to remove the collision. There are several snow drifts throughout Written in Stone, so you are welcome to take a look there

Thank you, Amadeus. I was a bit busy yesterday and didn't reply. 

It is virtually as I expected it to be, but I'm still grateful for advice with the details.

  • Like 1
Posted

I agree with Amadeus, you can also look at Snowed Inn which has lots of snow. We generally kept the snow drifts pretty unabtrusive to avoid problems. I would recommend keeping them solid if possible, as objects will dissapear in them, kinda of like real snow  😆 Keep solid 0 for plants or other very small rocks/ func_statics. 

Also the AI pathing over patches is  pretty forgiving, so unless you have really steap angles or the drift is very far above the solid "walkable" geometry  below, you should be good. It might just take some testing to see where the AI gets caught up. 
 

  • Like 1
  • Thanks 1
Posted (edited)

Here's a scripting question. How do you use And in an if statement? For example:
 

if ((boolean1) and (boolean2)) {do something}

I thought it was && but that gives a 'type missmatch' error.

[edit] never mind it is actually is && I was making a different mistake🙄

Edited by grodenglaive
Posted

Here is a simplified version of my problem. The type mismatch error was caused by using 2 different types of booleans.

void test_trigger(entity touching_ent)
{
	if ((touching_ent.getName() = $Fred.getName()) && (!bool1)) {
		sys.trigger($TestLight);
	}
}

 

I had to use nested ifs instead:

void test_trigger(entity touching_ent)
{
	if (touching_ent.getName() = $Fred.getName()) {
		if (!bool1){
			sys.trigger($TestLight);
		}
	}
}

Then it works!

Posted
11 minutes ago, grodenglaive said:

Here is a simplified version of my problem. The type mismatch error was caused by using 2 different types of booleans.

void test_trigger(entity touching_ent)
{
	if ((touching_ent.getName() = $Fred.getName()) && (!bool1)) {
		sys.trigger($TestLight);
	}
}

 

I had to use nested ifs instead:

void test_trigger(entity touching_ent)
{
	if (touching_ent.getName() = $Fred.getName()) {
		if (!bool1){
			sys.trigger($TestLight);
		}
	}
}

Then it works!

The one thing that jumps out is you're using '=' instead of '==' to compare.  A single '=' is used for assigning a value.  Try changing that and see what happens.

  • Like 1
  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions:

With Kerry000: The Hare in the Snare, Part 1, 

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs A Reciprocal Gambit

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

    • JackFarmer

      I will NOT return to Discord. Who wants to try something new?
       
      · 12 replies
    • JackFarmer

      I do not understand why Gilmour/Waters trash the "Atom Heart Mother" album and wish for that "all existing copies get dumped".
      I think it is a great recording. Is there something wrong inside my twisted little brain?
      · 3 replies
    • revelator

      Asus ROG strix x570-E gaming ryzen 3700x 32 gb ram radeon RX9070XT 10 tb ssd space (all full)
      · 5 replies
    • The Black Arrow

      I was playing Doom 3, and I learned how to edit maps text-by-text, this should help me a lot with finding secrets and locations I hope.
      That is, if I feel sneaky and greedy...Which I always do, can't get enough 100% a mission.
      · 3 replies
    • datiswous

      So on a regular basis I try to start building something in Darkradiant but very quickly I loose interest and give up.
      I tend to
      create a room, position an ai in it (or first ai, then room, probably better) put a light in it Put some stuff in it test the room in tdm Now I had this new idea:
      Start of with a gigantic room. To skip the importance of sealing for the time being and to think broader than one room. Then just use ground without wall, just to visualise the structure of the level.  Then just use prefab walls and other elements (arches, etc.). Just building area's that aren't enclosed. I can always close them at a later point. Maybe this is all very logical from a mappers perspective, but tdm is the first game where I have done any kind of real mapping and I always stop at the start. It just takes too long to make something exciting.
      I want to build something at some point, because over time I accumulated lots of ideas.
      · 21 replies
×
×
  • Create New...