Jump to content
The Dark Mod Forums

Powder kegs


VanishedOne

Recommended Posts

  • It's so sensitive to moveable damage, you can set it alight by rubbing a loaf of bread against it.

Looking at the entity C++ code it seems that bumping a bread loaf or any other generic item into an explodable barrel causes actual damage to the barrel.

That means that you can break anything damageable with it with enough effort, possibly even kill a revenant.

Where to from here?

Link to comment
Share on other sites

That means that you can break anything damageable with it with enough effort, possibly even kill a revenant.

 

 

While throwing objects at AI can do some small amounts of damage, the code is not supposed to let it kill AI. And I've never heard of simply bumping held objects into AI doing damage.

 

How much control do we have over the damage movable objects do to other movable entities? If we could make some kind of threshold value that has to be done in one shot to activate the powderkeg, we could avoid the issue of small damage building up.

Link to comment
Share on other sites

 

If we could make some kind of threshold value that has to be done in one shot to activate the powderkeg, we could avoid the issue of small damage building up.

I was thinking more in terms of "armor", i.e. every damage piece gets decreased by a fixed per-entity value.

 

 

While throwing objects at AI can do some small amounts of damage, the code is not supposed to let it kill AI. And I've never heard of simply bumping held objects into AI doing damage.

You'd need to add an AI to the test map so that I can look into it.

Link to comment
Share on other sites

I spawned a revenant and tried to hit him with the loaf.

It did not inflict any damage.

Now the difference between AI and regular entities is: AI damage is processed in idAI::Damage/idActor::Damage and entity damage - in idEntity::Damage

I guess we can safely add more logic to the latter and that would not affect AI's.

Ideas?

Link to comment
Share on other sites

Apparently AI (and players) had a similar-sounding problem at one point: http://bugs.thedarkmod.com/view.php?id=3370

 

 

Moveables aren't supposed to hurt actors unless there's a lot of mass and velocity involved.

 

I don't know whether this still holds:

 

 

For some reason, moveables can attain very high velocities for very short durations.

 

I wonder whether any of the stress/torque stuff in http://wiki.thedarkmod.com/index.php?title=Breakable_objects reached a working state.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I wonder whether any of the stress/torque stuff in http://wiki.thedarkmod.com/index.php?title=Breakable_objects reached a working state.

 

"Damage needs to be calculated from the impulse, not from a fixed set of "damage" values." Yeah, this I think would be crucial (if it is yet to be implemented). Testing physics in the game is hard because the results dont seem very consistent. Dropping heavy objects on AI seems to work well most of the time. The biggest issue seems to be the transfer of force between one entity and another. If you frob a medium sized object and you force it against another medium sized object, it will push it ok on the path you direct it (idtech4 physics is a bit quirky and not the prettiest to look at, but ok) - if however the object you are pushing meets another resting object on its way, it will almost always stop cold, even if the other object is very small and seems like it shouldnt pose an obstacle to the forces involved. Sometimes the pushing will eventually resume if you keep insistin, and everything will be pushed foward, sometimes they will get stuck for good and only changing direction will further displace them.

 

Throwing an object against hard surfaces do not seem to damage it. But hitting it with other objects does.

 

If you have several objects stacked or next to each other, even if their mass is light, applying force to the botton one will often result in nothing, specially if there are a good number of them in the group.

Edited by RPGista
Link to comment
Share on other sites

  • 9 months later...

According to this, the reason TDM mines don't have fire stims is that they're intended to be non-incendiary kinetic explosives:

Quote

Basically, the main effect of a mine is an explosion. If you blow up some powder, you won't get nearby objects on fire.

So where does this leave powder kegs: incendiary or non-incendiary?

I've been trying to research gunpowder blasts, but while there are loads of sites explaining deflagration versus detonation, trying to find out about e.g. the possibility of secondary ignition caused by sparks from a powder blast has probably just got me on government watch lists. I did find a couple of assertions about fires arising from explosions:

Quote
Quote

So I'm not certain black powder is non-incendiary (if you want an explanation for non-incendiary mines, maybe they use some form of high explosive). Anyway, powder kegs: with the current set-up they have a 'burn' phase prior to the actual explosion, perhaps implying the wooden keg has caught fire first, and hence that they chuck embers (def_debris) around as well. Do we want them setting flammable things on fire?

Edited by VanishedOne
  • Like 1
  • Haha 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

  • 5 weeks later...

Here is how I thought of it in my implementation:

The explosive urns I made provide a 110 unit fire stim , have 150 health, and do enough damage to kill most AI within a small radius blast.  The sound of them dropping nearby and exploding will alert an enemy , but they do not react to them being lit. They fizzle out in water and are set to a specific weight so they are easy to move around and set up ambushes.  I also wanted players to be able to shoot them with broadheads so  I ended up accepting that damage is damage and if you hit them enough times with the blackjack they will explode. 

 My point being in order to get those urns to work I had to touch a bunch of other stuff custom to that FM. I also gave up on the idea that they are black powder because that thinking led me to harder and more complicated problems.

 

From my point of view, I think it would be great to have more code support for the basic destructable crate:

- Inherits properties of a regular moveables

- Has health that when 0 it "explodes". Bonus if it can ignore certain damage types but Im not sure how that would work.

- Spawns flinders and has a spawn arg for how much impulse to apply to them.  Could just be generic away from origin impulse.

- Spawns an object and triggers it through spawn args. Ex: "object_to_spawn"  "atdm:item". "trigger_item_on_spawn"   "1".

From there we could probably implement all the rest of the explosive barrel stuff and it would be a destructable class for mappers to play with. Really the only thing I see missing from the breakable class we already have is the flinder impulse and spawn item stuff, but I could be wrong. 

Edited by kingsal
Link to comment
Share on other sites

11 hours ago, duzenko said:

Can we have a test map for this?

You can just use atdm:moveable_breakable_crate01 in your map. 

You can copy paste this into the editor:

Version 2
// entity 0
{
"classname" "atdm:moveable_breakable_crate01"
"name" "atdm_moveable_breakable_crate01_1"
"origin" "0 0 0"
"def_flinder" "atdm:moveable_junk_plank_scrap01_short"
"health" "5"
"def_flinder1" "atdm:moveable_junk_plank_scrap01_short"
"def_flinder2" "atdm:moveable_junk_plank_scrap01_short"
"flinder_offset" "5 5 0"
"flinder_offset1" "-5 -5 0"
"flinder_offset2" "0 0 0"
}

This is set up similar to the breakable bottles in tdm_moveable_kitchen.def:

entityDef atdm:moveable_kitchen_breakable_base {
	// for bottles, to make them roll better
	"inherit"				"atdm:moveable_barrel_base"
	"frobable"				"1"
	"is_mantleable"			"0"

	"editor_displayFolder"	"Moveables/Kitchen"
	"editor_usage"			"Don't use. Base class for all TDM breakable kitchen moveables."

	// tels: these two flinders are spawned if the bottle gets broken:
	"def_flinder"			"atdm:moveable_junk_wbottle01_broken"
	"flinder_offset"		"1 0 -3"
	"def_flinder1"			"atdm:moveable_junk_wbottle01_broken_top"
	"flinder_offset1"		"0 0 13"

	"snd_bounce"			"tdm_impact_bottle_01"
	"health"				"20"
	"friction"				"0.1"
	"bouncyness"			"0.01"
	"mass"					"0.5"
	
	"snd_bounce_carpet"                                 "tdm_impact_carpet"
        "snd_bounce_cloth"                                "tdm_impact_carpet"
	"snd_bounce_grass"					"human_grass"
	"snd_bounce_dirt"				"tdm_impact_dirt"
	"snd_bounce_snow"				"tdm_impact_dirt"
	"snd_bounce_wood"                    "tdm_impact_bottle_on_wood"
}

 

  • Like 1
Link to comment
Share on other sites

9 minutes ago, kingsal said:

You can just use atdm:moveable_breakable_crate01 in your map. 

You can copy paste this into the editor:

This is set up similar to the breakable bottles in tdm_moveable_kitchen.def:

 

That would be as uncomfortable for me as programming C++ code for you :)

Link to comment
Share on other sites

1 hour ago, duzenko said:

That would be as uncomfortable for me as programming C++ code for you :)

No Problem. Ill get you something to use when I get the chance.

Edited by kingsal
Link to comment
Share on other sites

  • 3 weeks later...

Hey guys, sorry it took my a while to get to this, but here is a test map for this problem:

Breakable crate test map

I included the breakable crates and explosive urns as well as flint and tools to break them with. I also threw in some AI and different distances to drop the crates from. It would be awesome if we can figure out a way to have crates break and take damage from velocity.

 

Hope this helps get things started.

Edited by kingsal
  • Like 1
Link to comment
Share on other sites

58 minutes ago, kingsal said:

Hey guys, sorry it took my a while to get to this, but here is a test map for this problem:

Breakable crate test map

I included the breakable crates and explosive urns as well as flint and tools to break them with. I also threw in some AI and different distances to drop the crates from. It would be awesome if we can figure out a way to have crates break and take damage from velocity.

 

Hope this helps get things started.

Thanks

What seems to be the problem?

I can both break a crate and trigger urn explosion with a sword

Link to comment
Share on other sites

On 1/31/2020 at 12:11 PM, kingsal said:

my point of view, I think it would be great to have more code support for the basic destructable crate:

- Inherits properties of a regular moveables

- Has health that when 0 it "explodes". Bonus if it can ignore certain damage types but Im not sure how that would work.

- Spawns flinders and has a spawn arg for how much impulse to apply to them.  Could just be generic away from origin impulse.

- Spawns an object and triggers it through spawn args. Ex: "object_to_spawn"  "atdm:item". "trigger_item_on_spawn"   "1".

From there we could probably implement all the rest of the explosive barrel stuff and it would be a destructable class for mappers to play with. Really the only thing I see missing from the breakable class we already have is the flinder impulse and spawn item stuff, but I could be wrong. 

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. 

Edited by kingsal
Link to comment
Share on other sites

@duzenko if it helps any, you can create new entities in Doomscript like this:

entity new_entity = sys.spawn("classname_of_entity");	//the .def defining the classname contains inherit

new_entity.setKey("noshadows", "1");		//change spawnargs of the spawning entity if wanted
...

sys.waitFrame();				//entity defined in previous frame is now fully spawned, this step might not be necessary though

...

sys.wait(5);
new_entity.remove();

 

Link to comment
Share on other sites

@grayman

Why does a flinder entity remain stuck in air after the crate breaks?

Looking at idEntity::SpawnFlinder I can't see anything wrong.

Are all newly spawned entities frozen?

	// if putting the body to rest
	if (dropToFloor && !self->m_droppedByAI) // grayman #1330 - only go straight to the floor if an AI didn't drop it
	{
		DropToFloorAndRest();
		current.externalForce.Zero();
		current.externalTorque.Zero();
		return true;
	}

 

Link to comment
Share on other sites

No, newly-spawned entities aren't frozen by default. Their drop-to-floor spawnarg says whether they should find the floor or stay put when spawned. Moveable entities typically drop.

Is the flinder hitting something on its way down?

That would stop its movement.

 

Link to comment
Share on other sites

7 hours ago, grayman said:

No, newly-spawned entities aren't frozen by default. Their drop-to-floor spawnarg says whether they should find the floor or stay put when spawned. Moveable entities typically drop.

Is the flinder hitting something on its way down?

That would stop its movement.

 

The @kingsal's test map above should demo this clearly.

For me the 3 flinder pieces remain stuck in the center position of the destroyed crate.

Link to comment
Share on other sites

Flinders' spawning with no velocity is an old bug. My comment from #4230: 'A bit of playing with breakables suggests that a single flinder spawns on the ground, 2+ flinders created with flinder_count (as opposed to two separate def_flinders, which can be given unique offsets as seen on the bottles) hover where they spawn.'

As I say here, it's a bit unclear how the flinder system is supposed to be used, since the example on the wiki actually has "def_flinder" pointing to models, not entity defs. Apparently breakability in TDM is a bit of an old unfinished project: note the w.i.p. warnings on https://wiki.thedarkmod.com/index.php?title=Breakable_objects

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

The exploded crate flinders appear to be touching each other when spawned.

Each flinder comes to a stop when this happens.

If you launch another fire arrow, you can see that the concussion affects the flinders, sending them apart, after which they fall to the ground.

I suggest the flinders not be spawned so close to one another.

Link to comment
Share on other sites

42 minutes ago, grayman said:

The exploded crate flinders appear to be touching each other when spawned.

Each flinder comes to a stop when this happens.

If you launch another fire arrow, you can see that the concussion affects the flinders, sending them apart, after which they fall to the ground.

I suggest the flinders not be spawned so close to one another.

Could you fix that and verify that flinders maintain their programmed velocity? I.e. not just fall down vertically.

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

    • 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
    • nbohr1more

      Congrats to all the busy Dark Mod developers! TDM 2.12 is here!
      · 4 replies
×
×
  • Create New...