![]() |
[0.1.3] [client/server] BotCreator - Printable Version +- Gothic Online Forums (https://archive.gothic-online.com) +-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html) +--- Forum: Resources (https://archive.gothic-online.com/forum-14.html) +---- Forum: Scripts (https://archive.gothic-online.com/forum-17.html) +---- Thread: [0.1.3] [client/server] BotCreator (/thread-2301.html) |
[0.1.3] [client/server] BotCreator - HammelGammel - 28.12.2017 Description: This is still WIP, so expect bugs Please report any problems you find, here: Issue Tracker Wiki (WIP): Wiki Home Current version: 2.6.3 Adds synchronized bots with AI. ![]() I am aware that there are already multiple threads with similar projects, but I do believe that this is not just another attempt to synchronize bots. What I am trying to achieve is a simple to use, complete package to a simple bot/AI system anybody can use with minimal effort. Among the current features of the bots are:
Installation:
Code: <!-- Module BotCreator --> Usage: Spawning: Code: local bot = BotHuman(name, x, y, z, angle, world) Basics: Code: bot.setWorld(world) AI: Code: bot.getFactionComp().addToFaction(factionname) Examples: Code: local novice = BotHuman("novice", 47034, 4990, 19750, 99); Code: local novice = BotHuman("novice", 47034, 4990, 19750, 99); Animation: Bots have an AnimTypeComponent, which holds registered animations for this type of bot. Similar bots share the same AnimTypeComponent. existing animation types (eg. bot.setAnimTypeComp(ANIMTYPE_HUMAN) -> bot uses human animations):
Code: bot.playNextAni(identifier) examples: Code: bot.playNextAni("attack1h") // plays attackanimations in succession Some registered animation sequences for humans are:
Combat: Bots have a CombatTypeComponent, which holds attributes that define combat behaviour. Similar bots share the same CombatTypeComponent. existing combat types (eg. bot.setCombatTypeComp(COMBATTYPE_HUM_1H) -> bot behaves like human with onehanded weapon):
Events:
Commands:
By default, a bunch of bots are spawned in the newworld monastery. They have schedules implemented (work by day, sleep by night) and are capable of fighting enemies. If you want to test combat go to server/placement/NewWorld.nut and remove comments to spawn a bunch of enemy factions in the newworld monastery. Download Repository RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - Osmith - 28.12.2017 Good! Maybe I'll try to do coop mode with that script on my free time. (I thought about to do that script long time ago, but I'm to lazy, so thx ![]() RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - HammelGammel - 28.12.2017 Awesome ![]() Small update that fixes respawn. Requires redownloading my Utility Scripts, too. RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - HammelGammel - 21.01.2018 Update with a bunch of fixes. Respawn should work as intended now, the code is cleaner and targeting is a bit more reliable (still causes issues sometimes but I don't have time to work on this at the moment). Note that some methods have changed: ScheduleAction(hour, min, identifier, function, repeat) -> AddSchedule(hour, min, function, repeat) Damage dealt by bots is now calculated on a client RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - nerdlv7 - 22.01.2018 So, I went to the monastery to check the bots and their AI. They don't deal any damage to me at all. I don't think wolves dealt any as well. Also, one of the scripts spams "1" in my server console, I'm not sure which one, but It has to be something connected to the bots, as I turned them off to check if that was something wrong on my side. Am I doing something wrong? ![]() Edit: Whoops, my fault. Bots deal damage to me, I just had 10k health so I didn't actually see the health bar going lower. Sadly, I still can't fix console spam :/ Any advices? RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - Quarchodron - 22.01.2018 search function that make that spam. Look for print. if u use notepad ++ just serach>look in file> print ![]() RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - nerdlv7 - 22.01.2018 (22.01.2018, 18:51)Quarchodron Wrote: search function that make that spam. Look for print. if u use notepad ++ just serach>look in file> print Well, I've tried that. I have no clue what's causing this. Edit: Okay I got it. There was a "print(packet.ID)" in server/packets.nut file. No idea why it's there but this is what was causing the spam. I should spend more time on finding the problem myself other then spamming on the forum. Sorry ^^ RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - Mattwell - 22.01.2018 I see 1 error, while player is staying afk, wolf will stay afk too instead of attacking/jumping back from player in fight. Anyway good job, very useful script for whole users ![]() RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - HammelGammel - 23.01.2018 The combat generally still needs an overhaul. I'm on it RE: [0.1.3] [client/server] Squirrel WIP Synchronized bots with AI - HammelGammel - 27.01.2018 Update 2.0 - requires new version of Util scripts This is almost a rewrite of most aspects of the AI. It should use less memory, work more reliably and the code is a lot cleaner. Combat got an overhaul too in the process and should work a lot better now. Note that a lot of things have changed. Adding schedules for example is a lot more streamlined now, requires rewriting any existing schedules though. Look at instructions in OP or server/placement/NewWorld.nut to find out more. |