The World of Layonara  Forums

Author Topic: Continuing To Attack CNR After It Is Exhausted  (Read 507 times)

Script Wrecked

Continuing To Attack CNR After It Is Exhausted
« on: November 27, 2007, 09:06:21 pm »
From this request for reimbursement.

Continuing to attack CNR after it is exhausted/destroyed is this is something I observed three times in the first session of collecting CNR. For example:

Code: [Select]
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:31] Argali Trueaxe attacks Choppable Tree - Oak : *hit* : (11 + 6 = 17)
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:31] Argali Trueaxe damages Choppable Tree - Oak: 7 (7 Physical)
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:31] Choppable Tree - Oak : Damage Resistance absorbs 3 damage
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:31] You have chopped off a Branch of Oak!
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:31] [COLOR=Blue]That's the end of that![/COLOR]
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:33] [COLOR=Red]Off Hand : Argali Trueaxe attacks Choppable Tree - Oak : *hit* : (11 + 11 = 22)[/COLOR]
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:36] Acquired Item: Branch of Oak
[CHAT WINDOW TEXT] [Sat Nov 24 22:09:47] Argali Trueaxe: All chopped.
[Script Wrecked] Argali Trueaxe: [Talk] All chopped.


In this case, I observed the tree placeable fade out after the "That's the end of that!" message, then briefly fade in for the final blow, before finally fading out.

Would it be possible to add a ClearAllActions() on the character to take them out of combat when the CNR is destroyed?

Regards,

Script Wrecked.
 

Dorganath

Re: Continuing To Attack CNR After It Is Exhausted
« Reply #1 on: November 27, 2007, 10:17:59 pm »
It's possible, but I think the peril in doing so is that one can cancel the actions of picking up the CNR, be it a branch or a nugget of something, resulting in players potentially forgetting to pick things up when all done.

In most cases, a used up CNR spawn will destroy itself during the interval where a character is picking up the CNR from the ground.  Occasionally due to lag or whatever, which of course is a terrible beast without predictability, someone with a lot of attacks per round can get off another hit on a rock/tree that is in the midst of destroying itself. This is typically harmless and doesn't produce any additional yield from the rock/tree.  There is a 2 second delay between detecting that a rock/tree should be destroyed and the call to destroy it.

As it relates to the item reimbursement request, the real culprit was changing weapons during that window and the subsequent fade-away that's typical of destroying any placeable object in NWN. Striking CNR deposits with normal weapons will eventually cause them to break, as was illustrated.  The best way to avoid this is simply to modify one's behavior when mining/chopping.

So regarding clearing of the action queue...I'll give it some thought, but I'm hesitant at this point to run the risk of simply exchanging one bug for another. I've been looking over the code for this as I respond and I'm not sure where to put the ClearAllActions() call where it would a) have the desired effect and b) not interfere with the "pick up" actions after.  When only one item is gained, it's probably not too much of a concern.  When multiple nuggets/branches are gained and when Mystery Minerals pop out, the most "logical" place to put a ClearAllActions() would surely interfere with this process. We could add a variable delay on the ClearAllActions() but then it may not address the second attack.

Anyway, if I think of a simple and elegant way to address the possibilities, then maybe this can go in.  At this point though, the effort vs. benefit picture doesn't look extremely favorable.
 

Hellblazer

Re: Continuing To Attack CNR After It Is Exhausted
« Reply #2 on: November 27, 2007, 10:26:32 pm »
Quote from: Dorganath
It's possible, but I think the peril in doing so is that one can cancel the actions of picking up the CNR, be it a branch or a nugget of something, resulting in players potentially forgetting to pick things up when all done.

that already happens quite a few time. people either move slightly or starts clicking on the cnr again to mine and the previous cnr they mined is still on the ground.

Dorganath

Re: Continuing To Attack CNR After It Is Exhausted
« Reply #3 on: November 27, 2007, 10:47:58 pm »
Quote from: Hellblazer
that already happens quite a few time. people either move slightly or starts clicking on the cnr again to mine and the previous cnr they mined is still on the ground.

Yes, this is true, but it's because the action queue gets cleared and reset due to said movement or a forced attack click to start harvesting once more.  These are explicit player actions and beyond the scope of what the script should even try to address.  It's very similar to becoming flat-footed in combat by moving.  Not much we can do when a player takes such actions.

What I'm talking about is the normal "hands-off" process that starts with clicking on a resource and ends with one or more bits of CNR in a character's inventory.

Incidentally, I've seen this also happen due to lag.  It's pretty rare, however, and much more the exception than the rule.
 

Script Wrecked

Re: Continuing To Attack CNR After It Is Exhausted
« Reply #4 on: November 28, 2007, 04:05:51 am »
Quote from: Dorganath
I've been looking over the code for this as I respond and I'm not sure where to put the ClearAllActions() call where it would a) have the desired effect and b) not interfere with the "pick up" actions after.  When only one item is gained, it's probably not too much of a concern.  When multiple nuggets/branches are gained and when Mystery Minerals pop out, the most "logical" place to put a ClearAllActions() would surely interfere with this process. We could add a variable delay on the ClearAllActions() but then it may not address the second attack.


Thanks for taking the time to have a look.

The ClearAllActions() call would go before the "pick up" actions. For multiple gained items, assuming this is handled in a loop, the ClearAllActions() call would go before the loop.

Quote from: Dorganath
As it relates to the item reimbursement request, the real culprit was changing weapons during that window and the subsequent fade-away that's typical of destroying any placeable object in NWN. Striking CNR deposits with normal weapons will eventually cause them to break, as was illustrated.  The best way to avoid this is simply to modify one's behavior when mining/chopping.


I don't know about everyone else, but there have been (quite) a few times when I have mis-clicked on a placeable objects, and in the middle of combat, find my character with an open inventory looking at a choice of nuts.

Regards,

Script Wrecked.
 

ShiffDrgnhrt

Re: Continuing To Attack CNR After It Is Exhausted
« Reply #5 on: November 28, 2007, 05:42:50 am »
Quote from: Script Wrecked

I don't know about everyone else, but there have been (quite) a few times when I have mis-clicked on a placeable objects, and in the middle of combat, find my character with an open inventory looking at a choice of nuts.

I hate it when that happens, because not ONCE when I looked up in that tree was the sword I was looking for...  >.>

But yeah...  Not fun fighting around CNR and then suddenly Fighting the CNR..

*Charges Ogres*  To the Fight!!!  *attacks the Ore instead* OH NO!