BioWare Atari
Information de BioWare Jeux BioWare Assistance Forums Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

Archives: Builders - NWN Scripting



       Aller au Bas de la page

Auteur Strange AI issue
SiliconScout
Game Owner
Profil: SiliconScoutNWN
NWN: SoU
NWN: HotU
SW: KotOR Xbox
NWN 2


Lié: 18 jui 2002
Posté: lundi, 22 mars 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.
  Profil: SiliconScout   Envoyer un Message à: SiliconScout
He Who Watches
Game Owner
Profil: He Who WatchesNWN
NWN: SoU
NWN: HotU


Lié: 10 déc 2003
De: London UK
Posté: lundi, 22 mars 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.
  Profil: He Who Watches   Envoyer un Message à: He Who Watches
_Ms
Game Owner
Profil: _MsNWN
NWN: SoU
NWN: HotU
NWN 2


Lié: 09 mar 2004
Posté: lundi, 22 mars 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
  Profil: _Ms   Envoyer un Message à: _Ms
SiliconScout
Game Owner
Profil: SiliconScoutNWN
NWN: SoU
NWN: HotU
SW: KotOR Xbox
NWN 2


Lié: 18 jui 2002
Posté: lundi, 22 mars 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?
  Profil: SiliconScout   Envoyer un Message à: SiliconScout
He Who Watches
Game Owner
Profil: He Who WatchesNWN
NWN: SoU
NWN: HotU


Lié: 10 déc 2003
De: London UK
Posté: lundi, 22 mars 2004 05:32
He said - because it might be disarmed, and he wants it to have a backup weapon.
  Profil: He Who Watches   Envoyer un Message à: He Who Watches
He Who Watches
Game Owner
Profil: He Who WatchesNWN
NWN: SoU
NWN: HotU


Lié: 10 déc 2003
De: London UK
Posté: lundi, 22 mars 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.
  Profil: He Who Watches   Envoyer un Message à: He Who Watches
SiliconScout
Game Owner
Profil: SiliconScoutNWN
NWN: SoU
NWN: HotU
SW: KotOR Xbox
NWN 2


Lié: 18 jui 2002
Posté: lundi, 22 mars 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.
  Profil: SiliconScout   Envoyer un Message à: SiliconScout
He Who Watches
Game Owner
Profil: He Who WatchesNWN
NWN: SoU
NWN: HotU


Lié: 10 déc 2003
De: London UK
Posté: lundi, 22 mars 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 ...
  Profil: He Who Watches   Envoyer un Message à: He Who Watches
Primogenitor
Game Owner
Profil: PrimogenitorNWN
NWN: SoU
NWN: HotU


Lié: 16 jan 2003
De: Somewhere in England...
Posté: lundi, 22 mars 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.
  Profil: Primogenitor   Envoyer un Message à: Primogenitor
Jasperre
Game Owner
Profil: JasperreNWN
NWN: SoU
NWN: HotU
SW: KotOR PC
Jade Empire:SE
NWN 2
NWN 2: MotB
Mass Effect PC


Lié: 05 jui 2002
De: UK
Posté: lundi, 22 mars 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!
  Profil: Jasperre   Envoyer un Message à: Jasperre
SiliconScout
Game Owner
Profil: SiliconScoutNWN
NWN: SoU
NWN: HotU
SW: KotOR Xbox
NWN 2


Lié: 18 jui 2002
Posté: lundi, 22 mars 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.
  Profil: SiliconScout   Envoyer un Message à: SiliconScout
Jasperre
Game Owner
Profil: JasperreNWN
NWN: SoU
NWN: HotU
SW: KotOR PC
Jade Empire:SE
NWN 2
NWN 2: MotB
Mass Effect PC


Lié: 05 jui 2002
De: UK
Posté: lundi, 22 mars 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!
  Profil: Jasperre   Envoyer un Message à: Jasperre
kevinodie
Game Owner
Profil: kevinodieNWN
NWN: SoU
NWN: HotU


Lié: 21 jui 2003
De: Bathos
Posté: mercredi, 24 mars 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.)

NWScript:

View Post/Code in separate window


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"));
}
}
  Profil: kevinodie   Envoyer un Message à: kevinodie


Que signifie cet icone?
Où puis-je apprendre à utiliser les forums?

Jump To:

Recherche dans les forums | FAQ des forums | Archives Forum

 

 

BioWare Store
Neverwinter Nights 2 Forums
Cacher/Afficher

English
Deutsch
Français
Español
Italiano

Cacher/Afficher

Voir les dernières captures d'écran 

Voir les dernières captures d'écran
Cacher/Afficher

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Il est actuellement: (régler heure)
sam, 21 novembre 2009 08:34

Cacher/Afficher

Download Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Cacher/Afficher

5,037,984 utilisateurs sur le site de BioWare:
  40 connectés
  4 invisibles
  131 invités

687 Playing Online
  100% NWN
  101% NWN: SoU
  100% NWN: HotU

446 Registered Guilds

8,767,742 messages dans les forums

Sujets les plus récents dans les forums:
1. PRC level 9 spells (NWN 1: Custom Content)

2. Default Summoned AI/Scripts (NWN 1: Scripting)

3. IGN rewards ME 1 Top Xbox 360 Ga... (Mass Effect 2 General Discussion (No Spoilers Allowed))

4. Lore (NWN2: General discussion forums for NWN2 (No Spoilers Allowed))

5. heads/skins/etc (NWN2: Custom Content)