![]() |
TestRun for NPC navgation - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Submissions (/Forum-Script-Submissions) +--- Thread: TestRun for NPC navgation (/Thread-TestRun-for-NPC-navgation) Pages: 1 2 |
TestRun for NPC navgation - Soulless - 09-16-2013 03:56 PM Okay, so this script is just a concept for an idea im trying to bloom. basically im in an attempt of making "bots" for my server. their eventual functionality will be hopefully rather in depth. obviously the first part of a bot is making it move to a place it wants to get to. and not looking like it's too NPCish. so i've made this script that has been able to successfully move an NPC from the graveyard to the sweetdreams inn. just add this to your scripts, add c_h_fighter, and type .testrun then target the fighter and watch him make his way. im looking for feedback, ideas, brainstorms to make this better. its pretty basic, but i think this is the best way i could think of at the time. let me know what you think, and feel free to help me with this project if you are able ![]() Code: //Created by Soulless RE: TestRun for NPC navgation - XuN - 09-16-2013 09:38 PM First of all, this is a great idea and a very nice adition for roleplaying purposes or some kind of events (LOL-Like minions, ie). I've tried it with an skeleton from Britain Graveyard, making britain unguarded, you have to mess with homedist, it doesn't go so far after entering the city, wich is just easy to do. But the real problem comes searching for a correct path, it will be a pain in the ass to make a pathfinding in scripts since you can calculate to move one tile, two, three, four... but the whole correct path it would be a very largue calculation when it may be possible that someone give us a function related to 'MoveToPos' from NPC_AI_ALWAYSINT or NPC_AI_PATH or somewhat/somehow/somewhere it's calculated? Coming back to topic, it goes so nice with 1x1,2x2 obstacles, but it's hard to him to get out from graveyard now (wich I asume you already knew ![]() RE: TestRun for NPC navgation - Soulless - 09-17-2013 02:30 AM well any enclosed area presents a serious problem for him. because there's no logic in the script in how to get out. but when he's outside of any trapping building anything that is a square shape, or anything thats small and can be re-routed by going 10 feet in either 45* or 90* along side it, can be handled decently. hpoefully we could get some more information on pathfinding or possibley work some kind of a RUNTO function in ( i know a dev mentioned that being a possibility in IRC when i was bugging people about it ![]() though i bet as a community we can all make this work seamlessly ! It's just a matter of getting it done and testing it out. the good news about bots is that they test themselves out ![]() RE: TestRun for NPC navgation - Rattlehead - 09-18-2013 09:28 AM well, one thing RunUO has that we dont, that we SHOULD have, are waypoint gems, no scripting required and they work (last time i checked 10 years ago) pretty well, i had one with 20 waypoints, all of which he flawlessly executed in a dungeon, so if the devs implemented something like this, we would be one step closer to having functionality on their level. RE: TestRun for NPC navgation - Anarch Cassius - 09-18-2013 10:31 AM I've seen a way point based caravan but then you just have a static route. Ideally you'd have the waypoints form a nodemap and use an A* variant to navigate that. Possibly using square grid based A* for finer dynamic navigation at other times. The question is how to do that most efficiently without bogging down the server. RE: TestRun for NPC navgation - XuN - 09-18-2013 04:56 PM GOD's have heard us ^^ Code: small change to NPC_Act_Runto and NPC_Act_Goto to prevent invalid point errors. Can't wait for it to compile! RE: TestRun for NPC navgation - Mordaunt - 09-18-2013 08:54 PM Don't go calling him a god... it'll go to his head lol RE: TestRun for NPC navgation - amonvangrell - 09-19-2013 07:12 AM LOL >:] RE: TestRun for NPC navgation - XuN - 09-19-2013 08:19 AM I've been waiting for this nightly for testing this and at first view it does the same that Soulless script is doing atm, NPCs aren't moving like they will when chasing you in combat. RE: TestRun for NPC navgation - Soulless - 09-19-2013 05:25 PM i beleive new_positioning walkcheck diaganaol walkcheck and the persistent_path flags should all be on to get the most out of the runto command. |