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)
mob/verb/AttackA()
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)
//
mob/proc/calcdmg(mob/defender)
var/ndmg = 0
if(!src.weapon)
ndmg = ndmg //no formula for fist fighting :(
else
var/wdmg = round(weapon.wepcalcdmg()) //each weapon has a damage calculation of its own.
ndmg = wdmg
return max(0, ndmg)
//
items
Weapons
proc/wepcalcdmg()
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
Scythe
wepcalcdmg()
. = round((damage*usr.str)/damage)
TestScythe
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?
Do you plan to have max amount of strength, or players can go as high as they want to?