Engines NIFE Roadmap Shatterloop Game Projects
Deprecated Saepes Mundi Other Projects Blog

Shatterloop

[P-4] Combat Notes v2

Posted May 23, 2022 by Xhin

This should be the final set of notes, that I will then begin checklisting whenever it's time work on this project (after Pets and maybe Bases get done probably).

Page 1

  • Spawning
  • Engagements
  • Weapon Types
  • Weapon Crafting
  • Archery
  • Enemy Region Differences
  • Combat Lab

    Page 2

  • Crystals Improvement

    Last Update: 8/16/2022

  • There are 8 Replies


    Spawning

    Engine Notes

  • I'm going to rewrite my entity rendering code -- it's in a pretty bad state right now. There will be a general rendering function here that's called by map.render() but isn't a direct part of it so that enemies will be able to move around outside of a turn structure and the whole thing will be a lot faster.

  • I'd also like to add a rudimentary physics engine where knocking back an enemy would knock back adjacent enemies in a domino way. This would solve some issues and would also generally look/feel better.

  • Position relative and some timing events (and a generalized polar library) would allow for animations which is kinda essential to know wtf is going on. Possibly mild particle effects. I like the idea of having animations in an ASCII roguelike - that's pretty unique.

  • Enemy health can be represented by their color, which deprecates a whole set of issues. The overall point of these engagements is to defeat enough enemies to make the nest shut off. Or to just come in and loot some corpses and exit the spawn zone.

    Spawns / Nests Basic Stuff

    The first thing I definitely want to upgrade is the spawning system, which is quite annoying at the moment and makes scout animals slightly more useless.

    Nests are fixtures that are scattered around the world that enemies spawn from. Like water colors, their generation is mathematical to cut down on rendering issues. They should be somewhat less predictable however. Using Zones might also make sense, or otherwise going through that existing endpoint. Nests will never be too close to the origin (got to give new players some time to work with the game before they hit combat), but they're not super far away either.

    If you're within a screen and a half (31 tiles) of a Nest, enemies will start spawning from it. Depending on their behavior, they might start appearing on screen on one of the edges as you get closer. If you're two and a half screens (52 tiles) away from a nest and no enemies are on screen, they'll despawn. Multiple nests can have this happen with them simultaneously.

    When enemies spawn, they can appear at any direction from the nest. The first time a spawning happens, floor tiles will get built two square radiuses from the nest so that enemies can actually pathfind to the player. This won't be perfect in more crazy terrain layouts but it should help. This shouldn't happen for flying enemy nests (they can fly over solids) or caves (they break through solids), or dungeons (they're already surrounded by floors).

    Enemies that get too far from their nest will start moving back towards it to help these systems move along. I'm not sure what the range is here yet.

    Spawning timing

  • Each nest has a "capacity" -- the maximum amount of enemies that it can have on screen at once.

  • Each nest also has a "spawn rate" -- the speed at which new enemies are created from the nest.

  • Lastly, each nest has a "final amount". Enemies will respawn when killed below capacity until the final amount has been reached.

    These properties are inherent in the enemy that spawns from that nest and can thus influence enemy difficulty and make learning patterns more valuable.

    Nests will always spawn a single enemy type, which again improves the learning factor and also improves materials acquisition. Nests and can be found with Scout animals.

    Nest Distribution

    The nest-spawning algorithm only determines that a Nest spawns there. The natural terrain surrounding the nest determines which enemy type spawns there, and this terrain system is identical to the same one that determines trapping locations.

    You can therefore use Scout animals to figure out which kind of enemy is going to spawn somewhere, provided you know the correct terrain patterns. This fits in quite well to the learning core mechanic, the terrain use mechanic, and also makes Scout animals more useful.

    Nest spawning is tied to the Tetrad you're currently on, so you can have a Nest spawn several kinds of enemies depending on which Tetrad you're actually on when the spawn event activates. To make this easier it'll probably make sense to change nest distribution based on the tetrad.

    Nest Attacking

  • You can attack Nests. If you kill them, enemies won't spawn anymore. However, attacking a nest makes all enemies swap to explicitly seeking you and increases their damage output as well.

  • May 23, 2022
    Xhin
    Sky's the limit

    Engagements

    There are three game states associated with enemies:

  • Out of Engagement -- This means you're not currently fighting any enemies. Turns proceed as they currently do -- you take a turn, then enemies take a turn. So your movement and their movement essentially moves at the same time and you can be more tactical.

  • Engagement -- Enemies move in real-time, with pauses here and there usually.

  • Flow -- Hand/Offhand weapon combinations have "Combos" attached to them. Execute these successfully and/or land a bunch of strikes in a row and you'll enter a state called Flow where enemies are paused for some amount of actions and you can wail on them to your heart's content.

    Engagements

  • Enemies have an "Awareness" property that's basically a range, a type of cardinality, and some bonuses/detractments based on different types of terrain. If you hit them with something inside their awareness, an engagement begins. Otherwise you can pot-shot them pretty effectively.

  • Enemies coming in contact with other enemies will activate them as well. This obviously has a kind of cascading effect.

  • On your combat menu, there's a button that lets you attempt to flee from an engagement. If successful, this ends the engagement but doesn't despawn the enemies (that's dependent on your distance from the Nest). Fleeing only works if there are no enemies on screen. Enemies revert back to being turn-based.

  • Nests causing enemies to despawn will also cause enemies to move out of engagement. This is a reasonably big range, and all enemies have to be off-screen as well.

    Flow

    You have a Flow meter that goes from 0 to 100. This can be increased in two ways:

  • Land three strikes in a row (with no non-hitting movements in between) and it'll go up with every subsequent strike according to that weapon's flow stat. There can maybe be a cumulative bonus attached to some weapons where striking more and more will make flow go up by more.

  • Hand/Offhand combinations have a "Combo" attached to them -- this is a random pattern of hand-attack, offhand-attack and movement around 4-7 in length with all 3 always being represented. Execute this (with all strikes being successful) and the flow meter will go up by whatever the procgen combo's flow increase is. Some are going to be better than others, or just easier to pull off. Combos should light up when you're doing them so you know where you are in the sequence. And reset when you change equipment.

  • While in flow your combo meter doesn't go up -- in fact it should be grayed-out.

  • The procgen combo will generate either Tactical Flow or Active Flow, which work a bit differently:

    When you enter Tactical Flow, all enemy movement will pause and you get to interact with them more tactically. Each movement or attack will decrease your flow meter by some amount -- these are determined by the flow stats generated by the Combo.

    With Active Flow, flow decreases in real-time, which lets you do crazier moves and keeps the action of the game alive more. The combo determines how fast flow goes down -- should generally allow for more fast moves than tactical flow.

    When you hit 0 or below it, your flow resets and the enemies move back to being in real-time.

    Flow stats are one of the rare systems in the game that can't be upgraded -- the point of this is to force the player to try out different weapon combinations to get better combos, as this increases weapons use. They can however be upgraded with magic, since magic can target everything.

  • June 14, 2022
    Xhin
    Sky's the limit

    Weapon Types

    Hand/Offhand

    You have two slots for equipment. Weapon classes are either Hand or Offhand, which determine how you use them:

  • Your "Hand" slot is the weapon you use with your mouse. You'll see a kind of preview for these kinds of attacks like you do now. These tend to be more specialized attacks.

  • Your "Offhand" slot is the weapon you use while moving into enemies, away from enemies, or side-swiping enemies. It can also be triggered by moving into specific types of terrain. These tend to be more basic attacks or defensive/movement attacks.

    Hand Weapons (mouse)

  • Sword -- These affect all enemies in an arc around you.

  • Spear -- These hit an enemy up to two spaces away from you and can also affect enemies on that line afterwards.

  • Clawarm -- These weapons are thrown into an enemy and then moves will either pull them towards you or you towards them, dealing them damage accordingly.

  • Flail -- These weapons are thrown into the ground, and then either pull them towards you or you towards them, damaging anything in the path of that.

  • Hammers -- These hit a solid tile and send damage to anything that's adjacent to a connected solid tile up to its range. Particularly useful if you're on a mountain or something.

  • Trident -- Similar to the above, but targets water rather than solids.

    Offhand weapons (movement)

  • Dagger -- Probably the easiest to understand -- you just walk into an enemy to stab them. No knockback, so you can do it over and over.

  • Axe -- If you're on a diagonal from the enemy and you make it so you're horizontally or vertically adjacent to them, it'll deal them damage. This can be done with two enemies at once.

  • Shield -- Knocks an enemy backwards 1-2 tiles by walking into them. If there's a solid in their knockback range, it deals them a massive amount of damage.

  • Acrobat Gauntlet -- Allows you to jump over an enemy (or line of enemies potentially) by walking into them. This deals them damage accordingly.

  • Grapple Glove -- Touching an enemy will grab them and throw them onto the other side of you, possibly with some knockback in that direction. Deals damage as well.

  • Spring Shoes -- Push off from a solid wall that you're adjacent to to deal damage to anything in range of you.

  • Spike Shoes -- If an enemy is on a floor tile and you're on a solid tile and you move onto it, deal it a massive amount of damage.

  • June 14, 2022
    Xhin
    Sky's the limit

    Weapon Crafting

    Instead of crafting any particular weapon individually, you instead can craft a "Hand Weapon" or an "Offhand" weapon, with the materials you use determining which kind of weapon you get.

    Hand weapons are crafted from Fiber/Hide/Wool/Bark and Rocks/Bones/Scales. The Fiber/Hide/Wool/Bark dictates the type of weapon and damage, while the Rocks/Bones/Scales dictates its range (or equivalent).

    Offhand weapons are crafted from Fiber/Hide/Wool/Bark and Rocks/Bones/Scales. The Fiber/Hide/Wool/Bark dictates the type of weapon and damage (if any), while the Fiber/Hide/Wool/Bark dictates its range (or equivalent).

    Other properties of weapons (such as stun chance) are split fairly between the two ingredients.

    There are a couple limitations, to make rarer materials more valuable:

  • Hammers, Tridents, and the Acrobat Gauntlet can only be crafted if Wool or Bark is used in the recipe. Wool or Bark additionally has a 50% chance of creating one of those.

  • June 14, 2022
    Xhin
    Sky's the limit

    Archery

    Via the Combat Lab, you can unlock Archery, which will allow you to work with Arrows. This might add a Bow key item (for enchantment possibilities), or might not.

    Bow attacks are based on the arrow. Unlike other weapons, you can select the arrow you want to use directly from the archery menu without first equipping it. This helps you see things more clearly, as arrow properties can be somewhat complex.

    Arrows are crafted from a combinaton of Leaves/Scales/Feathers and Branches/Bones.

    Arrows have a wide variety of properties:

    Dictated by Leaves/Scales/Feathers

  • Cardinality (O/D/B) -- arrows can be shot either orthogonally, diagonally, or both.

  • Range (3-10) -- a base range for floor and water tiles. Arrows will usually stop when they hit solid tiles.

  • Height (0-5) -- arrows with a better height can be shot over solids, with the amount dictating the amount of solids they can pass through.

    Dictated by Branches/Bones

  • Damage -- The amount of damage the arrow deals.

  • Secondary damage percent (20-80%) -- A percentage of the damage dealt by secondary effects. If there aren't any, this is ignored. The branches/bones dictates this.

  • Secondary effect duration (1-4) -- The number of turns secondary effects take where possible. If there aren't any, this is ignored. The branches/bones dictates this.

    Imbuing Station

    Provided you've unlocked this module, you can create special arrows by combining them with potion ingredients. This happens on an Imbuing Station.

    The way this works is you pick a potion ingredient, which will have one of the special effects attached to it. You then can turn 3 arrows of any type into 3 special arrows, which gives them a prefix and some special ability:

  • Flexible -- Flexible arrows can target individual enemies along a line rather than just shooting the first one within the range. Useful for more precise shots.

  • Knockback (1-3) -- Enemies hit by these arrows will get knocked back some amount of spaces. If moved into a solid they'll take secondary damage.

  • Winch (1-3) -- Same as knockback but pulls enemies towards you.

  • Pierce (1-3) -- Hitting an enemy will also hit this number of enemies directly behind it (if there is one) for the same amount of damage.

  • Stun percentage (20-80%) -- A percent chance of the enemy being stunned. If stunned, they will be stunned for the secondary effect duration.

  • Poison percentage (10-50%) -- A percent chance of the enemy being poisoned. If poisoned, they take secondary damage for secondary effect duration turns.

    Basic arrows can only have one special qualifier at once.

    Fletcher fixture

    A Fletcher is a fixture found in Bases or Shops that improves your arrows. Using it, you can improve any property up to the hard maximum (so like, 100% miasma percentage) on an arrow stack of any size.

    You need at least 4 arrows in order to use a Fletcher. Every time you upgrade a property, the stack loses 2 arrows. While you can create some ridiculously powerful arrows like this, it takes a lot of materials and you end up with very few arrows by the end of it.

    Metal Arrows

  • Metal arrows are an unlock that also requires the Smithy and Blast Furnace and/or Anvil to actually be useful. It should be more of a late-game thing as per the PGCS.

  • Arrows that have been modified in any or none of the above ways can be turned into metal arrows at a Smithy. This takes one metal per arrow, which gets expensive pretty quickly.

  • Metal arrows can then be combined together at a Blast Furnace (which gets around the only one type of special arrows limit) or have their properties upgraded at an Anvil (which costs precious metals rather than arrows).

  • June 14, 2022
    Xhin
    Sky's the limit

    Enemy region differences

    Cave Enemies

  • Enemies in caves are reptilian, rock-based, shadow-based or metallic.

  • They're also more spread out and harder to fight. It is however at-base harder to get them to be Aware of you because of how dark Caves are.

  • The tercos, relative difficulty and their overall awareness of you is based on the Cave level -- the lower you go, the harder they are and the more aware of you they are. This should however fit into the PGCS so you might legitimately need to go to level 10.

    I think rocks/metals are currently using a cave levels terco, fortunately.

  • Eggs extracted from them will automatically be Cyborgs.

    Dungeon Enemies

    Dungeons will occasionally spawn Portals in the bgfluid on a turn-based kind of thing.

    Each dungeon nonad has several enemies assigned to its terco, which then loops back through the PGCS so you need to enter a very specific dungeon nonad on a very specific dimension (or just the current one) in order to get the animal-extractive you need for a recipe.

    Portals will spawn enemies on a turn-based kind of thing around them. Their speed and the amount of enemies they need to create a swarm varies depending on the enemy. When the limit is reached, the enemies will all activate all at once, and this can cause activation of other enemy types via the proximity thing as well.

    Portal colors are also based on the Nest, so you can identify them a bit easier.

    Dungeon enemies will seek you as long as they're on bgfluid, and then their moves will vary. They should be quite hard to fight.

    Dungeon enemies have elements that match one of the two elements of the dungeon (with their colors also sorta matching that). If you attack them with a metal weapon or arrow that has an attacking element, you'll deal a lot more damage.

    Runestone warping is a pretty effective way of getting away from enemies -- they'll despawn once you're far enough away from their spawning portals.

    The actual portal spawn rate depends on the dungeon instance -- some are going to be harder than others so it sometimes makes sense to exit a dungeon and try a different runestone (or do the tetrad keys trick).

    Enemies in dungeons are always elemental or metallic (which I guess is also elemental now, neat!)

    Other Areas

  • Enemies don't spawn in the Quantum, Entropic or Melange Planes. They don't spawn in the Singularity. Those planes are more puzzle-focused so it's better to avoid Combat therein.

  • They're probably going to spawn in extracurricular structures in some capacity. And then also tie into the tercos. I have no idea what this will look like yet.

  • June 14, 2022
    Xhin
    Sky's the limit

    Combat Lab

    There should be a Combat Lab that aggregates these various functions:

  • Archery (might move this back to being a key item, might not)

  • Imbuing Station

  • Fletcher

  • Metal Arrows

  • Strength Station -- allows you to increase your health through increasingly harder (by PGCS standards) recipes. Need to move this to loose ends for post-PGCS work.

    Also anything else if this project changes as I work on it (which is pretty likely).

  • June 14, 2022
    Xhin
    Sky's the limit

    Crystals Improvement

  • The stronger weapon effects (like chaining, miasma, exploding hits, etc) are caused by attaching jewelry to a weapon. This gives jewelry yet another use. This probably occurs at a new fixture (unlockable via the combat lab), can only be applied to metal weapons, and has additional constraints, like the amt you can attach is a weapon property that's upgradeable and blast furnaceable.

  • This continues to make Crystals useless, so a new idea for them is to have them appear only in alt dimension caves, lower their ridiculous sell value, and make them enhance other systems like the potion one (since magical ingredients are getting removed probably).

  • July 25, 2022
    Xhin
    Sky's the limit

    Reply to: [P-4] Combat Notes v2

    Username
    Password