Help with Shields Vs. Bots

Users who are viewing this thread

Scarebear

Recruit
Hello TW Forum goers! Tis my first post, and I hope I do not offend. First I shall pose my question, then display what I have done or thought of in terms of solving it.

As we all know, the Multiplayer side of Warband implements an "Enhanced" hitbox for shields. I've seen many threads whining and/or debating this, luckily, this is not why I'm here. I am developing a small module for a friend and myself, as sometimes we like to just jump on and kill some bots together (She is across the continent, so Warband is one of the few things we can do together). Also, I am not a hardcore PVP addict, nor do I believe the solution to everything is to 1. Whine, 2. Whine, or 3. Nerf and whine. I'm sure I'm in the minority with what I'm about to ask, if the search function is any indicator. But enough jibber jabber.

In Short: Is the Multiplayer hitbox used for Shields hard-coded, or is there a way that it can be modified?

If it's the former, than obviously case closed. However, if it's the latter, some help in locating or figuring out what to change would be greatly appreciated. I've trawled through the python files time and again, but maybe I missed something. A few workarounds I was throwing around was just downsizing all shield areas, but would that even affect MP? There are many questions, and I cannot seem to locate some answers. I've used the search function for some time, I've used a broader search on Google as well (Praise google... Oh wait...), and all I've found are threads that cry foul for a nerf. I am just making something for a friend and me, not something to pollute the forums with another rendition of "I can do it better than TW can.", or to push my beliefs of balance on others. We like being archers from time to time (Come full circle to the entire reason of this overly-lengthy post), and I'll be damned if those small round shields weren't black holes unto themselves sometimes.

Anyways, sorry if I've stammered on too long for a simple question, but I'm willing to put forth my best effort and share findings if I have any on this. Thanks in advance for the help. ~SB
 
Turning down shield skill (to 0) on bots is really all you need to reliably hit them in the face, as native shield sizes are relatively well-adjusted. Obviously this needs to be done on the server side.
 
Thank you for the timely response Somebody. I will give that a try now.

-Update-

That is much, much better. Thank you again. I guess trying to over-complicate something simple is one of my faults.
 
So, rather than start an entirely new thread for my stupidity, I've another question:

I've used the search function again in trying to locate the answer, I know this is something probably significantly more difficult than my earlier issue, but has anyone found a way to be able to pull thrown weapons out of bodies? Not being able to do so out of shields is fine, nor do I need an animation or anything. But I've made all spears throwable, and while most javelins and things wouldn't necessarily survive multiple impacts, nor were they meant to be pulled back out, some of the spears I feel should be able to. I've thought about maybe scripting it in (WSE as a requirement would be fine in that case). But I'm not sure of the best way to go about this. Again, any help and the time it takes to provide said help is greatly appreciated. ~SB
 
ti_on_agent_hit to catch whether an agent has been hit by a spear, increase a slot value.
When another agent approaches the corpse, either prompt them to hit a key or automatically refill ammo (maybe try agent_add_offer_with_timeout?), iterating over the 4 item slots and checking for your spear and the current ammo count with agent_get_ammo_for_slot/agent_get_item_cur_ammo (since it's a throwing weapon, either should work)?

The problem with this approach is the fact that you can't affect the appearance of a corpse, so the spear will stay on. If an agent was still alive, you could re-equip and unequip the armor, removing the attached projectiles and blood vertex colouring. However, doing so while the agent is dead will spawn an armor on top of the corpse's location in the T pose. Ragdolling means this position won't be exactly where the corpse is, so the trigger might not fire accurately especially in narrow confines or near ledges.
 
Once again, thank you so much Somebody. I'll be attempting to get that to work now (Only just waking up ;_:wink:. I understand the limitations, I guess unlike a few others I wasn't expecting perfection. I mean having objects stuck in ragdolls, I knew the game was going to throw out some no-nos. I'm perfectly fine with the spears still being stuck unto their victims, so long as I can fling another pitchfork without having to die after I've thrown my four.

Alternatively, a side question before I get to scripting. In this method, would it account for if one had none of the throwable spears? The way I've set them up is: The original spears still exist for AI to use and such, so that nothing dependent on those items would be messed up. Then I added another version, such as war_spear_thrown, and after that, it's respective melee version, just a mirror of its normal self. So, with the max ammo being set to one for each spear, as I wanted some shadow of realism, with 4 slots you can get up to 4 on your ammo counter. Or take 4 different throwable spears or whatever. If not, would it be easier/more beneficial to create a way to just spawn_item however many spears were jabbed into one victim (At their current damage, it's usually never more than one unless it's the lower tiers) on the ground with an offset X/Y from the body? I don't mean to be exploiting your knowledge or anything, I'm just trying to learn. Again, thank you for your help and time.
 
Ammo can be refilled from a throwing weapon with 0/1 ammo as long as you don't pick another item up to override its slot - picking up the same item refills it. Spawning items would also work (since you only have a max of 4), but bots won't be able to pick them up.
 
As it stands Bots still use the default (Read: Not throwing spears), as I've been tossing up the idea to have forks thrown at me and AI charging with other weapons. I don't feel as though their intelligence is strong enough to make that 1 (Or other 3) shots count, so for now, they have to get in poking distance.
 
Back
Top Bottom