pMob->hit[DICE_NUMBER] = 0; /* ROM patch -- Hugin */ pMob->hit[DICE_TYPE] = 0; /* ROM patch -- Hugin */ pMob->hit[DICE_BONUS] = 0; /* ROM patch -- Hugin */ pMob->mana[DICE_NUMBER] = 0; /* ROM patch -- Hugin */ pMob->mana[DICE_TYPE] = 0; /* ROM patch -- Hugin */ pMob->mana[DICE_BONUS] = 0; /* ROM patch -- Hugin */ pMob->damage[DICE_NUMBER] = 0; /* ROM patch -- Hugin */ pMob->damage[DICE_TYPE] = 0; /* ROM patch -- Hugin */ pMob->damage[DICE_NUMBER] = 0; /* ROM patch -- Hugin */
fprintf(fp,"%d %dd%d+%d %dd%d+%d %d %d %s\n", pMobIndex->level, pMobIndex->hit[DICE_NUMBER], pMobIndex->hit[DICE_TYPE], pMobIndex->hit[DICE_BONUS], pMobIndex->damage[DICE_NUMBER], pMobIndex->damage[DICE_TYPE], pMobIndex->damage[DICE_BONUS], pMobIndex->hitroll, (int)pMobIndex->dam_mod, attack_table[pMobIndex->dam_type].name);
I had interpreted that as a set of dice for # of attacks or something, and a set of dice for damage. Which didn't make a ton of sense; why store it in a format so radically different from the weapon style?And, what I realized after looking at the first snippet was that of course.. if that's right, there's nowhere in the olc_save that's writing a mobs hit points and mana points.sheesh.so I rewrote that olc_save.c snippet as:
fprintf(fp,"%d %dd%d+%d %dd%d+%d %d %d %s\n", pMobIndex->level, pMobIndex->hit[DICE_NUMBER], pMobIndex->hit[DICE_TYPE], pMobIndex->hit[DICE_BONUS], pMobIndex->mana[DICE_NUMBER], pMobIndex->mana[DICE_TYPE], pMobIndex->mana[DICE_BONUS], pMobIndex->hitroll, (int)pMobIndex->dam_mod, attack_table[pMobIndex->dam_type].name);
Recompiled, changed a room and.. no crash :)EDIT: Well.. it still crashes, but the issue might be from editing Limbo.are; other areas seem to work OK.
