Skip to content

Conversation

@EttyKitty
Copy link
Collaborator

This is a placeholder PR, just so stuff won't get lost. I'm not sure if this whole thing will work out in the end, or if I'll have to scrap it.

Purpose

  • Make combat better (worse).
  • Refactor the unreadable code and make it even less readable.
  • Add cool new mechanics.
  • Ease future modification and additions.

Describe your changes/additions

  • Most of the enemy column targeting code in obj_enunit/Alarm_0.gml is refactored.
  • Most of the enemy related leftover code in scr_shoot is refactored (killed).
  • A bunch of code in scr_clean is refactored (WIP).
  • Most of the player related target selection and damage allocation code in scr_shoot is refactored.

Armour Piercing and Armour are reworked

  • Piercing now reduces the armour value of the target by a flat amount, for the purposes of damage calculation.
  • I adjusted it on some player and ork weapons, to test.
  • Armour reduces damage from each shot by a flat amount.

Max Kills are now Attack Count

  • This is now the amount of times the weapon attacks, no more esoteric stuff or damage spillover.
  • Still undecided on how to handle weapons with a lot of shots VS weapons with a big AoE, whenever they should be different.
  • Still undecided whenever weapons with >1 shot count should be allowed to kill more than 1 unit, or if that should be reserved for AoE.
  • I adjusted it on some player and ork weapons, to test.

Damage formula is a bit reworked

  • Universal minimum damage.
  • Damage randomization in a x0.005 - x2 range.

How enemy weapon stacks pick player columns to attack

  • There is now a logical priority queue that is built out of all player columns in range, with some randomization.

How enemy weapon stacks pick targets after picking a column

  • The enemy weapon stack will continue shooting until they run out of shots or all units in the column are dead.
  • This means, that if the enemy wanted vehicles, then if all vehicles are killed after 2 shots, the rest of the shots will target normal units.
  • Dreadnoughts now also count as vehicles for this purpose, as before they counted as infantry and were breaking the targeting.

Enemy and player vehicles are no longer made of paper

  • Huge armour and HP bonuses (to the enemy, for the most part), as a test.
  • Huge resistance cut. Please, stop using this everywhere.

Weapon reload mechanic (broken now, due to weapon stack constructor introduction)

  • A new property on weapons - reload (wip name), means how many turns it'll take to reload the weapon.
  • When a unit (weapon stack) run out of ammo, it'll spend the reload amount of time to reload it to full capacity.
  • Very small amount of enemy weapons and player weapons have this for now, as I was just testing it.
  • Yes, it works for both the player and the enemy.
  • Vehicles have x2 ammo (wip).
  • Weapons can be non-reloadable or have infinite ammo.

Global enemy accuracy multipliers per faction

  • Enemies have their shot count (weapon count * shot count stat of the weapon) multiplied by a global "accuracy mod".
  • Works for both melee and ranged.
  • Different factions have different melee and ranged accuracy.
  • The main reason, is to alleviate the insane enemy counts, that wipe out player units.
  • It kinda mirrors the old doom variable, that was nerfing a bunch of shit for enemies, depending on the faction.

Item rebalance P2

  • Most weapons, armour and gear are rebalanced to comply with the new system.
  • DW and TT are used as a reference.

What can/needs to be improved/changed

  • Allow vehicles to shoot in melee.
  • Refactor how player columns pick their targets, and fix the idiota "let's all shoot corpses" bug.
  • Refactor enemy and player columns.
  • Refactor enemy and player stacks. Parallel arrays are hell.
  • Generally move more shit into structs and constructors, where applicable.
  • Refactor the scr_clean abomination. It's became very big and inefficient.
  • Transfer the rest of the enemy weapon and armour, player weapon and armour, values to the new system.
  • Adjust player and enemy HP values, if needed.
  • Adjust enemy counts, if needed.

Testing done

  • Still doing a lot.

Related things and/or additional context

@github-actions github-actions bot added Area: JSON Changes to external JSON files or their under-the-hood functionality Type: CI Continuous Integration changes Area: Sprites Changes to sprites/images or their under-the-hood functionality labels Apr 22, 2025
@EttyKitty EttyKitty changed the base branch from feat/combat-overhaul to main April 28, 2025 23:30
@EttyKitty EttyKitty dismissed coderabbitai[bot]’s stale review April 28, 2025 23:30

The base branch was changed.

@github-actions github-actions bot removed Area: JSON Changes to external JSON files or their under-the-hood functionality Type: CI Continuous Integration changes labels Apr 28, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 28, 2025
@EttyKitty EttyKitty changed the title feat: Ground Combat Refactor/Rework P2 feat: Ground Combat 2.0 May 13, 2025
@github-actions
Copy link
Contributor

This PR is marked as stale, because it has been open for 7 days with no activity.

@github-actions github-actions bot added the Status: Stale No activity for more than a week label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Sprites Changes to sprites/images or their under-the-hood functionality Category: Balance Affects game balance Size: Warning Status: Stale No activity for more than a week Type: Docs Changes to documentation files Type: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants