Development: Troubles with Mobs
Posted: Wed Jun 04, 2014 11:05 am
Hi all -
I have managed to get the hang of this mostly - successfully added my real character's equipment to a test quest as rewards, threw together a few test enemies, and about 50% through my first map (I started big, oops).
I tripped over a few things along the way, but have found only one thing so far that is completely baffling me: Monster movement in combat. I lifted my formatting entirely from the Content Creator.
I have tried both protectSpawn and helpOthers for movementAggressionType, and neither worked. I have played around with max AP, move AP, attack AP - nothing seems to work.
With helpOthers: I get an error either when they attempt to move into my square, or if I end a turn with any alive and not adjacent to me (i.e., when they try to move to assist).
With protectSpawn: I get an error the moment I cross into their spawn range.
With wholeMap: Yep, insta-crash on map load, or within ~1 second of map load.
I have moved the spawn area around, ensured there is nothing in their way, and I consistently get an error similar to:
FATAL EXCEPTION: main
Process: com.gpl.rpg.AndorsTrail, PID: 1742
java.lang.ArrayIndexOutOfBoundsException: length:1089; index:2215
at com.gpl.rpg.AndorsTrail.controller.PathFinder.findPathBetween(PathFinder.java.37)
Errors come from MonsterMovementController.findPathFor / determineMonsterNextPosition / moveMonster / moveMonsters /onTick / onNewTick... etc, etc, etc.
I tried removing all monsters and spawns other than the affected monster - no joy.
Am I doing something obviously wrong, or is this something I simply should not be playing with at this time? Thanks for any suggestions or information. This is proving to be quite a bit of fun.
-Raner
I have managed to get the hang of this mostly - successfully added my real character's equipment to a test quest as rewards, threw together a few test enemies, and about 50% through my first map (I started big, oops).
I tripped over a few things along the way, but have found only one thing so far that is completely baffling me: Monster movement in combat. I lifted my formatting entirely from the Content Creator.
I have tried both protectSpawn and helpOthers for movementAggressionType, and neither worked. I have played around with max AP, move AP, attack AP - nothing seems to work.
With helpOthers: I get an error either when they attempt to move into my square, or if I end a turn with any alive and not adjacent to me (i.e., when they try to move to assist).
With protectSpawn: I get an error the moment I cross into their spawn range.
With wholeMap: Yep, insta-crash on map load, or within ~1 second of map load.
I have moved the spawn area around, ensured there is nothing in their way, and I consistently get an error similar to:
FATAL EXCEPTION: main
Process: com.gpl.rpg.AndorsTrail, PID: 1742
java.lang.ArrayIndexOutOfBoundsException: length:1089; index:2215
at com.gpl.rpg.AndorsTrail.controller.PathFinder.findPathBetween(PathFinder.java.37)
Errors come from MonsterMovementController.findPathFor / determineMonsterNextPosition / moveMonster / moveMonsters /onTick / onNewTick... etc, etc, etc.
I tried removing all monsters and spawns other than the affected monster - no joy.
Am I doing something obviously wrong, or is this something I simply should not be playing with at this time? Thanks for any suggestions or information. This is proving to be quite a bit of fun.
-Raner