Advertisement

Could I get some opinions on this combat engine

Started by November 17, 2002 03:18 AM
4 comments, last by Slyxsith 22 years, 2 months ago
I''m getting into the number crunching for my game design and wish I had paid more attention 15 years ago when I was in advanced algebra classes. The pretext here is to get a "Hit target" = True|false. In my game (although this shouldnt matter) the combatants are attacking each other melee. This formula is to see if an attack hits its target, nothing else. Damage mods and health checks etc etc all come later. --- Start “Hit” = True if ( Attack.roll > Defense.roll ) Attack.roll = Attack.mod + Attack.random Attack.random = (random roll from 1 to (attack.mod / 2) ) – (attack.mod / 4) Attack.mod = Players.skill.with.his.attacking.weapon + coord.bonus + weapon.mod.bonus % Players.skill.with.his.attacking.weapon = The players current attack skill with the weapon he is attacking with taken right from the players skill tree. %Coordination.bonus = modifier of +1 for every 5 coord points. %Weapon.mod.bonus = a magical enhancement of a weapon to give it a bonus to strike its target. Defense.roll = Defense.mod + Defense.random Defense.random = (random roll from 1 to ( defensemod / 2) ) – (defense.mod / 4) Defense.mod = targets.defense.skill + targets.dex.bonus + targets.defense.mods %targets.defense.skill = The defenseive skill of the attackers target from the targets skill stat. %targets.dex.bonus = modifier of +1 for every 5 dexterity points. %targets.defense.mods = any defensive spells, weapon enchantments armor enchantments etc that may grant the wielder/wearer a bonus chance to evade a blow. -- End By my thinking this gives a +/- 25% to both the attacker and defenders stats making for good random combat and less attk.skill dependancy while still giving someone with conciderably more attk.skill the decided edge. Am I missing anything? Thanks

Mark MacPherson
Flybynight Studios: Owner
Current Skillsets: Project Manager - Team Lead - Scripter - 2D Artwork - Basic 3D Modeller - Web Development - Marketing - Administration

To assign numbers to make things a little easier to chew:

Attacker:
Skill: 10
Coord Bonus: 10
Weapon Mod: 10

Defender:
Skill: 10
Dex Bonus: 10
Def Mods: 10

If Attacker attacked Defender, this would happen:

Attack Roll == (30) + ((1d5)-2.5))
Which could be anything from 28.5 to 32.5, a difference of 4.

Defense Roll == (30) + ((1d5)-2.5))
Which, again, would be 28.5 to 32.5, for a difference of 4.

For a balanced system this wouldn''t be too shabby if you either toned down the rolls, or made the difference greater than 4(which could be accomplished in a couple of ways)

-Ryan "Run_The_Shadows"
-Run_The_Shadows@excite.com
-The Navidson Record! The best film you''ll never see!
Advertisement
The math in your example doesn''t seem to match the formulas you outlined.

The attack mod is 30 (10+10+10)
and the random portion is the +/- 25% of the mod (30)
so it should read 30 +/- 7.5, yes?


One consequence of this design is greater variability with increased numbers (skills and whatnot). This means an attack mod of 90 vs defense mod of 80 would fail more often than attack mod of 30 vs defense mod of 20.

This is neither feature nor flaw, but it has an important impact on character improvement. If the characters have a generally linear improvement in numbers then small to moderate differences in those numbers become somewhat less meaningful as the game progresses. That is, a change from 10 to 15 will see definite improvement, while going from 50 to 55 will not seem to make much difference.

It also suggests that trying to make opponents distinct will become tougher at higher numbers. There would be little difference between a mod score of 75 and 80, so the scale has to be stretched.

On the low end, small differences in numbers may produce unacceptably large differences in results. A score of 8 will always beat a score of 5 (if my math is right). Or this could be the behavior you are looking for.

JSwing
Someone with low attack mod will have no chance at all to hit a target with high defense mod. Are you sure you want that?

-------------------
Aim for the horizon
but watch your step
-------------------Our only true limitis our imaginationAim for the horizonbut watch your step
Sorry was late at tnight I shouldve filled in some blanks as far as numbers go.

Im still working on balance issues but these numbers are "targets" for various levels. Meaning that the average character should be close to these target numbers by their level.

at lvl 1 (Just to clarify I am trying to develop a combat engine that is less level dependant and more skill dependant. Sort of a cross between a concsole combat interface (IE sega streetfighter) that doesn''t guarantee that a lvl 10 will crush a lvl 1.)

Target stats:
Lvl 1 - 15 str , 15 coord , 20 skill(attk/def) , +1 attk /def mod

Lvl 10 - 20 str , 20 coord , 40 skill(attk/def) , +2 attk/def mod

Lvl 20 - 25 / 25 / 80 / 3

Lvl 40 - 35 / 35 / 160 / 4

Lvl 80 - 40 / 40 / 320 / 6

So lets take a lvl 1attk vs a lvl 10def.

Attk roll = (20 + 3 + 1) + (ran(12) - 6)
*Just to clarify the random roll is very possibly a neg number to make the skill check bad and give the defender a better chance.*

Def Roll = ( 40 + 4 + 2) + (ran(23) - 12)

Again excuse the fact that math makes my head hurt but as I see it the lvl 1 attacker has a 24 (+/- 6)roll and the defender has a 46 (+/- 12) roll. This would set the attackers variance from 18-30 and the defenders variance from 34 - 58. Based on that a lvl 1 will never strike a lvl 10 based on the target stats but a lvl 10 will hit a lvl 1 every time.

Now lets take a lvl 10 attk Vs a lvl 20.

Attk Roll = ( 40 + 4 + 2) + (ran(23) - 12)
= variance from 34 to 58

Def Roll = ( 80 + 6 + 3) + (ran(45) - 22) *just rough rounding*
= variance from 67 - 111

Again the lvl 10 would not be able to strike the lvl 20 but would get hit every time by the lvl 20. Based on the numbers we see I am going to extrapolate that a lvl 15 char might have a variance between 51 - 85.

Based on these numbers my combat formula is not going to work as even a 5 level spread pretty much guarantees victory for the person with 5 levels. In order to counter this travisty I think my target skill numbers need to be cut dramatically. If I cap levels at 50 and reduce the skill variance between 1 and 50 to 100 points max I now have a much friendlier combat system where the lvl 50 will always beat the lvl 1 but not necessarily the lvl 25.

Thanks for reading this guys. Im going to crunch some more numbers will a much lower skill variance between levels and cap it at 50.

Mark

Mark MacPherson
Flybynight Studios: Owner
Current Skillsets: Project Manager - Team Lead - Scripter - 2D Artwork - Basic 3D Modeller - Web Development - Marketing - Administration

More numbers =)

New target skill numbers
Lvl 1 = 20
Lvl 10 = 40
Lvl 20 = 60 30=80 40=100 50=120

Based on those skill adjustments I now have a lvl 1 still unable to touch a lvl 10 etc but after 30 things start to work out.

Lvl 30 vs a lvl 50 = 67- 111 vs 100 - 168 Based on a 20 level spread the 30 shouldnt beat the 50 anyways.

Take a 10 lvl spread from 40 - 50 and suddenly its a 73-139 vs a 100-168.

These numbers still arent ideal, but they are a close rough in for me. I dont want to reduce the skill levels any more or it will affect leveling difficulty curves when we are designing monster strength. From here I am going to take a closer look at the str/coord/dex bonuses as well as the actual weapon.damage.modifier.

currently the numbers I''ve been crunching are just to determine to-hit rates and thats going to be super important for melee balancing. Once I have an acceptable rough formula for to Hits I can use damage variance and blocking techniques to increase a lower skilled persons survivability.

If you''ve got any feedback give me a hollar =)

Thanks

Mark MacPherson
Flybynight Studios: Owner
Current Skillsets: Project Manager - Team Lead - Scripter - 2D Artwork - Basic 3D Modeller - Web Development - Marketing - Administration

This topic is closed to new replies.

Advertisement