DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: aeanos on June 13, 2019, 11:44:40 PM

Title: Racial Hitpoints
Post by: aeanos on June 13, 2019, 11:44:40 PM
Hello all,

I've been dusting off an old project (v.1.1.2 based), and wondered if there was a way to make it so that each race can have its own base hitpoints. After all, it seems odd that a human, a dwarf, and a troll should have the same maxhitpoints, even though they're drastically different creatures. It appears that the maxhitpoints and maxhitpointsperlevel are defined in lib/all_tables.php, but I'm not sure how to go about making work on a race-by-race basis.

So far, I've considered trying to create a form of permanent buff/debuff in each race's module, so the core would simply be the standard Human hitpoints, but figured someone might already know of a better way to accomplish this. Thank you in advance. :)

Title: Re: Racial Hitpoints
Post by: Aeolus on June 14, 2019, 12:18:32 AM
I'd suggest simply making a module that, after a successful DK, sets maxhitpoints to a custom number dependent on the player's race, then remembering to add on any hitpoints bought with DK points.

As far as I can tell, maxhitpointsperlevel is only for companions. In train.php, maxhitpoints is always increased by ten. If you want to change this, you could insert a modulehook there, and modify that amount in the same manner as the initial suggestion above.

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines