BioWare Atari
Información sobre BioWare Juegos de BioWare Soporte Foros Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

Archives: Builders - NWN Scripting



       Ir abajo

Autor Strange AI issue
SiliconScout
Game Owner
Perfil: SiliconScoutNWN
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.
  Perfil: SiliconScout   Enviar mensaje a: SiliconScout
He Who Watches
Game Owner
Perfil: He Who WatchesNWN
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.
  Perfil: He Who Watches   Enviar mensaje a: He Who Watches
_Ms
Game Owner
Perfil: _MsNWN
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
  Perfil: _Ms   Enviar mensaje a: _Ms
SiliconScout
Game Owner
Perfil: SiliconScoutNWN
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?
  Perfil: SiliconScout   Enviar mensaje a: SiliconScout
He Who Watches
Game Owner
Perfil: He Who WatchesNWN
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.
  Perfil: He Who Watches   Enviar mensaje a: He Who Watches
He Who Watches
Game Owner
Perfil: He Who WatchesNWN
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.
  Perfil: He Who Watches   Enviar mensaje a: He Who Watches
SiliconScout
Game Owner
Perfil: SiliconScoutNWN
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.
  Perfil: SiliconScout   Enviar mensaje a: SiliconScout
He Who Watches
Game Owner
Perfil: He Who WatchesNWN
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 ...
  Perfil: He Who Watches   Enviar mensaje a: He Who Watches
Primogenitor
Game Owner
Perfil: PrimogenitorNWN
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.
  Perfil: Primogenitor   Enviar mensaje a: Primogenitor
Jasperre
Game Owner
Perfil: JasperreNWN
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!
  Perfil: Jasperre   Enviar mensaje a: Jasperre
SiliconScout
Game Owner
Perfil: SiliconScoutNWN
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.
  Perfil: SiliconScout   Enviar mensaje a: SiliconScout
Jasperre
Game Owner
Perfil: JasperreNWN
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!
  Perfil: Jasperre   Enviar mensaje a: Jasperre
kevinodie
Game Owner
Perfil: kevinodieNWN
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.)

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"));
}
}
  Perfil: kevinodie   Enviar mensaje a: kevinodie


¿Qué significan estos iconos?
¿Dónde puedo aprender a usar los foros?

Jump To:

Buscar foros | Preguntas frecuentes sobre los foros | Archivos del foro

 

 

BioWare Blog
Neverwinter Nights 2 Forums
Mostrar/Ocultar

English
Deutsch
Français
Español
Italiano

Mostrar/Ocultar

Ver las últimas pantallas 

Ver las últimas pantallas
Mostrar/Ocultar

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



La hora actual es: (insertar hora)
mar, 09 febrero 2010 08:01

Mostrar/Ocultar

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

Mostrar/Ocultar

5,993,843 usuarios de BioWare:
  69 conectados
  7 ocultos
  494 invitados

1265 Playing Online
  100% NWN
  102% NWN: SoU
  102% NWN: HotU

426 Registered Guilds

9,000,871 mensajes en los foros

Temas más recientes de los foros:
1. Script control of encounters? (O... (NWN2: Builders - NWN2 Scripting)

2. Do i need to play BG 1? (Baldur's Gate II: SoA and ToB General Discussion)

3. Memorized Spells ui modification (NWN2: Custom Content)

4. My Dm's Can't log in, DM Client ... (NWN 1: Server Admin)

5. My Dm's Can't log in, DM Client ... (NWN 1: Server Admin)