- Posts: 452
- Thank you received: 79
Please Log in or Create an account to join the conversation.
Liko wrote: I see the way stock Tba handles stat bonues like hp bonuses with con as shown belown;
Code:* The field referenced is for hitpoint bonus. */ cpp_extern const struct con_app_type con_app[] = { {-4}, /* con = 0 */ {-3}, /* con = 1 */ {-2}, {-2}, {-1}, {-1}, /* con = 5 */ {-1}, {0}, {0}, {0}, {0}, /* con = 10 */ {0}, {0}, {0}, {0}, {1}, /* con = 15 */ {2}, {2}, {3}, /* con = 18 */ {3}, {4}, /* con = 20 */ {5}, {5}, {5}, {6}, {6} /* con = 25 */ };
I want to do something like that, but make it so like every 4 con points gives you 1 extra hp gain. How would I change it? Is it pretty simple?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
WhiskyTest wrote: How about just edit the advance_level() function in class.c
Where it has:
Code:add_hp = con_app[GET_CON(ch)].hitp;
Could be altered to a formula instead, example:
Code:add_hp = MIN(MAX(0, GET_CON(ch)/4), 125);
That would set the bonus to be the players con divided by 4, but caps it between 0 and 125.
Another way would be to replace all the constant structures to formulas similar to the above one, but then you'd need to change a lot of references.. Depends what would make things easier in the long run I suppose
Please Log in or Create an account to join the conversation.
tbaMUD © 2024