ZC's enemy code really needs a rewrite (and I'd really like to have better combat in my first quest so that players new to ZC don't have to deal with a lot of the jank. Please?), but not a lot of people here know C++. So why not make the new enemies as scripts instead, which also has the benefit of any user being able to easily fork them? This first thread is to outline my ideas for walker-type enemies. However, please feel free to change anything you feel that needs changing when you write the script.
I know this is a lot to ask, but I hope it's enough of an honor that these are intended to replace the existing ZC enemies and for the script to come with the new default tileset.
This enemy type is intended to recreate enemies similar to the following Z1 enemies:
-Octoroks
-Moblins
-Lynels
-Armos
-Stalfos
-Gibdo
-Goriyas (we need a better EWeapon boomerang but that's not in the scope of this request)
-Gels
-Zols
-Darknuts
-Ropes
-Like-Like
I think Vires and Pols Voice should be a different class altogether, in with the Tektite - I think modern versions of these enemies would always be hopping and off-grid. I also think sideview enemies should not be included in this class, and should be a different enemy class altogether.
How a NewWalker moves
NewWalkers move on 8-pixel "tile" increments. This is to create an obvious link to the player's eyes between the combo solidity that is visible on screen and how the enemy moves. It also lessens the possibility of enemies not being able to fit into corridors that are as wide as they are.
NewWalkers respect combo solidity, including the four solidity quadrants.
A NewWalker first starts walking in a random direction of the four. It then calculates three valid random numbers from the four values below: Random Rate Min, Random Rate Max, Homing Factor Min, Homing Factor Max, Fire Rate Min, and Fire Rate Max, pushing these four numbers (RRMi, RRMa, HFMi, HFMa, FRMi, FRMa) into three numbers (RR, HF, FR). When a NewWalker calculates its HF, this is the amount of frames until it turns to walk in the direction that Link is. And when a NewWalker calculates its RR, this is the amount of frames until it turns to a random direction (which can include Link's direction, by coincidence). And Firing Rate, as seen below in the Walk Style enemy attributes, is not inherently connected to halt rate. However, if the enemy IS set to halt or halt when firing, it re-rolls all three numbers before moving again.
Let's look at a sample walking time:
The enemy's attribute values are:
60
80
200
400
100
900
Its rolled values for this instance are:
70
300
450
The enemy starts walking in a random direction. It takes its rolled values, and knows that it has 70 frames until it will choose a direction to walk randomly in and 300 frames until it must turn to face Link. The 70 frames elapse, and it changes directions. It then rolls another RR value from its Attributes. After 300 frames elapse, it turns to face Link, and rolls another HF value from its Attributes. After 450 frames, it will fire, and rolls another FR value from its Attributes. This enemy ultimately will seem very "zoomy", meandering around and changing directions often, only occasionally purposefully walking in Link's direction. These are the kinds of values a Stalfos 2 would have. You'd make the Random Rates higher and the Homing Factors lower if you wanted a less zoomy, more homing enemy such as a Blue Darknut.
Notice how a LOWER homing factor means more accurate homing, this time! It can be thought of as "time until homing" instead of "likeliness to home in".
A NewWalker can be knocked back, and its knockback depends on the direction of the LWeapon.
NewWalkers need an algorithm to affix themselves to the nearest walkable 8x8 square when they split or when their knockback timer runs out.
Movement attributes
Random Rate Min: 0-65535.
Random Rate Max: 0-65535
Homing Factor Min: 0-65535
Homing Factor Max: 0-65535
Fire Rate Min: 0-65535
Fire Rate Max: 0-65535
Step Speed: 0-255
Walk Style
-Nothing (no firing, no halting)
-Halt (This is what you select if you want to make a Gel or Zol)
-Fire (while moving; Death Knight-esque)
-Fire and Halt (Z1-esque)
-Fire and Halt Until Weapon is Gone (Goriya-esque)
-Fire and Change Direction, non-Halting (turns to face Link; used for more intelligent enemies)
-Fire, Halt, and Change Direction
--Firing needs to be capable of variable times so it can handle rocks/arrows/swords/magic, boomerangs, and breath without needing to be hardcoded.
Dash Style (Dashing should be more intelligent, and only do so when facing Link) (Dashing leaves a Fire Trail if that is the enemy's weapon)
-None
-Dash (Rope-like)
-Dash (Quake) (Quakes the screen and stuns Link when the enemy hits a solid combo)
-Dash (Explode) (Like a Bombchu, except in addition to exploding when it hits Link, it also does so when it hits a wall. Good for "Trick the Bombchu into blowing up the wall" puzzles. This DOES NOT affect whether it explodes when it dies or not!)
Eating Style
-None
-Touch-Drain
-Once (Magic Shield-esque; eats only once and does not eat again)
-Drain (This should not "re-hurt" Link, as this is very annoying to try to get out of!)
Eating Constant: 0-255
-Depending on the Eating Style, this is either the Itemclass to eat from, or the counter # to eat from.
Eating Frames: 0-255
-Depending on the Eating Style, this is either how many frames you have before you lose your shield/other item, or the enemy eats from your counter every x frames.
Eating Max Level
-The max level of item that this enemy can eat, for Once-Eating only. This means that some Like Likes can eat Mirror Shields, and some can't. The Mirror Shield has to be flagged as edible now!
Knockback Style
-Always Knockable
-Unknockable While Shooting (Goriya-esque, except it doesn't knock them back after they're done)
-Unknockable (GB Gibdo-esque)
Knockback Force: 0-255
-The amount of knockback an enemy takes when knocked back, to simulate weight. Don't use 0 for no knockback to avoid errors, use the Knockback style!
Weapons and such
Weapon
-All the ZC weapons
Firing Style (I'm sure people want more, but we can discuss this later)
-One, forward (Octorok)
-One, Slanted
-Three, forward
-Three, Aquamentus-style
-Five, forward
-Four, +shaped (Stalfos 3)
-Four, x-shaped
-Eight-Way
-Breath, forward (No longer auto-halts the enemy. That's what the Fire + Halt Walk Style is for)
-Breath, Slanted (Combine with "Fire, Halt, and Change Direction" for some real fun)
-Summon One
-Summon Three
-Summon One from Layer
-Summon Three from Layer
-Summon All from Layer
Weapon Speed: 0-255
Boss Fireball Flag []
-The engine handles Boss Fireballs with a flag on the EWeapon instead of as their own weapon type.
Touch Status Infliction
-This fits in with Emily's engine statuses, replacing the Jinx selection
Weapon Status Infliction
Shields
Shielded on Front? []
Shielded on Back? []
Shielded on Left? []
Shielded on Right? []
Unshielded While Shooting? []
Shield Reflect Flags: 0-65535 (mirrors the Player Shield's and new Mirror combo's reflect flags)
(The "Shield can be Broken" checkbox doesn't need to be added because Emily is rewriting enemy defenses so that the Hammer defense can just naturally break the shield.)
Death, splitting and tribbling
Split type:
-None
-Split on hit with knockback (Zol)
-Split on hit, no knockback
-Split on death with knockback
-Split on death, no knockback (Splitting Darknut)
Death explosion type
-Single Weapon (useful for Fire Trail or Fire)
-Bomb Blast
-Super Bomb Blast
-4 Weapons (+)
-4 Weapons (x)
-8 Weapons
Tribbles? []
Keep HP on splitting/tribbling? []
ID of enemy to split into:
ID of enemy to tribble into:
How enemy sprites are set up
What if we have a shielded enemy that can dash, eat, and fire? Here's what that would look like
Row 1: Walking, Unshielded
Row 2: Halting, Unshielded
Row 3: Firing, Unshielded
Row 4: Dashing, Unshielded
Row 5: Eating, Unshielded (i.e. the sprite when the Like-Like has grabbed Link)
Row 6: Walking, Shielded
Row 7: Halting, Shielded
Row 8: Firing, Shielded
Row 9: Dashing, Shielded
Row 10: Eating, Shielded
This means that dashing, eating, and halting now have their own sprite rows, even for enemies who did not used to have them such as Ropes and Zols. This also means that the "Special" tile is unused, at least for now. It also is a little counterintuitive that shielding comes after the unshielded sprites, but this allows for simple enemies like Octoroks to only use the first three rows of tiles, making enemy tiles more compact in the tile editor.
Ideally, shield row offset # is a constant so it can be changed if any additional actions are added without having to recode the entire thing.
Edited by P-Tux7, 07 August 2025 - 08:51 PM.

