PDA

View Full Version : Request - need a zone server with aggroing code disabled


Drawde
03-20-2002, 04:23 AM
I really hope this isn't too much trouble, but would it be possible for someone to
compile a modified version of the zone or world server .exe (whichever one has
the AI code in it; I think it's the zone server) with the AI "aggroing" disabled? (i.e monsters only attack when
you attack them, like in earlier versions). The aggroing is a really great addition
but the lag caused by the AI searching makes the game virtually unusable for me when it
is working; currently I have to keep camping and logging in again until the AI stops working for
some reason, at which point the lag disappears and I can consider, summon, cast spells etc.
properly.
To do this I think you'd just need to add a "return false" at the start of the AddHatetoCloseMobs() routine in npcai.cpp.
This would make it exit without performing the search routine.
I do know C/C++ programming but only have an old version of the MS Visual C++ compiler
(version 4.0) and can't get the EQEmu source to compile.

Shawn319
03-20-2002, 05:15 AM
ahh maby a mySQL variable would be great for this (true/false)

moving this thread to feature request forum...

Shawn319
03-20-2002, 05:16 AM
btw drawde, why not join the chatroom in your spare time?

Drawde
03-20-2002, 06:02 AM
It would be a really good idea to have AI switchable on/off via a DB variable or in-game command, but the reason I asked if someone could compile it for me is that I didn't want to wait for the next EQEmu version (which might be a while due to the new EQLive patch) to be able to reliably run EQEmu - I want to test out my DB changes a bit more before I release the next world data version .

Shawn319
03-20-2002, 06:11 AM
which might be a while due to the new EQLive patch

Hehe glad u asked... 0.2.6 already made but still working out a couple small disconnect/crash bugs. tradeskills soon also (MABY in 0.2.6, maby not). u can try out 0.2.6 on Hogiebane/Hogies test server or Lyenu's Playground.

ScotchTape
03-20-2002, 06:16 AM
Dunno if anyone has done it yet, but this is some simple code that sets up a "IsHateful" property. If you're hateful, then you'll agro. If not, you won't (and it'll return false out of AddHateToNpcs,etc.)


npc.cpp:80
//turn off hate by default
//todo: lookup value from table later

IsHateful(false);




npc.h
class NPC : public Mob
{
public:

....

//************************************************** ******//
//Can this npc agro?
//on_or_off: true, yes the npc uses hate
// false, no the npc does not use hate
//************************************************** ******//
bool IsHateful() { return _IsHateful;}
void IsHateful(bool on_or_off){_IsHateful=on_or_off;}

private:

bool _IsHateful; //Can this NPC agro?
};



Lastly..

NpcAI.cpp:19
if (!sender->IsHateful())
return false;



hth,
-ST

DeletedUser
03-23-2002, 09:04 AM
Actually NPC Attack and PC Attack is the most memory intensive because everyones so damn obsessed with floats

Merkur
03-23-2002, 09:40 AM
the bigger problem (in AI) was that factioncheck needed a SQL Query though - its fixed in 0.2.6