Hola mi gente!.

So i finally decided to scrap my plans for doing large scale non combat systems for a bit on my game and decided to move onto some combat mechanics after being bugged for some time now.

Anyways how do most people come up with their formulas? cause as it stands ive got nothing especially with how i want to do my system. im using the library by Spuzzum for damage overlaying and it overlays to a max of 9999. Which supported more or less what i wanted to do.

I always planned for my game to never exceed certain boundaries (well not never just pretty much unlikely) so the problem that is hitting me now is how would i make an attack system that would cater to a never exceeding 9999 damage and also catering to a system where players train themselfs instead of stat points etc.

for the sake of it being here this is the code ive got that handles the stuff (without formulas as i dont have them)

set name = "Attack"
for(var/mob/M in get_step(usr,usr.dir))
if(!M || !(M in get_step(usr,usr.dir))) break
if(M.attackable && !src.busy && !pkzone && src.stamina >= 0)
src.busy = 1
var/damage = calcdmg(M)

var/ndmg = 0
ndmg = ndmg //no formula for fist fighting :(
var/wdmg = round(weapon.wepcalcdmg()) //each weapon has a damage calculation of its own.
ndmg = wdmg
return max(0, ndmg)
CRASH("ERROR CODE: B101A. Type Error Undefined Weapon. Report to forum with weapon name.")

icon_state = "invent"
islot = "weapon"
var/damage = 0
var/speed = 1

. = round((damage*usr.str)/damage)


icon = 'Icons/Weapons/scythe.dmi'
refe = /obj/iconholders/weapons/testscythe
code = 3
rarity = "Legendary"
damage = 50

As you can see by that snippet(s). the weapons have a basic damage of their own to begin with and each weapons damage will be composed from a number of variables which include.

Str, Agi, Int, Weapon Skill(Sword,Scythe,Gun etc etc), Flame power(KHR Game so yea flame activated has a form of mod).

I really have no idea where to start. Anyone got any ideas?
Well I'm pretty sure your current formula round((damage*usr.str)/damage) will always output rounded usr.str. b*a/b = a * 1 = a.

Do you plan to have max amount of strength, or players can go as high as they want to?
In response to Ripiz
Arr. all the formulas there atm are purely for test purposes to check that damage was overlaying properly. was mainly for the purpose of checking colours etc since i had a verb that modifed my str to what i needed. anyways.

Well i dont really want to have a hard cap on stats as thats always been a disliking for me. but i dont really want them to be able to gain extremely high values if you catch my drift.

So i guess a shot would be to put like a number of barriers up. but since i dont really have a rank system in mind thats a flaw right there cause i could go something like.

Student. Cap1 at 3000 Increase slowed till 6000 then slowed further.
and yatta yatta for each corresponding rank =\ but i dont really have that however the flame side of things does come from a range of things such as d rank to s rank so i guess i could limit the rings to levels.

But to put it simply. There isn't a max.

The formulas would be easier if it was stat point based like alot of MMORPGS that allow character growth such as Silkroad,Maplestory and what not. but ive had feedback stating the bulk of potential players would prefer to train stats.
In response to Midgetbuster
Str, Agi, Int, Weapon Skill(Sword,Scythe,Gun etc etc), Flame power(KHR Game so yea flame activated has a form of mod).

//M is enemy/target
//usr is attacker/player
var/increase = min(max((usr.Int - M.Int * 1.1) / 200, -50), 50)
var/accuracy = max(min((usr.Agi / M.Agi) * 50, 100 + increase), 10 + increase)
var/damageDone = damage + usr.Str * accuracy

Player would need to increase all stats to get best possible damage. But it still would be pretty easy to get over 9999 damage.
You could try to lower damageDone like 2 times, or 5 times if you want lower numbers.
In response to Ripiz
yeah. formulas have to be the most annoying part i reckon cause you got to factor in lower levs and higher levs as well. expecially with a system that allows players to level themselfs =\