Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: UBStep and LBStep with extra body parts?  (Read 4063 times)

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
UBStep and LBStep with extra body parts?
« on: March 19, 2008, 11:19:00 pm »

This is basically a question about armor coverings on modded creatures.  

Would the "steps" on a platemail protect a modded creatures wings?  What about lower body armor and a tail?  Extra limbs? Quadrupeds?

I tried to test this myself but with minimal control over the different variables that could come up like the hitting creature having more than average strength, weapon power variances in the damage roll and other such things my results were inconclusive.

Does anyone know a reliable way to test? Or better yet, already tested and knows the answer?  This is kinda puzzling me.

[ March 20, 2008: Message edited by: Greiger ]

Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: UBStep and LBStep with extra body parts?
« Reply #1 on: March 20, 2008, 08:42:00 pm »

Okay, lessee...  for armor, start at the body part you are checking.  If it the part the item is being worn on, or it is a lower body and it's parent is the part the item is being worn on, then it gets the main blocking number.

Otherwise, does the part have a descendant that is a stance point as does not have an intervening upper/lower body?  Stance points determine whether it's upper or lower (UBSTEP or LBSTEP).  Stance points must be connected through [LIMB]s to the part for the stance point to be recognized as relevant.

We still need to check if the part is related to the item at all.  Go up the part's ancestors, counting steps (do not count steps as you pass through bodies).  If you hit the parent, good, use that number, plus whether it is "lower" or not, and compare it to the proper steps variable.  However, if you pass through an UPPER/LOWERBODY on the way, and then aren't in one, you aren't related to the armor item, and it bails.  If you do something odd like attach a lower body to another lower body which is attached to the upper body the item is on, I think it will respond poorly, covering any legs attached to the lower-lower body, but not covering the lower-lower body itself, so bodies attached to bodies attached to bodies aren't supported yet as far as armor goes.

In short, armor protects an upper body and any attached lower body with the main number, as well as any other attached non-bodies attached to the bodies, without intervening bodies.  Descendant stance points determine if UBSTEP or LBSTEP is used.

I tested this a bit back when I added it, and a few times since then, but there might also be problems of course.

So if I'm reading the code right and haven't missed anything, if you have a bipedal creature with wings and a tail, the wings will be covered by [UBSTEP:<N>] if N>=1, and the tail is the same way, even though it goes up through a lower body first, since it has no stance point.  If you add a foot on the end of the tail, you'd use [LBSTEP:<N>], N>=1 instead.  Extra limbs are all covered as regular limbs.  Quadrupeds would have their "arms" covered by LBSTEP instead of UBSTEP.

Logged
The Toad, a Natural Resource:  Preserve yours today!

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: UBStep and LBStep with extra body parts?
« Reply #2 on: March 21, 2008, 11:38:00 am »

So that's what you have [LIMB]s for...  damn. Oh well, that feature of my mod wasn't that important...

You really should start making single-meaning tags for stuff. [LIMB] also happens to mark that the part can be used to grab when wrestling...

Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: UBStep and LBStep with extra body parts?
« Reply #3 on: March 21, 2008, 11:48:00 am »

Wow, that is pretty complex. I suppose it needs to be with all the weird stuff you can do with bodies.

Thanks for the help Toady! I had given up hope on this being answered.

(Kinda Off topic: Just tried out Armok 1.  I'm guessing it uses the same body part system?  Anyway it's a pretty neat game too and didn't wanna make a new topic just for more generic praise.  It's fun dismembering a bunny rabbit limb by limb with teleportation and then using the blast part spell on whats left.  :D You are a programming and design mastermind good sir.)

Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: UBStep and LBStep with extra body parts?
« Reply #4 on: March 31, 2008, 06:44:00 pm »

I'd like some clarification since I fail at reading comprehension.

Limb protection only applies if the body part directly connected to the protected body has the [LIMB] tag, right?  So if we want to protect a tail, it must be a limb.

Does UBSTEP:/LBSTEP:MAX protect everything from the base of the limb down to the extremities, or does it only protect contiguous [LIMB] parts?  In other words, can a single piece of body armor protect my toes, or only down to my feet, or only down to the lower leg?

Logged

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: UBStep and LBStep with extra body parts?
« Reply #5 on: April 04, 2008, 11:59:00 pm »

Bumping this may be bad form, but I really would like some clarification.
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: UBStep and LBStep with extra body parts?
« Reply #6 on: April 05, 2008, 11:07:00 am »

If I read it right I think a tail would be protected by a lower body armor with UBstep greater than 1 even if not a limb because it is one "step" away from the lower body.  But if it was a limb with a stance on the end it would be protected by LBstep instead.

Same with wings and upperbody armor.  Even if not a limb(the vanilla wings are limbs, they can grapple too but my race has custom wings that don't grapple) they would still be protected by an UBstep of 1 because they too are only one step away.

At least I think...the MAX thing I'm not so sure about.  From the description I think it would cover everything  connected to the upperbody that doesn't go through the lower body first.  Hope that helps and isn't horribly wrong.

Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!