Code:
send_to_char(ch, "Height: %d - Weight: %d \r\n", GET_HEIGHT(ch), GET_WEIGHT(ch));
.
Ok in order for the code to replace the height/weight in DB.C i had to make it like the code below, it compiles fine. But it seems to me that the weight part works just fine BUT not the height, i made a dwarf it should as male range from:
GET_WEIGHT(ch) = 43 + dice(1, 10);
GET_HEIGHT(ch) = 43 + dice(1, 10);
But the test male dwarf i made got:
Height: 174 <---Way taller then my define
Weight: 52 <---Well within my dwarf male define
The same happend when i made a female elf:
GET_WEIGHT(ch) = 50 + dice(1, 10);
GET_HEIGHT(ch) = 50 + dice(1, 10);
But the test female elf i made got:
Height: 168 <---Again way taller then my define
Weight: 59 <---Again well within my define
I even tried with : rand_number(180, 240); and made a test char that turned out being 172.
What is wrong, why does weight work but not height ??
Code:
IN DB.C
/* Called during character creation after picking character class (and then
* never again for that character). */
void init_char(struct char_data *ch)
{
int i;
/* below above */ you find below that i remmed out and put in my code */
// if (GET_SEX(ch) == SEX_MALE) {
// GET_WEIGHT(ch) = rand_number(120, 180);
// GET_HEIGHT(ch) = rand_number(160, 200); /* 5'4" - 6'8" */
// } else {
// GET_WEIGHT(ch) = rand_number(100, 160);
// GET_HEIGHT(ch) = rand_number(150, 180); /* 5'0" - 6'0" */
// }
if (GET_SEX(ch) == SEX_MALE) {
if (IS_HALF_GIANT(ch)) {
GET_WEIGHT(ch) = 180 + dice(1, 10);
GET_HEIGHT(ch) = 200 + dice(1, 10);
}
else if (IS_HALFLING(ch)) {
GET_WEIGHT(ch) = 43 + dice(1, 10);
GET_HEIGHT(ch) = 43 + dice(1, 10);
}
else if (IS_DWARF(ch)) {
GET_WEIGHT(ch) = 43 + dice(1, 10);
GET_HEIGHT(ch) = 43 + dice(1, 10);
}
else if (IS_GNOME(ch)) {
GET_WEIGHT(ch) = 43 + dice(1, 10);
GET_HEIGHT(ch) = 43 + dice(1, 10);
}
else if (IS_ELF(ch)) {
GET_WEIGHT(ch) = 55 + dice(1, 10);
GET_HEIGHT(ch) = 55 + dice(1, 10);
}
else /* if (IS_HUMAN(ch)) */
GET_WEIGHT(ch) = 70 + dice(1, 10);
GET_HEIGHT(ch) = 170 + dice(1, 10);
}
else
if (GET_SEX(ch) == SEX_FEMALE) {
if (IS_HALF_GIANT(ch)) {
GET_WEIGHT(ch) = 170 + dice(1, 10);
GET_HEIGHT(ch) = 190 + dice(1, 10);
}
else if (IS_HALFLING(ch)) {
GET_WEIGHT(ch) = 43 + dice(1, 10);
GET_HEIGHT(ch) = 43 + dice(1, 10);
}
else if (IS_DWARF(ch)) {
GET_WEIGHT(ch) = 41 + dice(1, 10);
GET_HEIGHT(ch) = 41 + dice(1, 10);
}
else if (IS_GNOME(ch)) {
GET_WEIGHT(ch) = 36 + dice(1, 6);
GET_HEIGHT(ch) = 36 + dice(1, 6);
}
else if (IS_ELF(ch)) {
GET_WEIGHT(ch) = 50 + dice(1, 10);
GET_HEIGHT(ch) = 50 + dice(1, 10);
}
else /* if (IS_HUMAN(ch)) */
GET_WEIGHT(ch) = 60 + dice(1, 10);
GET_HEIGHT(ch) = 160 + dice(1, 10);
}
.