[...]
A simple implementation would be each weapon havinga reach value, then when attacking/defending simply compare the values anbd add the difference as a bonus/penalty to hit.
Example: Spear (reach 7) attacks longsowrd (reach 5), the result is -2 (*10) % to hit bonus.
This does produce a problem with bows, so eanged weapon would need an expection
[...]
This is low priority but your concept seems workable. I am not compelled to say Eropixel needs to work on this, but he had a similar idea earlier so I thought I'd help flesh it out. Plus I had a conceptualization of it that made muskets and bows different, which is welcome because muskets aren't in the game and they're not very justifiable if thinking about muskets and bows being equally long-rage weapons.
The hit bonus system could be basic arithmetic as above, but it can go deeper as well: ranges that overlap where some weapons need a
minimum distance from the user for peak effectiveness, and if the enemy is
closer than that distance the weapon is actually
worse. This is typically reserved for muskets, bows, and spears, while other weapons mostly behave well in very close distance though you can argue about it for the sake of balance.
For example: a spear attempts to attack a fast enemy that wants to get close. The enemy gets close so now the spear deals glancing blows (weaker damage), with higher chances to miss (zero damage). Bows would be strongly affected but the user can attack by using their arrow to stab the target like a handheld pick / dagger, giving them some ability. Muskets won't do this so they mostly miss a lot, but they would hit targets that a bow would struggle with sometimes.
The rest would be as expected. Daggers and gauntlets would work well close, though balance may sway expectation since this is a good place to give daggers a reach advantage over gauntlets since daggers are lame in this game's meta right now. Swords wouldn't work as well at fist distance but otherwise nice in a lot of distances. Axe starts seeing severe penalty to super-near enemies but mostly won't. Past that it's maces, spears, staffs, bows, and muskets so close enemies would mess with those more severely as needed for balance. At far ranges weapons that tended to do well up-close will miss often.
At the very least this is a good layer for balance-pass effects since some weapons are way more effective than others in a raw sense before skills are concerned. You can also balance skills here to make them less effective at certain ranges.