Unity Asset Store therealzeuk@gmail.com

Cyber Combat Kit Documentation

How to use it, how to set it up, what every part does and how to adapt it to your game. New here? Start with Your first fight in 5 minutes.

Part 1. Getting started

What's in the kit #

Cyber Combat Kit is a top-down action combat system for Unity 6 with URP. Drag in a humanoid model, click a few buttons and you have a hero fighting waves of enemies.

ItemAmount
Level up boosts42
Equipment chips36, in 9 slots, levels 1 to 4
Ready-made enemies21 (11 World 1, 10 World 2), 5 behaviours, plus a Training Dummy
Example companions3: Knight, Ranged, Healer
Status effects4: Burn, Freeze, Weakness, Frailty
Sword3 hit combo, plus 4 charged specials
Editor tools6: Setup Wizard, Check Setup, Hero Animations, Boost and Chip Creator, Effect Maker, Sound Library
Wired sounds, no clips67 entries in the Sound Library
Hero levels100
Code117 C# files, 19,982 lines, source included
Content71 prefabs, 140 materials, 136 PNG, 38 animation clips, 26 FBX, 1 demo scene
Folder size184 MB on disk, 567 files

What's not in the kit

No audio files, save system, currency, inventory, levels, ready-made bosses or player jump. Damageable.isBoss exists, but no prefab uses it and there is no boss bar.

Arenas, expeditions, crafting, training mode and hardcore mode belong to the game Cyberhero Legends. They are not in the kit.

Requirements

  • Unity 6. The kit was made and tested on 6000.6.5.
  • Universal Render Pipeline (URP) is what the kit is made for. You install it and set the URP Asset. For Built-in or HDRP, see Installing.
  • Input System, Unity UI with TextMeshPro and AI Navigation. The kit offers to install these.

Tested in Play Mode in the Unity Editor (731 automated checks, 149 wizard checks) and on a Windows build. This combat system runs on phones in Cyberhero Legends, our Android game. Touch controls are included: test them on your target devices too.

Folders

FolderContents
PrefabsHero, Companions, Enemies (World 1, World 2, Training Dummy), Projectiles, Pickups, Managers and VFX.
CharactersModels, materials, textures and animators of the hero, companions and enemies.
VFXEffect materials, textures, meshes and sword slash animations. Unity shaders only.
AudioThe Sound Library (no clips) and the audio mixer.
UISkill and companion icons, the TextMesh Pro font and UI textures.
DataSkill Database, Hero Stats Table and the Chip Library.
DemoCombat Demo scene, its NavMesh and floor materials.
ScriptsRuntime (combat), Editor (tools) and DynamoBone (bone physics of the hero ponytail).
DocumentationDynamoBone.md.

Installing #

You will get: the kit compiled and the Setup Wizard open.

Before you start: a Unity 6 project, ideally with URP. The kit does not install URP.

Using Built-in or HDRP: the kit materials use URP shaders, so they show pink until you swap them for shaders of your pipeline. The Render Pipeline item of the Project tab stays red, and you can ignore it once your materials are converted.

  1. Import the package. The kit lives in Assets/Zeuk Games/CyberCombatKit.
  2. A message lists the Unity packages the project is missing. Click Install. The kit stays off until they are installed.
  3. If you clicked Later, use Tools > Zeuk Games > Cyber Combat Kit > Install Required Packages when you are ready.
  4. Unity asks to enable the Input System and restart. Accept it.
  5. The Setup Wizard opens. Fix the items of the Project tab with one click.

It worked if: the Project tab has no red items and says "The project is ready."

If it didn't: see Troubleshooting.

Updating the kit

Everything you create goes to Assets/My Combat Kit, outside the kit folder. New prefabs are full copies, so a kit update does not touch them. For boosts and chips, click Make my own copy in the Boost and Chip Creator first: otherwise they live in kit assets that an update can replace. Check Setup warns about this.

Moving the kit

You can move the kit folder anywhere in the project. Editor tools find it by themselves.

Try the demo #

You will get: every system running in five minutes, with nothing to set up.

Open Demo/Combat Demo.unity, or click Demo Scene at the bottom of the Setup Wizard, then press Play.

ActionKeyboard / MouseGamepadTouch
MoveWASD, arrowsLeft stickVirtual stick
SwordJ, left clickX (West)SWORD
GunK, right click (hold with the Machine Gun chip)Y, RTGUN
DashSpace, Left ShiftA, RBDASH
Chips panelTabCHIPS
Companion menuCCOMPANION
Enemy test panel (demo)EENEMIES
Pause and helpEscStartII
Pick a boostNumber keys, clickUI navigationTap
Debug (Editor and development builds)F1 level up, F2 boost pick, F3 reset run, F4 touch controls

A five minute tour

  1. Move and press Dash. You pass through enemies and can't be hit during the dash.
  2. Press Sword three times for the combo. The third hit pushes enemies 4 meters.
  3. Press Gun. It aims at the closest enemy by itself.
  4. Kill enemies and collect the EXP orbs. When the skill bar fills, the game pauses and shows 3 boost cards.
  5. Press Tab. Equip Charging Core in the Sword Core slot, set level 4, close the panel, fire 12 shots and attack.
  6. Press C. Pick a companion and raise its stats with the + buttons.
  7. Press E. Spawn any of the 21 enemies next to you. Click its color square to use it in the waves.
  8. Press F1 to level up, F2 for a boost pick, F3 to reset the run and F4 to cycle the touch controls.

F1 to F4 and their pause menu buttons work only in the Editor and in development builds. They never work in release builds. To turn them off in the Editor too, untick Debug Tools on the CombatManager component. The enemy panel (E) exists only in the demo scene.

Your first fight in 5 minutes #

You will get: a new scene where your hero fights waves of enemies.

Before you start: finish Installing. Your own model is optional: it must be rigged, with a Humanoid rig. Mixamo and most store characters have one.

The Hero tab of the Setup Wizard with a model ready to become a hero
The Hero tab of the Setup Wizard with a model ready to become a hero
  1. Open Tools > Zeuk Games > Cyber Combat Kit > Setup Wizard.
  2. In the Project tab, fix the red items. The yellow items are recommended: name the layers and use Linear color space.
  3. Using your own model: open the Hero tab, drag it into Character Model and click Create Hero. Using the default hero: skip this step.
  4. Open the Scene tab. Your new hero is already in Hero Prefab.
  5. Create or open a scene, click Set Up Scene, or click New Combat Scene to start from an empty one.
  6. Press Play.
The Scene tab of the Setup Wizard listing what the scene needs
The Scene tab of the Setup Wizard listing what the scene needs

It worked if: you can move, attack and shoot, and enemies appear around you in waves.

If it didn't: open Check Setup. It finds most problems and fixes them with one click. No sound is normal: the kit ships without audio files, see Sound Library.

Concepts #

  • Hero: the player character. There is one per scene.
  • Boost: an option offered by the level up menu, picked during a run. Also called a skill in the code (SkillDatabase, HeroSkills).
  • Chip: equipment. One chip per slot, 9 slots, levels 1 to 4. Equipped from the chips panel or from code.
  • EXP: raises the hero level, which raises the base stats.
  • Skill EXP: a separate bar that gives boost picks. A run allows 6 picks, and each level of Exp Gain Boost adds 2.
  • Run: the current play session. Reset Run clears boosts and Skill EXP, and keeps level and EXP.
  • Team: Hero, Enemy or Neutral. It decides who can hurt whom, so the kit does not need special layers or tags for damage.
  • Element: Normal, Fire, Ice, Thunder, Frailty or Weakness, on attacks and on characters.
  • Status: Burn, Freeze, Weakness or Frailty. Works the same on the hero, enemies and companions.
  • Intensity: the distance in meters a hit pushes its target.
  • Hit stop: a short freeze of the hero animation when a sword hit lands. It does not change the game time.

Number conventions

  • Attack speed and movement speed: 100 = normal.
  • Critical chance in percentage points: 5 = 5%. Critical damage is a bonus: 30 = +30%.
  • Dodge, drop chance and damage reduction are fractions from 0 to 1 in code.
  • A field's value in the code can differ from its value in the prefab, and the prefab is what counts in the game. Example: Pickup healthPercent is 0.1 in code and 0.25 on the Health pickup.

Part 2. Tools, one by one

Setup Wizard #

Open it from Tools > Zeuk Games > Cyber Combat Kit > Setup Wizard. It also opens after the import.

The top bar opens the other tools: Boosts and Chips, Effect Maker, Sound Library, Hero Animations and Check Setup. The bottom bar shows the output folder, with Change, Documentation and Demo Scene. The output folder is Assets/My Combat Kit by default and must be inside Assets.

Project tab

Each item is green (done), red (required) or yellow (recommended), with a button that fixes it.

ItemState if missingButtonWhat it does
Input SystemRedEnableSets Active Input Handling to Both. Unity restarts.
TextMeshPro ResourcesRedImportImports the TMP essential resources, once per project.
AI NavigationRedInstallInstalls the package that bakes the NavMesh.
LayersYellowName LayersNames layers 9 (hero and companions) and 23 (enemies). It only names them, no collision changes.
Color SpaceYellowUse LinearThe effects were made in Linear. In Gamma they look washed out or too bright.
Render PipelineRedOpen GraphicsOpens Project Settings > Graphics. Install URP and set a URP Asset there.

Open Demo Scene opens the demo.

Hero tab

  1. Character Model. Drag a rigged character (FBX, or a prefab made from one). Empty keeps the default hero model. The window reports the height. If the rig is not Humanoid, click Make It Humanoid. If Unity can't map the bones, select the model, open its Rig tab and click Configure.
  2. Model parts. Listed when the model has 2 or more meshes. Untick what you don't want, like a weapon or effect that comes with the model. Unticking everything makes the hero invisible.
  3. Weapons (optional). Drag a Sword and a Gun. They get the size, direction and position of the default weapons. Click Flip if one points backwards.
  4. Prefab Name, then Create Hero. Under Advanced, Base Hero picks another hero prefab to copy.

Weapons, effects and sounds move to the same body parts of your model. After creating, the row shows Select, Edit and Add To Scene.

Enemies tab

  1. Based on. Pick any of the 21 enemies, or the Training Dummy. The new enemy copies its behaviour, attacks and effects.
  2. Model (optional). Any model works, FBX or prefab. With a model you get Model Scale (the window shows the height in the game; the collider and NavMesh agent follow), Flying and Animator Controller. Scripts of the model are not copied, except DynamoBone. Without a model, Armor Color tints the drone.
  3. Attacks. Shown for enemies with guns. Projectile changes what the guns shoot (Bomber Bot and Xeno Bot keep their bomb). Change Element sets the element of the hits.
  4. Stats. Health, Damage and Move Speed.
  5. Prefab Name, then Create Enemy.

Then click Add To Spawner. Add To Test Panel appears when the scene has one, like the demo.

Companions tab

  1. Based on. Kit companions and your own. The new one copies its abilities.
  2. Model (optional). With Model Scale, Flying and Animator Controller. Without a model, Body Color tints the drone.
  3. Menu. Display Name, Icon and Health. The health you set becomes the level 1 value of the health stat. The other stats copy the base companion.
  4. Prefab Name, Add To Companion Menu, then Create Companion.

Scene tab

Hero Prefab picks the hero and Enemy Waves adds the spawner. Set Up Scene adds everything the open scene is missing and keeps what is already there. Every step can be undone. New Combat Scene creates a new scene with everything: save it with Ctrl+S.

RowWhat it isButton
HeroThe hero prefab.Add
CameraTop-down camera that follows the hero.Add
Combat ManagerHUD, pause, skill, chip and companion menus, pickups and damage numbers.Add
EventSystemLets the menus receive mouse, touch and gamepad input.Add
GroundA surface with a collider under the hero. If the ground layer doesn't collide with the hero layer, the row says so.Add or Physics Settings
NavMeshWalkable area of enemies and companions.Bake or Bake Again
Enemy WavesOptional. Spawns waves around the hero.Add

Bake the NavMesh again after changing the level.

Check Setup #

Open it from Tools > Zeuk Games > Cyber Combat Kit > Check Setup, or from the top bar of the wizard. The window answers one question: is everything set up? It checks the project, the open scene, your prefabs and the kit data. Check Again runs it again and Show OK also lists what passed.

GroupMessageSeverityButtonBy hand
ProjectInput SystemErrorEnableSet Active Input Handling to Both, then restart.
ProjectTextMeshPro ResourcesErrorImportWindow > TextMeshPro > Import TMP Essential Resources.
ProjectAI NavigationErrorInstallAdd com.unity.ai.navigation in the Package Manager.
ProjectRender PipelineErrorOpen GraphicsInstall URP and set a URP Asset.
ProjectLayersWarningName LayersName layers 9 and 23.
ProjectColor SpaceWarningUse LinearPlayer Settings > Color Space.
Open SceneThere is no hero in the scene.ErrorSet Up SceneDrop a hero prefab.
Open SceneN heroes in the scene: keep only one.ErrorDelete the extras.
Open SceneNo ground collider under the hero: it will fall.ErrorAdd GroundAdd a collider under the hero.
Open SceneThe hero has no CharacterController.ErrorAdd it, or start from the kit hero.
Open SceneThe hero has no Skill Database (HeroSkills > Database): no level up boosts.ErrorAssign one on HeroSkills.
Open SceneNo Combat Manager (HUD, menus, damage numbers).ErrorAddDrop the prefab.
Open SceneNo Combat Camera.ErrorAddDrop the prefab.
Open SceneNo EventSystem: the menus can't be clicked.ErrorAddAdd an EventSystem with Input System UI Input Module.
Open SceneThe EventSystem uses the old input module: use Input System UI Input Module.WarningReplace the module.
Open SceneNo NavMesh: enemies and companions can't move.ErrorBake NavMeshBake a NavMesh.
Open SceneThe hero is not on the NavMesh: bake it again after changing the level.WarningBake NavMeshMove the hero or bake again.
Open Scene[Spawner] has no enemies.WarningAdd enemies to it.
Open Scene[Spawner] has empty enemy entries.ErrorRemove emptyRemove them in the Inspector.
Open SceneThe companion menu has empty entries.ErrorRemove emptyRemove them on CompanionSelector.
Open SceneThe enemy test panel has empty entries.WarningRemove emptyRemove them on EnemyTestPanel.
Open Scene[Object] has N missing script(s).ErrorRemoveRemove the components.
Your Prefabs[Prefab]: N missing script(s).ErrorOpen the prefab and remove them.
Your Prefabs[Prefab]: N reference(s) to deleted assets (shown as Missing).WarningAssign the fields again.
Your Prefabs[Prefab]: enemy without NavMeshAgent.ErrorAdd one.
Your Prefabs[Prefab]: gun '[name]' has no projectile.ErrorSet projectile or lobProjectile on EnemyGun.
Your Prefabs[Prefab]: companion without NavMeshAgent.ErrorAdd one.
Your Prefabs[Prefab]: no icon for the companion menu.WarningSet the icon.
Your Prefabs[Prefab]: no Damageable (health).ErrorAdd it.
Your Prefabs[Prefab]: N audio object(s) with no Sound and no clips.WarningPick a Sound on RandomAudio.
Kit DataThe Sound Library is missing.ErrorCreate
Kit DataNo sounds yet: the game is silent. Add your clips in the Sound Library (Auto-fill takes a folder).WarningOpenNormal right after import.
Kit DataThe Sound Library has N empty clip slot(s).WarningRemove or fill them.
Kit DataNo Chip Library.ErrorCreate
Kit DataThe Chip Library has N deleted chip(s).WarningRemove
Kit DataChip '[name]' has no effects.WarningEditAdd effects.
Kit DataYour chips are in the kit Chip Library: a kit update would replace them. Use Make my own copy.WarningOpen
Kit DataBoost '[name]' has no effects.WarningEditAdd effects.
Kit DataBoost '[name]' has no key: it can't be picked.ErrorEdit
Kit DataTwo boosts share the key '[key]': give one another key.ErrorRename one.
Kit DataYour boosts are in the kit Skill Database: a kit update would replace them. Use Make my own copy.WarningOpen

Boost and Chip Creator #

Open it from Tools > Zeuk Games > Cyber Combat Kit > Boost and Chip Creator. It has two tabs: Boosts (level up) and Chips. No code needed.

Create a boost

You will get: a new card in the level up menu.

Before you start: a scene with your hero. Click Make my own copy first. It copies the Skill Database to your folder and uses it on the hero of the open scene, so kit updates never replace your boosts.

  1. Click + New Boost.
  2. Set Name and Icon.
  3. Set Max Level: how many times it can be picked. 0 = unlimited, 1 = unique.
  4. Set Weight: the chance of being offered compared to the others. 1 = normal.
  5. Tick Gun Boost if it should not be offered when the hero has no gun (Super Charged Sword).
  6. Click + Add Effect and pick a type. Each effect has one value per level.
  7. Read the Level up card preview. The text is made from the effects, or write your own in Card Texts (optional).

It worked if: the card appears in the level up menu. Press F2 in the Editor for a pick. It is one option among many, so raise Weight while testing.

Default boosts can also get extra effects: tick Show default boosts and pick one. Changing the text of a default boost does not change what it does.

How the draw works

The menu shows 3 cards (optionsPerLevelUp), drawn without repeats, weighted by Weight. A boost is not offered when it is turned off, at its max level, an aura while another aura is active, a gun boost after Super Charged Sword, or Restore Companion with no companion in need.

Create a chip

Before you start: click Make my own copy in the Chips tab, so kit updates never replace your chips.

  1. Click + New Chip. Chips are saved in Assets/My Combat Kit/Chips.
  2. Set Name, slot and icon.
  3. Add effects with a value for each of the 4 levels.
  4. Read the Chips panel preview, or write Texts per level (optional).

It worked if: the chip shows up in the chips panel (Tab) by itself. From code, equip it with HeroChips.Equip(chip, level), or add it to HeroChips.startingChips.

Default chips can be renamed, get an icon, get extra effects, or be hidden by unticking In chips panel. Their own effect stays in code. "When Picked" effects only work on boosts, not on chips.

Every effect type

Values are per level. Element 0 is level 1, and higher levels use the last value.

TypeValueCard text at value 10
Attributes: Damage PercentValue (%)+10% damage
Attributes: Flat DamageDamage+10 damage
Attributes: Attack Speed PercentValue (%)+10% attack speed
Attributes: Flat Attack SpeedAttack speed+10 attack speed
Attributes: Gun Attack Speed PercentValue (%)+10% gun attack speed
Attributes: Flat Gun Attack SpeedAttack speed+10 gun attack speed
Attributes: Critical ChanceChance (%)+10% critical chance
Attributes: Critical Damage PercentValue (%)+10% critical damage
Attributes: Move Speed PercentValue (%)+10% movement speed
Attributes: Max Health PercentValue (%)+10% max HP
Attributes: Dodge ChanceValue (%)+10% dodge
Attributes: Damage ReductionValue (%)-10% damage taken
Attributes: Healing PercentValue (%)+10% healing
Attributes: Headshot ChanceValue (%)+10% headshot chance
Attributes: Max AmmoAmmo+10 max ammo
Attributes: Exp Gain PercentValue (%)+10% EXP
Attributes: Health Drop ChanceValue (%)+10% health drop chance
Attributes: Ammo Drop ChanceValue (%)+10% ammo drop chance
Attributes: Item Drop ChanceValue (%)+10% item drop chance
Attributes: Damage Per Health LostDamage per 1% HP lost+10 damage for each 1% HP lost
Attributes: Attack Speed Per Health LostAttack speed per 1% HP lost+10 attack speed for each 1% HP lost
On Hit: Burn On HitBurn per second (% of the hit)Hits burn for 10% of the damage per second (5s)
On Hit: Freeze On HitSlow (%)Hits slow by 10% (5s)
On Hit: Weakness On HitDamage reduction (%)Hits weaken: -10% damage dealt (5s)
On Hit: Frailty On HitExtra damage taken (%)Hits apply frailty: +10% damage taken (5s)
On Hit: Life StealHealed (% of the hit)Hits heal 10% of the damage
On Kill: Heal On KillHealed (% max HP)Kills heal 10% max HP
On Kill: Explode On KillExplosion damage (% of hero damage)Kills explode for 10% damage (5m)
Over Time: Health Regen% max HP per secondRegenerate 10% max HP per second
When Picked (boosts only): Instant HealHealed (% max HP)Heal 10% max HP now
When Picked (boosts only): Refill AmmoNo valueRefill the ammo
When Picked (boosts only): Add Shield ChargesShield charges+10 shield charges
When Picked (boosts only): Restore CompanionsNo valueRestore your companion

Fields of an effect: source (Sword and Gun, Sword or Gun), chance from 0 to 100, duration in seconds (for Explode On Kill it is the radius in meters), vfx and sound. Only the fields an effect type uses are shown.

Three complete examples

Vampire Fang, life steal on the sword. Boost, Max Level 3. Effect On Hit: Life Steal, source Sword, chance 100, values 5, 10, 15. Card text: "Sword hits heal 5% of the damage".

Glass Cannon, more damage, less health. Boost, Max Level 1. Effect Attributes: Damage Percent, value 50. Effect Attributes: Max Health Percent, value -30. Card text: "+50% damage. -30% max HP".

Regen Core, a chip with 4 levels. Chip, slot Body. Effect Over Time: Health Regen, values 0.5, 1, 1.5, 2. Panel text: "Regenerate 0.5% max HP per second" at level 1.

Effect Maker #

Open it from Tools > Zeuk Games > Cyber Combat Kit > Effect Maker. It makes a new version of an effect. The original is never changed.

  1. Effect. Pick from Kit effects, or drag any prefab with particles into Effect prefab.
  2. Look. Color: Keep Colors, Change Hue (every color takes the hue of the new color and keeps its brightness) or Multiply (tints). Size from 0.1 to 5, Speed from 0.1 to 4 (2 = twice as fast) and Amount from 0.1 to 3 (0.5 = half the particles). Preview in Scene plays it in the Scene view, with no need to select it.
  3. Create. Set a Name and click Create Effect. The prefab and its recolored materials are saved in Assets/My Combat Kit/Effects.
  4. Use it. The window lists the prefabs that use the original. Use new effect swaps it in one click. On a kit prefab it warns you, because a kit update would undo the change: do it on your own copy.

Example, a blue bullet that turns green. Pick the bullet effect, choose Change Hue, set a green New Color, click Create Effect, then Use new effect on your enemy or projectile prefab.

Sound Library #

The kit ships with no audio files, and every sound is already wired. Open Tools > Zeuk Games > Cyber Combat Kit > Sound Library and drop your clips in each sound. Every prefab that uses that sound plays them, with no other setup. Several clips in one sound means one at random each time.

  • Search filters the list. Sounds are grouped by Hero, Sword, Gun, Skills and Chips, Status Effects, Enemies, Companions, Pickups and UI.
  • Each sound has its own volume, plus a master volume.
  • A sound with no clips is silent and raises no error.

Auto-fill from a folder

  1. Put your clips in a folder inside Assets.
  2. Click Auto-fill from a folder... and pick it.
  3. The window lists the matches: sword_swing_01 goes to Sword Swing and footstep_concrete to Footstep.
  4. Click Fill empty sounds or Replace all of these.

Clips with no match are listed, and you can drop them by hand.

One clip on one prefab

To use a different clip on a single prefab, fill Clips on its RandomAudio. It then ignores the library. The inspector of RandomAudio shows which sound it plays and if it has clips.

Loops and mixer

Loops (auras, status effects, healer beam, companion engine) already have Loop on their AudioSource. The Audio Sources use Audio/Combat Audio Mixer.mixer. The Audio Listener stays on the hero, kept by TopDownCamera.audioListener, so 3D sounds are heard from the hero.

A sound on a new object

Add an AudioSource and a RandomAudio, pick the Sound and reference it in the script field, for example EnemyAI.deathAudio.

All 67 sounds

IdSoundWhere it plays
100FootstepHero footsteps (walk and run).
101DashHero dash.
102FireDashDash with the Fire Dash chip.
103IceDashDash with the Ice Dash chip.
104ThunderDashDash with the Thunder Dash chip.
105DodgeHero dodges an attack.
106HeroHurtHero takes damage (voice).
107HeroDeathHero dies (voice).
108HeroAttackVoiceHero attack shout.
109HeroRespawnHero spawns or respawns.
110LevelUpHero levels up.
200SwordSwingEach sword swing of the combo.
201SwordHitSword hits an enemy.
202Special1Special attack 1 (Charging Core).
203Special2Special attack 2.
204Special3Special attack 3.
205Special4Special attack 4.
206ChargeReadyA Charging Core charge is ready.
207ChargingLoopLoop while charging (loop the AudioSource).
208BulletReflectSword reflects an enemy bullet.
300HeroShotHero gun shot.
301HeroBulletHitHero bullet hits something.
302HeadshotHero bullet headshot.
400ShieldUpShield skill turns on.
401ShieldHitShield blocks a hit.
402ShieldBreakShield breaks.
403FireAuraFire aura skill (loop).
404IceAuraIce aura skill (loop).
405ThunderAuraThunder aura skill (loop).
406WeaknessAuraWeakness aura skill (loop).
407FrailtyAuraFrailty aura skill (loop).
408AuraTickEach damage tick of an aura.
409ChipBombBomb chips (Alpha, Beta, Power Bomb) explode.
500BurnLoopBurning (loop). Hero, enemies and companions.
501FreezeLoopSlowed by ice (loop).
502WeaknessLoopWeakened (loop).
503FrailtyLoopFrail (loop).
504FrozenSolidFreezes solid.
505IceShatterThe ice breaks at the end of the freeze.
600EnemyAttackEnemy starts an attack (and the melee swing of Robot Creep / Stinger).
601EnemyShotEnemy gun shot.
602EnemyBulletHitEnemy bullet hits something.
603EnemyHitEnemy takes damage.
604EnemyDeathEnemy dies.
605EnemyContactHitEnemy melee or body hits the hero (Robot Creep, Stinger, Saw Bot, Jumper Bot).
606EnemyJumpJumper Bot jumps.
607EnemyLandingJumper Bot lands.
608EnemyBounceSaw Bot bounces off a wall.
609BombLaunchBomb or goo is thrown (Bomber Bot, Xeno Bot).
610BombExplosionBomb or goo lands.
611TeslaChargeTesla Tower charges.
612TeslaShockTesla Tower shocks.
700CompanionMoveCompanion moving (engine or steps).
701CompanionHitCompanion takes damage.
702CompanionDeathCompanion is destroyed.
703CompanionTeleportCompanion dodges or teleports.
704CompanionSwordSwingKnight Drone sword swing.
705CompanionSwordHitKnight Drone sword hits.
706CompanionShotRanged / Healer Drone shot.
707CompanionBulletHitCompanion bullet hits something.
708CompanionDeflectKnight Drone deflects a bullet.
709CompanionHealHealer Drone heals.
710CompanionHealBeamHealer Drone beam (loop).
711CompanionAuraPulseAura companion pulse.
800PickupCollectHealth, ammo or EXP pickup collected.
801SkillMenuOpenLevel up skill menu opens.
802SkillPickA skill is picked.

Hero Animations #

Open it from Tools > Zeuk Games > Cyber Combat Kit > Hero Animations. It swaps the hero animations without touching the Animator.

You will get: your clips on the hero, with hits and footsteps at the right moments.

Before you start: add the hero to the open scene, for the preview. Clips must be Humanoid.

  1. The first time, click Create Backup and Start. Nothing changes in your hero yet.
  2. Click New Set. It makes an editable copy. The default set is the backup.
  3. Drop a clip in each action you want to change. An empty action keeps the default animation.
  4. Click Auto-detect. It plays the clip on the hero and finds the hits (fast weapon hand) and footsteps (foot coming down). Adjust with the sliders.
  5. Click Preview to check it on the hero in the open scene.
  6. Clips without root motion: tick Made in place and set the speed in m/s. For walk and run, the window suggests the playback speed that keeps the feet on the ground, with a button like Use x1.23.
  7. Click Apply to Hero.

It worked if: in Play Mode the hit lands when the blade connects.

To undo: Restore Default Animations puts the original ones back. Use Default does it for one action.

Clips don't need animation events: the moments you mark are sent by HeroAnimationTiming. A clip with its own animation events uses them as they are. Transition times, the sword chase and the dash push follow the new hit times automatically. Applying a set does not change the damage or intensity of a hit (see Sword).

Do not edit Characters/Hero/Animations/Default. It is the backup.

All actions

GroupActionWhat it needs
LocomotionIdleStanding still, sword in the right hand. Must loop.
LocomotionWalkSlow movement (small stick tilt). Must loop. Can be made in place.
LocomotionRunFull speed movement. Must loop. Can be made in place.
Dash & DodgeDashQuick burst forward. Set Invulnerable until.
Dash & DodgeDodgePlayed when an attack is dodged (dodge stat).
Sword ComboHit 1First sword hit. Mark when the blade hits.
Sword ComboHit 2Second hit, starts while hit 1 ends.
Sword ComboHit 3 (finisher)Strongest hit of the combo.
Special AttacksSpecial 1Charged attack 1 (Charging Core chip). Usually a dash strike.
Special AttacksSpecial 2Charged attack 2.
Special AttacksSpecial 3Up to three hits.
Special AttacksSpecial 4Finisher of the special chain.
Special AttacksSpecial RecoveryBack to the stance after Special 3.
GunShootOne shot. Mark the moment the bullet leaves.
GunMachine Gun StartFrom the shot pose to the rapid fire pose (Machine Gun chip).
GunMachine Gun LoopRapid fire. Must loop. Every shot mark fires a bullet.
GunMachine Gun EndLowers the gun.
Hurt, Death & SpawnHurt, Death, SpawnSpawn plays when the hero appears or respawns.
Jump & LandingGoing Up, FallingIn the air. Must loop.
Jump & LandingLand, Land (high fall), Land Moving, Land Running FastLanding variations.

Common mistakes

  • The rig is not Humanoid: the clip does not play on the hero. Set Animation Type to Humanoid in the clip's import settings.
  • The hero slides or stands still while moving: the clip has no root motion. Tick Made in place.
  • The hit lands too early or too late: adjust the Hit slider, then use Preview.

Hierarchy menu and prefabs #

Right click in the Hierarchy, or use GameObject > Cyber Combat Kit: Set Up Scene, Hero, Combat Camera, Combat Manager (HUD and Menus), Enemy Waves, Bake NavMesh.

Prefabs/Managers has everything a scene needs, ready to drop in the Hierarchy:

PrefabContents
Combat ManagerHUD, pause, skill, chip and companion menus, damage numbers, pickup settings, companion selector.
Combat CameraTop-down follow camera with screen shake.
Enemy SpawnerWaves of enemies around the hero.

They find the hero by themselves, so no reference has to be assigned. The scene also needs an EventSystem with the Input System UI module and a baked NavMesh. Set Up Scene adds both.

Part 3. Systems, rule by rule

Hero #

The hero moves by root motion: the Animator moves it and the speed comes from the run clip and the Speed stat. Movement is relative to the world, not to the camera.

Field on HeroControllerPrefab valueMeaning
maxForwardSpeed8Top value of the ForwardSpeed animator parameter.
gravity20Fall acceleration.
dashCooldown0.1Seconds before the next dash.
hitStopPerIntensity0.085Hit stop seconds per point of intensity, kept between 0.06 and 0.18 s.
hurtArmorTime1Seconds after being hurt in which another hurt animation can't interrupt you.
knockbackMultiplier0.5Meters the hero is pushed per point of intensity, up to 5 m.
elementalDashRadius1.3Reach in meters of Fire, Ice and Thunder Dash.

Dash

The hero can't be hit during the dash and passes through enemies (dashIgnoreLayers). With Double Dash you get 2 dashes before the cooldown. An elemental dash costs 1 ammo. With no ammo it is a normal dash.

Taking damage

Attacking gives armor: being hit does not interrupt a swing. After a hurt animation, there is 1 second of armor. Steel Body removes hurt interruptions. A burn tick always plays the hurt animation. Bullets, burns and auras don't push the hero.

Death and respawn

CombatManager shows the death panel, waits respawnDelay (3 s) and revives the hero at respawnPoint, or where it started. The hero gets 2 seconds of protection. Dying does not change level, boosts, chips or ammo. Without the Combat Manager, call hero.Revive yourself (see recipe 18).

Swap the ponytail physics

The hero ponytail uses DynamoBone. See Component reference and Documentation/DynamoBone.md.

Stats and progression #

Base stats per level are in Data/Hero Stats Table.asset. Edit the asset to rebalance, no code needed. Level 1: 100 HP, 30 damage, 100 speed, 100 attack speed, 5% critical chance, +30% critical damage.

Final stats:

maxHealth      = table x maxHealthMultiplier (minimum 1)
damage         = table x damageMultiplier + flatDamage (minimum 0)
attackSpeed    = table x attackSpeedMultiplier + flatAttackSpeed (minimum 10)
gunAttackSpeed = attackSpeed x gunAttackSpeedMultiplier + flatGunAttackSpeed (minimum 10)
critChance     = table + critChance modifiers
critDamage     = table x critDamageMultiplier
speed          = table x speedMultiplier (minimum 10)
dodge          = kept between 0 and 0.9

Multipliers multiply each other and flat values add up. Boosts and chips feed these through IStatContributor.

EXP and Skill EXP

EXP raises the level and the extra carries over. Skill EXP gives boost picks. It is accumulated: skillExp[n] is the total needed for the pick after n picks. The limit per run is baseSkillLimit (6) plus 2 for each level of Exp Gain Boost. At the limit the bar stops and the HUD shows MAX.

All 100 levels

Columns: level, EXP to the next level, max HP, speed, attack speed, damage, critical chance, critical damage.

Show the 100 levels
LvEXPHPSpeedAtk speedDamageCrit %Crit dmg
145010010010030530
251513110010031530
31,09516410010033531
42,25519610010034531
54,57523010110036531
69,21526410110037532
718,49529910110039532
837,05533510110040532
974,17537210110042533
10148,41540910110143533
11148,77344710110144633
12223,22448610110146634
13334,90152610110147634
14502,41656610110148634
15753,68960710210150635
161,130,59864910210151635
171,695,96369210210152636
182,544,00973610210154636
193,816,07878010210155636
205,724,18282610210256637
213,435,31587210210258637
224,122,44391910210259638
234,946,99796710210260638
245,936,462101610210262639
257,123,819106610310263639
268,548,648111710310264640
2710,258,442116810310265640
2812,310,196122110310266741
2914,772,300127410310268741
3017,726,824132810310369742
3121,272,256138410310370742
3225,526,772144010310371743
3330,632,190149710310372743
3436,758,692155510310374744
3544,110,496161410410375745
3652,932,660167510410376745
3763,519,256173610410377746
3876,223,176179810410378746
3991,467,870186110410379747
40109,761,510192510410580748
41131,713,880199010410581848
42158,056,720205710410582849
43189,668,130212410410584850
44227,601,820219310410585850
45273,122,240226210510586851
46327,746,780233310510587852
47393,296,200240410510588853
48471,955,500247710510589953
49566,346,600255110510590954
50679,616,060262610510891955
51407,771,300270310510892956
52448,548,480278010510893957
53493,403,4002859105108941057
54542,743,8002938105108951058
55597,018,2403019106108961059
56656,720,1003102106108971060
57722,392,2003185106108971061
58794,631,5003270106108981162
59874,094,7003356106108991163
60961,504,26034431061101001164
611,057,654,70035311061111011165
621,163,420,30036211061121021166
631,279,762,40037121061131031267
641,407,738,60038041061141041268
651,548,512,60038981071151051269
661,703,364,00039931071161051271
671,873,700,40040891071171061372
682,061,070,50041871071181071373
692,267,177,70042861071191081374
702,493,895,40043861071201091375
712,743,285,00044881071211091477
723,017,613,60045921071221101478
733,319,375,00046961071231111579
743,651,312,60048021071241121581
754,016,444,00049101081251131582
764,418,088,40050191081261131684
774,859,897,30051301081271141685
785,345,887,00052421081281151786
795,880,475,60053551081291151788
806,468,523,50054711081301161890
817,115,376,00055871081311171891
827,826,914,00057061081321171993
838,609,605,00058251081331182095
849,470,565,00059471081341192096
8510,417,622,00060701091351192198
8611,459,384,000619510913612021100
8712,605,323,000632110913712122102
8813,865,855,000644910913812123104
8915,252,441,000657910913912223106
9016,777,685,000671010914012324108
9118,455,454,000684310914112325110
9220,300,999,000697810914212426112
9322,331,100,000711510914312426114
9424,564,210,000725310914412527116
9527,020,630,000739311014512528118
9629,722,694,000753511014612629121
9732,694,962,000767911014712630123
9835,964,457,000782411014812731125
9939,560,905,000797211014912831128
10043,516,994,000812111015013032130

Sword #

Three hits. Each hit lands once per target. The values live on the Animator states, not in a script.

StateDamage multiplierIntensity (m)Hit stopDamage at level 1
HeroCombo10.50.30.06 s15
HeroCombo20.80.80.068 s24
HeroCombo31.040.18 s30

Change the damage or push of a hit

Open Characters/Hero/Animations/Hero Combat.controller, select HeroComboN and change damageMultiplier and damageIntensity on HeroComboAttackSMB. The specials use HeroSpecialAttackSMB the same way.

Sword chase

If an enemy is ahead, within meleeChaseRange (10 m) and inside the spread, and farther than meleeChaseMinDistance (2.5 m), the hero advances toward it during the swing at up to meleeChaseSpeed (4). Enemies touching a sphere in front of the hero (meleeFaceRadius, 1.5 m) are faced automatically.

Charged specials

The Charging Core chip enables them. Every 3 shots give 1 charge, up to the chip level. With charges, the attack button plays a special, and the hero can't be hit during it. A normal combo clears the charges.

StateDamage multiplierIntensity (m)
SpecialAttack113
SpecialAttack221
SpecialAttack31.4330.3
SpecialAttack46.56

Gun #

HeroGun starts with 40 ammo. It aims at the closest target within autoAimRange (30 m). With no target, it fires forward. Ammo does not reload by itself: it comes from pickups, the Gun Reload boost and Reset Run.

Capacity, in order

capacity = baseAmmoCapacity (40)
Power Converter: x 0.5, or Lead Rain: x 1.5, or Ammo Core: + 20 (same slot, only one)
Machine Gun: + 55 / 65 / 85 / 110
+ Ammo Up boosts and Max Ammo data effects
Big Guns: x 0.5
Super Charged Sword: 0

Damage of a bullet, in plain words

  1. Start from the hero damage, with a critical roll. Sharpshot adds to the chance and Leech Core halves the critical bonus.
  2. Apply the weapon core chip: Power Converter x 1.5, Lead Rain x 0.5 or Headshot Core x 0.5.
  3. Apply Multi Shot x 0.9, or Triple Shot x 0.7.
  4. Multiply by the bullet type: normal 0.55, shotgun pellet 0.15 or machine gun 0.08.
  5. Machine Gun ramps up the longer you hold: from 0.5 s and then from 2 s.
  6. Each ricochet takes 30% off, each pierced target 33%, and a wall bounce 50%. Split bullets deal 70%.
  7. Add the flat bonus from the gun boosts and Power Shot.
  8. Apply Double Trouble x 2.5 and Big Guns x 2.

With a plasma chip (Flaming, Freezing or Thunder Shot) a bullet lands two hits that total 80%: 90% of that is elemental and 10% is normal.

Machine Gun and Shotgun

Machine Gun: hold the button for 0.2 s. It keeps aiming at the closest target. Shotgun: 5, 7, 9 or 11 pellets, 5 degrees apart.

Boosts #

The texts, icons, max level and weight are in Data/Skill Database.asset. The effects of the 42 default boosts are in code, so changing a text does not change an effect. Max level 0 means unlimited. Only one aura per run.

BoostGroupMax levelWeightWhat it does
Multi ShotGun21Fire 2 bullets in a row for 1 ammo. Lv 1: -10% gun damage / -15% gun attack speed. Lv 2: -10% gun damage / -15% gun attack speed.
Triple ShotGun11Fire 2 extra bullets diagonally. -30% gun damage / Still costs 1 ammo.
Split ShotGun11Bullets split into 2 side shots when they hit an enemy. Side shots deal 30% less damage / Side shots don't bounce off walls.
Ricochet ShotGun11Bullets jump to nearby enemies up to 3 times. 30% less damage on each jump.
Piercing ShotGun11Bullets pass through enemies. 33% less damage for each enemy pierced / With Ricochet, the last jump also pierces.
Wall Bouncing ShotGun11Bullets bounce off an obstacle once. 50% less damage after the bounce.
HeadshotGun31Shots have a chance to kill an enemy instantly. Lv 1: 2.5% headshot chance. Lv 2: 4% headshot chance. Lv 3: 10% headshot chance.
Minor Gun BoostGunUnlimited1Increase your gun damage. +3 gun damage.
Gun BoostGunUnlimited1Increase your gun damage. +10 gun damage.
Gun ReloadGunUnlimited1Refill your gun ammo.
Minor Ammo UpGunUnlimited1Increase your maximum ammo. +5 max ammo.
Major Ammo UpGunUnlimited1Increase your maximum ammo. +15 max ammo.
Double TroubleGun11Each shot costs double ammo and hits much harder. Each shot costs 2 ammo / +150% gun damage.
Big GunsGun11Halve your maximum ammo and double your gun damage. -50% max ammo / +100% gun damage.
Small Attack BoostSword and DamageUnlimited1Increase your base damage. +10% base damage.
Great Attack BoostSword and DamageUnlimited1Increase your base damage. +20% base damage.
Small Attack Speed BoostSpeedUnlimited1Increase your base attack speed. +5% base attack speed.
Great Attack Speed BoostSpeedUnlimited1Increase your base attack speed. +12% base attack speed.
Small Critical Chance BoostCriticalUnlimited1Increase your critical hit chance. +2% critical hit chance.
Great Critical Chance BoostCriticalUnlimited1Increase your critical hit chance. +10% critical hit chance.
Small Critical Damage BoostCriticalUnlimited1Increase your critical hit damage. +10% critical hit damage.
Great Critical Damage BoostCriticalUnlimited1Increase your critical hit damage. +25% critical hit damage.
Speed UpSpeedUnlimited1Increase your movement speed. +5% movement speed.
Great Speed UpSpeedUnlimited2Increase your movement speed. +20% movement speed.
Super Charged SwordSword and Damage11Give up your gun ammo for more damage. -100% max ammo / +50% damage.
DodgeDefense11Gain a chance to fully dodge attacks. +20% dodge chance.
Shield ChargeDefenseUnlimited1Gain a shield that blocks the next 4 attacks.
Max HP BoostDefenseUnlimited1Increase your max HP. +25% max HP.
Heal BoostDefenseUnlimited1Heal more and find more healing items. +20% healing / +5% healing item drop chance.
Instant HealDefenseUnlimited1Recover all your HP.
HP SacrificeSword and DamageUnlimited1Trade max HP for damage. -10% max HP / +30% base damage.
FurySpeed31Attack faster as you lose HP. Lv 1: +0.4 attack speed per 1% HP lost. Lv 2: +0.7 attack speed per 1% HP lost. Lv 3: +1.1 attack speed per 1% HP lost.
BerserkSword and Damage31Deal more damage as you lose HP. Lv 1: +0.5 damage per 1% HP lost. Lv 2: +1 damage per 1% HP lost. Lv 3: +2 damage per 1% HP lost.
AgilityDefense31Dodge more often as you lose HP. Lv 1: +0.2% dodge chance per 1% HP lost. Lv 2: +0.3% dodge chance per 1% HP lost. Lv 3: +0.45% dodge chance per 1% HP lost.
Fire AuraAura31Surround yourself with a small fire aura. Lv 1: Deals 10% of your damage to enemies it touches / Burns them for 10% of your damage per second. Lv 2: Deals 20% of your damage to enemies it touches / Burns them for 20% of your damage per second. Lv 3: Deals 30% of your damage to enemies it touches / Burns them for 30% of your damage per second.
Ice AuraAura31Surround yourself with a small ice aura. Lv 1: Deals 5% of your damage to enemies it touches / Slows them by 10% / Enemies inside it for 4s freeze for 2s. Lv 2: Deals 10% of your damage to enemies it touches / Slows them by 20% / Enemies inside it for 4s freeze for 2s. Lv 3: Deals 20% of your damage to enemies it touches / Slows them by 40% / Enemies inside it for 4s freeze for 2s.
Thunder AuraAura31Surround yourself with a small thunder aura. Lv 1: Deals 30% of your damage to enemies it touches / Lightning also strikes enemies around them for 20% of your damage. Lv 2: Deals 40% of your damage to enemies it touches / Lightning also strikes enemies around them for 25% of your damage. Lv 3: Deals 50% of your damage to enemies it touches / Lightning also strikes enemies around them for 30% of your damage.
Weakness AuraAura31Surround yourself with a small weakness aura. Lv 1: Deals 5% of your damage to enemies it touches / They deal 30% less damage for 10s. Lv 2: Deals 10% of your damage to enemies it touches / They deal 40% less damage for 10s. Lv 3: Deals 20% of your damage to enemies it touches / They deal 50% less damage for 10s.
Frailty AuraAura31Surround yourself with a small frailty aura. Lv 1: Deals 5% of your damage to enemies it touches / They take 15% more damage for 10s. Lv 2: Deals 10% of your damage to enemies it touches / They take 20% more damage for 10s. Lv 3: Deals 20% of your damage to enemies it touches / They take 25% more damage for 10s.
Exp Gain BoostCompanion and LootUnlimited1Earn more EXP and pick more skills. +30% EXP / +2 max skills.
Loot Drop BoostCompanion and LootUnlimited1Increase the chance of ammo drops. +3% ammo drop chance.
Restore CompanionCompanion and LootUnlimited1Restore your companion's health. Heals your companion fully / Revives it if it is dead.

Auras

LevelRadius
12.1 m
23 m
33.9 m

Ticks happen every 1.067 s at 100 attack speed, and faster with more attack speed. Aura damage has no critical hits and does not push or stagger.

Chips #

One chip per slot. Texts and values are in Scripts/Runtime/Chips/ChipCatalog.cs. The panel (Tab) shows one row per slot with chip and level. In the demo all chips are free for testing: in a real game, call Equip yourself.

ChipSlotLevel 1Level 2Level 3Level 4
Dodge BodyBody+5% dodge, -10% max HP+10% dodge, -15% max HP+20% dodge, -20% max HP+35% dodge, -25% max HP
HP BoostBody+10% max HP+15% max HP+25% max HP+40% max HP
Steel BodyBodyAttacks don't interrupt you. -0% damage takenAttacks don't interrupt you. -10% damage takenAttacks don't interrupt you. -15% damage takenAttacks don't interrupt you. -20% damage taken
Berserker BodyBodyBelow 25% HP: +25% damage. Above: +25% critical damageBelow 25% HP: +50% damage. Above: +50% critical damageBelow 25% HP: +100% damage. Above: +100% critical damageBelow 25% HP: +250% damage. Above: +250% critical damage
Damage ReductionBody-10% damage taken-15% damage taken-20% damage taken-25% damage taken
Elemental ImmunityBodyImmune to burn, freeze, weakness and frailtyImmune to burn, freeze, weakness and frailtyImmune to burn, freeze, weakness and frailtyImmune to burn, freeze, weakness and frailty
Double DashFootDash twice before the cooldownDash twice before the cooldownDash twice before the cooldownDash twice before the cooldown
Fire DashFootDash leaves fire: burns for 5% damage per second. Costs 1 ammoDash leaves fire: burns for 10% damage per second. Costs 1 ammoDash leaves fire: burns for 15% damage per second. Costs 1 ammoDash leaves fire: burns for 30% damage per second. Costs 1 ammo
Ice DashFootDash slows enemies for 4s, then freezes them for 1s. Costs 1 ammoDash slows enemies for 4s, then freezes them for 2s. Costs 1 ammoDash slows enemies for 4s, then freezes them for 3s. Costs 1 ammoDash slows enemies for 4s, then freezes them for 6s. Costs 1 ammo
Thunder DashFootDash shocks for 5% damage and 10% to nearby enemies. Costs 1 ammoDash shocks for 10% damage and 15% to nearby enemies. Costs 1 ammoDash shocks for 15% damage and 30% to nearby enemies. Costs 1 ammoDash shocks for 30% damage and 60% to nearby enemies. Costs 1 ammo
SwiftnessFoot+10% movement speed+20% movement speed+30% movement speed+40% movement speed
EXP BoostHead+5% EXP+10% EXP+20% EXP+30% EXP
Health Drop BoostHead+1% health drop chance+2.5% health drop chance+6% health drop chance+12% health drop chance
Item Drop BoostHead+5% item drop chance+8% item drop chance+11% item drop chance+15% item drop chance
Ammo Drop BoostHead+5% ammo drop chance+10% ammo drop chance+15% ammo drop chance+25% ammo drop chance
Leech CoreWeapon coreCritical gun hits heal 50% of the damage. -50% gun critical damageCritical gun hits heal 50% of the damage. -50% gun critical damageCritical gun hits heal 50% of the damage. -50% gun critical damageCritical gun hits heal 50% of the damage. -50% gun critical damage
Power ConverterWeapon core+50% gun damage, -50% max ammo+50% gun damage, -50% max ammo+50% gun damage, -50% max ammo+50% gun damage, -50% max ammo
Lead RainWeapon core+50% max ammo, -50% gun damage+50% max ammo, -50% gun damage+50% max ammo, -50% gun damage+50% max ammo, -50% gun damage
Headshot CoreWeapon core+10% headshot chance, -50% gun damage+10% headshot chance, -50% gun damage+10% headshot chance, -50% gun damage+10% headshot chance, -50% gun damage
Ammo CoreWeapon core+20 max ammo+20 max ammo+20 max ammo+20 max ammo
Flaming ShotPlasmaShots burn enemies for 5% damage per secondShots burn enemies for 15% damage per secondShots burn enemies for 30% damage per secondShots burn enemies for 40% damage per second
Freezing ShotPlasmaShots slow enemies by 5%Shots slow enemies by 10%Shots slow enemies by 20%Shots slow enemies by 40%
Thunder ShotPlasmaShots chain 15% damage to enemies within 3mShots chain 25% damage to enemies within 3.5mShots chain 45% damage to enemies within 4.5mShots chain 80% damage to enemies within 6m
Power ShotPlasma+2 gun damage+4 gun damage+10 gun damage+20 gun damage
SharpshotPlasma+5% gun critical chance+10% gun critical chance+20% gun critical chance+50% gun critical chance
Power BombAux damageShot enemies explode on death for 20% damage (4m)Shot enemies explode on death for 25% damage (5m)Shot enemies explode on death for 40% damage (6m)Shot enemies explode on death for 50% damage (7m)
Alpha BombAux damageShot enemies explode on death applying weakness (4m)Shot enemies explode on death applying weakness (5m)Shot enemies explode on death applying weakness (6m)Shot enemies explode on death applying weakness (7m)
Beta BombAux damageShot enemies explode on death applying +20% frailty (4m)Shot enemies explode on death applying +30% frailty (5m)Shot enemies explode on death applying +45% frailty (6m)Shot enemies explode on death applying +60% frailty (7m)
ShotgunAmmo controllerGun fires 5 pelletsGun fires 7 pelletsGun fires 9 pelletsGun fires 11 pellets
Machine GunAmmo controllerHold to fire. Damage ramps up to x2.2. +55 max ammoHold to fire. Damage ramps up to x3.2. +65 max ammoHold to fire. Damage ramps up to x4.3. +85 max ammoHold to fire. Damage ramps up to x5.5. +110 max ammo
EnhancerAmmo controller+15 gun attack speed+40 gun attack speed+60 gun attack speed+100 gun attack speed
Cursed BladeBlade modifierSword kills heal 10% HP. -50% max HPSword kills heal 10% HP. -50% max HPSword kills heal 10% HP. -50% max HPSword kills heal 10% HP. -50% max HP
Berserker BladeBlade modifier+5% sword critical chance per consecutive hit (resets when hit)+5% sword critical chance per consecutive hit (resets when hit)+5% sword critical chance per consecutive hit (resets when hit)+5% sword critical chance per consecutive hit (resets when hit)
Enhanced BladeBlade modifier+2 sword damage+4 sword damage+10 sword damage+20 sword damage
Reflector BladeBlade modifierSword reflects enemy bullets (25% of your damage)Sword reflects enemy bullets (50% of your damage)Sword reflects enemy bullets (100% of your damage)Sword reflects enemy bullets (150% of your damage)
Charging CoreSword coreEvery 3 shots charge the sword (max 1 charges). Attack to release special slashesEvery 3 shots charge the sword (max 2 charges). Attack to release special slashesEvery 3 shots charge the sword (max 3 charges). Attack to release special slashesEvery 3 shots charge the sword (max 4 charges). Attack to release special slashes

Bombs

A shot marks its target. When a marked enemy dies, it explodes in the bomb radius (4, 5, 6 or 7 m). Power Bomb deals damage. Alpha Bomb applies weakness of 35, 50, 65 or 85%. Beta Bomb applies frailty.

Damage and teams #

Whoever deals damage only knows Damageable, and whoever reacts listens to events. Damageable.ApplyDamage runs in this exact order:

  1. Ignored if disabled, dead, invulnerable, or on the same team. Neutral is hurt by everyone.
  2. Ignored during the invulnerability after a hit (invulnerabilityAfterHit, 0 on every kit prefab).
  3. Ignored if the same melee weapon hit inside repeatedMeleeHitWindow. Only the hero uses it, with 0.5 s.
  4. Dodge: dodgeChance is rolled, unless frozen. Frozen characters never dodge.
  5. Shield: if there are charges, one is spent and the hit is blocked. Burn goes through shields.
  6. Damage: reduction, then the elemental multiplier, then frailty.
  7. Headshot: kills at once, or x 10 on a target with isBoss.
  8. Limited to the current health. immortal never goes below 1 HP.
  9. Health is removed and HealthChanged fires.
  10. At 0 health: statuses clear and the death events fire.
  11. Otherwise the damaged events fire.

Example

An enemy with 100 HP and no reduction takes a Fire hit of 30 and is Ice, with frailty x 1.25. 30 x 1.9 x 1.25 = 71.25, rounded to 71. It has 29 HP left.

Elements

AttackAgainstDamage
FireIce190%
IceThunder190%
ThunderFire190%
AnyThe same element10%
Normal, or any other pairAny100%

Status effects #

StatusEffects lives next to Damageable and works the same way on all characters. A status does not apply to dead, immune or invulnerable targets. During a dash, special or respawn, the hero is protected. The HUD shows the hero's active statuses with icon, text, time and a bar.

StatusEffectReapplying
BurnFire damage. 5 s means ticks at 1, 2, 3 and 4 s. Fire characters don't burn.Renews the time and damage.
FreezeSlows by 20% by default. After 4 s slowed, the target freezes solid for 2 s. Ice characters don't freeze.Keeps the biggest slow and the longest time.
WeaknessLowers damage dealt, by 50% by default, for 10 s.Keeps the biggest reduction.
FrailtyRaises damage taken, +25% by default, for 10 s.Keeps the biggest multiplier.

Frozen solid

Frozen solid means no movement and no animation. An ice shell covers every opaque mesh and crystals grow at the feet, scaled to the character. Then the ice breaks. New characters need no setup. Change the 4 seconds with StatusEffects.freezeBuildUp.

Elemental hits

ElementalHit turns the element of an enemy attack into a status, only when the hit deals damage: burnFraction 0.15, freezeSlow 0.2, freezeDuration 5, freezeSolidTime 2, weaknessMultiplier 0.5, frailtyMultiplier 1.25, thunderChainFraction 0.3 and thunderChainRadius 4.

Pushback and hit stop #

The intensity of a hit is the distance in meters it pushes. Targets slide fast, at 20 m/s, and stop at walls and NavMesh borders. A sword hit starts the push after its hit stop, which gives the hit weight.

  • Enemies: intensity x EnemyAI.knockbackStrength, up to 6 m, even during an attack. A killing hit also pushes the body.
  • Companions: 1 m per point of intensity.
  • Hero: intensity x 0.5, up to 5 m. Bullets, burns and auras don't push it.
AttackIntensity
Hero combo0.3, 0.8, 4
Hero specials3, 1, 0.3, 6
Knight Drone1
Chip bombs, boost explosions, chain lightning1
Bullets, burns, auras0
Robot Creep, Stinger1, 3
Saw Bot, Jumper Bot1, 8
Tesla Tower, Enemy Bomb, Enemy Goo1

To make an enemy immovable: set knockbackStrength to 0, NavMeshAgent speed to 0 and movement to Stationary. Turrets and the Tesla Tower already work this way.

Hit stop freezes only the hero Animator (Animator.speed), never the game time. Menus use Time.timeScale.

Enemies #

Every enemy has NavMeshAgent, Damageable, StatusEffects, Targetable, HealthBarTarget, LootDropper, EnemyAI and one EnemyBehaviour. They share one model, Basic Enemy Drone, with their own armor color. Drop them in EnemySpawner.enemies or in the scene: they need the NavMesh.

EnemyWorldHPDamageElementSpeedBehaviourEXPSkill EXPHealthAmmoWhat it does
MiniBot1155Normal1.0Shooter568%10%Small, wanders and stops to shoot
Quad Drone13010Normal2.0Shooter761%5%Wanders, stops and shoots at the target
Spider Drone13016Normal8.0Shooter561%5%Fires a radial pattern
Vdrone13010Normal2.0Shooter962%5%Radial pattern aligned with the arena
Saw Bot14555Normal5.0Bouncer65231%10%Bounces off the arena and hurts on touch
Turret Basic Type 218020Normal0.0Shooter14111.1%10%Stationary, a V of two shots
Turret Basic18020Normal0.0Shooter13111.1%10%Stationary, one aimed shot
Robot Creep110050Normal1.87LungeMelee130212%15%Chases and lunges forward
Tesla Tower110040Thunder0.0ShockTower761%10%Charges, shows the area and shocks everything in it
Frosty112030Ice2.0Shooter65341%4%Ice shots that slow and freeze
Jumper Bot120035Fire4.0Jumper145502%10%Jumps around and hurts on landing
Xeno Bot212025Weakness5.0Shooter170101%8%Runs away and lobs goo
Spider Drone Mk2214010Normal8.0Shooter6040%1%A stronger radial pattern
V-Tracer215060Weakness4.0Shooter1300160.5%5%Radial shots and an acid trail
Spammer Bot218540Normal2.0Shooter220121%5%A fan of 5 big shots
Stinger2200125Frailty2.8LungeMelee1625431%10%Chases and stings, causes frailty
Blizzbot223080Ice3.0Shooter300301%8%Two homing ice shots to the sides
Spider Mother226040Normal10.0Shooter215120.5%10%8 shots, and releases minions when it dies
Bomber Bot2305125Fire0.11Shooter300281.2%10%Throws bombs that leave a fire field
B-Hover235085Thunder2.0Shooter4380521%8%Fires 6 homing thunder bolts
Gatling Drone2400100Normal2.0Shooter4380521%8%Bursts of 6 aimed shots

EXP and Skill EXP are the totals that enemy drops. Health and ammo are drop chances.

The 5 behaviours

  • ShooterBehaviour (16 enemies). Moves, then stops and fires all its EnemyGuns at shotTimes. movement: Wander, Stationary, Pursue or Flee. Key fields: attackInterval plus intervalRandom, attackDuration, randomWindup, attackFacing.
  • LungeMeleeBehaviour (Robot Creep, Stinger). Chases and attacks inside attackDistance, with a MeleeHitbox. lungeDistance moves it forward during the attack.
  • JumperBehaviour (Jumper Bot). Jumps instead of walking. It can't be hit in the air, hurts on landing and fires 4 shots.
  • BouncerBehaviour (Saw Bot). Moves in straight lines and bounces off NavMesh borders. ContactDamage hurts what it touches.
  • ShockTowerBehaviour (Tesla Tower). Charges, shows the area on the ground and shocks everything within 4.32 m.

Training Dummy: immortal, 1000 HP, shows the damage per second and resets after 3 s.

Guns and projectiles

EnemyGun lives on child objects. angles fires one shot per angle, so a ring of guns or angles makes a radial pattern. aim is Forward or Target. SimpleProjectile flies straight or homing and can be reflected. LobProjectile throws bombs and goo in an arc and can leave a HazardZone. HazardTrail leaves zones behind a moving enemy. SpawnOnDeath releases minions.

Enemy waves #

EnemySpawner starts a wave when no enemy is alive and none is spawning. It waits delayBetweenWaves (except for the first wave), then creates min(maxAlive, 2 + wave) enemies, one every delayBetweenSpawns, picked by weight.

FieldPrefab valueMeaning
enemies11 entries, weight 1Prefab and chance.
spawnPointsEmptyEmpty uses a ring around the spawner.
ringRadius18Radius of the ring.
maxAlive7Most enemies in a wave.
delayBetweenSpawns0.6Seconds.
delayBetweenWaves3Seconds.
minDistanceToHero6No spawn closer than this.
spawnOnStarttrueStarts by itself.

Important: the Enemy Spawner prefab only brings the 11 enemies of World 1. World 2 enemies are much stronger: add them when you balance your game. Use Add To Spawner in the wizard for your own enemies.

Companions #

One active companion at a time (CompanionSelector). The three prefabs are examples. Make your own in the Companions tab.

CompanionRoleHealthPowerSpeed
Knight DroneProtector150 to 3000 HPDamage 12 to 60 per hitAttack speed 2.0 to 1.0 s
Ranged DroneAttacker64 to 1300 HPDamage 5 to 40 per bulletAttack speed 1.5 to 0.6 s
Healer DroneHealer64 to 1300 HPHealth reserve 40 to 1500 HPHealing speed 3 to 60 HP/s

Each stat goes in a straight line from level 1 to level 10. Companion level is 1 + the levels gained. Upgrades are free: press + in the companion menu (C). Levels are kept while you switch companions. Set CompanionSelectionPanel.showUpgrades to false to hide the free buttons.

  • Follow: wanders 2 to 2.5 m from the hero, and picks a new spot when farther than maxDistanceFromHero. Beyond teleportDistance (25 m) it teleports.
  • Knight: chases enemies within leashRange (7 m) of the hero, and has a 50% chance to deflect each enemy bullet within 2.5 m.
  • Ranged: shoots the closest enemy within range.
  • Healer: heals the hero within healRange (3.5 m on the prefab) from a reserve. The hero's overheal refills the reserve. It also shoots, with 2 damage every 5 s, and that shot does not grow with the stats.
  • Aura ability: CompanionAuraAbility pulses damage and status around it. No kit prefab uses it, and it is there for your own companions.

Pickups and loot #

LootDropper rolls when a character dies.

health chance = healthDropChance + hero health drop bonus
ammo chance   = ammoDropChance + hero ammo drop bonus + hero item drop bonus
Ammo at zero: chance x 3. Ammo up to 5%: chance x 1.2. Capacity 0: no ammo drops.
EXP orbs = max(1, exp / 30 if exp >= 30, exp / 10 if exp >= 10, otherwise exp / 5), rounded down
PickupHow it worksValue
HealthCollected within 1.2 m, if the hero is hurt or the Healer has room.25% of max HP
AmmoCollected within 1.2 m, if the gun is not full.3 to 23, shown on the pickup
EXPAfter 0.6 s it flies to the hero. It always collects.EXP and Skill EXP split among the orbs

Pickups last 30 s. Prefabs come from PickupSettings in the Combat Manager, unless the LootDropper has its own.

UI #

The Combat Manager prefab has all the UI, in TextMesh Pro.

PartWhat it showsWhere
HeroHUDHealth, EXP, Skill EXP, level, ammo, boosts picked, charges, stats, dash cooldown.HUD > HeroHUD
StatusEffectBarActive statuses of the hero.HUD > HeroHUD > StatusEffects
CompanionHUDCard of the equipped companion. Hidden with no companion.Combat Manager
SkillSelectionPanelBoost cards. Pauses the game. Mouse, gamepad and keys.Combat Manager
ChipLoadoutPanelOne row per slot.HUD > ChipPanel
CompanionSelectionPanelList and stats window.Combat Manager
ComboCounter"x23". Getting hurt or 5 s without a hit resets it.Combat Manager
DamagePopupsNumbers, CRITICAL, HEADSHOT, MISS and BLOCK, colored by element.Combat Manager
HealthBarOverlayBars over characters, set on each HealthBarTarget.Combat Manager
MobileControlsVirtual stick and buttons.Combat Manager

Change the look

Make a prefab copy of Combat Manager, then change colors, fonts and textures on the existing objects. Move or restyle objects, and don't delete them: scripts reference them. DamagePopups, CompanionHUD and HealthBarOverlay have color and font fields. StatusEffectBar and CompanionHUD build their UI at runtime.

Camera #

TopDownCamera on the Combat Camera prefab keeps a fixed angle: offset (0, 45, -40), pivotHeight 1.17, smoothTime 0. An empty target finds the hero. TopDownCamera.ShakeMain(duration, intensity) shakes it, and the biggest shake wins. Gun shake values are on HeroGun.

The kit ships a fixed-angle top-down camera. Enemy and aim logic works on the ground plane, so test any other view in your game.

Mobile controls #

MobileControls shows a virtual stick and buttons. Mode: Auto (shows on touch devices), AlwaysVisible or Hidden. They use the Input System on-screen controls, on the same paths as the gamepad.

For your own buttons, call PressAttack(), PressShoot() and PressDash() on HeroInput.

This combat system runs on phones in Cyberhero Legends, our Android game. Test controls and performance on your target devices too.

Part 4. Adapt it to your game

Recipes #

Tool recipes need no code. Code recipes need a script: add using UnityEngine; and using ZeukGames.CyberCombat;.

1. Swap the hero model (Tool)

In the wizard, open Hero, drag your model and click Create Hero. In Scene, set Hero Prefab and click Set Up Scene. Test: press Play and attack. Weapons should stay in the hands.

2. Swap the sword and gun (Tool)

In Hero, drag models into Sword and Gun, and click Flip if one points backwards. Then Create Hero. Test: in Play Mode, attack and shoot.

3. Rebalance health, damage and speed (Tool)

Select your copy of Data/Hero Stats Table.asset and edit the arrays. Index 0 is level 1. Speeds use 100 = normal. Test: press F1 in the Editor and watch the stats line of the HUD. Create a copy with Assets > Create > Zeuk Games > Cyber Combat Kit > Hero Stats Table and assign it to HeroStats.table on your hero.

4. Sword only (Tool)

Set HeroGun.baseAmmoCapacity to 0 on your hero. The HUD shows --, the gun does not fire and ammo stops dropping. In your own Skill Database, turn off the gun boosts with Offered, because they are hidden automatically only after Super Charged Sword. Charging Core needs shots, so remove it from play. Hide the GUN button under MobileControls. Test: play a run.

5. Gun only (Code)

canAttack turns off the sword and the gun together, so don't use it. Remove the sword bindings in HeroInput.Awake, and hide the SWORD button. Test: the sword button does nothing, and the gun fires.

6. A new enemy in 2 minutes (Tool)

In Enemies, pick a base, set Armor Color and stats, click Create Enemy, then Add To Spawner. Test: press Play.

7. A boss (Code)

Set Damageable.isBoss: a headshot deals x 10 damage instead of killing, and the boss is not pushed or staggered. The kit has no boss bar. Use HealthChanged for yours:

using UnityEngine;
using UnityEngine.UI;
using ZeukGames.CyberCombat;

public class BossBar : MonoBehaviour
{
    public Damageable boss;
    public Image fill;

    void OnEnable() { boss.HealthChanged += OnHealth; }
    void OnDisable() { boss.HealthChanged -= OnHealth; }
    void OnHealth(int current, int max) { fill.fillAmount = (float)current / max; }
}

8. An enemy with its own behaviour (Code)

Put this on an enemy in place of its current behaviour. An enemy has one behaviour. Tick only runs while alive, not staggered and not frozen. Reset state in OnRestart, because enemies come from a pool.

using UnityEngine;
using ZeukGames.CyberCombat;

public class OrbitBehaviour : EnemyBehaviour
{
    public float radius = 5f;
    public float attackInterval = 3f;
    public EnemyGun gun;
    float timer;

    protected override void OnRestart() { timer = attackInterval; }

    public override void Tick(float dt)
    {
        Targetable target = ai.FindTarget();
        if (target == null) { StopMoving(); return; }
        Vector3 away = transform.position - target.transform.position;
        away.y = 0f;
        MoveTo(target.transform.position + Quaternion.Euler(0f, 40f, 0f) * away.normalized * radius);
        ai.Face(target.transform.position - transform.position);
        timer -= dt;
        if (timer <= 0f)
        {
            timer = attackInterval;
            ai.SetWindup(false);
            gun.Fire(target, ai.CurrentDamage, gameObject);
        }
    }
}

9. Your own companion (Tool, Code for a new ability)

In Companions, pick a base, set the menu fields and click Create Companion. For a new ability, derive from CompanionAbility:

using UnityEngine;
using ZeukGames.CyberCombat;

public class MyAbility : CompanionAbility
{
    public override void Tick()
    {
        if (!companion.CanAct) return;
        Targetable target = TargetRegistry.Closest(transform.position, Team.Hero, 10f);
        companion.CurrentTarget = target;
    }

    public override void OnCompanionDied() { }
}

10. Levels with set waves (Code)

Set spawnOnStart as you need, fill spawnPoints, and use Wave and AliveCount to end the level:

using UnityEngine;
using ZeukGames.CyberCombat;

public class LevelGoal : MonoBehaviour
{
    public EnemySpawner spawner;
    public int wavesToWin = 5;
    bool won;

    void Update()
    {
        if (won || spawner.Wave < wavesToWin || spawner.AliveCount > 0) return;
        won = true;
        spawner.SetActive(false);
        Debug.Log("Level complete");
    }
}

11. Save progress (Code)

The kit has no save system. Save hero.Stats.level, the picked boosts (hero.Skills.PickedSkills, restore with Acquire), the chips (hero.Chips.Equipped), hero.Gun.Remaining and CompanionStats.Levels of each companion. stats.Changed tells you when to save and SetLevels loads them.

Limits: HeroProgression has no setter for EXP or Skill EXP. Add a method if you want to restore those bars. Your own boosts appear as SkillId.Custom, without the key.

12. A shop and currency (Code)

Set CompanionSelectionPanel.showUpgrades to false, then charge for upgrades yourself:

using UnityEngine;
using ZeukGames.CyberCombat;

public class CompanionShop : MonoBehaviour
{
    public CompanionSelector selector;
    public int coins = 100;
    public int cost = 10;

    public void BuyPower()
    {
        var stats = selector.Current.GetComponent<CompanionStats>();
        if (stats.power.IsMax || coins < cost) return;
        coins -= cost;
        stats.Upgrade(stats.power);
    }
}

13. Give chips and boosts as rewards (Code)

using UnityEngine;
using ZeukGames.CyberCombat;

public class Reward : MonoBehaviour
{
    public void Give()
    {
        var hero = FindAnyObjectByType<HeroController>();
        hero.GetComponent<HeroProgression>().AddExp(100f, 50f);
        hero.Stats.SetLevel(10);
        hero.Skills.Acquire(SkillId.TripleShot);
        hero.Chips.Equip(ChipType.MachineGun, 3);
        hero.Gun.Refill();
        hero.Heal(50);
    }
}

14. Remove the boost pick (Tool)

In your own Skill Database, set baseSkillLimit to 0. The skill bar stops and the HUD shows MAX. Keep optionsPerLevelUp for later. Exp Gain Boost raises the limit, so turn it off too, or use your own way of giving boosts with Acquire.

15. Change the keys (Code)

The bindings are in HeroInput.Awake. Edit them there. Panel and debug shortcuts (Tab, C, F1 to F4) are in CombatManager, and E is EnemyTestPanel.toggleKey.

16. Change the UI look (Tool)

See UI. Restyle a copy of Combat Manager without deleting objects. Test: press Play, then open every menu.

17. Change the camera (Tool)

Change TopDownCamera.offset on your Combat Camera. Test aiming, enemy behaviour and the frozen crystals: their placement assumes the default camera.

18. Use it without the Combat Manager (Code)

Without it, you need your own HUD and you call Revive yourself:

using System.Collections;
using UnityEngine;
using ZeukGames.CyberCombat;

public class SimpleRespawn : MonoBehaviour
{
    public HeroController hero;
    public Transform spawnPoint;

    void OnEnable() { hero.Died += OnDied; }
    void OnDisable() { hero.Died -= OnDied; }
    void OnDied() { StartCoroutine(RespawnAfter(3f)); }

    IEnumerator RespawnAfter(float seconds)
    {
        yield return new WaitForSeconds(seconds);
        hero.Revive(spawnPoint.position);
    }
}

19. Your own sound on a new object (Tool)

Add an AudioSource and RandomAudio, pick the Sound, or fill Clips. Call PlayRandom() from your script. For a one-shot with no component, call SoundLibrary.PlayAt(SoundId.Dash, position).

20. Win, lose and main menu screens (Code)

Listen to hero.Died for defeat, and CombatEvents.Killed or EnemySpawner.WaveStarted for your goals, then show your own panel.

using UnityEngine;
using ZeukGames.CyberCombat;

public class GameScreens : MonoBehaviour
{
    public HeroController hero;
    public GameObject defeatPanel;
    public GameObject victoryPanel;
    public int killsToWin = 50;
    int kills;

    void OnEnable() { hero.Died += OnDefeat; CombatEvents.Killed += OnKilled; }
    void OnDisable() { hero.Died -= OnDefeat; CombatEvents.Killed -= OnKilled; }

    void OnDefeat() { defeatPanel.SetActive(true); }

    void OnKilled(Damageable target, DamageInfo info)
    {
        if (target.team != Team.Enemy) return;
        kills++;
        if (kills >= killsToWin) victoryPanel.SetActive(true);
    }
}

The Combat Manager respawns the hero by itself. Remove that behaviour if your game ends on death.

21. Before you publish (Tool)

Untick Debug Tools on CombatManager if you also want the shortcuts off in development builds: release builds never run them. The enemy test panel exists only in the demo scene, so leave that scene out of your build. Fill the Sound Library, and run Check Setup.

22. Port to mobile (Tool)

The kit includes touch controls in Auto mode. Build to your device and test the controls, quality settings and frame rate. No performance numbers are promised, because they depend on your game and device.

Part 5. For programmers

Architecture #

Whoever deals damage only knows Damageable, and whoever reacts listens to events. So UI, loot, chips and combo don't depend on each other.

LayerContents
CoreDamageInfo, Damageable, StatusEffects, CombatEvents, TargetRegistry, Targetable, PrefabPool, VfxPool, NavKnockback, TopDownCamera
WeaponsMeleeHitbox, SlashEffect, SimpleProjectile, HeroProjectile, LobProjectile
CharactersHeroController and hero components, EnemyAI + EnemyBehaviour, CompanionController + CompanionAbility
ProgressionHeroStats, HeroSkills, HeroChips, BoostEffect, HeroProgression, CompanionStats
DataSkillDatabase, HeroStatsTable, ChipLibrary, ChipDefinition, SoundLibrary
UIOnly reads state and listens to events

Assemblies: ZeukGames.CyberCombat.Runtime, ZeukGames.CyberCombat.Editor, ZeukGames.CyberCombat.Installer, ZeukGames.DynamoBone. Namespaces: ZeukGames.CyberCombat, ZeukGames.CyberCombat.Editor, ZeukGames.CyberCombat.Installer, ZeukGames.

Layers: hero and companions on 9, enemies on 23, projectiles on 14 and pickups on 28. Damage ignores layers: Damageable.team decides. Layers serve collision and the dash.

IStatContributor is implemented by HeroSkills and HeroChips. Statics reset themselves on entering Play Mode, so you can turn off Reload Domain.

Events #

Global, in CombatEvents

EventSignature
DamageApplied(Damageable target, DamageInfo info, int amount, DamageResult result), for Dodged, Blocked, Damaged and Killed
Killed(Damageable target, DamageInfo info)
Healed(Damageable target, int amount)

Per object

ClassEvents
DamageableDamaged, Died, Dodged, Blocked, HealedEvent, HealthChanged, and UnityEvents onDamaged, onDeath
HeroControllerDied, Revived, Overhealed, DashCooldownStarted
HeroStatsStatsChanged
HeroGunAmmoChanged, BulletsFired
HeroChipsChipsChanged
HeroSkillsSkillAcquired, SkillsReset
HeroProgressionExpChanged, LeveledUp, SkillExpChanged, SkillPickAvailable
CompanionStatsChanged
CompanionSelectorCompanionChanged
EnemyAIDied
EnemySpawnerWaveStarted
CompanionControllerDied, Restored

Listen to the fight

using UnityEngine;
using ZeukGames.CyberCombat;

public class CombatListener : MonoBehaviour
{
    void OnEnable() { CombatEvents.DamageApplied += OnDamage; CombatEvents.Killed += OnKilled; }
    void OnDisable() { CombatEvents.DamageApplied -= OnDamage; CombatEvents.Killed -= OnKilled; }

    void OnDamage(Damageable target, DamageInfo info, int amount, DamageResult result)
    {
        Debug.Log(target.name + " took " + amount + " (" + result + ")");
    }

    void OnKilled(Damageable target, DamageInfo info)
    {
        Debug.Log(target.name + " died");
    }
}

Deal damage from your script

using UnityEngine;
using ZeukGames.CyberCombat;

public class SpikeTrap : MonoBehaviour
{
    public int damage = 25;

    public void Hit(Damageable target)
    {
        var info = DamageInfo.Create(damage, Team.Enemy, this, gameObject, transform.position,
            DamageKind.Melee, Element.Fire, 1f);
        DamageResult result = target.ApplyDamage(info);
        if (ElementalHit.Landed(result)) Debug.Log("Hit landed");
    }
}

API #

Public members of the runtime, by file.

Audio

RandomAudio : MonoBehaviour Audio/RandomAudio.cs

Plays a sound of the Sound Library (or its own clips, if any), with optional pitch randomization.

  • void PlayRandom()
  • void PlayRandom(float pitchBoost)
  • void PlayAt(Vector3 position)
  • void Stop()
  • void StopImmediately()

SoundLibrary : ScriptableObject Audio/SoundLibrary.cs

The sounds of the kit in one place: drop your clips in each entry and every prefab that uses it plays them. A RandomAudio with its own clips ignores the library (per prefab override). Lives in a Resources folder, so it is found without any setup.

Entry Audio/SoundLibrary.cs

  • Entry Find(SoundId id)
  • static AudioClip Pick(SoundId id, out float volume)
Boosts

BoostEffect Boosts/BoostEffect.cs

One effect of a custom boost or chip, with a value per level.

  • float Value(int level)
  • static bool IsInstant(BoostEffectType t)
  • static bool IsOnHit(BoostEffectType t)
  • static bool IsOnKill(BoostEffectType t)
  • static bool UsesChance(BoostEffectType t)
  • static bool UsesSource(BoostEffectType t)
  • static bool UsesDuration(BoostEffectType t)
  • static bool UsesVfx(BoostEffectType t)
  • static bool HasValue(BoostEffectType t)
  • static string ValueLabel(BoostEffectType t)
  • string Describe(int level)
  • static string Describe(IList<BoostEffect> effects, int level)
  • void Contribute(StatModifiers m, float healthLostPercent, int level)

BoostEffectRunner Boosts/BoostEffectRunner.cs

Runs the data driven effects of the hero (custom boosts and chips): on hit, on kill and over time. Attribute effects go through HeroSkills / HeroChips (IStatContributor). Owned by HeroSkills.

  • BoostEffectRunner(HeroSkills skills)
  • void Enable()
  • void Disable()
  • void Tick(float dt)
  • void ApplyInstant(IList<BoostEffect> effects, int level)
  • int BonusAmmo()
Chips

ChipCatalog Chips/ChipCatalog.cs

Slot, display texts and per-level values (1..4) of every chip.

  • static ChipSlot SlotOf(ChipType type)
  • static string DisplayName(ChipType type)
  • static string Description(ChipType type, int level)
  • static float DodgeBonus(int l)
  • static float DodgeHpPenalty(int l)
  • static float HpBoost(int l)
  • static float SteelBodyReduction(int l)
  • static float BerserkerBonus(int l)
  • static float DamageReduction(int l)
  • static float FireDashBurn(int l)
  • static float IceDashDuration(int l)
  • static float ThunderDashDamage(int l)
  • static float ThunderDashChain(int l)
  • static float SwiftnessBonus(int l)
  • static float ExpDropBoost(int l)
  • static float HealthDropBoost(int l)
  • static float ItemDropBoost(int l)
  • static float AmmoDropBoost(int l)
  • static float FlamingBurn(int l)
  • static float FreezingSlow(int l)
  • static float ThunderShotDamage(int l)
  • static float ThunderShotRange(int l)
  • static int PowerShotDamage(int l)
  • static float SharpshotCrit(int l)
  • static float BombRadius(int l)
  • static float PowerBombDamage(int l)
  • static float AlphaBombWeakness(int l)
  • static float BetaBombFrailty(int l)
  • static int ShotgunPellets(int l)
  • static float MachineGunRamp1(int l)
  • static float MachineGunRamp2(int l)
  • static int MachineGunAmmo(int l)
  • static float EnhancerAttackSpeed(int l)
  • static int EnhancedBladeDamage(int l)
  • static float ReflectorDamage(int l)

ChipDefinition : ScriptableObject Chips/ChipDefinition.cs

A chip made with data (Tools > Zeuk Games > Cyber Combat Kit > Boost and Chip Creator): slot, texts and effects per level. Listed in the Chip Library, it shows up in the chips panel next to the default chips.

  • string Description(int level)

DefaultChip Chips/ChipLibrary.cs

Settings of a default chip (its effect stays in code): name, icon, if it is offered, extra data effects.

ChipLibrary : ScriptableObject Chips/ChipLibrary.cs

The chips of the game: settings of the default chips and your own chips. Lives in a Resources folder, so it is found without setup. Your copy (Project Library) wins over the kit one.

  • DefaultChip Default(ChipType type)
  • static IEnumerable<ChipDefinition> InSlot(ChipSlot slot)
  • static bool IsEnabled(ChipType type)
  • static string NameOf(ChipType type)
  • static Sprite IconOf(ChipType type)
  • static List<BoostEffect> ExtraEffects(ChipType type)
  • static string DescriptionOf(ChipType type, int level)

EquippedChip Chips/HeroChips.cs

HeroChips : MonoBehaviour, IStatContributor Chips/HeroChips.cs

Equipment of the hero: one chip per slot. Passive bonuses are applied through IStatContributor, weapon behaviours are read by HeroGun, HeroMelee and HeroController. Also handles the Aux Damage bombs (enemies shot explode when they die).

  • EquippedChip(ChipType type, int level)
  • EquippedChip(ChipDefinition custom, int level)
  • void Equip(ChipType type, int level)
  • void Equip(ChipDefinition chip, int level)
  • bool Has(ChipDefinition chip)
  • void CollectEffects(List<(BoostEffect, int)
  • void Unequip(ChipSlot slot)
  • void UnequipAll()
  • EquippedChip Get(ChipSlot slot)
  • bool Has(ChipType type)
  • int LevelOf(ChipType type)
  • void Contribute(StatModifiers m, float healthLostPercent)
  • float LowHealthDamageMultiplier(float healthRatio)
  • float HighHealthCritMultiplier(float healthRatio)
  • void MarkForBomb(Damageable target)
  • event Action ChipsChanged
Companions

CompanionAbility : MonoBehaviour Companions/CompanionAbility.cs

Base class of the companion abilities. Ticked by the CompanionController while it can act.

  • abstract void Tick()
  • virtual void OnCompanionDied()

CompanionAnimationEvents : MonoBehaviour Companions/CompanionAnimationEvents.cs

Receives the animation events baked in the companion clips (put it next to the companion Animator). Attacks are timed by the abilities, so only the footstep event does something.

  • void PlayStep()
  • void AttackBegin()
  • void AttackEnd()
  • void EndAttack()
  • void ExclamationAttack()

CompanionAuraAbility : CompanionAbility Companions/CompanionAuraAbility.cs

Elemental companion: periodically damages enemies around it and applies its element.

  • override void Tick()

CompanionController : MonoBehaviour Companions/CompanionController.cs

Companion that follows the hero on the NavMesh, wanders close to it and runs its abilities (melee, ranged, healer, aura). Uses the same Damageable/StatusEffects as everybody else. Optional animator parameters: IsMoving (bool), Attack, Hit, Dodge, Deflect, Death (triggers).

  • bool HasParam(int hash)
  • void Trigger(int hash)
  • void Trigger(string name)
  • void FaceTowards(Vector3 point)
  • void Warp(Vector3 position)
  • void Restore()
  • void Heal(int amount)
  • event Action<CompanionController> Died
  • event Action<CompanionController> Restored

CompanionHealerAbility : CompanionAbility Companions/CompanionHealerAbility.cs

Heals the hero with a beam while the hero is hurt and close, spending a health reserve. Overheal from the hero (pickups, skills) refills the reserve.

  • void Refill(int amount)
  • override void Tick()
  • override void OnCompanionDied()
  • event Action<float, int> ReserveChanged

CompanionMeleeAbility : CompanionAbility Companions/CompanionMeleeAbility.cs

Knight style companion: chases enemies close to the hero, slashes them and has a chance to deflect enemy bullets flying near it.

  • override void Tick()
  • override void OnCompanionDied()

CompanionRangedAbility : CompanionAbility Companions/CompanionRangedAbility.cs

Shoots the closest enemy every attackInterval seconds (alternating muzzles).

  • override void Tick()
  • override void OnCompanionDied()

CompanionSelector : MonoBehaviour Companions/CompanionSelector.cs

Keeps a single active companion for the hero. Selecting another one removes the current companion and spawns the new one next to the hero, which it then follows like any companion.

  • int LevelOf(int index)
  • void Select(int index)
  • void SelectNone()
  • event Action<CompanionController> CompanionChanged

CompanionStat Companions/CompanionStats.cs

One upgradable stat: its value goes in a straight line from level 1 to the max level.

CompanionStats : MonoBehaviour Companions/CompanionStats.cs

Health, power and speed of a companion, each from level 1 to 10 (companion level = 1 + the levels gained). Upgrades are free: call Upgrade, or use the + buttons of the companion menu. The CompanionSelector keeps the levels of each companion while you switch between them.

  • float ValueAt(int atLevel)
  • string Format(float value)
  • bool Upgrade(CompanionStat stat)
  • void SetLevels(Vector3Int levels)
  • void Apply(bool refillHealth)
  • event Action Changed
Core

CombatEvents Core/CombatEvents.cs

Global combat notifications. UI (popups, combo counter) and systems (loot, chips) listen here so damage dealers and damageables don't need to know about each other.

DamageInfo Core/DamageInfo.cs

Everything a damageable needs to know about an incoming hit.

Damageable : MonoBehaviour Core/Damageable.cs

Health component used by the hero, enemies and companions. Handles teams, dodge, shield charges, damage reduction, elemental resistances and headshots.

  • void ResetHealth()
  • void SetMaxHealth(int value, bool addDifferenceToCurrent)
  • void SetHealth(int value)
  • int Heal(int amount)
  • bool CanBeDamagedBy(Team attacker)
  • DamageResult ApplyDamage(DamageInfo info)
  • static float ElementalMultiplier(Element attack, Element defender)
  • event Action<DamageInfo, int> Damaged
  • event Action<DamageInfo> Died
  • event Action<DamageInfo> Dodged
  • event Action<DamageInfo> Blocked
  • event Action<int> HealedEvent
  • event Action<int, int> HealthChanged

LightningBolt : MonoBehaviour Core/LightningBolt.cs

Jagged line between two points, re-randomized a few times per second. Spawn it through VfxPool.

LightningStrike Core/LightningBolt.cs

Chain lightning helper: damages every hostile target near a point and draws bolts to them.

  • void Strike(Vector3 from, Vector3 to)
  • void Strike(Transform from, Transform to)

NavKnockback Core/NavKnockback.cs

Push of a hit on a NavMesh character (enemies, companions): the hit intensity is the distance in meters. The character slides there fast, after the hit stop of a hero sword hit, and stops at walls and NavMesh borders.

  • void Update(NavMeshAgent agent, float deltaTime)
  • void Stop()

PooledInstance : MonoBehaviour Core/PrefabPool.cs

Remembers which prefab an instance came from so it can go back to the right pool.

PrefabPool Core/PrefabPool.cs

Global prefab pool (projectiles, pickups, enemies).

  • static T Get<T>(T prefab, Vector3 position, Quaternion rotation)
  • static GameObject Get(GameObject prefab, Vector3 position, Quaternion rotation)
  • static void Release(GameObject instance)

StatusEffects : MonoBehaviour Core/StatusEffects.cs

Burn, Freeze, Weakness and Frailty. Lives next to a Damageable. Movement scripts read SpeedMultiplier / IsFrozen, damage dealers read OutgoingDamageMultiplier and the Damageable reads IncomingDamageMultiplier.

  • void ClearAll()
  • event Action<bool> FrozenChanged

TargetRegistry Core/TargetRegistry.cs

Keeps track of every living Targetable so aim assist doesn't need physics queries.

  • static bool AnyHostile(Team attackerTeam)

Targetable : MonoBehaviour Core/Targetable.cs

Marks an object as a valid target for auto aim (hero gun, companions, chain lightning...). Registered in the TargetRegistry while enabled. Dead targets stay registered but are skipped (IsValid), so a character that is revived without being disabled (the hero after a respawn) is a target again.

TopDownCamera : MonoBehaviour Core/TopDownCamera.cs

Fixed angle follow camera with screen shake. Movement input is relative to the world, not the camera.

  • static void ShakeMain(float duration, float intensity)
  • void Shake(float duration, float intensity)
  • void SnapToTarget()

VfxPool : MonoBehaviour Core/VfxPool.cs

Pools short lived effect prefabs (hit sparks, explosions, lightning bolts). Instances are recycled automatically after their lifetime.

Active Core/VfxPool.cs

Enemies

BasicEnemyDronePower : MonoBehaviour Enemies/BasicEnemyDronePower.cs

Glow of the Basic Enemy Drone: 1 = awake, 0 = off (animated by its Idle and Death clips).

BouncerBehaviour : EnemyBehaviour Enemies/BouncerBehaviour.cs

Moves in straight lines and bounces off the edges of the arena (NavMesh borders), hurting what it touches.

  • override void Tick(float dt)

ContactDamage : MonoBehaviour Enemies/ContactDamage.cs

Hurts hostile targets that touch this enemy (saw, landing jumper). One hit per cooldown.

ElementalHit Enemies/ElementalHit.cs

Status effect applied by an elemental enemy attack when it deals damage: Fire burns, Ice slows (and freezes if it lasts), Weakness lowers the damage dealt, Frailty raises the damage taken and Thunder chains to the allies close to the target.

  • void Apply(Damageable target, Element element, int damage, Team team, GameObject instigator, UnityEngine.Object source)
  • static bool Landed(DamageResult result)

EnemyAI : MonoBehaviour Enemies/EnemyAI.cs

Enemy brain: chases the closest hero-team target (hero or companion) and attacks in melee or with projectiles. Reacts to hits (stagger + knockback), freeze/slow and dies. An EnemyBehaviour on the same object replaces the chase/attack logic (wandering shooters, turrets, jumpers...). Optional animator parameters: Speed (float), Attack, Hit, Death (triggers).

  • void SetTrigger(string parameter)
  • void Spawn(Vector3 position)
  • void Face(Vector3 direction)
  • void Face(Transform part, Vector3 direction)
  • Targetable FindTarget()
  • void SetWindup(bool active)
  • void PulseVisual(float progress)
  • void PlayAttackAudio()
  • event Action<EnemyAI> Died

EnemyBehaviour : MonoBehaviour Enemies/EnemyBehaviour.cs

Replaces the default chase/attack logic of EnemyAI. EnemyAI keeps health, status effects, knockback, death and pooling, and calls Tick every frame while the enemy is alive and not staggered.

  • void Restart()
  • abstract void Tick(float deltaTime)
  • virtual void OnDamaged(DamageInfo info)
  • virtual void OnDied(DamageInfo info)

EnemyGun : MonoBehaviour Enemies/EnemyGun.cs

A muzzle of an enemy. Fires a straight (or homing) projectile or a lobbed one, along its forward direction or at the target. Behaviours fire all their guns at once, so a ring of guns makes a radial pattern.

  • void Fire(Targetable target, int damage, GameObject owner)

EnemySpawner : MonoBehaviour Enemies/EnemySpawner.cs

Keeps a number of enemies alive around the arena, in waves. Enemies are pooled.

Entry Enemies/EnemySpawner.cs

  • void SetActive(bool value)
  • EnemyAI SpawnOne()
  • event Action<int> WaveStarted

HazardTrail : MonoBehaviour Enemies/HazardTrail.cs

Leaves hazard zones on the ground behind a moving enemy (acid trail).

HazardZone : MonoBehaviour Enemies/HazardZone.cs

Area on the ground (fire field, acid) that hurts hostile targets standing in it for a while. Spawned from the pool by bombs and trails.

  • static HazardZone Spawn(HazardZone prefab, Vector3 position, Team team, int sourceDamage, GameObject owner)

JumperBehaviour : EnemyBehaviour Enemies/JumperBehaviour.cs

Jumps from point to point in a high arc. Can't be hit in the air, hurts what it lands on and fires all its guns when it lands.

  • override void Tick(float dt)
  • override void OnDied(DamageInfo info)

LungeMeleeBehaviour : EnemyBehaviour Enemies/LungeMeleeBehaviour.cs

Melee enemy: walks to the target and, inside attackDistance, attacks with a MeleeHitbox. The attack can push the enemy forward (lunge).

  • override void Tick(float dt)
  • override void OnDied(DamageInfo info)

ShockTowerBehaviour : EnemyBehaviour Enemies/ShockTowerBehaviour.cs

Stationary tower: charges for a few seconds, shows the area on the ground and then shocks every hostile target inside the radius.

  • override void Tick(float dt)
  • override void OnDied(DamageInfo info)

ShooterBehaviour : EnemyBehaviour Enemies/ShooterBehaviour.cs

Enemy that moves (wanders, holds a position, walks to the target or runs away) and every few seconds stops to attack: it plays a telegraph and fires all its EnemyGuns at the shot times of the attack.

  • override void Tick(float dt)
  • override void OnDamaged(DamageInfo info)
  • override void OnDied(DamageInfo info)

SpawnOnDeath : MonoBehaviour Enemies/SpawnOnDeath.cs

Spawns smaller enemies around this one when it dies (Spider Mother).

TrainingDummy : MonoBehaviour Enemies/TrainingDummy.cs

Target that never dies: heals back after a few seconds without damage and shows the DPS.

Hero

HeroController : MonoBehaviour Hero/HeroController.cs

Top-down hero: root motion movement, dash (double/elemental dash chips), sword and gun input, auto aim, attack lunge, hit stop, knockback, death and respawn. Works with the Hero Combat animator controller. Animation events used by the clips: EquipSword, VisualEquipSword, MeleeAttackStart, MeleeAttackEnd, SpecialAttackStart, Shoot, MakeInvulnerable, MakeVulnerable.

  • void SetCurveOverride(int hash, float value)
  • void SetInPlaceSpeed(float metersPerSecond)
  • void OnAnimationEvent(HeroAnimationEvent action)
  • bool IsShootState()
  • bool IsDashState()
  • void FaceTowards(Vector3 point)
  • void SetInvulnerable(InvulnerabilitySource source, bool value)
  • void AddForce(Vector3 force, float duration)
  • void HitStop(float intensity)
  • float HitStopDuration(float intensity)
  • void Heal(int amount)
  • void HealPercent(float percent)
  • void ReleaseControl()
  • void GainControl()
  • void OnDashStart()
  • void OnDashUpdate()
  • void OnDashEnd()
  • void ResetAttack()
  • void OnHurtStateEnter()
  • void OnSpecialRecover()
  • void FreeAttackDirection()
  • void LockAttackDirection()
  • void EquipSword()
  • void VisualEquipSword()
  • void MeleeAttackEnd()
  • void SpecialAttackStart()
  • void Shoot()
  • void MakeInvulnerable()
  • void MakeVulnerable()
  • event Action Died
  • event Action Revived
  • event Action<float> DashCooldownStarted
  • event Action<int> Overhealed

HeroGun : MonoBehaviour Hero/HeroGun.cs

Hero gun: ammo, firing patterns (normal, shotgun, machine gun, triple shot, multi shot) and hit resolution of every bullet (critical, headshot, plasma elements, ricochet, pierce, split...). Bullets are fired by the "Shoot" animation event through HeroController.

  • void RecalculateCapacity()
  • void Refill()
  • void AddAmmo(int amount)
  • void EmptyAmmo()
  • Targetable FindTarget()
  • bool Fire()
  • bool CanBounce(HeroProjectile p)
  • bool ResolveHit(HeroProjectile p, Damageable target, Vector3 point, out bool headshot)
  • event Action<int, int> AmmoChanged
  • event Action<int> BulletsFired

HeroInput : MonoBehaviour Hero/HeroInput.cs

  • void ReleaseControl()
  • void GainControl()
  • void ClearBuffered()
  • void PressAttack()
  • void PressShoot()
  • void PressDash()
  • event System.Action PausePressed

HeroMelee : MonoBehaviour Hero/HeroMelee.cs

Sword combat: 3 hit combo, charged special attacks (Charging Core chip), blade modifier chips, hit stop and camera shake. Driven by the animator (state behaviours + animation events).

  • void OnOwnerDamaged()
  • void BeginComboStep(int slashIndex, float intensity, float multiplier)
  • void ActivateComboSlash(int slashIndex)
  • void EndComboStep(int slashIndex)
  • void BeginSpecial(int specialIndex, float intensity, float multiplier)
  • void ActivateSpecial(int specialIndex, int vfxIndex)
  • void EndSpecial(int specialIndex)
  • void SwingStart()
  • void SwingEnd()
  • void SpecialStart()
  • void ShowSwordInHand(bool inHand)
  • void DeactivateAllEffects()
  • void ResetCharges()

HeroProgression : MonoBehaviour Hero/HeroProgression.cs

Two progressions: - EXP: raises the hero level (base attributes from HeroStatsTable). - Skill EXP: every threshold reached grants a skill pick (shown by the SkillSelectionPanel), up to the skill limit of the run.

  • void AddExp(float amount, float skillAmount)
  • void PickSkill(SkillId id)
  • void PickSkill(SkillDefinition def)
  • void SkipSkillPick()
  • void ResetRun()
  • event Action<float, float> ExpChanged
  • event Action<int> LeveledUp
  • event Action<float, float, float> SkillExpChanged
  • event Action<int> SkillPickAvailable

HeroStats : MonoBehaviour Hero/HeroStats.cs

Final hero attributes = per-level base values (HeroStatsTable) modified by skills and chips. Also rolls damage (critical hits) for every hero attack.

  • int FractionOfDamage(float fraction)
  • void SetLevel(int newLevel)
  • event Action StatsChanged

HeroStatsDefaults Hero/HeroStatsDefaults.cs

Default per-level values.

HeroStatsTable : ScriptableObject Hero/HeroStatsTable.cs

Per-level base attributes and EXP curves. Index 0 = level 1. Create with Assets > Create > Zeuk Games > Cyber Combat Kit > Hero Stats Table (filled with the default values).

  • int MaxHealthAt(int level)
  • int SpeedAt(int level)
  • int AttackSpeedAt(int level)
  • int DamageAt(int level)
  • int CritChanceAt(int level)
  • int CritDamageAt(int level)
  • float ExpToNextLevel(int level)
  • float SkillExpThreshold(int skillsPicked)

StatModifiers Hero/StatModifiers.cs

Bag of modifiers filled by skills and chips every time the hero stats are recalculated. Multipliers start at 1, additive values start at 0.

IStatContributor Hero/StatModifiers.cs

Implemented by systems that change hero attributes (skills, chips).

  • void Reset()

HeroAnimationTiming : HeroStateBehaviour Hero/StateMachine/HeroAnimationTiming.cs

Timing of a hero state whose clip has no events or curves of its own: fires the combat events at normalized times, gives the movement curves and moves clips made in place. Written by the Hero Animations window.

TimedEvent Hero/StateMachine/HeroAnimationTiming.cs

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroComboAttackSMB : HeroStateBehaviour Hero/StateMachine/HeroComboAttackSMB.cs

One step of the sword combo: sets damage values and shows the slash at effectStartTime.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroDashSMB : HeroStateBehaviour Hero/StateMachine/HeroDashSMB.cs

Dash state: invulnerability, passing through enemies and elemental dash chips.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroHurtSMB : HeroStateBehaviour Hero/StateMachine/HeroHurtSMB.cs

Hurt state: gives a short armor window so consecutive hits don't lock the hero in the hurt animation.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroInvulnerableSMB : HeroStateBehaviour Hero/StateMachine/HeroInvulnerableSMB.cs

The hero can't be damaged while in this state (dodge, death).

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroRecoverSMB : HeroStateBehaviour Hero/StateMachine/HeroRecoverSMB.cs

End of the special attack chain: removes the special/dash protection.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroResetAttackSMB : HeroStateBehaviour Hero/StateMachine/HeroResetAttackSMB.cs

Clears pending attack / dash / shoot requests when the state starts (and optionally ends).

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroSpawnSMB : HeroStateBehaviour Hero/StateMachine/HeroSpawnSMB.cs

Respawn state: the hero is protected until the animation ends.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroSpecialAttackSMB : HeroStateBehaviour Hero/StateMachine/HeroSpecialAttackSMB.cs

Charged special attack (Charging Core chip). Consumes a charge and activates the special slash/area.

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)

HeroStateBehaviour : StateMachineBehaviour Hero/StateMachine/HeroStateBehaviour.cs

Base for the hero animator state behaviours: caches the HeroController.

SetNormalizedTimeSMB : StateMachineBehaviour Hero/StateMachine/SetNormalizedTimeSMB.cs

Writes the normalized time of the state into a float parameter (used by transitions).

  • override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
  • override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
Pickups

LootDropper : MonoBehaviour Pickups/LootDropper.cs

Drops health, ammo and EXP orbs when the Damageable dies. Drop chances get the hero bonuses (Heal Boost skill, drop chips) and ammo is more likely when the gun is empty.

Pickup : MonoBehaviour Pickups/Pickup.cs

Health / ammo / EXP drop. Pops out of the enemy in an arc, then can be collected. EXP orbs fly to the hero automatically.

  • void Drop(Vector3 position)

PickupSettings : MonoBehaviour Pickups/PickupSettings.cs

Default pickup prefabs used by every LootDropper in the scene.

Skills

HeroAura : MonoBehaviour Skills/HeroAura.cs

Elemental aura skills. Damages and applies the element to every enemy inside the radius, ticking faster with higher attack speed.

  • void SetAura(SkillId id, int newLevel)
  • void Clear()

HeroSkills : MonoBehaviour, IStatContributor Skills/HeroSkills.cs

Skills picked on level up. Stores levels, applies stat effects and exposes flags used by the gun, the aura and the progression.

  • int Level(SkillDefinition def)
  • void CollectEffects(List<(BoostEffect, int)
  • void AddShieldCharges(int charges)
  • int Level(SkillId id)
  • bool Has(SkillId id)
  • static float AuraScale(int level)
  • static float AuraDamage(SkillId aura, int level)
  • static float IceAuraSlow(int level)
  • static float ThunderAuraChain(int level)
  • static float WeaknessAuraReduction(int level)
  • static float FrailtyAuraMultiplier(int level)
  • static bool IsAura(SkillId id)
  • static bool RequiresGun(SkillId id)
  • void Contribute(StatModifiers m, float lost)
  • bool IsAvailable(SkillDefinition def)
  • void GetOffers(List<SkillDefinition> result, int count)
  • void Acquire(SkillDefinition def)
  • void Acquire(SkillId id)
  • void ResetSkills()
  • event Action<SkillId, int> SkillAcquired
  • event Action SkillsReset

SkillLevelText Skills/SkillDatabase.cs

SkillDefinition Skills/SkillDatabase.cs

SkillDatabase : ScriptableObject Skills/SkillDatabase.cs

Names, icons, texts and pick rules of every skill. Effects live in HeroSkills.

  • SkillLevelText TextForLevel(int level)
  • SkillDefinition GetCustom(string key)
  • SkillDefinition Get(SkillId id)
UI

Billboard : MonoBehaviour UI/Billboard.cs

Keeps world space texts/canvases facing the camera.

ChipLoadoutPanel : MonoBehaviour UI/ChipLoadoutPanel.cs

Equip chips at runtime: one dropdown per slot (chip type) plus one for the level. The rows are set in the Combat Manager prefab, the options are filled automatically.

SlotRow UI/ChipLoadoutPanel.cs

  • void Refresh()
  • void Toggle()
  • void SetOpen(bool open)

CombatManager : MonoBehaviour UI/CombatManager.cs

Scene glue: respawns the hero, opens the pause/chip/companion panels and handles the debug shortcuts. Shortcuts: Esc = pause/help, Tab = chips panel, C = companion. Debug tools (Editor and development builds only): F1 = +EXP, F2 = skill pick, F3 = reset run, F4 = mobile controls.

  • void TogglePause()
  • void ToggleChips()
  • void ToggleCompanions()
  • void ToggleCompanionsFromPause()
  • void GiveExp()
  • void GiveSkillPick()
  • void ResetRun()
  • void ToggleChipsFromPause()
  • void CycleMobileControls()
  • void Resume()
  • void QuitApplication()

ComboCounter : MonoBehaviour UI/ComboCounter.cs

"x23" combo counter: every hero hit adds 1, getting hurt or 5 seconds without hitting resets it. The text shakes harder with bigger combos and shrinks while the timer runs out.

  • void ResetCombo()

CompanionHUD : MonoBehaviour UI/CompanionHUD.cs

HUD card of the equipped companion: icon, name, level, health and stats (CompanionStats). Hidden when there is no companion. Builds its own UI under this RectTransform.

CompanionSelectionPanel : MonoBehaviour UI/CompanionSelectionPanel.cs

Lists the companions of a CompanionSelector (plus "None") as buttons created from a template. Picking one spawns it and closes the panel. The game is paused while the panel is open. Next to the list, the stats of the equipped companion (CompanionStats) with free + buttons.

StatRow UI/CompanionSelectionPanel.cs

  • void Toggle()
  • void SetOpen(bool open)

DamagePopups : MonoBehaviour UI/DamagePopups.cs

Floating damage numbers for every damageable (critical, headshot, elements, heal, miss, block). Texts are pooled world-space TextMeshPro objects created at runtime (no prefab needed).

Popup UI/DamagePopups.cs

EnemyTestPanel : MonoBehaviour UI/EnemyTestPanel.cs

Demo panel to try the enemies: click an enemy to spawn it next to the hero, tick the ones used by the waves, turn the waves on/off and clear the arena. Opens with E or the ENEMIES button. Builds its own UI.

Group UI/EnemyTestPanel.cs

  • void Toggle()
  • void SetOpen(bool open)
  • void SpawnNearHero(EnemyAI prefab)
  • void ClearEnemies()
  • void SetWaves(bool on)

HealthBarOverlay : MonoBehaviour UI/HealthBarOverlay.cs

Draws the health bars of every HealthBarTarget on a screen space canvas. Bars are simple UI images created at runtime.

Bar UI/HealthBarOverlay.cs

  • static void Register(HealthBarTarget t)
  • static void Unregister(HealthBarTarget t)

HealthBarTarget : MonoBehaviour UI/HealthBarTarget.cs

Shows a small health bar above this character (drawn by the HealthBarOverlay in the HUD).

HeroHUD : MonoBehaviour UI/HeroHUD.cs

Screen HUD: health, EXP, skill EXP, level, ammo, dash cooldown, sword charges and skills picked.

MobileControls : MonoBehaviour UI/MobileControls.cs

Shows the on-screen joystick and buttons (Input System OnScreenStick / OnScreenButton) on touch devices, or always/never.

  • void Apply()
  • void CycleMode()
  • void SetVisible(bool visible)

SkillCard : MonoBehaviour UI/SkillCard.cs

One option of the level up panel.

  • void Show(SkillDefinition def, int nextLevel, int index, Action<SkillDefinition> picked)
  • void Hide()

SkillSelectionPanel : MonoBehaviour UI/SkillSelectionPanel.cs

Opens when the hero has a skill pick: pauses the game and shows random skill options. Options can be picked with the mouse/touch, gamepad (UI navigation) or the 1/2/3 keys.

StatusEffectBar : MonoBehaviour UI/StatusEffectBar.cs

HUD row with the status effects of the hero (or any StatusEffects): burn, slow / frozen, weakness and frailty, each with its icon, what it does and a bar with the time left. Builds its own UI under this RectTransform.

Badge UI/StatusEffectBar.cs

UIBar : MonoBehaviour UI/UIBar.cs

Filled image bar with optional text and a delayed "damage" trail.

Weapons

HeroProjectile : MonoBehaviour Weapons/HeroProjectile.cs

Hero bullet. Moves with sphere casts and asks the HeroGun to resolve every hit, so all gun skills (pierce, ricochet, wall bounce, split shot, headshot...) are computed in one place.

  • void Launch(HeroGun owner, Vector3 dir)
  • void Redirect(Vector3 newDirection, Damageable ignore)

LobProjectile : MonoBehaviour Weapons/LobProjectile.cs

Ballistic projectile (bombs, goo): flies in an arc to a point and explodes when it touches the ground or a target, damaging every hostile target in the explosion radius. Can leave a hazard on the ground.

  • static LobProjectile Spawn(LobProjectile prefab, Vector3 position, Vector3 target, Team team, int damage, GameObject owner)
  • void Launch(Vector3 target, Team team, int dmg, GameObject owner)

MeleeHitbox : MonoBehaviour Weapons/MeleeHitbox.cs

Sphere based melee hit detection. While a swing is active, every attack point is checked each physics step and each target can only be hit once per swing. Damage is built by the owner through DamageProvider.

AttackPoint Weapons/MeleeHitbox.cs

  • void BeginSwing()
  • void EndSwing()
  • void BeginSpecial()
  • bool TryHit(Collider col)
  • bool ApplyHit(Damageable target, Vector3 point)
  • event Action<Damageable, DamageInfo, DamageResult> Hit
  • event Action<SimpleProjectile> Reflected

SimpleProjectile : MonoBehaviour Weapons/SimpleProjectile.cs

Straight projectile used by enemies and companions. Uses sphere casts (no rigidbody needed) and can be reflected by the hero sword (Reflector Blade) or the Knight companion.

  • static SimpleProjectile Spawn(SimpleProjectile prefab, Vector3 position, Vector3 direction, Team team, int damage, GameObject owner)
  • void FixHeight(float height, float duration)
  • void SetHomingTarget(Targetable target)
  • void Launch(Vector3 dir, Team team, int dmg, GameObject owner)
  • void Reflect(Team newTeam, GameObject newOwner, int newDamage)

SlashEffect : MonoBehaviour Weapons/SlashEffect.cs

Visual slash (mesh + Animation) that turns itself off when the animation ends. When areaRadius > 0 it also damages everything inside the radius through the owner hitbox (used by the charged special attacks).

  • void Activate()
  • void Deactivate()

More code recipes #

A new boost in code

  1. Add a value to SkillId, before Custom (1000).
  2. Add the effect in HeroSkills.Contribute, or a property you read where needed.
  3. An instant effect goes in the switch of HeroSkills.Acquire.
  4. If it needs the gun, add it to HeroSkills.RequiresGun.
  5. Add the entry in Data/Skill Database.asset.

Prefer the Boost and Chip Creator when data effects are enough.

A new chip in code

  1. Add the value at the end of ChipType, and handle it in SlotOf. The enum is saved as a number, so inserting in the middle shifts the others.
  2. Fill ChipCatalog: DisplayName, Description and values.
  3. Add the effect in HeroChips.Contribute, HeroGun, HeroMelee or HeroController.

The Chip Library and the chips panel pick it up by themselves.

A new data effect type

  1. Add a value to BoostEffectType in the right range: 0-99 attribute, 100-199 on hit, 200-299 on kill, 300 over time, 400+ instant.
  2. In BoostEffect: ValueLabel, Describe and, for an attribute, Contribute.
  3. In BoostEffectRunner: OnDamage, OnKilled, Tick or ApplyInstant.
  4. UsesChance, UsesSource, UsesDuration, UsesVfx and HasValue decide the fields shown.

A new sound

  1. Add a value to SoundId, in the category range.
  2. Open the Sound Library inspector: it creates the entry. Write the description.
  3. On the object: AudioSource + RandomAudio, or call SoundLibrary.PlayAt.

Pitfalls #

  • Pools keep values. Projectiles, pickups and enemies come back with the values of their last life. Reset in OnEnable, OnRestart or Launch. Mark per launch, not per object: SimpleProjectile.LaunchCount exists for this.
  • Enums are saved as numbers. Don't insert in the middle of ChipType, SkillId, SoundId or BoostEffectType without updating the assets.
  • Hit stop uses Animator.speed. Don't use Time.timeScale, which belongs to the menus. Things that must run during a pause use unscaled time.
  • TargetRegistry takes the attacker's team. TargetRegistry.Closest(pos, Team.Hero) returns enemies. The wrong team returns the opposite list.
  • Don't edit the default controller. Hero Combat (Default).controller is the backup.
  • Hero clips have no curves or events by default. Read curves through HeroController, which knows the overrides from HeroAnimationTiming.
  • A destroyed Unity object compares equal to null. To detect a changed reference, use ReferenceEquals.
  • Test the real effect. To check a companion hit, filter CombatEvents by kind and instigator.

Animator #

Characters/Hero/Animations/Hero Combat.controller has one layer. The default state is Respawn. Clips are Humanoid, so they play on any humanoid character.

  • Sub-machines: LocomotionSM, AirborneSM, LandingSM, MeleeCombatSM (HeroCombo1-3), Specials, Attack (Shoot, MachineGunStart, MachineGunLoop, MachineGunEnd).
  • Root states: Hurt, Death, Respawn, Dodge, Dash.
  • Tags: BlockInput (Hurt, Death, Respawn), Attack, Shooting, Idle, Landing.

Parameters: VerticalSpeed, ForwardSpeed, AirborneVerticalSpeed, Grounded, InputDetected, MeleeAttack, Hurt, Death, HurtFromX, HurtFromY, StateTime, FootFall, Shoot, ShootPressed, ASPD, ASPDGun, Dodge, WalkSpeed, HasCombo2, HasCombo3, HitTank, CycleOffset, Shooted, Dash, DashBoost, MeleeBoost, ChargeLevel, CurrentCharge, SteelBody, WalkingAttackWeight.

State behaviourWhat it does
HeroAnimationTimingFires the combat events at normalized times and gives the curves, so clips need neither.
HeroComboAttackSMBOne combo step: damage values and slash.
HeroSpecialAttackSMBA charged special.
HeroDashSMBInvulnerability, passing through enemies, elemental dash.
HeroHurtSMBShort armor window.
HeroInvulnerableSMBNo damage in this state (dodge, death).
HeroSpawnSMBProtected during respawn.
HeroRecoverSMBEnds the special chain.
HeroResetAttackSMBClears pending requests.
SetNormalizedTimeSMBWrites StateTime, used by transitions.

Animation events a clip can send: EquipSword, VisualEquipSword, MeleeAttackStart, MeleeAttackEnd, SpecialAttackStart, Shoot, MakeInvulnerable, MakeVulnerable.

Enemies and companions are driven by code, and their animator is optional.

CharacterParameters used when present
Enemy (EnemyAI)Speed (float), Attack, Hit, Death (triggers)
Companion (CompanionController)IsMoving (bool), Attack, Hit, Dodge, Deflect, Death (triggers)

Part 6. Reference

Component reference #

Every public field of the runtime, read from the scripts. Default is the value in code. A prefab can have another value, and the prefab is what counts in the game. An empty description means the name says it all or the field is explained in the chapter of that system.

Audio (12 fields)

RandomAudio Audio/RandomAudio.cs

FieldTypeDefaultDescription
soundSoundIdSound of the Sound Library played here (Tools > Zeuk Games > Cyber Combat Kit > Sound Library).
alternateSoundsSoundId[]new SoundId[0]Sounds played by index (PlayIndex 1, 2, ...); index 0 is Sound. Used by the hero dash: Fire, Ice and Thunder Dash.
clipsAudioClip[]new AudioClip[0]Optional: clips only for this object. When set, the Sound Library is not used here.
randomizePitchbooltrue
pitchRandomRangefloat0.2f
playDelayfloat

Entry Audio/SoundLibrary.cs

FieldTypeDefaultDescription
idSoundId
clipsAudioClip[]new AudioClip[0]One is picked at random each time.
volumefloat1f
descriptionstring
masterVolumefloat1f
entriesEntry[]new Entry[0]
Boosts (7 fields)

BoostEffect Boosts/BoostEffect.cs

FieldTypeDefaultDescription
typeBoostEffectType
valuesfloat[]{ 10f }Value per level (element 0 = level 1). Higher levels use the last one.
sourceBoostAttackSourceBoostAttackSource.SwordAndGunOn hit effects: attacks that trigger it.
chancefloat100fOn hit effects: chance of each hit (%).
durationfloat5fStatus effects: seconds. Explode On Kill: radius (m).
vfxGameObjectExplode On Kill: effect spawned at the explosion (scaled to the radius).
soundSoundIdExplode On Kill: sound of the Sound Library.
Chips (18 fields)

ChipDefinition Chips/ChipDefinition.cs

FieldTypeDefaultDescription
displayNamestring"New Chip"
slotChipSlotChipSlot.Body
iconSpriteOptional, for your own UI (the chips panel of the demo lists the names).
levelDescriptionsstring[]new string[0]Optional text per level (element 0 = level 1). Empty: made from the effects.
effectsList<BoostEffect>new List<BoostEffect>()

DefaultChip Chips/ChipLibrary.cs

FieldTypeDefaultDescription
typeChipType
displayNamestringEmpty = the default name.
iconSpriteOptional, for your own UI (the chips panel of the demo lists the names).
enabledbooltrueShown in the chips panel.
extraEffectsList<BoostEffect>new List<BoostEffect>()Added to the chip's own effect.

ChipLibrary Chips/ChipLibrary.cs

FieldTypeDefaultDescription
projectLibraryboolYour own copy of the library: used instead of the kit one.
defaultChipsList<DefaultChip>new List<DefaultChip>()
chipsList<ChipDefinition>new List<ChipDefinition>()

HeroChips Chips/HeroChips.cs

FieldTypeDefaultDescription
startingChipsList<EquippedChip>new List<EquippedChip>()
powerBombVfxGameObjectEffect played here.
alphaBombVfxGameObjectEffect played here.
betaBombVfxGameObjectEffect played here.
bombAudioRandomAudioSound played by this object.
Companions (79 fields)

CompanionAuraAbility Companions/CompanionAuraAbility.cs

FieldTypeDefaultDescription
elementElementElement.Ice
radiusfloat3f
intervalfloat1f
damageint3
burnDamagePerTickint2
freezeSlowfloat0.3f
freezeDurationfloat2f
weaknessReductionfloat0.3f
frailtyMultiplierfloat1.15f
boltPrefabLightningBolt
pulseVfxParticleSystemEffect played here.
pulseAudioRandomAudioSound played by this object.

CompanionController Companions/CompanionController.cs

FieldTypeDefaultDescription
displayNamestring"Companion"
iconSprite
ownerHeroControllerHero to follow. Found automatically if empty.
animatorAnimator
bodyTransformRotated towards targets (defaults to this transform).
maxDistanceFromHerofloat5fPicks a new spot near the hero when farther than this.
wanderRadiusVector2new Vector2(2f, 2.5f)
teleportDistancefloat25fTeleports next to the hero when farther than this (e.g. stuck).
turnSpeedfloat720f
knockbackOnHitbooltrueHits push the companion: one meter per point of hit intensity.
knockbackDurationfloat0.25fShortest time the companion stops after a pushing hit.
deathVfxGameObjectEffect played here.
healVfxParticleSystemEffect played here.
hitAudioRandomAudioSound played by this object.
deathAudioRandomAudioSound played by this object.
dodgeAudioRandomAudioSound played by this object.
stepAudioRandomAudioSound played by this object.
renderersRenderer[]new Renderer[0]Renderers hidden when the companion dies.

CompanionHealerAbility Companions/CompanionHealerAbility.cs

FieldTypeDefaultDescription
reserveCapacityint25Max HP stored to heal the hero.
healPerSecondint2HP healed every second while healing.
healRangefloat5f
beamLineRenderer
healingVfxParticleSystemEffect played here.
refillVfxParticleSystemEffect played here.
healAudioRandomAudioSound played by this object.
beamLoopAudioRandomAudioSound played by this object.

CompanionMeleeAbility Companions/CompanionMeleeAbility.cs

FieldTypeDefaultDescription
hitboxMeleeHitbox
damageint12
damageIntensityfloat1f
attackRangefloat1.6fDistance to the edge of the enemy to start the attack.
leashRangefloat7fOnly enemies this close to the hero are chased.
attackIntervalfloat2f
hitDelayfloat0.25fDelay between the attack trigger and the hit window.
hitWindowfloat0.35f
attackTriggerstring"Attack"
swingEffectGameObjectSlash effect shown only during the swing (its Animation, if any, is played from the start).
swingEffectDurationfloat0.35f
deflectChancefloat0.5f
deflectRadiusfloat2.5f
deflectTriggerstring"Deflect"
deflectVfxParticleSystemEffect played here.
deflectAudioRandomAudioSound played by this object.

CompanionRangedAbility Companions/CompanionRangedAbility.cs

FieldTypeDefaultDescription
projectilePrefabSimpleProjectile
muzzlesTransform[]new Transform[0]
damageint5
rangefloat12f
attackIntervalfloat1.5f
muzzleDelayfloat0.1fDelay between the shots of each muzzle in the same volley.
muzzleFlashParticleSystemEffect played here.
shootAudioRandomAudioSound played by this object.
attackTriggerstring"Attack"

CompanionSelector Companions/CompanionSelector.cs

FieldTypeDefaultDescription
heroHeroController
companionsList<CompanionController>new List<CompanionController>()Companions that can be selected.
startingCompanionint-1Index spawned at start (-1 = none).
spawnDistancefloat2.5f
spawnVfxGameObjectEffect played here.

CompanionStat Companions/CompanionStats.cs

FieldTypeDefaultDescription
namestring"Health"
unitstring"HP"Shown after the value (HP, s, per bullet...). Can be empty.
effectCompanionStatEffectCompanionStatEffect.MaxHealth
level1float100fValue at level 1.
maxLevelValuefloat1000fValue at the max level. Lower than level 1 for times (attack interval in seconds).
decimalsboolShow one decimal (seconds); otherwise the value is rounded.
levelint1

CompanionStats Companions/CompanionStats.cs

FieldTypeDefaultDescription
rolestring"Attacker"Shown under the name (Attacker, Protector, Healer...).
healthCompanionStatnew CompanionStat()
powerCompanionStatnew CompanionStat { name = "Damage", unit = "per hit", effect = CompanionStatEffect.MeleeDamage, level1 = 10f, maxLevelValue = 50f }
speedCompanionStatnew CompanionStat { name = "Attack speed", unit = "s", effect = CompanionStatEffect.MeleeAttackInterval, level1 = 2f, maxLevelValue = 1f, decimals = true }
Core (40 fields)

Damageable Core/Damageable.cs

FieldTypeDefaultDescription
teamTeamTeam.Enemy
maxHealthint100
immortalboolNever drops below 1 HP. Useful for training dummies.
isBossbool
elementElementElement.NormalElemental affinity. Attacks of the same element deal 10% damage, the weak element deals 190%.
dodgeChancefloat
damageReductionfloat
invulnerabilityAfterHitfloatSeconds of invulnerability after receiving damage.
repeatedMeleeHitWindowfloatIgnore repeated hits from the same melee weapon inside this window (seconds).
startInvulnerablebool
onDamagedUnityEvent
onDeathUnityEvent

LightningBolt Core/LightningBolt.cs

FieldTypeDefaultDescription
segmentsint10
jitterfloat0.35f
refreshRatefloat0.05f

StatusEffects Core/StatusEffects.cs

FieldTypeDefaultDescription
burnVisualGameObject
freezeVisualGameObject
frozenSolidVisualGameObject
weaknessVisualGameObject
frailtyVisualGameObject
burnAudioRandomAudioSound played by this object.
freezeAudioRandomAudioSound played by this object.
weaknessAudioRandomAudioSound played by this object.
frailtyAudioRandomAudioSound played by this object.
freezeBuildUpfloat4fSeconds slowed before the target freezes solid (only if the freeze lasts long enough).
frozenOverlayMaterialCovers every mesh of the character while frozen solid (ice shell).
frozenSolidEffectGameObjectCreated at the feet while frozen solid (ice crystals), scaled to the character height and aligned to the world.
shatterVfxGameObjectSpawned when the ice breaks.
frozenAudioRandomAudioSound played by this object.
shatterAudioRandomAudioSound played by this object.

Targetable Core/Targetable.cs

FieldTypeDefaultDescription
aimPointTransformPoint projectiles aim at. Defaults to the collider center.

TopDownCamera Core/TopDownCamera.cs

FieldTypeDefaultDescription
targetTransformFollowed object. The hero is found automatically if empty.
offsetVector3new Vector3(0f, 45f, -40f)
pivotHeightfloat1.17fHeight used as the follow pivot, so jumps/knockbacks don't move the camera vertically.
smoothTimefloat0 = snap to target.
audioListenerTransformKept on the target, so 3D sounds are heard from the hero and not from the camera height.
listenerHeightfloat1.5f

VfxPool Core/VfxPool.cs

FieldTypeDefaultDescription
instanceGameObject
prefabGameObject
releaseTimefloat
Enemies (160 fields)

BasicEnemyDronePower Enemies/BasicEnemyDronePower.cs

FieldTypeDefaultDescription
Powerfloat1

BouncerBehaviour Enemies/BouncerBehaviour.cs

FieldTypeDefaultDescription
spinSpeedfloat1690fSpins the visual around its up axis (degrees per second).
stuckTimefloat1fSeconds without moving before it picks a new random point.
wanderAreafloat10f
bounceVfxGameObjectEffect played here.
bounceAudioRandomAudioSound played by this object.

ContactDamage Enemies/ContactDamage.cs

FieldTypeDefaultDescription
radiusfloat0.8f
offsetVector3new Vector3(0f, 0.5f, 0f)
damageint0 uses the damage of the EnemyAI.
elementElementElement.Normal
knockbackfloat1f
cooldownfloat1f
hitVfxGameObjectEffect played here.
hitAudioRandomAudioSound played by this object.
elementalHitElementalHitnew ElementalHit()

ElementalHit Enemies/ElementalHit.cs

FieldTypeDefaultDescription
burnFractionfloat0.15fBurn damage per second, as a fraction of the hit damage (5 seconds).
freezeSlowfloat0.2fSpeed lost while slowed (0.2 = 80% speed).
freezeDurationfloat5fSlowed for StatusEffects.freezeBuildUp (4 s), then frozen solid for freezeSolidTime.
freezeSolidTimefloat2f
weaknessMultiplierfloat0.5fDamage dealt by the target is multiplied by this (10 seconds).
frailtyMultiplierfloat1.25fDamage received by the target is multiplied by this (10 seconds).
thunderChainFractionfloat0.3fChain damage to other targets near the hit one, as a fraction of the hit damage.
thunderChainRadiusfloat4f
thunderBoltLightningBolt

EnemyAI Enemies/EnemyAI.cs

FieldTypeDefaultDescription
attackTypeAttackTypeAttackType.Melee
detectionRangefloat25f
attackRangefloat1.8f
attackCooldownfloat1.5f
attackWindupfloat0.45fTelegraph time before the hit lands.
damageint8
attackIntensityfloat2fKnockback applied by melee hits.
attackElementElementElement.Normal
projectilePrefabSimpleProjectile
muzzleTransform
turnSpeedfloat540fDegrees per second when turning.
staggerTimefloat0.25f
knockbackStrengthfloat1fMeters pushed per point of hit intensity (0 for enemies that never move, like turrets).
deathDespawnDelayfloat1.5f
deathShrinkTimefloatThe visual shrinks during the last seconds of the despawn delay (0 = whole delay).
visualRootTransformAnimated (bob, punch, windup) without affecting the collider.
hoverAmplitudefloat0.15f
hoverSpeedfloat2.5f
deathVfxGameObjectEffect played here.
windupVfxGameObjectEffect played here.
attackAudioRandomAudioSound played by this object.
hitAudioRandomAudioSound played by this object.
deathAudioRandomAudioSound played by this object.
animatorAnimator
attackTriggerstring"Attack"
speedParameterstring"Speed"Float parameter that receives the movement speed (ignored if the controller doesn't have it).
hitTriggerstring"Hit"
deathTriggerstring"Death"

EnemyBehaviour Enemies/EnemyBehaviour.cs

FieldTypeDefaultDescription
canBeStaggeredbooltrueHits stop the enemy for EnemyAI.staggerTime. Turn off for enemies that keep acting when hit.

EnemyGun Enemies/EnemyGun.cs

FieldTypeDefaultDescription
projectileSimpleProjectile
lobProjectileLobProjectileUsed instead of the straight projectile when set.
aimAimAim.Forward
anglesfloat[]new float[0]One shot per angle (degrees, around the aim direction). Empty = one straight shot.
speedfloatProjectile speed. 0 keeps the prefab speed.
radiusfloatHit radius of the projectile. 0 keeps the prefab radius.
fixHeightboolThe projectile moves to the height of the target in fixHeightTime (for guns placed high or low).
fixHeightTimefloat0.5f
elementElementElement.Normal
targetSpreadfloatRandom offset of the target point (lobbed shots).
muzzleJitterfloatRandom sideways offset of the muzzle on each shot.
muzzleFlashParticleSystemEffect played here.
shotAudioRandomAudioSound played by this object.

Entry Enemies/EnemySpawner.cs

FieldTypeDefaultDescription
prefabEnemyAI
weightfloat1f
enemiesList<Entry>new List<Entry>()
spawnPointsTransform[]new Transform[0]Spawn points. If empty, enemies spawn on a ring around this transform.
ringRadiusfloat12f
maxAliveint6
delayBetweenSpawnsfloat0.6f
delayBetweenWavesfloat3f
minDistanceToHerofloat6fSpawns are not made closer than this to the hero.
spawnVfxGameObjectEffect played here.
spawnOnStartbooltrue

HazardTrail Enemies/HazardTrail.cs

FieldTypeDefaultDescription
zoneHazardZone
spacingfloat0.8fDistance travelled between two zones.
damageintDamage used by the zones (status strength). 0 uses the enemy damage.

HazardZone Enemies/HazardZone.cs

FieldTypeDefaultDescription
radiusfloat1.5f
durationfloat4f
tickIntervalfloat0.5f
elementElementElement.Fire
damageFractionfloatDamage per tick, as a fraction of the damage of the attack that created the zone.
elementalHitElementalHitnew ElementalHit { burnFraction = 0.1f }Status effect applied to targets inside (burn per second, weakness...).

JumperBehaviour Enemies/JumperBehaviour.cs

FieldTypeDefaultDescription
jumpIntervalfloat2.5fSeconds between jumps.
intervalRandomVector2new Vector2(0f, 1f)Random seconds added to the interval each time (min, max).
jumpHeightAnimationCurvenew AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.5f, 10f), new Keyframe(1f, 0f))Height of the visual during the jump (x = progress 0..1).
maxSpeedDistancefloat10fAir time is maxSpeedDistance / clamp(distance, 3, 7) seconds.
wanderAreafloat8fLanding points are picked around a random spot inside this radius around the spawn position.
landingRadiusVector2new Vector2(1f, 2f)Distance from that spot (min, max).
chanceNearTargetfloat0.1fChance to land next to the target instead.
jumpYawfloat45fThe jump rotates the enemy to this yaw (fixed shooting pattern).
contactFromfloat0.51fProgress of the jump after which the contact damage is active.
gunsEnemyGun[]new EnemyGun[0]
contactDamageContactDamage
takeoffVfxGameObjectEffect played here.
landingVfxGameObjectEffect played here.
targetMarkerGameObjectShown on the landing point during the jump.
jumpAudioRandomAudioSound played by this object.
landingAudioRandomAudioSound played by this object.

LungeMeleeBehaviour Enemies/LungeMeleeBehaviour.cs

FieldTypeDefaultDescription
attackDistancefloat5fStarts the attack when the target is closer than this.
cooldownfloat1fSeconds between the end of an attack and the next one.
hitboxMeleeHitbox
elementElementElement.Normal
damageIntensityfloat1f
elementalHitElementalHitnew ElementalHit()
attackDurationfloat1.7fLength of the attack.
hitWindowVector2new Vector2(0.75f, 1.08f)Seconds after the attack start where the hitbox is active (start, end).
lungeDistancefloatDistance moved forward during the attack (0 = attacks in place).
lungeWindowVector2new Vector2(0.45f, 1.1f)Seconds after the attack start where the lunge happens (start, end).
trackUntilfloat0.4fTurns to the target until this time of the attack.
attackTriggerstring"Attack"

ShockTowerBehaviour Enemies/ShockTowerBehaviour.cs

FieldTypeDefaultDescription
attackIntervalfloat4fSeconds between the end of a shock and the next charge.
intervalRandomVector2new Vector2(-1f, 1f)Random seconds added once when the tower spawns (min, max).
radiusfloat4.32f
elementElementElement.Thunder
knockbackfloat1f
elementalHitElementalHitnew ElementalHit()
attackDurationfloat3.333f
chargeTimesfloat[]{ 0f, 0.667f, 1.333f, 2f }Each charge particle plays at its time.
areaWindowVector2new Vector2(1.383f, 2.65f)
shockWindowVector2new Vector2(2.667f, 3.017f)
chargeParticlesParticleSystem[]new ParticleSystem[0]Effect played here.
chargeAudioRandomAudioSound played by this object.
areaIndicatorGameObjectArea shown on the ground before the shock (object turned on, or particles played).
areaParticlesParticleSystemEffect played here.
shockVfxGameObjectSpawned from the pool at the shock.
shockParticlesParticleSystemPlayed at the shock.
shockAudioRandomAudioSound played by this object.

ShooterBehaviour Enemies/ShooterBehaviour.cs

FieldTypeDefaultDescription
movementMovementMovement.Wander
wanderAreafloat8fWander: points are picked around a random spot inside this radius around the spawn position.
wanderRadiusVector2new Vector2(1f, 4f)Wander: distance from that spot (min, max).
chanceToTargetfloatWander: chance to walk to the target instead.
pauseAtWaypointfloatWander: seconds standing still after picking a new point.
faceTargetWhileMovingboolFace the target while moving (otherwise faces where it walks).
keepDistancefloat3fPursue: stops this far from the target (+- keepDistanceRandom).
keepDistanceRandomfloat1f
fleeDistancefloat6fFlee: runs when the target is closer than this.
fleeRadiusfloat20f
attackIntervalfloat4fSeconds between attacks.
intervalRandomVector2new Vector2(-1f, 2f)Random seconds added to the interval each time (min, max).
intervalFromAttackStartboolThe interval counts from the start of the attack (otherwise from its end).
attackWhenCloserThanfloatPursue: also attacks when the target gets closer than this (0 = off).
randomWindupVector2Extra random telegraph before the attack timeline (min, max), standing and facing the target.
attackDurationfloat1.6fLength of the attack, standing still.
shotTimesfloat[]{ 1f }Seconds after the attack start where all guns fire.
attackFacingAttackFacingAttackFacing.Target
gunsEnemyGun[]new EnemyGun[0]
attackTriggerstring"Attack"

SpawnOnDeath Enemies/SpawnOnDeath.cs

FieldTypeDefaultDescription
minionEnemyAI
minCountint1
maxCountint4
radiusfloat1.5f
delayfloat0.2f
spawnVfxGameObjectEffect played here.

TrainingDummy Enemies/TrainingDummy.cs

FieldTypeDefaultDescription
resetDelayfloat3f
dpsTextTMPro.TMP_TextOptional label showing damage per second.
visualRootTransformShakes when hit (optional).
Hero (100 fields)

HeroController Hero/HeroController.cs

FieldTypeDefaultDescription
maxForwardSpeedfloat8f
gravityfloat20f
dashIgnoreLayersLayerMaskLayers the hero passes through while dashing (e.g. Enemy).
canAttackbooltrue
dashCooldownfloat0.1fSeconds of dash cooldown (dash button overlay).
meleeAssistLayersLayerMask~0Colliders checked by the sword chase (e.g. Enemy). Everything = any hostile Damageable.
meleeFaceRadiusfloat1.5fEnemies touching this sphere (in front of the hero) are faced automatically while attacking.
meleeFaceForwardOffsetfloat0.6f
meleeChaseRangefloat10fEnemies in front of the hero up to this distance are chased.
meleeChaseSpreadInnerfloat0.3fEnemies this close (meters) to the line in front of the hero are chased, whatever the angle.
meleeChaseSpreadOuterfloat0.5fChase angle to each side: 0.5 = about 27 degrees.
meleeChaseMinDistancefloat2.5fThe hero only chases enemies farther than this.
meleeChaseSpeedfloat4fChase speed = WalkingAttackWeight curve x this value.
hitStopPerIntensityfloat0.085fHit stop duration per point of damage intensity (clamped 0.06 - 0.18s).
hurtArmorTimefloat1fSeconds after being hurt in which another hurt animation can't interrupt you.
knockbackMultiplierfloat0.5fMeters the hero is pushed per point of hit intensity (bullets, burns and auras don't push).
gunInHandGameObject
gunOnBackGameObject
swordWeaponGameObject
swordHolsteredGameObject
dashVfxParticleSystemEffect played here.
fireDashVfxParticleSystemEffect played here.
iceDashVfxParticleSystemEffect played here.
thunderDashVfxParticleSystemEffect played here.
dashAudioRandomAudioSound played by this object.
dodgeAudioRandomAudioSound played by this object.
elementalDashRadiusfloat1.3f
footstepAudioRandomAudioSound played by this object.
hurtAudioRandomAudioSound played by this object.
deathAudioRandomAudioSound played by this object.
attackVoiceAudioRandomAudioSound played by this object.
healVfxParticleSystemEffect played here.
respawnVfxParticleSystemEffect played here.
respawnAudioRandomAudioSound played by this object.

HeroGun Hero/HeroGun.cs

FieldTypeDefaultDescription
muzzleTransform
muzzleFlashParticleSystemEffect played here.
projectilePrefabHeroProjectile
boltPrefabLightningBolt
baseAmmoCapacityint40
normalBulletDamagefloat0.55f
shotgunPelletDamagefloat0.15f
machineGunBulletDamagefloat0.08f
autoAimRangefloat30f
minAimHeightfloat0.15fBullets never aim lower than this height above the hero's feet.
normalShakeVector2new Vector2(0.08f, 0.05f)
shotgunShakeVector2new Vector2(0.05f, 0.2f)
machineGunShakeVector2new Vector2(0.3f, 0.02f)

HeroInput Hero/HeroInput.cs

FieldTypeDefaultDescription
pressBufferfloat0.1fHow long (seconds) a button press stays buffered waiting to be consumed.
shootHoldThresholdfloat0.2fHolding shoot for this long counts as 'held' (machine gun).
useMouseButtonsbooltrue

HeroMelee Hero/HeroMelee.cs

FieldTypeDefaultDescription
hitboxMeleeHitbox
swordInHandGameObjectSword in the hand (shown while attacking).
swordOnBackGameObjectSword on the back (shown while idle).
comboSlashesSlashEffect[]new SlashEffect[0]One slash per combo step (HeroComboAttackSMB.slashIndex).
specialSlashesSlashEffect[]new SlashEffect[0]One slash per special attack (HeroSpecialAttackSMB.specialIndex).
specialAreasSlashEffect[]new SlashEffect[0]Area damagers of the special attacks (same indexes).
specialVfxParticleSystem[]new ParticleSystem[0]Effect played here.
specialAudioRandomAudio[]new RandomAudio[0]Sound played by this object.
chargeLevelVfxParticleSystem[]new ParticleSystem[0]Effect played here.
chargeGlowGameObject
chargeIconsGameObject[]new GameObject[0]
chargeAudioRandomAudioSound played by this object.
chargingLoopAudioRandomAudioSound played by this object.
reflectAudioRandomAudioSound played by this object.

HeroProgression Hero/HeroProgression.cs

FieldTypeDefaultDescription
levelUpVfxParticleSystemEffect played here.
levelUpAudioRandomAudioSound played by this object.

HeroStatsTable Hero/HeroStatsTable.cs

FieldTypeDefaultDescription
expfloat[](float[])HeroStatsDefaults.Exp.Clone()EXP needed to go from level N to N+1 (index = level - 1).
maxHealthint[](int[])HeroStatsDefaults.Hp.Clone()
speedint[](int[])HeroStatsDefaults.Speed.Clone()Movement speed, 100 = normal.
attackSpeedint[](int[])HeroStatsDefaults.Aspd.Clone()Attack speed, 100 = normal.
damageint[](int[])HeroStatsDefaults.Damage.Clone()
critChanceint[](int[])HeroStatsDefaults.CritChance.Clone()Critical chance in percent.
critDamageint[](int[])HeroStatsDefaults.CritDamage.Clone()Critical damage bonus in percent.
skillExpfloat[](float[])HeroStatsDefaults.SkillExp.Clone()Accumulated skill EXP needed for each skill pick (index = number of skills already picked).

HeroAnimationTiming Hero/StateMachine/HeroAnimationTiming.cs

FieldTypeDefaultDescription
timefloat
actionHeroAnimationEvent
activeboolOff when the clip carries its own animation events and curves.
repeatboolSend the events again on every loop of the clip (machine gun). Off: each event once per state.
eventsList<TimedEvent>new List<TimedEvent>()
dashBoostAnimationCurvenew AnimationCurve()
meleeBoostAnimationCurvenew AnimationCurve()
chaseWeightAnimationCurvenew AnimationCurve()
footstepsList<float>new List<float>()Normalized times of the footsteps.
inPlaceSpeedfloatForward speed (m/s) added while the state plays. 0 for clips with root motion.
locomotionboolLocomotion only: speed of the walk and run clips, used along the ForwardSpeed blend.
walkSpeedfloat2.2f
runSpeedfloat8.8f
walkThresholdfloat1.424f
runThresholdfloat8f

HeroComboAttackSMB Hero/StateMachine/HeroComboAttackSMB.cs

FieldTypeDefaultDescription
slashIndexintIndex in HeroMelee.comboSlashes (also selects the hit camera shake).
damageIntensityfloat1fHow hard this hit pushes (meters, times the Knockback Strength of the enemy). Also scales the hit stop.
damageMultiplierfloat1fMultiplier of the hero damage for this step.
effectStartTimefloat

HeroResetAttackSMB Hero/StateMachine/HeroResetAttackSMB.cs

FieldTypeDefaultDescription
onExitToobooltrue

HeroSpecialAttackSMB Hero/StateMachine/HeroSpecialAttackSMB.cs

FieldTypeDefaultDescription
specialIndexintIndex in HeroMelee.specialSlashes / specialAreas (0-3).
damageIntensityfloat1f
damageMultiplierfloat1f
effectStartTimefloat
vfxIndexintIndex in HeroMelee.specialVfx.

SetNormalizedTimeSMB Hero/StateMachine/SetNormalizedTimeSMB.cs

FieldTypeDefaultDescription
parameterstring"StateTime"
Pickups (24 fields)

LootDropper Pickups/LootDropper.cs

FieldTypeDefaultDescription
expfloat40f
skillExpfloat20f
healthDropChancefloat0.08f
ammoDropChancefloat0.35f
healthPickupPickupLeave empty to use the PickupSettings of the scene.
ammoPickupPickup
expPickupPickup

Pickup Pickups/Pickup.cs

FieldTypeDefaultDescription
typePickupType
healthPercentfloat0.10fHealth: percent of max HP (0.1 = 10%).
ammoAmountVector2Intnew Vector2Int(3, 23)Ammo: random amount (min, max).
collectRadiusfloat1.2f
lifetimefloat30f
maxDropRangefloat2f
arcHeightfloat1.5f
dropDurationfloat0.5f
groundHeightfloat0.5f
magnetDelayfloat0.6f
magnetSpeedfloat3f
collectVfxGameObjectEffect played here.
collectAudioRandomAudioSound played by this object.
amountTextTMPro.TMP_TextShows the ammo amount (optional).

PickupSettings Pickups/PickupSettings.cs

FieldTypeDefaultDescription
healthPickupPickup
ammoPickupPickup
expPickupPickup
Skills (37 fields)

HeroAura Skills/HeroAura.cs

FieldTypeDefaultDescription
auraRootTransformObject scaled by the aura level (0.35 / 0.5 / 0.65). Usually holds the visuals below.
radiusAtScaleOnefloat6fDamage radius when the aura root scale is 1.
baseTickIntervalfloat1.0667fSeconds between ticks at 100 attack speed.
fireVisualGameObject
iceVisualGameObject
thunderVisualGameObject
weaknessVisualGameObject
frailtyVisualGameObject
fireAudioRandomAudioSound played by this object.
iceAudioRandomAudioSound played by this object.
thunderAudioRandomAudioSound played by this object.
weaknessAudioRandomAudioSound played by this object.
frailtyAudioRandomAudioSound played by this object.
tickAudioRandomAudioSound played by this object.
boltPrefabLightningBolt
chainRadiusfloat5f

HeroSkills Skills/HeroSkills.cs

FieldTypeDefaultDescription
databaseSkillDatabase
shieldVisualGameObject
shieldUpAudioRandomAudioSound played by this object.
shieldHitAudioRandomAudioSound played by this object.
shieldBreakAudioRandomAudioSound played by this object.
shieldChargesPerPickint4

SkillLevelText Skills/SkillDatabase.cs

FieldTypeDefaultDescription
descriptionstring
detailsstring

SkillDefinition Skills/SkillDatabase.cs

FieldTypeDefaultDescription
idSkillId
keystringCustom boosts only: unique name used to save its level.
displayNamestring
iconSprite
maxLevelint10 = can be picked unlimited times. Otherwise the max level (1 = unique).
weightfloat1fRelative chance of being offered.
enabledbooltrue
levelsSkillLevelText[]new SkillLevelText[] { new SkillLevelText() }Text per level (index 0 = level 1). Unlimited skills use only the first entry.
requiresGunboolCustom boosts: hidden when the gun is gone (Super Charged Sword).
effectsList<BoostEffect>new List<BoostEffect>()Data driven effects. Custom boosts are made only of these; on a default boost they are added to its own effect.

SkillDatabase Skills/SkillDatabase.cs

FieldTypeDefaultDescription
optionsPerLevelUpint3How many options the level up panel shows.
baseSkillLimitint6Max skills picked per run (Exp Boost increases it).
skillsList<SkillDefinition>new List<SkillDefinition>()
UI (129 fields)

SlotRow UI/ChipLoadoutPanel.cs

FieldTypeDefaultDescription
slotChipSlot
typeDropdownTMP_Dropdown
levelDropdownTMP_Dropdown
descriptionTMP_Text
typesList<ChipType>new List<ChipType>()
customsList<ChipDefinition>new List<ChipDefinition>()
chipsHeroChips
rootGameObject
rowsList<SlotRow>new List<SlotRow>()

CombatManager UI/CombatManager.cs

FieldTypeDefaultDescription
heroHeroControllerFound automatically if empty.
respawnPointTransformWhere the hero comes back after dying. Empty = where the hero started.
respawnDelayfloat3f
pausePanelGameObject
deathPanelGameObject
chipPanelChipLoadoutPanel
companionPanelCompanionSelectionPanel
skillPanelSkillSelectionPanel
mobileControlsMobileControls
spawnerEnemySpawnerFound automatically if empty.
waveTextTMPro.TMP_Text
debugToolsbooltrueF1 to F4 and their pause menu buttons. They never work in release builds.
debugObjectsGameObject[]Objects shown only while the debug tools work.

ComboCounter UI/ComboCounter.cs

FieldTypeDefaultDescription
rootGameObject
labelGameObjectThe word next to the number. Hidden with it.
textTMPro.TMP_Text
shakeTargetRectTransform
comboTimefloat5f
fontSizefloat100f

CompanionHUD UI/CompanionHUD.cs

FieldTypeDefaultDescription
selectorCompanionSelectorFound automatically if empty.
fontTMP_FontAssetFont.
accentColorColornew Color(0.2f, 0.9f, 1f)
healthColorColornew Color(0.25f, 0.9f, 0.45f)

CompanionSelectionPanel UI/CompanionSelectionPanel.cs

FieldTypeDefaultDescription
selectorCompanionSelector
rootGameObject
listRootTransform
buttonTemplateButtonInactive button used as template. Needs an Image child named 'Icon' and a TMP text child.
selectedColorColornew Color(0.2f, 0.9f, 1f, 1f)
normalColorColornew Color(0.1f, 0.16f, 0.24f, 0.95f)
showUpgradesbooltrueWindow next to the list with the stats of the equipped companion and a free + button per stat.
fontTMP_FontAssetFont.
nextValueColorColornew Color(0.36f, 1f, 0.54f)
plusLabelTMP_Text name, level, value,
plusButton
pipsImage[]

DamagePopups UI/DamagePopups.cs

FieldTypeDefaultDescription
fontTMP_FontAssetFont.
fontSizefloat8f
lifetimefloat0.8f
riseSpeedfloat2.5f
heightOffsetfloat2f
randomSpreadfloat0.5f
alwaysOnTopbooltrueDraws the numbers over the characters and effects instead of behind them.
normalColorColorColor.white
criticalColorColornew Color(1f, 0.85f, 0.1f)
headshotColorColornew Color(1f, 0.2f, 0.2f)
heroDamageColorColornew Color(1f, 0.3f, 0.3f)
healColorColornew Color(0.3f, 1f, 0.4f)
fireColorColornew Color(1f, 0.5f, 0.1f)
iceColorColornew Color(0.4f, 0.9f, 1f)
thunderColorColornew Color(1f, 1f, 0.4f)
infoColorColornew Color(0.8f, 0.8f, 0.8f)
textTextMeshPro
agefloat
velocityVector3
colorColor
scalefloat

Group UI/EnemyTestPanel.cs

FieldTypeDefaultDescription
titlestring
enemiesList<EnemyAI>new List<EnemyAI>()
groupsList<Group>new List<Group>()
spawnerEnemySpawnerFound automatically if empty.
heroHeroControllerFound automatically if empty.
fontTMP_FontAssetFont.
toggleKeyKeyKey.E
spawnDistancefloat7f
pauseWhileOpenbooltruePauses the game while the panel is open.

HealthBarOverlay UI/HealthBarOverlay.cs

FieldTypeDefaultDescription
heightfloat9f
backgroundColorColornew Color(0f, 0f, 0f, 0.6f)
shieldColorColornew Color(0.4f, 0.8f, 1f)
rootRectTransform
fillImage
shieldImage

HealthBarTarget UI/HealthBarTarget.cs

FieldTypeDefaultDescription
offsetVector3new Vector3(0f, 2.2f, 0f)
colorColornew Color(0.9f, 0.2f, 0.2f)
widthfloat70f
hideWhenFullbooltrueOnly show after the first hit.

HeroHUD UI/HeroHUD.cs

FieldTypeDefaultDescription
heroHeroController
healthBarUIBar
expBarUIBar
skillExpBarUIBar
levelTextTMPro.TMP_Text
ammoTextTMPro.TMP_Text
skillsTextTMPro.TMP_Text
chargesTextTMPro.TMP_Text
statsTextTMPro.TMP_Text
dashCooldownOverlayImageFilled image shown over the dash button while on cooldown.

MobileControls UI/MobileControls.cs

FieldTypeDefaultDescription
modeModeMode.Auto
rootGameObject

SkillCard UI/SkillCard.cs

FieldTypeDefaultDescription
buttonButton
iconImage
titleTMPro.TMP_Text
levelTMPro.TMP_Text
descriptionTMPro.TMP_Text
detailsTMPro.TMP_Text
hotkeyTMPro.TMP_Text

SkillSelectionPanel UI/SkillSelectionPanel.cs

FieldTypeDefaultDescription
heroHeroController
rootGameObject
cardsSkillCard[]new SkillCard[0]
titleTextTMPro.TMP_Text
openAudioRandomAudioSound played by this object.
pickAudioRandomAudioSound played by this object.
inputDelayfloat0.35fSeconds of real time before the options accept clicks (avoids accidental picks while attacking).

StatusEffectBar UI/StatusEffectBar.cs

FieldTypeDefaultDescription
targetStatusEffectsFound on the hero if empty.
fontTMP_FontAssetFont.
burnIconSprite
freezeIconSprite
weaknessIconSprite
frailtyIconSprite
badgeSizeVector2new Vector2(196f, 44f)
spacingfloat8f
rootGameObject
fillRectTransform rect,
fillImageImage strip,
iconRawImage
infoTMP_Text title,
shownbool
popfloat

UIBar UI/UIBar.cs

FieldTypeDefaultDescription
fillImage
trailImageOptional second fill that catches up slowly (shows recent damage).
labelTMPro.TMP_Text
trailSpeedfloat1.5f
Weapons (64 fields)

HeroProjectile Weapons/HeroProjectile.cs

FieldTypeDefaultDescription
speedfloat30f
radiusfloat0.2f
lifetimefloat3f
hitLayersLayerMask~0Solid layers that stop (or bounce) the bullet.
bulletParticleParticleSystemEffect played here.
trailTrailRenderer
hitVfxGameObjectEffect played here.
launchAudioRandomAudioSound played by this object.
hitAudioRandomAudioSound played by this object.
headshotAudioRandomAudioSound played by this object.

LobProjectile Weapons/LobProjectile.cs

FieldTypeDefaultDescription
speedfloat15f
arcArcArc.Highest
damageint10
elementElementElement.Normal
radiusfloat0.25fHit radius of the projectile itself.
explodeOnTargetsbooltrueExplodes when it touches a target (otherwise it flies through targets and explodes on the ground).
explosionRadiusfloat2.5fDamages every target touching this sphere. 0 = only the target it hits.
knockbackfloat1f
lifetimefloat8f
hitLayersLayerMask~0Solid layers that stop the projectile.
elementalHitElementalHitnew ElementalHit()
explosionVfxGameObjectEffect played here.
targetMarkerGameObjectShown on the ground where the projectile will land.
groundHazardHazardZoneSpawned on the ground where it explodes (fire field, goo...).
launchAudioRandomAudioSound played by this object.
explosionAudioRandomAudioSound played by this object.

AttackPoint Weapons/MeleeHitbox.cs

FieldTypeDefaultDescription
rootTransform
offsetVector3
radiusfloat0.5f
attackPointsAttackPoint[]new AttackPoint[0]
hitLayersLayerMask~0Layers checked by the swing. Leave Everything if unsure (the team check filters allies).
endAfterFirstHitbool
hitVfxGameObjectEffect played here.
hitVfxHeightfloat0.6f
hitAudioRandomAudioSound played by this object.
swingAudioRandomAudioSound played by this object.
swingParticleParticleSystemEffect played here.
reflectProjectilesbool
DamageProviderFunc<Damageable, DamageInfo>
ReflectDamageProviderFunc<int>

SimpleProjectile Weapons/SimpleProjectile.cs

FieldTypeDefaultDescription
speedfloat12f
radiusfloat0.15f
lifetimefloat4f
damageint5
elementElementElement.Normal
knockbackfloat0f
canBeReflectedbooltrue
hitLayersLayerMask~0Solid layers that stop the projectile.
elementalHitElementalHitnew ElementalHit()Status effect of the element when the projectile deals damage.
homingboolTurns towards the target it was launched at.
homingTurnSpeedVector2new Vector2(0.01f, 0.6f)Turn speed (radians per second), picked between x and y on launch.
homingSpeedVector2new Vector2(0.5f, 9f)Cruise speed, picked between x and y on launch.
homingLaunchSpeedfloat8fStarts at this speed and slows down to the cruise speed.
homingLaunchDecelerationfloat3f
lifetimeVariationfloat0.25f
hitVfxGameObjectEffect played here.
launchAudioRandomAudioSound played by this object.
hitAudioRandomAudioSound played by this object.
trailTrailRenderer
reflectVfxGameObjectEffect played here.

SlashEffect Weapons/SlashEffect.cs

FieldTypeDefaultDescription
hitboxMeleeHitbox
areaRadiusfloat0 = visual only.
areaOffsetVector3
fallbackDurationfloat0.5fUsed when there is no Animation component.

DynamoBone

Bone physics for tails, hair, cloth strips and cables. There are no collisions. Chains up to about 32 bones work well. Add Component > Zeuk Games > Dynamo Bone, and drag the first bone into Root.

FieldWhat it does
RootFirst bone of the chain. It stays with the animation, and the bones below it swing.
Update RateSimulation steps per second. 0 runs one step per frame.
DampingSpeed the bones lose on each step. Low values swing for longer.
ElasticityHow strongly the bones are pulled back to the animated pose.
StiffnessHow far the bones can leave the animated pose. 1 keeps them on it.
InertiaHow much of the character movement the bones follow directly.
End LengthAdds an extra point after the last bone, as a multiple of its length.
End OffsetSame idea with a fixed offset. Used only when End Length is 0.
GravityForce on each step. Keep it small (the default is -0.002 on Y).
External ForceExtra force on each step, such as wind.
Freeze AxisKeeps the bones from moving along this axis of their parent bone.
Enable Distance CullingStops the simulation when the character is far away.
Distance ReferenceDistance is measured from here. Empty uses the main camera.
Culling DistanceDistance in meters where the simulation stops.

SetBlendWeight(float weight) fades the effect, and GetBlendWeight() reads it. The component is under the MIT License.

Prefab reference #

FolderPrefabsUse
Prefabs/HeroHeroBase of every hero. Copy it with the wizard.
Prefabs/ManagersCombat Manager, Combat Camera, Enemy SpawnerDrop in any scene.
Prefabs/CompanionsKnight Drone, Ranged Drone, Healer DroneExample companions.
Prefabs/Enemies/World 111 enemiesSee Enemies.
Prefabs/Enemies/World 210 enemiesStronger set.
Prefabs/EnemiesTraining DummyImmortal target that shows DPS.
Prefabs/ProjectilesHero, Companions, EnemiesEnemy Bullet variants: Big, Fire, Ice, Weakness, Homing Ice, Homing Thunder. Also Enemy Bomb and Enemy Goo.
Prefabs/PickupsHealth, Ammo, EXPUsed by PickupSettings.
Prefabs/VFXCombat, Chips, Status, Pickups, EnemiesEffects, including Frozen Solid, Ice Shatter, Fire Field and Acid Puddle.

Data reference #

AssetWhereWhat it holds
Skill DatabaseData/Skill Database.assetoptionsPerLevelUp (3), baseSkillLimit (6), and every boost.
Chip LibraryData/Resources/CyberCombatKit Chip Library.assetSettings of the 36 default chips and your own chips. Your copy with projectLibrary wins over the kit one.
Hero Stats TableData/Hero Stats Table.asset100 levels. See Stats and progression.
Sound LibraryAudio/Resources/CyberCombatKit Sound Library.assetMaster volume, then clips and volume for all 67 sounds.

Create new ones: Assets > Create > Zeuk Games > Cyber Combat Kit, then Sound Library, Chip, Chip Library, Hero Stats Table, Skill Database or Hero Animation Set.

Troubleshooting #

ProblemCauseSolution
The kit scripts show as missing, or the wizard doesn't openThe required packages are not installed.Tools > Zeuk Games > Cyber Combat Kit > Install Required Packages.
Pink materialsThe materials use URP shaders and the project uses another pipeline.Install Universal RP and set a URP Asset in Project Settings > Graphics, or swap the material shaders for your pipeline.
A model with a shader from another asset is pink in a clean projectIts shader is not in the project.Copy the shader too.
The hero falls through the groundNo collider, or the layers don't collide.Add a collider, and check Project Settings > Physics > Layer Collision Matrix. The Scene tab checks it.
Enemies or companions don't moveNo NavMesh, or the level changed.Bake again in the Scene tab or the Hierarchy menu.
No keyboard or gamepad inputActive Input Handling is wrong.Set "Input System Package" or "Both" in the Project tab.
Menus can't be clickedNo EventSystem, or it uses the old module.Check Setup adds it. Use Input System UI Input Module.
The game is silentThe kit ships without audio files.Add your clips in the Sound Library.
A new hero's weapon points backwardsThe model axis differs.Enable Flip in the Hero tab and create the hero again.
No boost cards after a whileThe run reached its pick limit.Normal. See Stats and progression.
F1 to F4 do nothingRelease build, or Debug Tools is off.Normal in release builds.
Ammo never dropsCapacity is 0.Normal with Super Charged Sword.
The ENEMIES button is missing in my sceneThe test panel exists only in the demo.Use EnemySpawner or your own UI.

FAQ #

Do I need to code?

No, to set up a fight, create characters, boosts, chips and effects. Yes, to add a save system, a shop or new attack types.

Can I use my own character?

Yes, any humanoid model. Drag it into the Hero tab. Weapons and effects move to the same bones.

Does it work with Built-in or HDRP?

Yes, after you swap the shaders. The kit is made for URP and its materials use URP shaders. In Built-in or HDRP they show pink until you change them.

Does it include sound?

No. Add your clips in the Sound Library. Every sound is already wired.

Is the source code included?

Yes. All C#, with separate assemblies and namespaces.

Does it work on mobile?

Yes. Touch controls are included, and this combat system runs on phones in Cyberhero Legends, our Android game. Test on your target devices too.

Does it save progress?

No. The documentation lists what to save and how to restore it.

Can I change the camera?

The kit ships a fixed-angle top-down camera. The offset is a field you can change. Enemy and aim logic works on the ground plane, so test other views.

Will updates overwrite my work?

Things you create go to Assets/My Combat Kit, outside the kit folder.

Which Unity version?

Made and tested on Unity 6000.6.

Glossary #

  • Aura: a boost that damages enemies around the hero. One per run.
  • Boost: a level up card.
  • Charge: a stored special attack, from the Charging Core chip.
  • Chip: equipment for one of 9 slots.
  • Hit stop: a short freeze of the hero animation on a sword hit.
  • Intensity: push distance of a hit, in meters.
  • Skill EXP: the bar that gives boost picks.
  • Stagger: a short stop of an enemy after a hit.
  • Telegraph: the warning before an enemy attack.
  • Wave: a group of enemies from EnemySpawner.

Known limitations #

  • Steel Body level 1 has 0% damage reduction. It only stops interruptions.
  • Item Drop Boost (the chip) and Loot Drop Boost only affect ammo, because there is no other item.
  • The Enemy Spawner prefab only brings the 11 enemies of World 1.
  • The test panel exists only in the demo scene. Set Up Scene does not add it.
  • The Healer Drone also shoots, and that damage does not grow with its stats.
  • With plasma chips, only the elemental part of a bullet carries a headshot.
  • The animator parameters VerticalSpeed, CycleOffset, HasCombo2 and HasCombo3 aren't written by any script. They stay at their default values.
  • EnemyAI fields like attackRange and attackCooldown only count without an EnemyBehaviour. All 21 enemies have one.
  • Damageable.isBoss exists, with no boss bar and no boss prefab.
  • Made for URP. Built-in and HDRP need the material shaders swapped.

Support #

Questions, bugs and requests: therealzeuk@gmail.com. Tell us your Unity version, what you did, what you expected and what happened. Open Check Setup first: it solves most setup problems.