[ZScript] Popguy12's enemy AI library

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
popguy12
Posts: 40
Joined: Fri Jan 19, 2018 1:44 pm
Location: Planet SOPHIA

[ZScript] Popguy12's enemy AI library

Post by popguy12 »

What is it?
This is a free to use enemy AI library, fit for your enemy coding needs, and all in ZScript.
I've been working on this the past couple months, in part due to messing around with redoing
the enemy functions in my own mod, and helping out with enemies in another mod as well.

At its core its Project Brutality's AI redo from around 2019/2020, with some tweaks, added features,
and large tweaks to the custom A_Chase function, in part fixing the target memory and wandering feature.
All neatly bundled into 336 lines of a base monster class, and another 9 lines for a math function.

Features
- More organic movement when the player is visible
- Highly aggressive
- Toggleable dodge movements
- Toggleable ZSDuke leaping, with properties for limiting the range and height
- Losing track of the player
- Wandering around after forgetting about the player
- An A_SmartPain function, for if you want a different sound at low health
- On the fly LOF check right before firing to prevent friendly fire

A lot of this can be customized, and a demonstration Zombieman has been included
to show off what this library can do, and also function as a baseline for whats needed
in an enemy's code to function correctly with the library.
A couple placeholder sprites have also been included purely for the demonstration Zombieman

[youtube]https://youtu.be/sOmm8x0nIv0[/youtube]

If you have any questions or issues, please try and reach me on Discord first, im more active there than on here.

Credits:
- uhh, Mark i guess for those zombieman roll sprites
- PB team for the dolphin dive zombieman sprites, alongside being the original code base
- "Jewalky" on GitHub for making ZSDuke, which the leaping code is from
You do not have the required permissions to view the files attached to this post.
Last edited by popguy12 on Sun Jul 03, 2022 12:25 am, edited 1 time in total.
User avatar
inkoalawetrust
Posts: 36
Joined: Mon Aug 26, 2019 9:18 pm
Discord: inkoalawetrust #9783
Github ID: inkoalawetrust
Graphics Processor: nVidia with Vulkan support

Re: [ZScript] Popguy12's enemy AI library

Post by inkoalawetrust »

Shouldn't this be in the Script Library subforum, instead of the main Resources subforum ?
popguy12
Posts: 40
Joined: Fri Jan 19, 2018 1:44 pm
Location: Planet SOPHIA

Re: [ZScript] Popguy12's enemy AI library

Post by popguy12 »

i didnt even notice that section was there lmao, i dont really look in the Resources area too much
User avatar
lulle
Posts: 113
Joined: Fri May 06, 2022 9:39 pm
Location: Germany

Re: [ZScript] Popguy12's enemy AI library

Post by lulle »

leap & jump is nice. the roll looks a bit random.
But cool. Maybe a good base for a md3 model, tnx!
popguy12
Posts: 40
Joined: Fri Jan 19, 2018 1:44 pm
Location: Planet SOPHIA

Re: [ZScript] Popguy12's enemy AI library

Post by popguy12 »

lulle wrote:leap & jump is nice. the roll looks a bit random.
But cool. Maybe a good base for a md3 model, tnx!
well, the dodging stuff doesnt have to be a roll, could make it a sidestep or somethin, but yea, might look cool with a Model thats for sure

Anyways, puttin out a quick V2 update real quick, just fixes a couple issues ive noticed, alongside changing the int for the speed mult to a double so itll work correctly now lol

Return to “Resources”