Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
|
Animals won't start fights
|
| Author |
Message |
Anarch Cassius 
Master
 
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
![]()
|
RE: Animals won't start fights
Yeah that's the thing, I don't want to do that. It'll affect other things. I want neutral animals attacking out of hunger, which I specifically scripted to happen and used to work.
I know what brain_animal does and I am fine with that. In versions of Sphere up to around a year ago however ANY brain would attack when a script explicitly told it too. Now they intitiate hostilities (*x is attacking y*) but don't move to attack the target.
And I just confirmed it's not even an animal thing...
Monsters won't fight monsters either.
I switched a rabbit's brain to monster and it went for the rat before I could even change it. Then I changed the rat's brain and they both stopped fighting.
The problem looks to be here: https://github.com/Sphereserver/Source/b...s.cpp#L449
Brains of the same type aren't hostile. Changing the threat doesn't seem to help and I don't know how to affect hostility directly.
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
| 01-26-2017 12:30 PM |
|
|
Leonidas 
Master
 
Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1
![]()
|
RE: Animals won't start fights
Worked for me.
Code:
[SPEECH spk_stag_test]
ON=test
TARGETF attacktest
say Who do I attack?
obj=<uid>
[FUNCTION attacktest]
obj.attack <argo>
Code:
// Monsters run when scared of death
MonsterFear=0
// Monsters may fight each other
MonsterFight=0
BUT my build is Dec 17th after just reading you comment latest version of sphere
(This post was last modified: 01-27-2017 12:12 PM by Leonidas.)
|
|
| 01-27-2017 12:09 PM |
|
|
Anarch Cassius 
Master
 
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
![]()
|
RE: Animals won't start fights
Thanks, that helped if only to know if can work.
Latest Sphere in this case is anything from the last year so you're fine.
It's NOT MonsterFear or MonsterFight.
It IS one of the Extra_NPC_AI flags. I was able to get correct behavoir by killing all but the old Speedmove. Since most of them don't work well this is fine for now. I will debug to figure out which is the problem.
Edit: Okay, apparently the unwillingness to fight the same brain, like monster vs monster, does happen only if MonsterFear/MonsterFight are ON. I suppose they may just all be afraid but I recall them moving away if that happened before.
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
| 01-27-2017 05:45 PM |
|
|
Anarch Cassius 
Master
 
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
![]()
|
RE: Animals won't start fights
It may depend on the brain.
All I know is that my faction monsters weren't fighting even after I disabled the Extra_AI and most of the other scripts were working. Once I disabled Fear and Fight they started fighting like before. As I said, it could be that they just all fear each other due to some quirk of my server's stats.
You seemed to have a similair problem with guards at one point ( https://forum.spherecommunity.net/Thread...ting-back) where you able to find the cause?
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
| 01-28-2017 08:40 AM |
|
|
User(s) browsing this thread: 2 Guest(s)