Jump to content
The Dark Mod Forums

Powder kegs


VanishedOne

Recommended Posts

When a firearrow hits an exploding crate, it imparts its linear and angular velocities to the flinders.

For the case of the firearrow, this works ok: the flinders fly off, ending up scattered around on the floor.

For the case of holding a torch next to the crate, however, the torch has no velocities, so the crate simply breaks (no explosion) and the flinders fall down to the floor.

I suggest giving random velocities to the flinders rather than taking them from the object that triggered the explosion. This should fling flinders in all directions, regardless of what the activating object was.

Things to check: how do other breakables (fractures, etc.) deal with their flinders. Breaking a window with an arrow might look better if the flinders don't fly away.

Comments?

Link to comment
Share on other sites

1 hour ago, grayman said:

When a firearrow hits an exploding crate, it imparts its linear and angular velocities to the flinders.

For the case of the firearrow, this works ok: the flinders fly off, ending up scattered around on the floor.

For the case of holding a torch next to the crate, however, the torch has no velocities, so the crate simply breaks (no explosion) and the flinders fall down to the floor.

I suggest giving random velocities to the flinders rather than taking them from the object that triggered the explosion. This should fling flinders in all directions, regardless of what the activating object was.

Things to check: how do other breakables (fractures, etc.) deal with their flinders. Breaking a window with an arrow might look better if the flinders don't fly away.

Comments?

I tested this with a sword strike but anyway

The `external` entity in idEntity::SpawnFlinder seems to be fixed to `gameLocal.world` by idPhysics_RigidBody::ApplyImpulse

So not sure how you end up with fire arrow impulse

In any case, idEntity::SpawnFlinder assigns random velocity and impulse but it's not respected per my description above

Did you commit your fix to svn yet?

 

Link to comment
Share on other sites

On 2/21/2020 at 12:39 AM, kingsal said:

Would like to have script support for a better breakable crate, rather than hacking it together with stims and responses and firing invisible explosions to make it flinder.

 

Edit: The basic destructable crate does not send and impulse to the flinders. They just spawn and float mid-air which obviously isnt how that should work. 

Can you test the @grayman changes?

Link to comment
Share on other sites

@duzenko - So I downloaded the latest source code of the SVN and will try to compile it. Do you know where I can grab all the newest content? Do I need any of that for this latest build to work?

Link to comment
Share on other sites

Scratch that- I was able to get it working without needing the new content. 

 

@duzenko @grayman - This looks great! Needs a lot of testing but this is a good start I think. Is it still possible to add an impulse to these flinders? Im thinking it would be beneficial in some cases where a mapper might want to give the illusion of an explosion without having to spawn an explosion and then trigger it. 

Also- Will we be able to add velocity / fall damage to the crate and bottles? So in the case a player throws a bottle or crate hard enough it shatters. 

Link to comment
Share on other sites

4 hours ago, kingsal said:

Is it still possible to add an impulse to these flinders? Im thinking it would be beneficial in some cases where a mapper might want to give the illusion of an explosion without having to spawn an explosion and then trigger it. 

Also- Will we be able to add velocity / fall damage to the crate and bottles? So in the case a player throws a bottle or crate hard enough it shatters. 

Have you looked at idDebris, like I mentioned on the tracker? The powder keg (not your urn, the w.i.p. idExplodingBarrel keg) spawns some as def_debris. Edit: however, just spawning one from the console doesn't 'launch' it. I just had a look for a way to do that at will, and didn't find one.

(Edit2: by the way, my suggestion for creating 'the illusion of an explosion' would be the FX system: you can tie together sound, lights and particles, and there's even a 'launch' command that's supposed to launch projectiles, though it was unused in D3 and I haven't tested it. Maybe launching debris could be added to that.)

https://wiki.thedarkmod.com/index.php?title=Breakable_objects#Todo claims that wine bottles break under force, but I've been throwing one around and it didn't break even after I added "max_stress" and "max_torque" spawnargs.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Ill have a look at the def_flinder stuff. Can you send me the .def of the idExplodingbarrel you are talking about?

How in depth mappers want to go with custom explosions is up to them I suppose, but basic flinder chunks with impulse will better sell the illusion. Its hard to do that without custom texture work and fiddling with the fx editor.  

 

Link to comment
Share on other sites

The def in the OP should still be current. There's a test map to go with it here.

One detail: idDebris is intended to have a 'fuse' like a grenade and be removed from the game world when it runs out (optionally with particle effects, and there seems to be shaderparm support for 'burnaway' effects like D3's dead monsters' too). Whereas flinders like those used by the wine bottles are standard moveables, so they persist and can be grabbed.

While getting the links to my previous posts I found this one too, which may be of interest re. mappers' control of collision effects.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I checked out the powder keg. Thats pretty interesting and seems like a good start. 

I personally like the moveable flinder object method as you get more realistic physics and can  attach more properties to those  ( AI suspicion , or sound prop alerts, ect).  However, maybe idDebris are safer since this is their intended use.  Can idDebris  fly in a random vector when spawned?  Right now they just slide across the floor. This might be because they spawn at the barrels origin. 

 

Either way both solutions  can serve different purposes in my opinion. Maybe for exploding barrels it makes sense to use idDebris, but for breakable crates and bottles its better to leave behind moveable flinders. 

Link to comment
Share on other sites

It might be worth fiddling with the spawnargs, which are possibly just D3 values carried over. If "velocity" "100 100 00" uses the world axis then it's 0 in global z. (Then "random_velocity" is turned on, which apparently semi-randomises the values in all three axes.) Also "gravity" "266" must be pulling them downwards.

Yes, I agree it's good to have both. The flinder system seems to be intended for cases where the direction comes from an external impulse, and spawnargs only determine mass, friction, etc.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

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

    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 0 replies
    • The Black Arrow

      Any of you heard Age of Wonders 4's OST?
      https://www.youtube.com/watch?v=Q0TcoMGq4iA
      I love how after all these years, Michiel van den Bos still conserves his "Melodic" spirit.
      · 0 replies
    • nbohr1more

      Moddb article is up:  https://www.moddb.com/mods/the-dark-mod/news/the-dark-mod-212-is-here
      · 3 replies
    • Petike the Taffer

      I've been gone for a while, but now I'm back, have a new desktop and I want to get back to making missions and playing missions. And doing other contributions. Waiting for my reset password for the wiki, but I'll take a look at it soon. Hello, all.
      · 4 replies
    • snatcher

      TDM Modpack 4.0 for The Dark Mod 2.12 released!
      · 1 reply
×
×
  • Create New...