I have noticed that when the PC escapes from enemies following a straight line, the enemies with melee weapon can't hit him, even if they are more fast. This script, added to a heartbeat of a enemy, make him able to chase the pc.
Update 8/25/2010: I have changed the code. The script now dont affect the PC with penalties.
Posted by ffbj at 2011-08-21 20:40:22 Voted 7.25 on 08/21/11
That did not seem to get all the script:
ClearAllActions(TRUE);
if ((GetDistanceToObject(oPC) >= 3.0f) && (GetDistanceToObject(oPC)
Posted by ffbj at 2011-08-21 20:37:50 Voted 7.25 on 08/21/11
I made a few changes to the original script, with authors permission:
#include "x0_i0_position"
void main()
{
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
int iHd = GetHitDice (oPC);
int iHd1 = GetHitDice (OBJECT_SELF);
int iHdd = iHd - iHd1;
effect eSpeed = EffectMovementSpeedIncrease(125);
//change number to change speed. added for possible temporary speed increase.
ClearAllActions(TRUE);
// you probably want to use the TRUE parameter here as this is likely to occur
// in combat otherwise the ClearAllActions call will have no effect.
if ((GetDistanceToObject(oPC) >= 3.0f) && (GetDistanceToObject(oPC)
Posted by ffbj at 2011-08-21 20:34:08 Voted 7.25 on 08/21/11
While the original script had problems I thought the idea had merit.
Posted by uther1978 at 2010-08-25 06:12:28 Voted 10.00 on 08/25/10
Update 8/25/2010: I have changed the code. The script now dont affect the PC with penalties, but only improves the A.I.
Posted by uther1978 at 2010-08-17 04:11:12 Voted 10.00 on 08/25/10
If someone has a good idea to fix npc A.I., please tell me.
Posted by ShaDoOoW at 2010-08-15 20:52:08 Voted 1.00 on 08/15/10
Posted by ffbj at 2010-08-14 08:13:07 Voted 7.25 on 08/21/11
I think it does slow the PC down even if immune like from Freedom of Movement. It's just an effect applied to the PC if their fatigue falls below a certain point. So my guess is it will work as will all the other effects as the PC becomes more fatigued. So even if immune to KD they will still fall down if they become exhausted.
Posted by uther1978 at 2010-08-07 09:02:34 Voted 10.00 on 08/25/10
The fatigue script works even with PC immune to speed reduction?
Posted by uther1978 at 2010-08-07 07:52:57 Voted 10.00 on 08/25/10
Thanks!
Posted by ffbj at 2010-08-07 07:27:57 Voted 7.25 on 08/21/11
I made something to emulate combat fatigue. It slows the player briefly with a winded condition first, makes it difficult to run away. To me this script is too specific and there is not enough value to warrant it's use, though I agree it is a bit odd that PC's can actually run from wolves for instance.
Posted by uther1978 at 2010-08-07 05:36:56 Voted 10.00 on 08/25/10
So you have not analyzed the problem to determine the root cause? That is often a good first move when trying to solve a problem. I believe the problem stems from the monster moving to *just* within melee range then starting its attack. But there is a delay between the start of the attack and the verification by the combat engine that the combatants are within melee range. In that small slice of time, the PC moves out of melee range, starting the cycle over.
Cancel the ActionAttack(), use ActionMoveToObject() to move to well within melee range, then re-initiate the attack with ActionDoCommand(ActionAttack()) -- you'll need this double call to make the new attack action wait its turn in the action queue.
Posted by uther1978 at 2010-08-05 14:20:32 Voted 10.00 on 08/25/10
Yes, I tried to fix the monster AI but I not found a solution. If someone has an idea can suggest here.
Penalizing the player because of a bug in the monster is going about things backwards, isn't it? Why not fix the NPCs instead of arbitrarily crippling PCs?
Posted by uther1978 at 2010-08-04 09:24:09 Voted 10.00 on 08/25/10
Even with the Jasper AI the NPCS was unable to chase a PC that escapes following a straight line, even if the npc has the DM speed. This is very frustrating for me.
Mantain the chase or place obstacles is effectively a good solution.
Posted by Markshire at 2010-08-04 09:11:07 Voted 1.00 on 08/03/10
In PnP there's nothing in any of the rules that say a monster (or NPC) gets a "pause" or "slow" because the PC is getting away. What a monster gets when a PC is fleeing is an Attack of Opportunity. Same one NWN gives a monster when a PC flees. Now, in terms of game mechanics, I don't see the need to change anything. The creature AI built into the game by BW is sufficient to maintain the chase of the PC through multiple transitions and so on. So if the monster is determined enough to chase the PC they will continue to do so until the PC slows or runs the wrong direction. If the AI isn't up to your liking, track down any of the alternates or add-ons here on the vault and try them out. Jasperre's is a solid one. In the end, if the intent is to slow up the PC from running directly away from a monster, then place more obstacles for the PC to go around. That should be sufficient to slow them down enough to get "captured" or otherwise chewed upon. _________________________ Vault Game World Entry: Markshire
Website: www.markshire.com
Server: www.markshire.net:5121
NWNWiki: Markshire
Vault Submissions:
NWN1: Magic Carpet Transitions | Experience and Teamwork System | Portable Persistent Chest System | Nerfed Pulse Drown | Renaming System | Quill of PC Recording
NWN2: Climbing System | Explosive Barrels | Quill of PC Recording
Fiction: A Missed Adventure | Kurm and the Sewer King's Curse | A Harrowing Story | Loki's Foulest Trick | Rising Force | The Mad Red Titan: One, Two, Three
Posted by uther1978 at 2010-08-03 12:09:10 Voted 10.00 on 08/25/10
Maybe to avoid the dexterity bug I can slow the PC instead of immobilize him.
Posted by Raven_Blood at 2010-08-03 11:22:09 Voted 7.00 on 08/03/10
I must say the idea is neat, but i must agree with Markshire on the topic.
I wont go so fat as to say it is mean, but having this intended for online use it out of the question lol
It would however go great for a true Hardcore D&D module story :] keep em up! id like to see more
Posted by Markshire at 2010-08-03 10:02:10 Voted 1.00 on 08/03/10