-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI for basic mobs, slightly harder mobs, random optimizations, partial action functionality, mobs deal with corpses #996
base: main
Are you sure you want to change the base?
Conversation
Several issues remaining, namely AI freezing/not doing anything after a point. Eat corpses may not be appropraite for Azure Peaks - may need to add a check if it is a player body.
…ble eat_corpses trolls, moles, volfs, (azure peak's) minotaur, orcs, rous converted. ai_controller now checks for both ghost and player on zlevel. Unsure as to performance hit - useful for my debugging, turf - check if there is an obstacle, to be used with environment_smash. tentative reverted an accidental find and replace behavior->behaviour in old txt file commented out animals eating, they'll just congregate around corpses for now (this may lead to mobs constantly fighting) add learn_ai.md from monkeystation trolls, moles, volfs, (azure peak's) minotaur, orcs, rous converted.
HYPE |
…ghtly, using actions rather than proj alt attacks for mob specials, some func improvements, added details to mobs original plan was to use spells for mobs but the spell code appears to be in urgent need of refactoring, still much to do for farm animals but other things appear to be in working condition, will probably at some point go back to spells for targeted abilities, improving, adding or incorporating (thank you tg) functions as I see them added some commented notes for myself
d7cbe61
to
3d1bb11
Compare
their is an easy fix for them running away, and thats just adding a new var to the flee element that makes them stop fleeing after a certain point |
but the real reason to port this is it allows better control over what mobs do as you can give them more indepth plans that aren't a pain to read |
Yup, I've realised this over the past few days -- especially with small tweaks for differing mob subtypes when needed. And it cuts down significantly on repetitive code. Thanks for your work/inspo! |
if you get stuck I did make a pr on vanderlin a few hours ago redoing some of this code to help with the issue |
updated ai turf pathfinding rather than going through a global list, it will instead check whether the pawn can traverse the turf safely added a testing behaviour with elite orcs so they will try to (poorly) melee space against their targets when their swing is on cooldown. Sounds good but doesn't work well (yet) in practice That was the main reason for the reach change mudcrabs don't attack and just move left/right
97b99f4
to
7b3575d
Compare
Vanderlin-Tales-Of-Wine/Vanderlin#237 Fixed up a few type checks and returns just in the case the current_movement_target wasn't set by the plotter and a qdelete check on ai_flee_when_hurt The mob self-healing during idle numbers should probably be tweaked but want to be mindful of too many expensive calcs on such a simple function. missed a turf check in idle walk placeholders for next actions
Built into the retaliate subtree itself, may need to be expanded in future.
Built into the retaliate subtree itself, may need to be expanded in future. fix up melee_spacing, will now push if unit is hiding around a corner (dist vs reach)
only non-firebreathing dragons will use it
…zure-peak into hopefully-smarter-mobs
commit 33de53ed0c5c2694ea2e8cd78abfbd7d91c672bd Author: crix870 <[email protected]> Date: Fri Dec 13 23:15:30 2024 +1100 add mossback, dragon actions, cleanup dragon abills commit 824ae5ad4db1b963324e158619d7b375c1130322 Author: crix870 <[email protected]> Date: Fri Dec 13 22:23:11 2024 +1100 code cleanup
hopefully fixes 'sentientish' mobs being kited
some wildlife (scavengers - rats, wolves, trolls) will also eat hide, fur, bones in addition to foodstuffs.
specifically for attack speed yes, last I checked there's no way to alter that for mobs. only npcs seem to have atk speed variables to edit |
You can give them custom intents and make them slower. I think all of the mobs (on live) are using 1s generic attacks |
I've centralized all the general mob data (health, attack speed and movement speed) into defines so future-people can balance it to their heart's content. |
…astmind on eating bodies
to help prevent corpse camping upon ambush death in the wilderness
47d8ba0
to
95762b4
Compare
95762b4
to
e82f6bf
Compare
testmerging for a little bit, poor pr's waited long enough already |
heals blood amount now too, to a point remove blank file
About The Pull Request
Ports basic mobs from Vanderlin as well as some AI components from TG/Monkeystation.
Vanderlin-Tales-Of-Wine/Vanderlin#48
The original intent behind porting this system was to help me familiarize myself with, learn and understand the intricacies of SS13’s code—and it has successfully served that purpose. I'll probably tinker around with it here and there for my own fun.
I encourage you if you have some time and motivation to play around with it, test, debug etc. I've done one or two runs of the wilds/orc dungeon and didn't have any major (non-skill) issues.
Why It's Good For The Game
Honestly I'm not sure if it is worth it. The current system in Azure Peak is functional with no major performance issues and it's unclear (to me) whether the potential performance improvements (?) justify the inevitable AI bugs that will arise. Still, it's here if anyone's interested.
Key problems at the moment:
- Mobs when running away won't attack back. Compared to the original AI, mobs at some point will turn around and attack you. But in this version, they will keep running until the end of the map, a barrier or if they fall a Z-level.---- NEW
Complete list of changes.
Currently this does nothing for the mob except sate their hunger which is also currently used for nothing (as they're non-farm animals). Could probably work in spawning more or healing the mob later on.
Known Issues