Invisible enemies, uncanny dodge/blind-fighting, and sneak a
3 posters
Page 1 of 1
Invisible enemies, uncanny dodge/blind-fighting, and sneak attacks...
Have noticed that a lone invisible enemy still gets a sneak attack against my
barbarian, even though he is not flanked, and he has uncanny dodge (so he still has his dex bonus).
I have a number of questions:
Im curious where the sneak attack determination is made... is it in the invisibility script?
Is it in the uncanny dodge code?
Is it in the blind-fighting code?
Is sneak attack scripted or hardcoded? What exactly does "hardcoded" mean in this context?
barbarian, even though he is not flanked, and he has uncanny dodge (so he still has his dex bonus).
I have a number of questions:
Im curious where the sneak attack determination is made... is it in the invisibility script?
Is it in the uncanny dodge code?
Is it in the blind-fighting code?
Is sneak attack scripted or hardcoded? What exactly does "hardcoded" mean in this context?
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
In the game engine itself.
Hardcoded basically means it is part of the game itself and can't be modified through script changes or hak files.
Sneak attack, blind-fight, and uncanny dodge all fit this description.
Hardcoded basically means it is part of the game itself and can't be modified through script changes or hak files.
Sneak attack, blind-fight, and uncanny dodge all fit this description.
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
frustration...mounting...
must... break... something....
must... break... something....
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
*deep breath*
what about workarounds?
can scripts be set to fire when these hardcoded effects take place?
as an example, a script to increase the attack bonus by 5 each time the great cleave effect is triggered?
a script to make a target with uncanny dodge or blind-fighting temporarily immune to sneak attack if they are unflanked?
what about workarounds?
can scripts be set to fire when these hardcoded effects take place?
as an example, a script to increase the attack bonus by 5 each time the great cleave effect is triggered?
a script to make a target with uncanny dodge or blind-fighting temporarily immune to sneak attack if they are unflanked?
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
Great Cleave, sneak attack, etc. don't fire an "event" that a script can detect.
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
So... I know scripts can detect things like when a "hit" lands.... but you are saying they cannot tell when a "sneak attack" lands, rather than just a normal hit? But they can tell when a "crit" lands... so I am confused why not a sneak attack? Maybe you can make sense of this for me....
As for great cleave, I am sure the scripting engine can detect when you kill a monster... and as that is the "event" that triggers the hardcoded great cleave effect, could the script not induce a temporary attack bonus of +5 for that kill and each successive kill that round?
As for great cleave, I am sure the scripting engine can detect when you kill a monster... and as that is the "event" that triggers the hardcoded great cleave effect, could the script not induce a temporary attack bonus of +5 for that kill and each successive kill that round?
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
There's a big difference between the game engine creating and using information and a script being able to grab that info and do anything with it.
In order to get a record of every hit, miss, and critical hit, I would have to make every weapon in the game as a new item that you activate from inventory to "attack" once per round (without the usual animations, sounds, etc.) instead of wielding, and create a new script for every variation of every weapon (which would have to get your base attack bonus, and factor in your Str, weapon focus feats, weapon specialization, base damage of the weapon, damage bonuses of the weapon, enhancement bonuses of the weapon, special abilities of the weapon, if weapon finesse should be used (and get the bonus for that from your Dex modifier), if there are any spell or magical effects that should be taken into consideration (like temporary attack bonuses), the armor class of your target, any miss change your target may enjoy from displacement or concealment or invisibility, if the target has the Dodge feat, any special abilities of the enemy's armor, if it should be a sneak attack on them, if they are helpless (and thus open to a coup de grace and all the calculations that entails), and a couple of other factors). Then, run another slightly delayed script to check and see if you killed the target creature, and if you have Cleave or Great Cleave, send the script back into calculation mode to find another enemy within reach and do another attack on that new enemy.
Then, you'd have to get every NPC to use the unique power property of their redone weapons...and NPCs never use unique powers of items, just standard properties that would benefit them.
The one's that detect when a "hit" lands aren't actually detecting the "hit". They are being run when the game engine says it was a hit, figures out which weapon did the hit, then checks to see if that weapon has an item property associated with making a hit, then applies the effect or runs the script associated with that weapon making a "hit".
Scripts don't detect when a creature dies...the creature runs a specified script upon their death. The game engine "decides" when a creature dies based on it's remaining hitpoints vs. damage dealt/spells cast on it/etc. and "kills" the creature, which then plays it's death animation and fires its onDeath script. It's the game engine that figures out if a cleave should happen, and it doesn't send that information anywhere.
In order to get a record of every hit, miss, and critical hit, I would have to make every weapon in the game as a new item that you activate from inventory to "attack" once per round (without the usual animations, sounds, etc.) instead of wielding, and create a new script for every variation of every weapon (which would have to get your base attack bonus, and factor in your Str, weapon focus feats, weapon specialization, base damage of the weapon, damage bonuses of the weapon, enhancement bonuses of the weapon, special abilities of the weapon, if weapon finesse should be used (and get the bonus for that from your Dex modifier), if there are any spell or magical effects that should be taken into consideration (like temporary attack bonuses), the armor class of your target, any miss change your target may enjoy from displacement or concealment or invisibility, if the target has the Dodge feat, any special abilities of the enemy's armor, if it should be a sneak attack on them, if they are helpless (and thus open to a coup de grace and all the calculations that entails), and a couple of other factors). Then, run another slightly delayed script to check and see if you killed the target creature, and if you have Cleave or Great Cleave, send the script back into calculation mode to find another enemy within reach and do another attack on that new enemy.
Then, you'd have to get every NPC to use the unique power property of their redone weapons...and NPCs never use unique powers of items, just standard properties that would benefit them.
The one's that detect when a "hit" lands aren't actually detecting the "hit". They are being run when the game engine says it was a hit, figures out which weapon did the hit, then checks to see if that weapon has an item property associated with making a hit, then applies the effect or runs the script associated with that weapon making a "hit".
Scripts don't detect when a creature dies...the creature runs a specified script upon their death. The game engine "decides" when a creature dies based on it's remaining hitpoints vs. damage dealt/spells cast on it/etc. and "kills" the creature, which then plays it's death animation and fires its onDeath script. It's the game engine that figures out if a cleave should happen, and it doesn't send that information anywhere.
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
And just think.... all that massive text there is only a very brief *description* of what's going on.... not the actual code itself!
MannyJabrielle- Ludicrous Level
- . :
Number of posts : 5927
Main Character : See the "A-Team" thread in the Biographies forum.
DM Name : Dungeon-Master Gaelen
Time Zone : GMT -5:00(EST)
Registration date : 2008-07-05
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
There's a big difference between the game engine creating and using information and a script being able to grab that info and do anything with it.
Ugh. Now Im really confused.
If scripts can't use information created by the game engine.... how can you ever get a script to work at all?
I was specifically asking about how some scripts can detect melee combat things and run off them... nothing about creating a record of every miss, hit and crit... the combat log does that. It was more about how a kill can result in things like a quest complete script firing... or a loot container spawning... or a certain greatsword gaining power. The quest complete and loot container could be specific to the creature, I imagine... but the sword script changing the weapons properties would have to be firing off some event related to the "death" that isnt specified on the creature blueprint... unless every creature OnDeath script in the game was changed...
I've noticed that my ray attacks seem to be automatically hitting objects I target, which seems to indicate that before the attack "lands" something is checking information on the target. Would not something similar be able to check for uncanny dodge/blind-fighting and whether or not the target is "flanked", and then toggle an immunity as needed?
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
Scripts can use certain information the game creates, if BioWare made it so that the "event" can be processed through the script system.daveyeisley wrote:If scripts can't use information created by the game engine.... how can you ever get a script to work at all?
The combat log shows that, but doesn't send that information anywhere a script can get to it.daveyeisley wrote:I was specifically asking about how some scripts can detect melee combat things and run off them... nothing about creating a record of every miss, hit and crit... the combat log does that.
When a creature dies, it runs its onDeath script. Quest creatures (and a few others) have custom written onDeath scripts.daveyeisley wrote:It was more about how a kill can result in things like a quest complete script firing... or a loot container spawning... or a certain greatsword gaining power. The quest complete and loot container could be specific to the creature, I imagine...
There is an onDeath script that is shared by all creatures (nw_c2_default7), even those with a custom script (the default one is activated from within the custom script). I altered nw_c2_default7 todaveyeisley wrote:but the sword script changing the weapons properties would have to be firing off some event related to the "death" that isnt specified on the creature blueprint... unless every creature OnDeath script in the game was changed...
1. get the thing that killed the creature (a capability BioWare provided with GetLastKiller)
2. get the racial type of the dead creature
3. check to see if the racial type of the dead creature is not undead, construct, or elemental
4. get the weapon held in the killer's right hand
5. get the tag of the weapon held in the killer's right hand
6. check to see if that tag matches the one for that special sword
7. if that tag matches, execute the script associated with that sword
So, yeah, the onDeath script of every creature was altered
Rays are not weapons, and they are run by scripts. The visual effect of a ray will always appear to hit (the visual has nothing to do with the ray hitting, it just looks cool). I scripted each one that didn't already have it to calculate a touch attack (there is a script function that performs that, and I decide if the attack roll shows in the combat window), after the visual effect fires, and if the result would indicate a hit, then apply the other effect(s) of the spell. The rays don't take into account Dodge, Uncanny Dodge, Blind-Fighting, Flanking, etc....just AC since they're spells and not melee attacks with weapons.daveyeisley wrote:I've noticed that my ray attacks seem to be automatically hitting objects I target, which seems to indicate that before the attack "lands" something is checking information on the target. Would not something similar be able to check for uncanny dodge/blind-fighting and whether or not the target is "flanked", and then toggle an immunity as needed?
Re: Invisible enemies, uncanny dodge/blind-fighting, and sneak a
The combat log shows that, but doesn't send that information anywhere a script can get to it.daveyeisley wrote:I was specifically asking about how some scripts can detect melee combat things and run off them... nothing about creating a record of every miss, hit and crit... the combat log does that.
*Right. That much I did know.
There is an onDeath script that is shared by all creatures (nw_c2_default7), even those with a custom script (the default one is activated from within the custom script). I altered nw_c2_default7 todaveyeisley wrote:but the sword script changing the weapons properties would have to be firing off some event related to the "death" that isnt specified on the creature blueprint... unless every creature OnDeath script in the game was changed...
1. get the thing that killed the creature (a capability BioWare provided with GetLastKiller)
2. get the racial type of the dead creature
3. check to see if the racial type of the dead creature is not undead, construct, or elemental
4. get the weapon held in the killer's right hand
5. get the tag of the weapon held in the killer's right hand
6. check to see if that tag matches the one for that special sword
7. if that tag matches, execute the script associated with that sword
So, yeah, the onDeath script of every creature was altered
** This would seem to be the way to do the workaround, then. A check for the Great Cleave feat, and a stacking +5 attack bonus per kill until the attacksperround sequence resets back to the full base attack bonus... the hardcoded great cleave feat would do the rest. Attacks of Opportunity should not be a problem,
as the great cleave attack bonus reduction will apply to them as well, and the workaround script just counters that reduction... so in a way, the workaround will also fix the unfair attack bonus reduction on attacks of opportunity during a great cleave chain.
Rays are not weapons, and they are run by scripts. The visual effect of a ray will always appear to hit (the visual has nothing to do with the ray hitting, it just looks cool). I scripted each one that didn't already have it to calculate a touch attack (there is a script function that performs that, and I decide if the attack roll shows in the combat window), after the visual effect fires, and if the result would indicate a hit, then apply the other effect(s) of the spell. The rays don't take into account Dodge, Uncanny Dodge, Blind-Fighting, Flanking, etc....just AC since they're spells and not melee attacks with weapons.[/quote]daveyeisley wrote:I've noticed that my ray attacks seem to be automatically hitting objects I target, which seems to indicate that before the attack "lands" something is checking information on the target. Would not something similar be able to check for uncanny dodge/blind-fighting and whether or not the target is "flanked", and then toggle an immunity as needed?
** Yeah, I know the visual is unrelated to the "hit" determination. I was trying to say that my rays, when targeted on an object, always roll a 19, and never roll a 1... and hence, they always seem to hit. There must be a check happening as far as the target goes... sneak attack isnt scripted, so the "trigger" for any workaround would have to be a little... creative... but the check for "flanked" status, as well as a conditional check for uncanny dodge or blind-fighting if "flanked" is false, would allow for a determination of whether the target should be immune to the sneak attack... its just finding a good trigger for the script.
daveyeisley- Ludicrous Level
- . :
Number of posts : 6934
Age : 47
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Similar topics
» Sneak Attack
» Sneak attack equipment upgrade
» Ailish the Half Blind
» Not Used: Portal Codes Fot The Color Blind
» Animals Fighting Again
» Sneak attack equipment upgrade
» Ailish the Half Blind
» Not Used: Portal Codes Fot The Color Blind
» Animals Fighting Again
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum