sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 22, 2018 19:14:39 GMT -5
Only looking at skillups
Summary Roughly the possible checks in 1 round of combat
ride random number check might gain 2 skill if thrown blindfighting random(1,100) >= skill offense (miss) random difficult - better to run simulations, chances look small weapon prof(miss) random(1,500)<= off_kpc & 1in2 Two randoms to pass. Don't know off_kpc value race weapon prof(miss) NOT RANDOM IF YOU HAVE THE SKILL otherwise chance to learn skill defense (vict) hit - same as offense probably small chance shield (vict) hit holding shield NOT RANDOM parry (vict) hit not holding shield NOT RANDOM
dual_wield(miss) 1 in 25 chance to skillup parry (vict) fighting against dual wielder another chance at parry 5 in 6 so random two handed(miss) check random(1,100) > skill then 1 in 25 chance to skillup
Combat.c walkthrough
Weapons against a racetype if you don't have the skill then if a random number(0, 100) <= wis_app[GET_WIS(ch)].learn you will get the skill else you WILL gain 1 pt
Weapons proficiency gain if you have the skill you WILL gain 1 pt
ws_damage -> timers always apply to skill ups Called each round from hit (below) not all calls will check for skillups (need the correct attack type, not shield or dual wield calls) /* weapon/spell damage to victims in room */ /* mounted attack? */ riding, skilled and pass random number checks: gain 2 in SKILL_RIDE if thrown Probably get skillup if thrown /* check blind fighting here */ random number (1,100) >= skill in blindfighting MAY NOT GET blindfighting
/* miss so check your offense */ /* penalties to percent = carrying heavy won't let you gain, riding, random numbers */
timer && percent <= guild[(int) GET_GUILD(ch)].off_kpc Do not know off_kpc, penalties are random MAY NOT GET
pass the above check you get +1 offense
/* hit so check victim defense */ /* same penalties to percent as offense check */
percent <= guild[(int) GET_GUILD(victim)].def_kpc) && timer Do not know def_kpc, random penalties MAY NOT GET /* increment the base ability, and current */ victim->abilities.def += 1; victim->abilities.def = MIN(victim->abilities.def, 95); <- defense caps at 95 for everyone?
/* COMBAT START */
hit This function runs each round too ws_damage called from hit each round. Not every round will get damage. (some checks
you do not hit ----- if ((random number (1, 500) <= guild[(int) GET_GUILD(ch)].off_kpc) && 50% chance RANDOM You WILL gain proficiency in weapon type (if you pass the above, no more random chances) if (wp_pri && victim) You MIGHT gain_weapon_racetype_proficiency (see above - if you already have the skill you WILL gain) NOT RANDOM
you do hit check victim skillups ----- victim checks for shield/parry against your hit here // Victim failed to shield or parry if (shield_vict && has_skill(victim, SKILL_SHIELD)) NOT RANDOM gain_skill(victim, SKILL_SHIELD, 1); else if (wp_vict && has_skill(victim, SKILL_PARRY)) NOT RANDOM gain_skill(victim, SKILL_PARRY, 1);
NOTICE THE IF/ELSE so if you have a shield wielded you will not get to the parry code. No random numbers these will go up (with timer)
Dual wielders only
misses random number check 1 in 25 will skillup RANDOM gain_skill(ch, SKILL_DUAL_WIELD, 1); hits Victim fails block/parry random number check looks like 5 in 6 will skillup victim gets a second (good) chance at parry gain_skill(victim, SKILL_PARRY, 1);
Last check - two-handed weapon and has skill for two-handed
random number (1,100) <= skill level in TWO_HANDED shortens combat wait time else random chance 1 in 25 to gain skill - 1 point RANDOM
|
|
sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 23, 2018 12:42:21 GMT -5
A quick test to show how shield/parry work. Took longer than I wanted - forgot my quickie warriors did not have shield use skill.
2 pcs both warriors wis,agi,str = 15 end = 20
Summary - ran about 400 rounds: about 200 on shield use, 200 on dual wield. Healed the pcs as the fight went along. shield use/parry skill up quickly in a fight (if timers allow) dual wield skills up quickly weapon/hit vs creature skills up quickly slashing - one warrior skillup at round 202, other at round 262. Warriors has same stat/equipment. offense/defense skilled up but didn't watch those.
THESE HAVE THE CORRECT SHIELD USE SKILL - both using shields
/* New character: Hooby (Hoob) [localhost] */ /* New character: Frooby (Froob) [localhost] */ The frooby (Frooby) attacks the hooby (Hooby). /* Function hit: Round 1 */ /* gain_skill: Hooby gained 1 points of skill in 'shield use' (10 => 11), max is 60 */ The frooby (Frooby) hits at the hooby (Hooby)'s body, nicking him. /* Function hit: Round 2 */ /* gain_skill: Frooby gained 1 points of skill in 'shield use' (10 => 11), max is 60 */ The hooby (Hooby) hits at the frooby (Frooby)'s leg, nicking him. /* Function hit: Round 5 */ The frooby (Frooby) swiftly dodges the hooby (Hooby)'s hits. /* gain_skill: Hooby gained 1 points of skill in 'HIT_VS_MAMMALIAN' (1 => 2), max is 100 */ /* Function hit: Round 10 */ The hooby (Hooby) swiftly dodges the frooby (Frooby)'s hits. /* gain_skill: Frooby gained 1 points of skill in 'HIT_VS_MAMMALIAN' (1 => 2), max is 100 */ (CHANGED WEAPONS TO SLASHING) /* Function hit: Round 33 */ The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes. /* gain_skill: Frooby gained 1 points of skill in 'SLASH_VS_MAMMALIAN' (1 => 2), max is 100 */ /* Function hit: Round 41 */ The frooby (Frooby) swiftly dodges the hooby (Hooby)'s slashes. /* gain_skill: Hooby gained 1 points of skill in 'SLASH_VS_MAMMALIAN' (1 => 2), max is 100 */ /* Function hit: Round 202 */ The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes. /* gain_skill: Frooby gained 1 points of skill in 'slashing weapons' (10 => 11), max is 70 */
STOP - change to dual wield
/* Function hit: Round 206 */ /* gain_skill: Frooby gained 1 points of skill in 'parry' (5 => 6), max is 65 */ The hooby (Hooby) slashes the frooby (Frooby)'s leg, connecting hard. The hooby (Hooby) slashes the frooby (Frooby)'s body, connecting hard. /* Function hit: Round 209 */ /* gain_skill: Hooby gained 1 points of skill in 'parry' (5 => 6), max is 65 */ The frooby (Frooby) slashes the hooby (Hooby)'s body, connecting hard. The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes. /* Function hit: Round 224 */ The hooby (Hooby) brutally slashes the frooby (Frooby) on his wrist. /* gain_skill: Hooby gained 1 points of skill in 'dual wield' (10 => 11), max is 100 */ The frooby (Frooby) swiftly dodges the hooby (Hooby)'s slashes. /* Function hit: Round 244 */ The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes. /* gain_skill: Frooby gained 1 points of skill in 'dual wield' (10 => 11), max is 100 */ The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes. /* Function hit: Round 262 */ The frooby (Frooby) swiftly dodges the hooby (Hooby)'s slashes. /* gain_skill: Hooby gained 1 points of skill in 'slashing weapons' (10 => 11), max is 70 */ The frooby (Frooby) swiftly dodges the hooby (Hooby)'s slashes.
/* Function hit: Round 406 */ The frooby (Frooby) solidly slashes the hooby (Hooby)'s leg. The hooby (Hooby) swiftly dodges the frooby (Frooby)'s slashes
That's all I'm going to do with it. Time to go do something else.
|
|
OT
Displaced Tuluki
Posts: 257
|
Post by OT on May 23, 2018 13:43:33 GMT -5
This seems to confirm my suspicions that parry won't go up while shield use is "in use."
Can you confirm that defense went up during these fights, when the combatants had active parry and/or shield use? It has long been believed that you can only gain defense if there's no other defensive skill "in the way" when you take the hit, but that's quite difficult to test in-game.
|
|
sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 23, 2018 19:33:57 GMT -5
I only did 2 kinds of fights: dual wield pc vs dual wield pc and then weapon/shield pc vs weapon/shield pc. Looking at the code if you succeed at parry or shield you skip the defense check.
I know defense and offense went up but I wasn't logging those to the same window so I don't know which round of combat. They increased in the PC save file. The "LAST GAIN" number is the timer and is 0 if never set.
{*DEFENSE*} 12 {*DEFENSE LAST GAIN*} 1527090941
|
|
OT
Displaced Tuluki
Posts: 257
|
Post by OT on May 23, 2018 20:56:18 GMT -5
I only did 2 kinds of fights: dual wield pc vs dual wield pc and then weapon/shield pc vs weapon/shield pc. Looking at the code if you succeed at parry or shield you skip the defense check. Yes, but I'm talking about when you take a hit that rolled against a parry or shield use that the character has on their skill list and is thus "in the way" of a defense gain. The belief, specifically, is that when you get hit and you have another defensive skill to check against, defense doesn't go up. I know it wouldn't go up from a succesful parry/block because then you don't get hit. That's a different matter. This comes from the observation that rangers - who don't normally have parry until 10-15 days played or more - usually get much higher defense than warriors who start with parry and thus presumably cannot gain defense while armed. Even if the warrior gets hit plenty, they don't seem to gain defense properly. This is a huge deal in building a character, especially if you're not in a sparring that does unarmed training. Since the ranger spent so much time without the parry skill, all those hits he took before branching parry would have increased his defense while the warrior only gains defense from fighting unarmed. The same goes for assassins. Meanwhile, a warrior is forced to do a lot of unarmed training in order to raise defense. This is a theory that some combat gurus have come up with. You're positive that they were always armed and didn't gain defense from accidentally starting the fight unarmed or something? I'd like to definitively confirm whether or not you can gain defense while you have parry or shield use active, i.e. holding a weapon or shield while having the associated skill. If you forgot to arm the PCs at some point, they could have gained defense there. I noticed some unarmed hits in your data and that would interfere with this experiment.
|
|
sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 24, 2018 7:21:29 GMT -5
Did the experiment. Both dual wield/2 slashing weapons each.
$ gdb armSolo.exe (gdb) run Starting program: /cygdrive/e/codedumptest/armSoloRun/armSolo.exe
Thu May 24 07:48:53 2018: (kill): [1004] Hooby (Hoob): "kill frooby" Thu May 24 07:48:53 2018: Function hit: Round 1 Thu May 24 07:48:53 2018: gain_skill: Frooby gained 1 points of skill in 'parry' (6 => 7), max is 65 Thu May 24 07:48:55 2018: Function hit: Round 2 Thu May 24 07:48:55 2018: gain_skill: Hooby gained 1 points of skill in 'parry' (6 => 7), max is 65 Thu May 24 07:48:58 2018: Function hit: Round 3
Thu May 24 07:49:25 2018: Function hit: Round 6 Thu May 24 07:49:25 2018: gain_skill: Frooby gained 1 points of skill in 'SLASH_VS_MAMMALIAN' (2 => 3), max is 100 Thu May 24 07:49:28 2018: Function hit: Round 7 Thu May 24 07:49:28 2018: gain_skill: Hooby gained 1 points of skill in 'slashing weapons' (11 => 12), max is 70 Thu May 24 07:49:28 2018: gain_skill: Hooby gained 1 points of skill in 'SLASH_VS_MAMMALIAN' (2 => 3), max is 100
Thu May 24 07:53:58 2018: Function hit: Round 26 Thu May 24 07:53:58 2018: gain_skill: Frooby gained 1 points of skill in 'slashing weapons' (11 => 12), max is 70
Thu May 24 07:56:07 2018: Function hit: Round 51 Thu May 24 07:56:07 2018: gain_skill: Hooby (Hoob) gained 1 points of skill in 'defense' (12 => 13)
Stopped soon after
Relevant code.
if (IS_ATTACK(attacktype)) { <- includes hit, bite, sting, slashing, etc. if (miss) { /* offense slow hack - hal */ // loading your self down to fail won't let you gain // prevent using riding as a quick-gain // subtract riding skill - 50, or offense, whichever is less // no riding skill, 50% penalty -> penalties go into percent if ((percent <= guild[(int) GET_GUILD(ch)].off_kpc) && check_combat_gain_wait()) { /* increment the base ability, and current */ } } else if (!miss) { <- you got hit /* defense slow hack - hal */ -> same penalties as offense if ((percent <= guild[(int) GET_GUILD(victim)].def_kpc) && check_combat_gain_wait) { /* increment the base ability, and current */ victim->abilities.def += 1; } } }
|
|
sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 24, 2018 8:08:00 GMT -5
Look at it this way: parry/shield will go up almost immediately if the timer allows. Defense/offense take a lot of checks due to the random number ("percent" in the code).
If on average it takes 25 hits up side the head to roll a low number to skillup defense then as your parry/shield go up it will take more rounds of combat to get those 25 hits.
Shield check you can remove easily. Parry check? Not sure. Either way, the focus is on how many times you get hit. Don't know the exact average number (above took 51 rounds of combat hits/misses). With the random numbers, might spar and skillup the first time you're hit, or you might be unlucky and just wasted your time.
|
|
OT
Displaced Tuluki
Posts: 257
|
Post by OT on May 24, 2018 8:36:47 GMT -5
Neat.
So defense will go up no matter how you configure yourself. That's good to know. Part of the reason people thought otherwise was that parry won't go up if you're holding a shield, which is confirmed above, so it made sense that defense won't go up if one of the other two defensive skills are active.
Next thing I'd like to look at is the exact calculations behind backstab damage. We tried to decipher that in another thread but it's all a bunch of spaghetti and the codedump seems to contradict itself here and there.
|
|
julio
Displaced Tuluki
Posts: 270
|
Post by julio on May 24, 2018 9:23:20 GMT -5
It's amazing how you're deriving this information. Might as well be fucking chinese!
So the only way to improve defense is with parry and block OFF?
|
|
OT
Displaced Tuluki
Posts: 257
|
Post by OT on May 24, 2018 9:59:34 GMT -5
No, we seem to have discovered that that's not the case after all. If sneazy's data is correct, defense can go up regardless.
|
|
sneazy
Clueless newb
Posts: 115
|
Post by sneazy on May 24, 2018 10:21:59 GMT -5
Just get hit a lot and it will go up. As the game goes on, you don't get hit a lot. That's it. Random numbers means it might take 50 hits to get a skillup today and 3 tomorrow. They suck. Especially since it is on top of a skill timer that says nothing is going to count for about an hour after your last skillup.
No clue why anyone would make a game that way. Timer is bad enough.
Going to look at backstab and that will be it. Got other things to do.
|
|