I haven't worked on anything Blockland related in a while so I'm going to release this in it's unfinished state. the pack does not come with a working AI bot. It requires ShapeLinesV2 and I can't remember what edits I made to it so link lines might be broken. for the sake of simplicity I have disabled some of the link options (speed, weight, slowdown) because they were still being worked on when I stopped and I can't remember if they are actually working. I will include a save file for the manual nodemap I made on afghan. it's got some
pretty neat demo stuff.
Chat commands:
/toggleNodeShapes - Show/hide nodes and links.
/nodegun - Equips the nodegun. Press Light to switch between modes.
/commitNodeMap - Creates/updates information that Port's A* algorithm can use. You must do this every time you load or change a nodemap or the path testing tool will not recognize it.
/generateNavmesh - Will generate a navmesh over every brick using quadtrees and then trying to collapse it. Will automatically turn off node/link shapes so it doesn't destroy your computer. I heavily encourage you to manually create nodemaps instead, this algorithm is probably exponentially time complex, meaning maps beyond a certain size will become infeasible to generate mesh for, and the collapsing algorithm is just simply not good enough.
Console commands:
wrath_save("<name>"); - saves nodes to a file located under
Blockland/Config/Server/wrathwrath_rload("<name>"); - loads nodes from a file located in that directory. for example
wrath_rload("afghan_manual");wrath_getClosestNode(%position) - gets the closest node to this position
wrathfinder_newPath(%startNode, %goalNode) - creates a new path between two nodes and returns a path scriptobject containing all the nodes in an array. if there already exists a path between these nodes it will return that instead.
wrath_rebuild(); - clears all nodes and re-executes the addon. I think there's a function somewhere for just deleting the nodes but I forgot what it is. Try not to load/create and then delete too many nodes because it probably wastes memory. Once you're done making a node map you should save it, restart your game, and load it once.
The following code
%AIPlayer.wrath_AIEenabled = true;%AIPlayer.wrath_stepPath(%path, 0);Will make a bot follow a path. It's what the path tester uses. I recommend using the built in
setMoveTolerance and
setMoveSlowdown functions as well to adjust the bot's behavior while walking the path.
Download
https://leopard.hosting.pecon.us/dl/bduti/System_Wrathfinder.zip