Skip to content

Zombie api gadget#5784

Open
Stiofan-K wants to merge 3 commits into
ZeroK-RTS:masterfrom
Stiofan-K:zombie/gaia_api_gadget
Open

Zombie api gadget#5784
Stiofan-K wants to merge 3 commits into
ZeroK-RTS:masterfrom
Stiofan-K:zombie/gaia_api_gadget

Conversation

@Stiofan-K

Copy link
Copy Markdown
Contributor

Splitting off some the zombies code into a gadget to later be used by nanoplague

groundwork for splitting off some the zombies into a gadget to be used by nanoplague
@Stiofan-K

Copy link
Copy Markdown
Contributor Author

I'm a bit on the fence on some things, specifically handling the zombies arrays and such.

I could unify/port/standerdise the countdown to revive aswell I suppose, though then it would not be possible to differentiate between zombie or nanoplague zombies.

@GoogleFrog

Copy link
Copy Markdown
Contributor

What does each of the gadgets do? The descriptions of each should be updated to make this clear, because api_ and unit_ don't mean a whole lot.

@Stiofan-K

Copy link
Copy Markdown
Contributor Author

aaaaaye.
The api gadget are essentially just helper functions to be used by anything that wants to do zombie esque things, with the base/unit zombies being the global passive wreck reviving.

Ideally I want to put as much into the helper gadget to avoid duplication, but I'm unsure if I can put more there without it becoming inflexible.

Comment thread LuaRules/Gadgets/api_zombie_helper.lua Outdated
GG.Zombies = {
TurnFeatureIntoUnit = TurnFeatureIntoUnit,
SetZombieSpeedMult = SetZombieSpeedMult,
SetZombieBehavior = SetZombieBehavior,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd get rid of the "set behaviour" and just let gadgets ask for the wander directly. Units are essentially "controlled by luaAI" by default.

Suggested change
SetZombieBehavior = SetZombieBehavior,
SetZombieWander = GiveZombiesRandomOrders,

@sprunk sprunk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok overall, i'll see if i can find some time to test during the week

@Stiofan-K

Stiofan-K commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

aye thanks, I'll change it around!

Thoughts on if theres sense in trying to put the to be rezed arrays in the api gadget?
Same with unslowing/speeding zombies, since some may not want their zombies to reset speed.

And is LuaAi different from amove behavior? since thats essentially what wander applies, and I'd be curious if more complex behavior can be coaxed out for nanoplague zombies.

@sprunk

sprunk commented Jul 13, 2026

Copy link
Copy Markdown
Member

Thoughts on if theres sense in trying to put the to be rezed arrays in the api gadget?
Same with unslowing/speeding zombies

IMO slowing is ok as-is, rezzed arrays may be ok to eventually put in the api but I'll have to think of how to do it cleanly.

And is LuaAi different from amove behavior? since thats essentially what wander applies, and I'd be curious if more complex behavior can be coaxed out for nanoplague zombies.

LuaAI can make units do anything, it's just a matter of writing an implementation. This includes arbitrarily powerful "legit" behaviour (e.g. pyros use jump; glaives perfectly dodge projectiles and avoid LLTs; units congregate into hivemind armies and strategically raid mexes...) but also beyond that (e.g. radars call down orbital tacnukes; detriment roars, whistles, and even plays music).

@Stiofan-K

Stiofan-K commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

For rezzed arrays I think the issue would be referencing back to the gadgets that put the features "in queue", so that you can differentiate between different zombie types.

And :O Detriment with all the bells and whistles. Is there a good example for LuaAI floating about? Wandering works generally for whats intended, but cons building structures and units being smarter or 'biased' toward the team that made them could be interesting to give Nanoplagued zombies a smarter feel over normal ones, being a less degraded/feral version of the same tech essentially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants