Rayvolution
Journeyman
Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia
|
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
(08-02-2012 04:23 PM)WRWR Wrote: IF (<SRC.isEVENT.e_AI_Hostile>)
That did the trick! Although, I had to change it to isTEVENT
Thanks!
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
|
|
08-02-2012 11:00 PM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
(08-02-2012 04:05 PM)Gil Amarth Wrote: You can try ISTEVENT.
IF (<SRC.TEVENTS.ISTEVENT.e_AI_Hostile>)
It works in my system.
(08-02-2012 04:23 PM)WRWR Wrote: IF (<SRC.isEVENT.e_AI_Hostile>)
I agree with both of you, but, using this function, I think will do 2 operations.
<SRC.ISEVENT.E_AI_HOSTILE> one operation
and the
ISEVENT Function, second operation, that maybe already be a STRMATCH
So, if someone know, whats quickly, do the operation in the condition or call a function to do the operation?
I choose the first one because looks quickly, but I don't know.
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
08-03-2012 02:00 AM |
|
|
Anarch Cassius
Master
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
|
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
Quote:
- I can't use brain_guard for my script though anyway, because when "spawned" via spawngem, they vanish. They'll only stick around if I manually add them via Axis.
- Even stranger: Brain_None on the guard won't change his behavior. He still "runs away" from all human characters.
- Looking more into it, it seems that basically any NPC with the same Body won't attack each other.
These sounds like issues.
The first should only be a problem if you don't have guardzones. Guard brain is meant to work with guard zones and it rescriptable if you aren't using them so this is fine.
The second is an issue. I'd be in favor of any non-defined brains having no behavior. The only downside would be logically this should include not movement behavior. Then you have a totally blank slate to work from, you just need to give it wander orders on your own.
The third is interesting because it doesn't work on Elves. Test the other ML creatures. I suspect it's code written before they existed. I'd like to see this specifically disable-able since it's no longer complete and likely to be undesired on many servers.
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
08-03-2012 09:50 AM |
|
|
Rayvolution
Journeyman
Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia
|
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
(08-03-2012 09:50 AM)Anarch Cassius Wrote: Quote:
- I can't use brain_guard for my script though anyway, because when "spawned" via spawngem, they vanish. They'll only stick around if I manually add them via Axis.
- Even stranger: Brain_None on the guard won't change his behavior. He still "runs away" from all human characters.
- Looking more into it, it seems that basically any NPC with the same Body won't attack each other.
These sounds like issues.
The first should only be a problem if you don't have guardzones. Guard brain is meant to work with guard zones and it rescriptable if you aren't using them so this is fine.
The second is an issue. I'd be in favor of any non-defined brains having no behavior. The only downside would be logically this should include not movement behavior. Then you have a totally blank slate to work from, you just need to give it wander orders on your own.
The third is interesting because it doesn't work on Elves. Test the other ML creatures. I suspect it's code written before they existed. I'd like to see this specifically disable-able since it's no longer complete and likely to be undesired on many servers.
The first sounds like that's the issue, since I'm still in heavy dev on my maps I haven't even bothered writing the region/map flags for anything, and my main city is by-the-scripts in the middle of no where. But, even when I do write the map flags, my cities won't have the "Guarded" flag anyway. My new guards don't use brain_guard anyway and my cities won't technically (As far as Sphere is concerned) be "guarded" areas since the guards will just be regular NPCs wandering the streets.
Second won't be an issue, since I overcame that with my new AI system I'm writing. I'll just be keeping their brains as-is.
Third actually does the same with elves, and all other bodies I've tried. The only reason elves "fix" my problem is because I don't use elves anywhere on my server, so if the only elves are the guards, the guards should operate correctly 100% in all situations now. Unless they attack each other, but there's no AI flags (or plan to have any) to ever make them do that.
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 08-03-2012 10:45 AM by Rayvolution.)
|
|
08-03-2012 10:43 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
08-03-2012 12:15 PM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
(08-03-2012 06:08 PM)WRWR Wrote: Funny orcs but
Code:
14:05:DEBUG:__ thread (9460) __ | # | _____ function _____________ | ticks passed from previous function start ______
14:05:DEBUG:>> 9460 | 0 | NetworkThread::tick | +0
14:05:DEBUG:>> 9460 | 1 | NetworkOutput::processOutput | +0
14:05:DEBUG:>> 9460 | 2 | NetworkOutput::processPacketQueue | +0 <-- exception catch point (below is guessed and could be incorrect!)
14:05:DEBUG:>> 9460 | 3 | NetworkOutput::sendPacket | +0
14:05:CRITICAL:Exception, in NetworkOutput::processPacketQueue() #1 "sending"
14:05:DEBUG:id='1', pri='2', packet '2' of '25' to send, length '34' of '12000'
14:05:DEBUG:__ thread (9460) __ | # | _____ function _____________ | ticks passed from previous function start ______
14:05:DEBUG:>> 9460 | 0 | NetworkThread::tick | +0
14:05:DEBUG:>> 9460 | 1 | NetworkOutput::processOutput | +0
14:05:DEBUG:>> 9460 | 2 | NetworkOutput::processPacketQueue | +0 <-- exception catch point (below is guessed and could be incorrect!)
14:05:DEBUG:>> 9460 | 3 | NetworkOutput::sendPacket | +78
14:05:DEBUG:id='1', pri='2', packet '3' of '25' to send, length '51' of '12000'
Strange... I runned it for one day and don't get any errors...
Maybe is your settings in sphere.ini...
What about network settings?
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
08-04-2012 02:20 AM |
|
|