The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
Author Message
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #21
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
IF (<SRC.isEVENT.e_AI_Hostile>)
08-02-2012 04:23 PM
Find all posts by this user Like Post Quote this message in a reply
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #22
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 Big Grin

Thanks!

[Image: 4_Logo.png]
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
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #23
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
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #24
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
Find all posts by this user Like Post Quote this message in a reply
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #25
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. Wink

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. Tongue

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.

[Image: 4_Logo.png]
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
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #26
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
A sux but funny 'invasion'.
To works, create I_SPAWN_INVADER and I_SPAWN_DEFENDER and it will summon the mobs and will have an infinity combat hahaha


Attached File(s)
.scp  1 - Cove Invasion.scp (Size: 4.72 KB / Downloads: 14)

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 12:15 PM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #27
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
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'
08-03-2012 06:08 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #28
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
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #29
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
it's a very interesting script Shock

The only problem is that sometime the orcs spawns on the wrong place(like above a wall), still it's very funny Big Grin
08-04-2012 02:42 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #30
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
(08-04-2012 02:42 AM)darksun84 Wrote:  it's a very interesting script Shock

The only problem is that sometime the orcs spawns on the wrong place(like above a wall), still it's very funny Big Grin
Ah.. thats because I set to spawn around the spawner.. of course we can fix it, its easy =D

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:45 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)