Data Realms Fan Forums http://868000.nnhp.asia/ |
|
Making AI more "relentless" http://868000.nnhp.asia/viewtopic.php?f=73&t=46277 |
Page 1 of 1 |
Author: | 4zK [ Thu Aug 16, 2018 12:15 pm ] |
Post subject: | Making AI more "relentless" |
The current AI isn't very good at pushing towards enemy, and relies a lot on having a weapon to fire from a distance while standing still. This makes implementing AI-compatible melee weapons really difficult. The diggers-only one man army activity is a good example how the AI gets confused with using the digger as an offensive weapon. Actors can eventually figure out how to charge the player, but until then they just stand still. I'm looking for the same relentlessness as the "default" hardcoded AI has (when walking towards the brain without a weapon), but I want to include the pathfinding of the new AI. I fear that there's nobody left around here to look into this so I'll have to do it myself, just looking to see if someone would have thought about this too. |
Author: | Bad Boy [ Thu Aug 16, 2018 10:20 pm ] |
Post subject: | Re: Making AI more "relentless" |
I'd be surprised if you find too much, the ai is a big, complex and kind of messy set of code and most people don't want to delve too far in. I'm trying to remember cases of this sort of stuff but not much comes to mind. Here's what I got though: xenoargh's Cortex Command reloaded may be of some help: viewtopic.php?t=31342 There's also the post by clunatic about it which suggests a possible solution (there's some code partway down the page and I think this probably the most straightforward way to do things): viewtopic.php?f=73&t=45284 There may be more too that I'm missing, but aside from whatever you can find through searching you're probably on your own. |
Author: | 4zK [ Fri Aug 17, 2018 1:50 pm ] |
Post subject: | Re: Making AI more "relentless" |
Yeah, thanks anyway. The AI files are ass to read thoroughly so I've been trying to just strip away any AI functions that might be keeping it from advancing, since I'm aiming for a relatively dumb AI with the simple goal of getting to the enemy brain and destroying it. (read: zombie) I'm going to delve into the two topics and see if I can find anything. |
Author: | Bad Boy [ Sat Aug 18, 2018 3:12 am ] |
Post subject: | Re: Making AI more "relentless" |
Haha well I can at least say that I very much know your pain. I took a brief stab at that exact thing with the DayZ mod, but never got past the same stripping it down stage before the mod was abandoned. Good luck with it, hope you can keep at it. |
Author: | 4zK [ Sat Aug 18, 2018 11:32 am ] |
Post subject: | Re: Making AI more "relentless" |
It's like I'm using lobotomy to fix the issue... lmao I've used enough time to create a pretty rad zombie actor, so I really wanna finish this "project" and turn it into an activity. I'm aiming for a simple zombie defense + possibly a campaign-ish activity with tasks. The zombie actor is packed with following features:
To-do:
EDIT: I managed to poke the right spot in the AI. Huzzah. The part that stopped the script was at the end of HumanBehaviors.BrainSearch. Code: --Owner:ClearAIWaypoints() -- this part freezes the script when facing the brain if MovableMan:IsActor(ClosestBrain) then Owner:ClearAIWaypoints() -- moving the function here fixes it Owner:AddAIMOWaypoint(ClosestBrain) AI:CreateGoToBehavior(Owner) else return true -- the brain we found died while we where searching, restart this behavior next frame end The AI doesn't seem freeze the actors in their place anymore. I also did some further edits that help legless actors without jetpacks move by crawling. They could still be better at traversing terrain though. |
Author: | Bad Boy [ Tue Aug 21, 2018 1:46 am ] |
Post subject: | Re: Making AI more "relentless" |
Hey that sounds awesome, the double tap rule and headless chicken-ing sound particularly cool. Hmm, I'd guess your scene doesn't have a brain actor and all the zombies are in brainhunt mode? It looks like that part wouldn't cause problems if they have a brain to search for, but otherwise they'd get stuck running the function and returning constantly without actually doing anything. Keep in mind I haven't looked at lua, much less CC's ai, in ages and may be way off base haha |
Author: | 4zK [ Tue Aug 21, 2018 11:11 am ] |
Post subject: | Re: Making AI more "relentless" |
It's probably caused by the fact that the "brain" actor in One Man Army isn't exactly a brain to begin with but rather just a regular unit that has been given brain status. It likely caused an extra step for the AI to get over, making it too clumsy. I also implemented clunatic's melee weapon thing and it was pretty straightforward and functional. I'm not sure yet if it's mandatory to replace the Base.rte AI for it to work, however it's not like it *removes* any features. |
Author: | Bad Boy [ Tue Aug 21, 2018 11:41 pm ] |
Post subject: | Re: Making AI more "relentless" |
Ah yeah that might give problems for the check. And cool stuff about melee weapon script, hope everything else goes so smoothly. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |