[Condo I/O] Enemy & Friendly NPCs mechanics

So with enemy and friendly NPCs added to the trello for Condo I/O, it got me thinking on how it could function. While I don’t suggest it should be 1 : 1 with what I post, perhaps it can aid in visualising what it can be and how it can work.

This will be a lot of text so I understand if most would rather skip this.

- T H E - V I S U A L S -
I believe much like normal NPCs, there should be options, the more merrier right?
Let players choose default enemies already existing in the game; stuff like zombies, undead dogs, werewolves, these will use the logic pre-existing for them. The selection of default options can be expanded upon as the game develops.
In addition letting players use other default models that exist from the normal NPC, as well as workshop. Perhaps these humanoid choices can be given equipment, just a single weapon and the logic changes depending on the type of weapon (more on that later).

In addition, for artists that want a stylised choice; what I deem the ‘Doom option’

Be able to change texture for idle, move. attack and perhaps death.
Always faces the player but Y axis is locked to prevent it looking odd when faced from below or above.
For death state, play all frames of animation but freeze upon the last frame.

In addition perhaps if advanced enough, could use the same logic as the NPC in arcade uses, where players ‘can’ if they wish to add more textures for different angles.

- T H E - L O G I C -
Logic-wise I wouldn’t want it to be too advanced, this is just a small part of condo, something that while if it were advanced I’d love, but doesn’t really need it.

Movement for NPCs will be incredibly simple to avoid it being too complicated. If a player comes into range, move straight towards them regardless of geometry or objects in between them. Obviously prevent them from going through objects and geometry unless their collision is disabled.

The enemy NPC and friendly NPC would both have similar changable options:
Detection Range: The range at which an NPC will begin to ‘hunt’ a target. Otherwise if no targets in range will simply be idle. NPC will always target the target that enters their radius first, otherwise will go for the closest if that target dies or leaves range.
Attack Range: Range at which the NPC can deal damage, this determines the distance an NPC must be from the target to deal damage. If no weapon given, by default it’ll be a single hitscan towards the target.
Attack Rate: Determines how often the NPC is allowed to attack when in range.
Attack Damage: Determines how much damage an NPC will deal per attack. Can be put in the negatives to heal instead(?)
Health: Determines the amount of hit points the NPC has. If set to zero NPC cannot die.
Movement Speed: Determines how fast the NPC moves.
Wander: ON / OFF, will determine if the NPC is allowed to freely wander during idle. If NPC bumps into collision, will change direction similar to the toy robot.
Flying: ON / OFF, will determine if the NPC should ignore gravity and simply float towards target regardless of height.
Allow Jump: ON / OFF, determines if an NPC will be allowed to do a jump if it gets ‘stuck’ against geometry or an object for a period of time while going for a target.
Jump Height: Determines how high the NPC is allowed to jump if allow jump is enabled.
Attack Type: Ranged / Melee. Ranged simply changes it so the NPC when at the perfect attack range will simply stay put till the target is out of range and will attempt to move back into range. Melee regardless of attack range will persue the target.
Death Timer: Determines how long an NPC’s death state will exist, if using sprite mode it’ll play the entire animation sheet but stop at the last frame and remain that way until death timer ends and it vanishes. If using models the body will remain until the end of the death timer where it’ll poof out of existence.
Provoked: ON / OFF, determines if the NPC should be neutral to players / other NPCs unless attacked. If ON will wait until they receive damage and then ‘hunt’ target if in range.
Limit Vision: ON / OFF, determines if the NPC should ignore targets in their range that they can’t see due to geometry or objects blocking their sightline.
Respawn Timer: Determines how long it should take after death timer has ended for the NPC to respawn in its original position. If set to zero, the NPC will never respawn unless the condo is reset, an input forces them to respawn or the NPC is placed down again.

- A D D I T I O N A L - U S E S -
Depending on the logic added in conjunction with condo i/o or even community condos, outputs from the NPC can be given based on going idle, detecting a target, attacking a target or simply dying. This can be used to aid in map design or even reward players with something for defeating them, such as the mentioned ‘condo currency’ when community condos was discussed. If used cleverly these outputs could be used for more technical creations like custom made boss battles.

This is definitely something that I would love to see. Surprised no one even started discussing your post or gave it more votes.