There isn't any kind of standard, shareable thing to do for this. It's basically just
1) Find the code for the mechanic you want to be affected by a stat
2) Shove a stat check in there with appropriate math to make it scale in the way you want
It's pretty open-ended. And if you have any interest in keeping things balanced, you'd probably want to do little tweaks here and there to offset the new stat effects you add. Unlikely that someone else's code would have it just how you'd like it.
As far as having max HP or mana scale with a stat: the client does its own calculations for the displayed HP and mana values. You can't just change how they are calculated on the server without desynchronizing from the values the client believes it has (unless you do something really hacky like shoving the extra amount onto the packet for an item the client has equipped). Would need to go about it another way, like damage and mana cost reduction.
|