Jump to content
The Dark Mod Forums

Recommended Posts

Posted
54 minutes ago, Sotha said:

In one of newer missions, I've noticed that doors have smoother movement. I think it could be described as door having slower movement first, then moving at faster speed and slowing down before reaching end of the movement.

How does one do that? There was no info in the door wiki page. There, it says speed is only controlled by move_time and my doors seem to move at constant rate, which doesn't look as natural as the opening I've seen on other missions with the smoother opening.

Or did I just imagine it all?

Doors are a type of mover so they support accelTime and decelTime spawnargs (might have been with an underscore). That's all that's needed.

  • Like 1
Posted
1 hour ago, Dragofer said:

Doors are a type of mover so they support accelTime and decelTime spawnargs (might have been with an underscore). That's all that's needed.

Nope, these are not spawnargs for door entities. They seem to be scripting functions.

Clipper

-The mapper's best friend.

Posted
6 minutes ago, datiswous said:

Which mission? Probably an external asset.

Hazard Pay has it.

Ach, it was with underscores.

image.png.ac5866464767583b9785f8706bcc001b.png

Clipper

-The mapper's best friend.

Posted

Now works! It looks so much better and realistic when the door has acceleration. Thanks!

Clipper

-The mapper's best friend.

Posted
2 minutes ago, datiswous said:

So what did you do?

I checked Kingsal's map and found it was controlled by the spawnargs Dragofer was talking about. Very simple to adjust.

image.png.60ff1835a9fc03a56c9f8baaa0672be5.png

  • Like 1

Clipper

-The mapper's best friend.

Posted

I wonder what this core script is for then:

//Special delayed door script

void real_frob_door_delayed(entity ent)
{	
	if (ent.getKey("IsDoorOpen") == "yes")
{
	ent.ToggleOpen();
	ent.setKey("IsDoorOpen", "no");
}	
	else if (ent.getKey("IsDoorOpen") == "no")
	{
	$func_static_1858.rotate('360 0 0');
	sys.wait(1);
	$func_static_1858.rotate('0 0 0');
	sys.wait(0.5);
    ent.ToggleOpen();
	ent.setKey("IsDoorOpen", "yes");
	}
}
 
void frob_door_delayed(entity ent)
{
    thread real_frob_door_delayed(ent);
}

 

Posted
7 hours ago, datiswous said:

wonder what this core script is for then

Looks like it waits for something (a wheel?) probably wall-mounted to rotate 360 degrees in the x plane before opening the associated door. Since it hard-codes that rotating object as func_static_1858, this script is intended for 1 particular FM. (Lots of FMs have a func_static_1858... of ones I have on my hard drive, I didn't see a likely "wheel" candidate.)

  • Like 1
Posted

Ugh, this is why we shouldn't use "magic numbers" in code. If that thing had been named "secret_crank_wheel" or something instead of "func_static_1858" it would have been much clearer.

None of New Job, St Lucia, or the Training Mission call the function real_frob_door_delayed so it seems this wasn't intended for any of the "official" missions. Or possibly it was used in an earlier version and the code still lingers like a bad smell.

  • Like 2

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted

That precursor code snippet by the late great grayman might suggest that one of his FMs uses it. Or once did, but "lingers". Not conclusive though.

Posted

I use the lightgem_adjust spawnarg to offset the player's visibility when the world is too bright, but is there an equivalent to lower how audible the player is to all AI? I'm almost ready to wrap up my upcoming FM but AI hearing is a bit too strong; I could offset it for everyone on the map but a global offset would be better if there one exists.

Posted
4 hours ago, MirceaKitsune said:

I use the lightgem_adjust spawnarg to offset the player's visibility when the world is too bright, but is there an equivalent to lower how audible the player is to all AI? I'm almost ready to wrap up my upcoming FM but AI hearing is a bit too strong; I could offset it for everyone on the map but a global offset would be better if there one exists.

Interesting question! How exactly is the AI hearing too strong for you?

Reason for my question: in my experience, AI hearing level in unmodified TDM is pretty OK, but if your sound is leaking through walls, then the AI can be alerted strangely long distances.

Two examples:

1) You only fly thrice had sound leaking through windows. AI shouting inside the bowels of the ship could alert everyone in the ship, because audio leaked through the windows to the outside of the ship and back inside the ship.

2) Back in the days I made Glenham Tower, I noticed that if worldspawn walls are too thin, sound passes through them. They isolating worlds pawn walls must be 8 units minimum to seal properly.

Could your AI aquity be due to sound leaking in geometry?

Clipper

-The mapper's best friend.

Posted

About ambient_world colors:

1) The default ambient_world color is rather bright and influences the light gem, so that you get a little bonus for crouching.

2) people have different monitors and different settings.

3) too high ambient_world makes everything look a bit washed out, but too low makes it hard to see what's happening.

4) slight tone change in ambient_world color gives the more scene interesting, but can also make it unnatural looking. The default neutral ambient_world is a bit boring.

It is difficult art to adjust the color to get the most out of it. Are there nowadays some consensus about ambient_world color? What are good practices? Any tried and true settings? Any other advice?

Clipper

-The mapper's best friend.

Posted (edited)

I'm not sure it's the geometry thickness that counts in sound propagation. I think it's more of how visportals work by default.

If you feel like AI has bat ears, add info_portalsettings entity and make it touch your visportal, then try modifying the sound_loss spawnarg. Also, make sure apply_loss_to_Player is unchecked, if you want the player to hear the AI without any modifications. Otherwise, sound dampening works both ways.

Edit: According to this: https://wiki.thedarkmod.com/index.php?title=Estimating_Volume_for_New_Sounds#Volume_Guestimation_Method_#3:_Gameplay_Driven

AI has a hearing threshold of 20 dBs, and maybe that's the problem. I mean, you can download a decibel meter on your phone; try to get a "silence" that will be below 30 dBs, in a typical flat with all windows closed :) Maybe you could raise this value to simulate AI hearing in the outside ambience better?

Edited by peter_spy
Posted

Oh, AI hearing is likely working as intended. It's just that my structure is somewhat cramped and has a stone floor: When the player has to sneak around the hallway, AI becomes alert a bit too easily. It's not unplayable, I'd just prefer if there was an audio equivalent to the lightgem offset to make AI hearing slightly more forgiving for all characters in that map. If not I might just put more carpets around the problematic area.

Another answer I could use: What's the proper way to make a particular AI invincible so they can never die no matter how often they're hit? Do I just set health to -1? I know a FM that does this, won't mention its name as to not spoil... I can decompile it to take a look but I presume there is a known default solution.

Posted (edited)
On 10/27/2024 at 5:01 PM, MirceaKitsune said:

Oh, AI hearing is likely working as intended. It's just that my structure is somewhat cramped and has a stone floor: When the player has to sneak around the hallway, AI becomes alert a bit too easily. It's not unplayable, I'd just prefer if there was an audio equivalent to the lightgem offset to make AI hearing slightly more forgiving for all characters in that map. If not I might just put more carpets around the problematic area.

 

Maybe setting the property

sound_loss - x

on relevant location separators?

Edited by JackFarmer
Posted

I have an interesting question: Do we have a setting to not render a model if its origin point isn't located in an open visportal, even if its bounding box intersects a room the player can see? If not can you associate the visibility of an entity with a particular info_location so it only renders in that area?

The reason why I ask: The building modules are pretty terrific visually speaking, but were made with some design issues when it comes to origin points and proportions. Often times you'll have an interior module poking outside, or oppositely an exterior module poking the interior of a room. You usually can't see them but the model is still loaded which will may decrease performance. It might improve FPS with the modules if interior and exterior walls can be bound to only render inside or outside, being completely derendered when the room they're bound to isn't open.

Posted

A question for the more immediate time: Is there a tutorial on how to setup dynamic breakable glass? There doesn't appear to be a page on the wiki about it.

Also on making AI use and ride an elevator. I made elevators in the past but never had a character use them, I've seen it done in other FM's but no idea how to do it right.

Posted (edited)
18 hours ago, MirceaKitsune said:

A question for the more immediate time: Is there a tutorial on how to setup dynamic breakable glass? There doesn't appear to be a page on the wiki about it.

How dynamic do you need? The basic process is pretty simple, but it just replaces the model with a broken model when you damage it. Make the glass object a func_damagable, set the spawn arg "break 1" and add a model for the broken object like this. 

image.png.a10bb6a4dd4c41e01158b60aefeb7a20.png

This also targets an emitter for added visual effect, but I couldn't find any good ones for glass (sparks looks okay from a distance).  You don't even need to add sound effects as it is already coded in based on the material of the object. 

I also tried the flinder function https://wiki.thedarkmod.com/index.php?title=Breakable_objects which could be used to add extra scattered shards, but I couldn't get it to work.

Edited by grodenglaive
Posted

So I use a func_fracture entity to make breakable glass, as I think this gives you a bit more control over things like shard size, shatter sound, etc. You can even trigger things such as func_emitters or lights. For Eye on the Prize, I used it to trigger surface emitter patches to make it look like it was raining inside the greenhouse once the window had been shattered.  You are welcome to take a look at that map file to see how it's setup.
image.png.73ed9f6df773d50b8a634cfd1d2857c7.png

  • Like 1
  • Thanks 1
Posted (edited)

Yes, that was the one and what I'm looking for, thanks! Hope a wiki page can be made with details on setting it up so others have the knowledge handy.

I also can't find details on how to make AI ride a multistate elevator using the default entities to move between floors. Do I simply put a path_corner at the floor position of the elevator at each location, tie them together, and TDM automatically knows how to make the AI frob the right button and use the elevator?

Edited by MirceaKitsune

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

    • nbohr1more

      Cool thing: Thanksgiving break means I don't have to get my son up before dawn

      Not cool thing: My son stays up all night on my PC so I don't get much TDM time...
      · 3 replies
    • datiswous

      Does anyone know if the mission/map in this video posted by @Springheel can still be found somewhere and played? Looks like fun.
       
      · 1 reply
    • taffernicus

      I'm curious about doom and thief multiplayer netcode 😂 or how these games handle networking for multiplayer in general
      a youtube channel called battle(non)sense sometimes posts about netcode analysis
      · 2 replies
    • The Black Arrow

      Hey @Ansome, are you still around? I think it's been about 3 months since you've had an issue with an SSD, right?
      · 4 replies
    • Sotha

      Brushes: ~1300
      Patches: ~990
      Entities: ~960
      Ambients: Done, EFX: Done, Objectives: Done, Briefing, Done, Location System: Done.
      Going to final polishings before beta.
      · 0 replies
×
×
  • Create New...