Only some mods have been updated for tModLoader v0.11. Sorry for any inconvenience.
AStar Pathfinding
Filename: AStar.tmod
Version: v1.0.1.1
Downloads: 12618
Last Update: 2018-10-21 07:27:54
This mod has not been updated for tModLoader v0.11 and will not work.
This mod adds Pathfinding to Enemy and Town NPCs.
That means they will be smarter and navigate the world and try to avoid obsticals to try and get to their target location.
NPCs will only search for a path within a distance of 120 blocks as enemy ones will usually despawn outside 125 blocks.
They will also not search through areas they cannot normally nativate, such as sky for gravity NPCs and outside the water for Fish, and places they won't fit through.
Some however will jump up platforms to get to their target location. Some can't go through platforms at all. (I'm looking at you most Demon Eyes)
Slimes, Jellyfish and Derplings are excluded as they are considered dumb.
Bosses and NPCs that pass through tiles are also excluded.
Any modded NPC that does not use a vanilla AI style that's allowed in this mod, they will be excluded too.
AI Styles that are allowed: 2,3,5,14,16,17,22,26,38,40,44,85,90,91,96 and for debug purposes, 92 (You can look them up on the wiki)
There have been limits I've hit due to how things work in vanilla
* Not all NPCs will move properly or as gracefully as they do without pathing
SinglePlayer / Server
EnableNPCs[/b]: Enable for enemy NPCs EnableTownNPCs[/b]: Enable for Town NPCs EnableProjectiles[/b]: Enable for certain Projectiles Projectiles include Magic Missile and Flying Knife as well as any other similar ones TownNPCsGather[/b]: Townies gather at Spawn during the day Townies will hide away at home during Boss Fights, Slime Rain, Invasions or Solar Eclipse TownNPCsAttack[/b]: Townies seek and attack nearby Enemies Townies will not seek enemies during Boss Fights, Blood Moon or Solar Eclipse NurseSeeksInjured[/b]: Nurse seeks and heals injured Townies She will do this regardless of Boss Fights, Blood Moon or Solar Eclipse
Heuristic[/b]: The method of which the pathfinding is calculated 0: Manhattan (Default, Fastest) 1: Euclidean 2: Euclidean Squared (Prefers short diagonals) 3: Chebyshev 4: Dijkstra (Slowest, Most Accurate) [b]TieBreakScale[/b]: Tie-breaking Scale (Dijkstra ignores this) The closer to 1 the more paths will hug walls The closer to -1 the closer to the Dijkstra heuristic [b]SearchDistance[/b]: Search Distance in tiles Higher vales decrease overall performance but increase search range [b]WalkHeight[/b]: Walkable Height How many tiles above a solid is considered walkable [b]NPCQueueProcessTime[/b]: NPC Queue Process Time How many game ticks it will process the NPC queue [b]NPCUpdateTime[/b]: NPC Update Time How many game ticks it will take to process each NPC if the queue is small [b]ProjectileUpdateTime[/b]: Projectile Update Time How many ticks it will take to process each Projectile (60 = 1 second)
[b]ClientSide[/b]: Allows client sided processing Disable this if you have performance issues on servers, however NPCs may appear to desync Enabling this in game will cause your game to freeze for a moment, so do it somewhere safe This has no effect in Single Player
[b]ShowPaths[/b]: Show Paths [b]ShowTileMarkers[/b]: Show Tile Markers If playing on a server, paths and tile markers in darkness will be hidden
Planned Features
* Find Modded NPCs that need to be whitelisted
Known Bugs
* Some Modded NPCs may not work as intended or at all
Mod is configurable via [url=]Mod Settings Configurator[/url] or editng AStar.json and using the command /as reload
[b]v1.0.1.1* Fixed array errors with modded NPCs. * Fixed pathfinding not working on the client side when connected to a server regardless if enabled or not. * Defaulted client side processing to false due to performance concerns. [b]v1.0.1* Fixed nodes generating twice on world load (could be TML issue) * Added status text for generating nodes in game [b]v1.0* Changed Icon * Restarted Version Scheme * Requires my new Library Mod * Renamed to AStar from A* * Drastically overhauled pathfinding code * Pathfinding is much faster and more reliable * Drastically reduced the node system overall * Nodes now only generate on world load and never dynamically * You can now switch client sided processing on and off without having to reconnect to clear the node memory * Added ability for some projectiles to use pathfinding such as the Magic Missile and other similar projectiles * NPC despawn range has been doubled * Town NPCs are better at navigating around and also to their home * Added ability to enable or disable any main aspect of this mod * Added ability to change the search distance up to double if your computer can handle it * Added ability for Town NPCs to seek and attack nearby enemies, but will hide away during boss fights or moon events * Added ability to change how often a NPC or Projectile will update their paths in ticks. [b]v0.3.1:* Fixed clients not being able to generate nodes while connected to a server * Fixed Modded NPCs causing errors * Added logging for errors to tModLoader's Logs.txt * Removed Mimics from whitelisted AIs [b]v0.3:* Added a bunch more configurable options. * Nodes already generated won't regenerate unless their tiles are modified. * Added ability to disable all Node and Path generating if you're playing online to only let the server handle it, however NPCs may rubberband around. * Added a bunch of debug lines. * Fixed NPC width checks not working properly. * Added ability for Town NPCs to either path to Spawn or their Homes. OldMan sticks to Dungeon no matter what. * Added ability for the Nurse to seek out other Town NPCs that need healing. * Fixed hopefully all vanilla NPCs that stop to shoot from sliding on the ground. * Slowed down how much Floating Eyes change their velocity by half. * Added Error messages. * Fixed Fighter AI NPCs from not being able to stay on platforms. * Drastically increased performance of drawing nodes. IDK why I wrote it the previous way D: * Changed the drawing of paths to use lines instead of just arrows. Arrows will appear at each corner. * While Online, Nodes and Paths will not be drawn in darkness. [b]v0.2.1:* Hopefully prevented errors when NPCs clear their paths [b]v0.2:* Added Config * Added option to generate nodes around the player rather than the whole world at start * Allowed clients to generate nodes in Multiplayer, but is restricted to local generation * Allowed clients to make paths for NPCs in Multiplayer, which will end up being the same as the server makes anyway to prevent rubberbanding * Allowed clients to show nodes and paths in Multiplayer * Added Lava checks to prevent NPCs who aren't immune to it from pathing through it (but they are probably dumb enough to anyway) * Added node generation progress for the server console * Changed Heuristic from Manhattan to Dijkstra to prevent hugging around complex objects