SiliconScout
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR Xbox NWN 2
Suscrito: 18 jul 2002 |
Colgado: lunes, 22 marzo 2004 04:31 |
Hey everyone here is an interesting one.
I have a half-orc NPC (he is representing and OROG) who has a greatexe and a dagger.
The great axe has a property that adds 5 pounds to it’s weight, the dagger adds 2 points of piercing damage.
his added feats (he’s a 4th level ftr) are
Exotic weapon proficiency Weapon focus Dagger Weapon Focus Greataxe Weapon Specialization Greataxe Power Attack Knockdown
Using Jasperre’s AI as well as the Bioware default has the guy run at me with his Greataxe out (he spawns with it equipped) but then changing to the dagger just before he attacks.
I realise that he has one feat too many so I pulled the weapon focus dagger and the bugger STILL switches to it!
I want his to use the great axe and have the dagger as a backup if he get’s disarmed (all Orog’s have this funky dagger with +2 piercing damage as their backup, Orog commoners only have this weapon).
Why does he switch weapons the great axe is d12, the dagger is d4+2. Assuming the scripts choose the most damaging weapon they should stay with the Greataxe, especially since with specialization it’s d12+2 vs. the daggers d4+2 (plus STR bonus of course).
Anyone know why this might be happening? The real weird thing is that I have an Orog champion that is the same guy with an extra level of FTR and 1 level of Barb who uses a Greatsword. The Greatsword also has the extra 5 pounds on it same as the axe AND he carries the dagger backup but he will stick with his great sword only pulling the dagger when I manage to disarm him.
Anyone have ANY insight? If I can’t solve this I guess he will just not have a backup weapon, which kinda sucks as Orog always have at least 2 weapons. I suppose I could give him a mitt full of throwing axes or something instead in a worse case scenario. |
|
He Who Watches
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 10 dic 2003 De: London UK |
Colgado: lunes, 22 marzo 2004 05:00 |
|
It is happening because of a bug in Bioware's provided functions eg. EquipMostDamagingMelee() - they do not properly register most two-handed weapons. |
|
_Ms
Game Owner
NWN NWN: SoU NWN: HotU NWN 2
Suscrito: 09 mar 2004 |
Colgado: lunes, 22 marzo 2004 05:10 |
if you want him to use the greataxe why did you place a dagger into his inven. Or is this a test to find some bugs or such _________________ Coder Not So Elite |
|
SiliconScout
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR Xbox NWN 2
Suscrito: 18 jul 2002 |
Colgado: lunes, 22 marzo 2004 05:32 |
Orog are intelligent warriors and (according to the MM) generally carry 2 weapons. A primary and a backup if you will.
In my mod there is an Orog Hunting Knife that they all carry. It's a well made blade that is given to all Orog upon reaching adulthood in the adulthood ceremony. Disgraced or disowned Orog have their knife taken from them as a mark of shame and dishonour.
They all carry the weapon as a backup, essentially if they are disarmed then the still have this backup blade, though non-warrior Orog typically ONLY carry the dagger. That is why it is in his inventory and I do indeed want him to use it if he is disarmed.
Anyone know if there is any chance of this rather ugly bug being fixed in a future patch from BioWare? Or baring that anyone have a fix for the EquipMostDamagingMelee() function? |
|
He Who Watches
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 10 dic 2003 De: London UK |
Colgado: lunes, 22 marzo 2004 05:32 |
|
He said - because it might be disarmed, and he wants it to have a backup weapon. |
|
He Who Watches
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 10 dic 2003 De: London UK |
Colgado: lunes, 22 marzo 2004 05:37 |
Quote: anyone have a fix for the EquipMostDamagingMelee() function?
My (half-finished) AI gets around the problem by using the rather expensive function I put up at the bottom of page 7 of the Homebrew Functions sticky thread, GetCanUseWeaponOrArmour(). Non-monk creatures with no weapons equipped will run that function on every weapon in their inventory, and then "remember" their favoured weapon so they do not have to run the expensive function again if they switched from melee to ranged. If their favoured weapon is "themselves" ie. they are a monk or they use creature bit, gore etc., they remember that too. |
|
SiliconScout
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR Xbox NWN 2
Suscrito: 18 jul 2002 |
Colgado: lunes, 22 marzo 2004 05:47 |
Sounds like a pretty nasty performance hit. Maybe I will just change his 2 hander axe in for a battle axe with shield.
=P
Kinda sucks that the BioWare function doesn't work. |
|
He Who Watches
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 10 dic 2003 De: London UK |
Colgado: lunes, 22 marzo 2004 05:55 |
In testing, there is only a tiny lag spike on the following occasions:
- when a creature "examines" a weapon type that no-one else has ever "examined" before; - when a creatures "examines" weapon/armour that is more expensive than any other item already examined by any creature anywhere.
And since 99.99% of creatures only ever need to run the function once (or twice if they possess both ranged and melee weapons), this isn't really a problem anyway.
The AI also runs a quick value-adjustment function on weapons so that a plain longsword would show up to be more valuable than it ought to be if the creature concerned has longsword-related feats.
HWWAI will be finished sometime around December 2009, I will post it up then ... |
|
Primogenitor
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 16 ene 2003 De: Somewhere in England... |
Colgado: lunes, 22 marzo 2004 07:28 |
Quote: Posted 03/22/04 16:31:40 (GMT) by SiliconScout Using Jasperre’s AI as well as the Bioware default
How? You can only have one or the other I thought, though Jasperres can be non-overriding. What scripts does the orog have? Are they jasperres or biowares? _________________ Author of the roguelike module NWNAngband. |
|
Jasperre
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Suscrito: 05 jul 2002 De: UK |
Colgado: lunes, 22 marzo 2004 09:28 |
If you are using mine, make sure that it has martial weapon proficiency - I can't tell from what you first posted!
That might be it.
Else, there is an option to turn on use of EquipMostDamagingMelee() of course.
If it isn't, I am sure I've had greataxes equipped right (with ranged/other weapons) as I tested a Dwarf with a shield/axe and greataxe. Oh well... _________________ Jasperre
Jasperre's AI for NWN1 | NWN2 AI In progress! |
|
SiliconScout
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR Xbox NWN 2
Suscrito: 18 jul 2002 |
Colgado: lunes, 22 marzo 2004 10:03 |
Sorry he has 3 levels of fighter so he gets all armour, shield simple and martial proficiencies.
And I tried both the default and Jasperre's. I might tweak Jasperre's to see if I can get it to NOT switch it out.
jasperre if you want to test it just make a lvl 3 ftr give it a greataxe and a dagger and see what happens.
Turns out the greatsword guy did not have a dagger, when I give him one he switches to it regardless. If I give them handaxes they will not switch unless they attack at range. Then if they do switch they will not switch back thus I could fire a bow at them (triggering them to go missile) then I could close to melee and get AOO against them as they keep the missile axes. For now I have removed the daggers and I guess I will just not have them have a backup. |
|
Jasperre
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Suscrito: 05 jul 2002 De: UK |
Colgado: lunes, 22 marzo 2004 11:05 |
I don't know. I've not had any other reports of the AI not equipping the right weapons, probably because they don't use too many. I'll maybe have a quick look if I have the time tommorow. _________________ Jasperre
Jasperre's AI for NWN1 | NWN2 AI In progress! |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Suscrito: 21 jul 2003 De: Bathos |
Colgado: miércoles, 24 marzo 2004 06:07 |
Okay, I haven't tested this, but here's the theory.
1. Remove the Dagger from the inventory of the OROG. (We'll use a script to determine if at the end of a combat round we've been disarmed, and simply script the creation of a new one and the equipping of said dagger should that be true.) 2. Replace the default OnCombatRoundEnd script with the script to follow (modified to include the resref of the dagger you want the creature to equip should it be disarmed.)
Again, this is untested, but I think it should be theoretically sound. _________________ -kevinodie
void main() { if ( IsUncertain ( GetLastThingSpoken (OBJECT_SELF))) { SendMessageToReader ( GetLocalString (OBJECT_SELF, "Standard_Disclaimer")); } } |
|