Arx-Game / arxcode

A text-based/web game using Evennia.
MIT License
46 stars 42 forks source link

Knacks and Soak Rating #253

Open Sritterbush opened 4 years ago

Sritterbush commented 4 years ago

Feature Request

At present, @knacks do not seem to neatly work with the combat code for resisting damage. That being Soak Rating.

I propose adding a check against @knacks to see if the player has any knacks using the Attributes Stamina or Willpower, then adding that @knack rating to the player's soak rating. I am volunteering to add this to the code myself if approved, but won't write anything until it gets a thumbs up from Tehom and discussion has had a chance to happen.

dreamsofgold commented 4 years ago

I think the larger question here is whether the knack should have the same weight as a full skill or stat die, considering how soak rating works. Maybe if it was half a point, rounded down, per knack rank?

And only when coupled with survival for either willpower or stamina, in my opinion.

rozzingit commented 4 years ago

I think the better solution would be finding the places where the combat code (or other code pieces, like haggling) rolls weird combinations of things with multiple stats and a skill and whatnot, and tell it to look for any knacks that fit any one stat and skill in the roll. And then add the knack benefit that way. Because, yeah, you don't want to give someone a whole extra dice for a knack when the intended benefit is 1 extra success (per level).

Sritterbush commented 4 years ago

I really should've been clearer. Yeah, +1 to the result / -1 to the difficulty was my intent, not whole dice.

dreamsofgold commented 4 years ago

@rozzingit's solution is probably fairer across the board than merely a knack with stat 1 OR stat 2 and no association with the skill required to increase Soak Rating.

Sritterbush commented 4 years ago

You're right, it is fairer.

I am concerned I may not yet be ready to write the code for the fairer solution. I'm not sure I can accurately detect the intersection of the stats and skills with both being checked, but the fairer solution is the better one.

I'll hold off on attempting this until I am more confident in my code and hope someone beats me to an elegant solution until then.

rozzingit commented 4 years ago

Yeah, I wouldn't just say that it's fairer as much as giving people benefit for a knack that only matches the stat is actively _un_fair and contrary to the spirit of the system. You'd want to do it so that it matched Stamina+Survival or Willpower+Survival.

Zironic commented 4 years ago

I am concerned I may not yet be ready to write the code for the fairer solution. I'm not sure I can accurately detect the intersection of the stats and skills with both being checked, but the fairer solution is the better one.

You don't need to write any of your own code for this. Just call character.mods.get_total_roll_modifiers(["Willpower","Stamina"],["Survival"]) And you'll get the sum of their knacks that affects that roll.