How does combat work?

Started by LordMunchkin, December 21, 2013, 08:20:59 AM

Previous topic - Next topic

LordMunchkin

I was wondering if someone could explain the exact mechanics of combat in this game, specifically how fighting skills and weapon accuracy contribute to the base stats? Also, just what are the base stats?

thebadman

#1
Well there are few modifiers... Target size, light, skill, first cover, second cover, full cover and weather.

Accuracy don't work at the moment so now most important is skill(miss chance/title).
Characters with less than 5 shooting skill always have 5% miss chance per title.

Lets say you want to shoot boomrat behind a rock, its 10 titles away and youre trying to hit it with settler:
Base chance is 50% to hit, but because of target size you have 60% of current value so its 30%...  But its behind a rock so bullet have ~30% of hitting rock, so now its 21%.
If its night and there is no light source you have 60% less chance of hitting so now its 12,6%.

Weather can also decrease your hit chances depending if its fog(50% max so now you have 6,3% hit chance) or rain(80% max; 10,8%). if its dry or clear then you don't lose accuracy.

If you select colonits and hover cursor over target that is in range you will see current modifiers, how much distance/skill affect aim and hit chance(Shot by XXX: YYY%).

LordMunchkin

Quote from: thebadman on December 21, 2013, 08:58:49 AM

Characters with less than 5 shooting skill always have 5% miss chance per title.


Thank you so much for answering my questions but I still have a few more:

How does skill above 5 affect the miss chance? The wiki says 0.2% per point. Is this every point after 5 shooting skill?

Also, what is the base chance to hit for melee?

thebadman

Its after 4 shooting 0.5% then something less then around 14 shooting(1.00%/title) its 0.10%

Tynan

These systems are still evolving anyway, I wouldn't worry too much about trying to optimize for them. However, these are the melee hit chances:

   public static readonly float[] MeleeHitChanceAtLevel = {0.30f, 0.40f, 0.50f, 0.55f, 0.60f,      //0-4
                                        0.625f, 0.65f, 0.675f, 0.7f, 0.725f,      //5-9
                                        0.75f, 0.775f, 0.8f, 0.825f, 0.85f,   //10-14
                                        0.875f, 0.9f, 0.92f, 0.94f, 0.96f, 0.98f };   //15-20

And gun accuracy base hit chance from skill:

   public static readonly float[] AccuracyAtLevel = {0.70f, 0.85f, 0.93f, 0.95f, 0.95f,      //0-4
                                        0.955f, 0.96f, 0.965f, 0.97f, 0.975f,      //5-9
                                        0.98f, 0.985f, 0.9875f, 0.99f, 0.991f,   //10-14
                                        0.992f, 0.993f, 0.994f, 0.995f, 0.996f, 0.997f };   //15-20
Tynan Sylvester - @TynanSylvester - Tynan's Blog

palandus

So then does accuracy follow an exponential function rather than a linear function? That would explain much. I wonder if it could be built into a linear function rather than an exponential function.

Darker

I'm also wondering about the accuracy skill. If I pick a soldier with 18 lvl shooting skill and let him throw grenades 5 tiles away, he still misses over 50% of time. How can that be?
Please... Throw human readable errors on savefile parsing failure!!!
Rim world editor Editor on GIT

Coenmcj

That has been something that has bugged me, Raiders seem to have some sort of god power when it comes to throwing grenades but when my colonists try it's like trying to hit a fly from space with a tennis ball.
Moderator on discord.gg/rimworld come join us! We don't bite

palandus

I've noticed that too. Also have you noticed how a sniper with an M25, can still hit your guy with almost perfect accuracy, in the dark, rain and behind cover, from 30+ squares away?