Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

Hello demagogue,

 

Thanks for the prompt response. Those absence markers are entities from the entity list? I have browsed through most of the folders, but I cannot find it.

 

It's under atdm:entity_base and is called atdm:absence_marker.

 

(FYI under "Entity" in the top-menu, you can open the entity tree and just start typing "absence" or any other part of an entity name and it will be selected.)

 

Placing them directly isn't the way they were designed, but my guess is it'd work. Worth a shot anyway.

 

Edit: Note IIRC the AI needs to see it. So it can't be spawned in the dark, and is best if it's spawned under a light. Kind of funny, it needs to "see" an absence, but it makes sense when it's a small object.

  • Like 1

20js9wp.jpg

Share this post


Link to post
Share on other sites

I have a few questions about file locations... I'm trying to add a frob highlight to a stone texture that doesn't have one, and I found this entry on the wiki. I think I will be able to figure it out, but I have no idea where the material file I need to edit is located. What makes it worse for me is that I left all the standard files for the game in their respective .pk4 archives so going through the regular file structure wasn't possible. (Side note: is there any benefit of leaving them in there or should I just extract since I may need more vanilla files to edit later?)

I also wanted to use the complete electric lights entities for parts of my mission, but the attached lights are far too large in radius. I know from previous experience that you cannot change them with simple spawnargs. I'm guessing some editing of the def files is required, so I wonder is it worth it (and if so, where are they located), or should I just make them models and add my own lights? (I think that's the route i chose in Pearls and Swine).

Share this post


Link to post
Share on other sites

AI react to the marker as something has been stolen , which is not an appropriate response.

 

The only way to notice a missing guard would be to script a specific relationship between the guards involved.

Share this post


Link to post
Share on other sites

I have a few questions about file locations... I'm trying to add a frob highlight to a stone texture that doesn't have one, and I found this entry on the wiki. I think I will be able to figure it out, but I have no idea where the material file I need to edit is located. What makes it worse for me is that I left all the standard files for the game in their respective .pk4 archives so going through the regular file structure wasn't possible.

In this case, I think it should be possible to make a file /materials/your-custom-name.mtr, and put your modified def in it, then it'll override the same-named material in the .pk4s. (Better than overriding an entire core file, which would require copying all the contents over.)

  • 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 have a few questions about file locations... I'm trying to add a frob highlight to a stone texture that doesn't have one, and I found this entry on the wiki. I think I will be able to figure it out, but I have no idea where the material file I need to edit is located. What makes it worse for me is that I left all the standard files for the game in their respective .pk4 archives so going through the regular file structure wasn't possible. (Side note: is there any benefit of leaving them in there or should I just extract since I may need more vanilla files to edit later?)

I also wanted to use the complete electric lights entities for parts of my mission, but the attached lights are far too large in radius. I know from previous experience that you cannot change them with simple spawnargs. I'm guessing some editing of the def files is required, so I wonder is it worth it (and if so, where are they located), or should I just make them models and add my own lights? (I think that's the route i chose in Pearls and Swine).

The main advantage of not extracting the files is that you don't run into problems with updates. TDM uses files with the priority "files in the currently selected FM-folder", then "extracted files", then pk4-files. Thus, when you extract them and install an update, TDM uses the extracted files, which did not get updated.

You can set spawnargs on def attached entities (which lights are) as described on this wiki page: http://wiki.thedarkmod.com/index.php?title=Combined_light_entities under the section setting spawnargs. However, if you want to have a lot of entities with the same properties it may be easier to modify the def.

Regarding finding files (and their contents) inside pk4-files, SteveL gave me a Python script that can do that. Unfortunately, I am out of town this week, so I don't have access to it right now, but if you like, I can look it up for you next weekend.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I decided to unpack the files anyway. I like being able to flip through the folders with ease to see the file structure. I decided to go with a different texture that already has the ability to frob highlight, since I couldn't figure out what to change. I also added separate light entites to model lights. I know I've tried adding spawnargs before and it didn't change diddly squat ingame. It's really only a handful of light fixtures so it's not a big deal.

 

I have a few other persistant annoyances in my mission that I can't seem to get rid of though. Right now I'm trying to figure out why my card playing AI will sometimes have a card permanently attached to their right hand, causing them to spam the console with error messages every time they pick up a new one. What really made me scratch my head is that is the same exact prefab that I've used in previous missions, with the exact same spawnargs, yet that doesn't happen in those other missions. It is also kind of random, every time I load up the map, a different card player is experiencing the bug, some times all of them, sometimes just one. Very frustrating... has anyone run into this before? I feel like I've seen it before while building, but from what I can tell I never applied any fixes (and yet it went away).

Share this post


Link to post
Share on other sites
yet that doesn't happen in those other missions. It is also kind of random, every time I load up the map, a different card player is experiencing the bug, some times all of them, sometimes just one. Very frustrating... has anyone run into this before? I feel like I've seen it before while building, but from what I can tell I never applied any fixes (and yet it went away).

 

 

I haven't seen it, but as a shot in the dark, do you have uncapped FPS on?

Share this post


Link to post
Share on other sites

 

I haven't seen it, but as a shot in the dark, do you have uncapped FPS on?

 

Hmm, yeah it could have been... some scripts are tied to FPS. I did infact have the FPS uncapped, but I tried turning it off just now and it's still happening. Also it was not happening in my older missions with uncapped FPS.

Here are the error messages in detail, if it helps:

 

WARNING: Already have an attachment at hand_r, skipping frame command.

WARNING: Cannot find attachment 'card' to destroy in animation.

Those two lines pop up in the console every time the card playing AI goes through the draw card animation, if he's affected by the glitch. Different AI are affected at different times it seems.

Edited by Bienie

Share this post


Link to post
Share on other sites

Reaching deep into the dark recesses of memory, I think this is related to dropping frames...the card is supposed to be destroyed on a specific frame, and if that frame is skipped then it can cause a backup. I don't know what's causing the frames to drop in this case though.

Share this post


Link to post
Share on other sites

Recreating Thief's exploding barrels has been on my list of things to try for a while; I just haven't got around to it. I can't remember offhand whether idExplodingBarrel appeared to be doing anything that e.g. a modified mine couldn't.

 

To my mind, since we're dealing with a toolkit for making missions, whether something has been used yet is less of a guide to its potential usefulness than whether there's another straightforward way to accomplish the same thing. id made various spawnclasses like idTarget_LightFadeIn for basic tasks a TDM mapper would probably accomplish with a script or S/R. But they also made interesting stuff that's presently dormant (idTarget_SetInfluence, for example).

 

Looking at how explosives are used in Thief (exiting the cathedral in T1; breaking open a bricked-up doorway in Rowena's Curse; an FM I forget the name of that invites you to blow a metal door open), I think it's interesting but my remarks here are applicable, which is why I haven't yet looked into it closely,

 

Ive been thinking of ways of making things more interactive in tdm (using physics) ever since I saw Arcturus' videos on breakable geometry. I miss this a lot in this game, its a pitty how static it feels most of the time. But I cant really think of ways of doing it naturally, other than in scripted scenes. His own experiments were with baked physics, which is a rigid animation that wouldnt take account of the direction of the force, or the geometry around the fallen pieces. A simple example I wanted to try was to create breakable bottles. They do break right now but not realistically, its just a new "broken" model that gets swapped with the original one, no glass pieces and also, no liquid. I thought it would be interesting to be able to throw a bottle against the wall and have the wine fall on a flame, putting it out, like an improvised water arrow of sorts. For an emergency situation, not for general use, but for added realism. We would need a breakable bottle, glass shards and liquid particles that work with the physics of the throw. Would also be nice to actually drop the wine from the bottle by frobbing it upside down and letting the liquid fall, again, for the same effect. Breakable doors and furniture is also very interesting for gameplay of course, specially in horror settings against some real monsters, poltergeist effects and the like (we actually do have it from doom3, a phantom entity that works great, Ive seen it in videos).

 

Im really curious about the set influence thing, been trying to find info about it. Anything that allows the mapper to affect the player view for storytelling purposes. Its a shame theres so little stuff on this.

Edited by RPGista
  • Like 1

Share this post


Link to post
Share on other sites

The ability to span flinders and particle effects when objects break is already coded, presumably you could spawn S/R effects as well. It's an area I've only glanced at a few times.

  • Like 1

Share this post


Link to post
Share on other sites

If anyone wants to play around more with this idea, this is as far as I got a while ago:

entityDef moveable_powderkeg {
"inherit" "atdm:entity_base"
"editor_color" "0 .5 .8"
"editor_mins" "-16 -16 0"
"editor_maxs" "16 16 48"
"editor_rotatable" "1"


"editor_displayFolder" "Moveables/Junk"
"editor_usage" "Moveable barrel. Works just like a func_moveable. However the barrel"
"editor_usage1" "has special handling to make it appear more round. This version also explodes when damaged enough."
"editor_usage2" "Only add model, model_detonate or model_burn or health to override defaults"
"editor_var burn" "number of seconds to burn before exploding."
"editor_model model_damage" "model to leave as damaged base"
"editor_model model_detonate" "ips model to switch to for explosion."
"editor_model model_burn" "ips model to show when on fire."
"editor_var def_debris" "add as many as you like, debris1, debris2, etc.. "
"editor_var health" "how much health the barrel has, default is 5. If burn is set to 1, the health is effectively doubled so you have to kill it twice to get the explosion"
"editor_var respawn" "if non zero the number of seconds to respawn after killed"
"editor_var respawn_range" "no player in distance range to actually respawn - default 256"
"editor_var respawn_again" "try again in seconds if player in range - default 10"
"editor_bool triggerTargets" "if set to 1 will trigger targets after being killed"
"editor_material mtr_lightExplode" "light shader to use for explosion"
"editor_material mtr_lightBurn" "light shader to use for burning"

"spawnclass" "idExplodingBarrel"

"density" "0.02"
"friction" "0.2"
"bouncyness" "0.4"


"model" "models/darkmod/containers/barrell_med.lwo"
"def_debris" "debris_generic1"
"def_debris1" "debris_generic1"
"def_debris2" "debris_generic1"

"model_detonate" "mine_cloud.prt"

"model_damage" "models/darkmod/junk/barrell_broken03.lwo"
// "skin" "skins/exp_barrel_red"
"mtr_lightexplode" "lights/barrelexplode"
"light_radius" "300"
"health" "5"
// sound of shatter on impact or destroyed
"snd_explode" "mine_explode_2"

// propogated sound on impact or destroyed
"sprS_explode" "mine_explode_2"
"snd_bounce" "metal_barrel_impact"
"clipmodel" "models/darkmod/misc/clipmodels/barrell_med_cm.lwo"
}

entityDef debris_generic1 {
"inherit" "atdm:entity_base"
"spawnclass" "idDebris"
"mins" "-3 -3 -3"
"maxs" "3 3 3"

"editor_displayFolder" "x doom3 junk/Debris"
"model" "models/darkmod/junk/generic_shards/ceramicflind04.ase"
//"skin" "skins/exp_barrel_red"

"health" "0" // amount of damage projectile can take if damaged (0 means it can't be destroyed)
"velocity" "100 100 00" // how fast the projectile leaves the gun (or distance if fuse is 0)
"random_velocity" "1"
"angular_velocity" "1 -1 1" // how the projectile is rotating when it leaves the gun
"thrust" "50" // the rate of acceleration (always in the direction of the projectiles model)
"thrust_start" "50" // when to start accelerating
"thrust_end" "0" // when to stop accelerating
"linear_friction" "0.8" // "air" friction
"angular_friction" "1.1"
"contact_friction" "0.9"
"bounce" "0.1" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.
"mass" "4"
"gravity" "266" // how much gravity affects the trajectory. gravity direction is same as the entity that fired it.
"fuse" "15" // how long before the projectile is removed or self-detonates. Use 0 for beam weapons (velocity == distance).

"detonate_on_fuse" "1" // whether projectile should detonate when it's fuse runs out
"detonate_on_death" "0" // whether projectile should detonate when it's "killed" (health runs out)
"detonate_on_world" "0" // whether projectile should detonate when it hits an obstacle
"detonate_on_actor" "0" // whether projectile should detonate when it hits a character in the game

"smoke_fly" "imp_trail2" // particle effect while in the air

// parametric particles -- temp
"model_detonate" ""
"smoke_detonate" "" // particle effect when detonates
"smoke_fuse" ""
"smoke_bounce" ""
}

 

 

I don't remember how much was working. Doesn't look like any damage def was attached yet.

  • Like 2

Share this post


Link to post
Share on other sites

Breaking bottles do spawn flinders - a top half and a bottom half - but there seems to be a problem with them sitting in place instead of flying apart.

 

Talk of liquids and throwing bottles against walls makes me wonder whether there's any way to make moveables splat decals on impact like projectiles can. I see an fx_collide spawnarg but the FX system only seems to like to splat vertically downwards. I also wondered about splats defined in the damage def, but I imagine mtr_killed_splat and mtr_wound won't do anything to, say, a wall. I don't know what mtr_blob does.

 

I'm not actually sure what it would take to spawn S/R effects from a broken moveable, because I think spawning a 'result' entity on detonation might be unique to projectiles. If it is, maybe some kind of invisible flinder entity could provide a work-around... (The burning barrel that then explodes is an interesting case: probably the burning and exploding stages should have different radii for fire stims.)

 

Regarding target_setinfluence, the entity def isn't in TDM's files but you can get one from https://github.com/DanielGibson/d3-base-assets/blob/master/sabase/def/targets.def


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites
If it is, maybe some kind of invisible flinder entity could provide a work-around..

 

 

That would be how I'd try it, with a debris entitydef that has a S/R attached.

 

Breaking bottles do spawn flinders - a top half and a bottom half - but there seems to be a problem with them sitting in place instead of flying apart.

 

 

Do they have impulses set? I've never looked into it. It's possible the required id spawnclasses didn't make the move over when we went standalone.

Share this post


Link to post
Share on other sites

I'm not sure where to look for impulses, but spawnargs like init_velocity are empty.

 

The damage defs used by the fire arrow have "push" values, though, and when I fire one in the test map it sends a few bottles flying. It's the bottles that break that seem not to receive a push (or rather, the flinders that replace them don't).

 

I see http://wiki.thedarkmod.com/index.php?title=Breakable_objects#Todo has the TODO note 'Damage needs to be calculated from the impulse, not from a fixed set of "damage" values', but I'm not sure what that implies for the current physics.

 

Broken bottle parts have the idMoveable spawnclass, not idDebris: they're standard physics objects the player can grab, etc. (A second fire arrow sends them flying as one would expect.) Oddly, intact bottles have idBarrel (because they're approximately cylindrical, maybe?).

  • 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

Examine what happens when broadheads hit hard surfaces. The two flinders of the broken arrow are given velocity vectors, IIRC.

Share this post


Link to post
Share on other sites

Hey guys, really cool research there, this is pretty exciting. The best case scenario I think would be to have a complete replica of the bottle model, but broken up into several small pieces, that would replace the original one on impact, each shard then carrying its velocity and vector, etc., just like you guys are discussing. Im gonna provide us with one (bottle model), maybe we can use it for further tests.

 

PS: What would be the best way of doing it? Each shard is a different model/entity but they all share the same origin?

Edited by RPGista

Share this post


Link to post
Share on other sites

I'm not sure where to look for impulses, but spawnargs like init_velocity are empty.

 

 

"idDebris" used the following spawnargs related to movement:

 

 

"velocity" "100 100 00" // how fast the projectile leaves the gun (or distance if fuse is 0)

"random_velocity" "1"

"angular_velocity" "1 -1 1" // how the projectile is rotating when it leaves the gun

"thrust" "50" // the rate of acceleration (always in the direction of the projectiles model)

"thrust_start" "50" // when to start accelerating

"thrust_end" "0" // when to stop accelerating

"linear_friction" "0.8" // "air" friction

"angular_friction" "1.1"

"contact_friction" "0.9"

"bounce" "0.1" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.

"mass" "4"

"gravity" "266" // how much gravity affects the trajectory. gravity direction is same as the entity that fired it.

 

However, broken arrow pieces do not use any of those spwanargs...I can't tell what's giving them any impulse. They're just regular movable entities.

 

edit: Ah, maybe it's this line on atdm:result_arrow_broadhead: "velocity_xfer_dud" "0.8" // fraction of velocity to transfer to spawned object/s

 

The best case scenario I think would be to have a complete replica of the bottle model, but broken up into several small pieces, that would replace the original one on impact, each shard then carrying its velocity and vector, etc., just like you guys are discussing. Im gonna provide us with one (bottle model), maybe we can use it for further tests.

 

 

We already have a bottle model and two broken pieces. I don't think you'd want any other actual models, but a glass fragment particle effect would be nice.

  • Like 1

Share this post


Link to post
Share on other sites

How do I use the entity "func_peek"?

 

This seems to be something new (at least I have not seen it before) and I cannot find it in a mission.

 

The description says, I can place it on the keyholes of door models. I did so, but nothing happens. :(

 

This would be extremely cool for my next mission.

Edited by JackFarmer

Share this post


Link to post
Share on other sites

Thank you Destined, just fnished reading through this thread.

 

Unfortunately, I can not learn much from it. I tried now to bind the entity to the door model and then tried the same with the target function - both times with no effect. :(

Edited by JackFarmer

Share this post


Link to post
Share on other sites

@Jack: Do you have an example of how you're using func_peek? PM me and I'll get you fixed up.

Share this post


Link to post
Share on other sites

Anybody got some experience with troubleshooting doors that start way outside of their frames? I've got a couple that start on the floor below, then when frobbed they slowly float back to where they should be. While they're floating they can still be 'opened' & 'closed' normally. It's variable which doors are affected, it changes every few days.

Share this post


Link to post
Share on other sites

You can try binding the whole thing to a no-draw entity, Dragofer, as an anchor.

Why it's random though... are you sure the goat you sacrificed was a virgin last full moon? Cos some ppl have been selling non-virgin goats and there's been some issues...

  • Like 1

Share this post


Link to post
Share on other sites

Vanished one - I will find my notes on causing damage with stuff like that - hopefully it will help you - it has a bunch of stuff about damage over velocity and that, but not quite done in the way the games s/r code is set.
I'll PM you a link to my blog when I find it!

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