Jump to content
The Dark Mod Forums

Random Idea: Attachable Armor?


Ishtvan

Recommended Posts

Helmets *are* supposed to make them impervious to damage. Metal armour causes arrows to bounce off and break, so no problem there. Cloth hats and hoods aren't supposed to stop any damage at all, and making them nonsolid ensures that, so no problem there.

I'm talking about melee damage. Is the intended design that any helmet will stop 100% of melee damage? You hit a guy with a chainmail coif with a fully "powered up" overhand sword blow and no damage? If that's the case we're okay, if not, we would have to write extra code to propagate the damage, or make the chain coif part of the head model instead of a separate entity.

Link to comment
Share on other sites

Yes, plate is supposed to stop all melee damage as well, which is why only the elites have much plate armour on them (well, them and the builder guards, but the builders have bare heads to compensate--I was actually thinking of this stuff when I did the concepts. :) )

 

Chain mail is the only problem, as I said. It could either be part of the head model (which makes the head less versatile, since it can only be used for warriors), or it could be a separate model set to non-solid. That means chainmail on the head wouldn't give you any protection, but I can live with that.

Link to comment
Share on other sites

That means chainmail on the head wouldn't give you any protection, but I can live with that.

Yeah, that sounds perfectly reasonable to me. A sword to the head is going to hurt even if you are wearing chainmail, I expect; and while it technically should give you some protection, it's not like anyone's really going to notice. Even if they do, they won't care; simulating armour is not a very critical problem.

 

I think this particular corner sounds like a good one to cut. :) If it turns out to be a noticeable problem (which I doubt) we can worry about it after release.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Okay, that sounds like it should work. We can still have the chainmail give some protection via the texture dependent damage code. Assuming that is still a viable option performance-wise. Atti's stress test map of multiple textures on the same entity seemed to indicate that it's not that big a hit, but now that we're talking about separate heads and more attached entities, that increases the number of things that need to be displayed separately, per AI.

Link to comment
Share on other sites

Hmm, on second thought, this system might still need a change to propagate the damage. The thing is, if the helmet is a separate entity, any and all kinds of damage will only be applied to the helmet and not the AI. There are certain things that definitely should kill/damage an AI with a helmet, like a giant stone block falling on them, or a steam bot cannonball (if we decide to have those) hitting them right in the head. [EDIT: Imagine if you had a trap room with a ceiling that comes down and crushes things. It would be pretty silly to have the ceiling stop when it hit an AI's helmet and just have the AI be wedged in there supporting a whole ceiling without any damage.]

 

Explosions might still work because they have splash damage (although maybe not if it does a trace to determine splash damage, since the explosion epicenter would be on the other side of a solid object).

 

So there are some cases where we want the damage to be propagated from helmet to AI. I wonder if there's an easy way to do that in scripting. It should be possible using SIGNAL_DAMAGE (see documentation forum) to call a script that damages the owner of the helmet, but we're still not sure that signals were completely implemented by Id, since Gildoran said he tried to set up a signal and it didn't do anything.

 

Or, we could also look at how damage gets propagated from the attached head entity to the AI, since that is also technically a separate, attached entity. I think that would be best initially.

Link to comment
Share on other sites

AFAIK the scripting language is in the SDK. I'm not 100% if really everything is there, but when I tracked the bugs with the arrows, that we had some months ago, I stepped through the scripting code. The interpreter should definitely be there, so I assume also the parser will be there. So if these signals are missing, or we need some additional functionality, we can extend that.

Gerhard

Link to comment
Share on other sites

Related issue:

A lot of the guard models have cloth on the outside of the armor/chainmail. So if we fire an arrow at a guard, like the proguard, the arrow will kill him because the arrow will hit the cloth first. Would it be better to treat that cloth like it's chainmail?

Link to comment
Share on other sites

A lot of the guard models have cloth on the outside of the armor/chainmail. So if we fire an arrow at a guard, like the proguard, the arrow will kill him because the arrow will hit the cloth first. Would it be better to treat that cloth like it's chainmail?

 

Absolutely! The material type isn't supposed to identify what you see visually, it's what you would impact if you hit it. The hardest surface type should be the one listed, regardless of how many layers there are (eg, cloth over metal plate over chain would be 'metal'.)

 

Hmm, on second thought, this system might still need a change to propagate the damage. The thing is, if the helmet is a separate entity, any and all kinds of damage will only be applied to the helmet and not the AI.

 

Hmm, good catch. Though those are probably rare situations.

Link to comment
Share on other sites

Okay, a little research on how damage is passed from the head shows the following: Head is class idAFAttachment.

 

/*
============
idAFAttachment::Damage

Pass damage to body at the bindjoint
============
*/
void idAFAttachment::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, 
const char *damageDefName, const float damageScale, const int location, trace_t *tr ) {

if ( body ) {
	body->Damage( inflictor, attacker, dir, damageDefName, damageScale, attachJoint );
}
}

 

So AFAttachments have a member var "body" that must be set to their parent body, by calling this:

idAFAttachment::SetBody( idEntity *bodyEnt, const char *model, jointHandle_t attachJoint )

 

In other words,

1. All attachments that we want to propagate damage should be of class idAFAttachment, meaning they must have spawnclass "idAFAttachment" in their def.

 

2. We need to modify my idActor::Attach code to call SetBody on AF Attachments. I tried to do this just now. I'll upload to CVS shortly, but I'm not sure about one part of it, the part where it gets the modelname. I'm trying to get "model" from the spawnArgs of the thing that's attached, but I'm not sure that's the right way to go about doing it. The only way to find out for sure if that works is to try it out with a test helmet.

Link to comment
Share on other sites

I'm going to assume this thread was locked by accident...if someone did that on purpose, PM me.

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...