I've got my NWN database setup, but it looks like the table pwdata has 0 data and has never been updated.
Stuart
stuartpierce
Member Since 24 May 2005Offline Last Active Apr 06 2009 05:23 PM
Community Stats
- Group Member
- Active Posts 19
- Profile Views 3383
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Posts I've Made
In Topic: Resting
31 May 2005 - 11:14 PM
In Topic: Resting
31 May 2005 - 12:59 PM
It looks like my iRestLast is getting set back to zero every time I rest. Is this a database problem? The information isn't getting stored correctly in the persistent database? I think I see where it is supposed to update iRestLast.
if(!GetIsDM(oPC))
SetPersistentInt(oMod,("LastRest" + GetName(oPC) + GetPCPlayerName(oPC)),nSSB);
but then next time the a rest happens and
int iLastRest = GetPersistentInt(oMOD,("LastRest" + GetName(oPC) + GetPCPlayerName(oPC)));
is executed, iLastRest is back to zero.
Stuart
if(!GetIsDM(oPC))
SetPersistentInt(oMod,("LastRest" + GetName(oPC) + GetPCPlayerName(oPC)),nSSB);
but then next time the a rest happens and
int iLastRest = GetPersistentInt(oMOD,("LastRest" + GetName(oPC) + GetPCPlayerName(oPC)));
is executed, iLastRest is back to zero.
Stuart
In Topic: Resting
31 May 2005 - 12:55 AM
Ok, I see why resting isn't working.
In hc_on_play_rest, there is a function IsTooSoonToRest.
Around line 220 it says:
if (iRESTSYSTEM && iLastRest && ((iLastRest + iMinRest) > nSSB))
{
AssignCommand(oPC, ClearAllActions());
sRestedText += " Try again in ";
sRestedText = sRestedText + GetSubString(FloatToString(((fMinRest+fLastRest) - fSSB) / fConv), 6,2)
+ " hours " + IntToString(iMin)+" minutes";
FloatingTextStringOnCreature( sRestedText, oPC, TRUE);
nNotOkToRest = 1;
}
Well, iLastRest is 0 all the time, so this subroutine never gets to run, so nNotOkToRest = 1 never happens because of not waiting enough time.
Stuart
In hc_on_play_rest, there is a function IsTooSoonToRest.
Around line 220 it says:
if (iRESTSYSTEM && iLastRest && ((iLastRest + iMinRest) > nSSB))
{
AssignCommand(oPC, ClearAllActions());
sRestedText += " Try again in ";
sRestedText = sRestedText + GetSubString(FloatToString(((fMinRest+fLastRest) - fSSB) / fConv), 6,2)
+ " hours " + IntToString(iMin)+" minutes";
FloatingTextStringOnCreature( sRestedText, oPC, TRUE);
nNotOkToRest = 1;
}
Well, iLastRest is 0 all the time, so this subroutine never gets to run, so nNotOkToRest = 1 never happens because of not waiting enough time.
Stuart
In Topic: Resting
30 May 2005 - 11:10 PM
Ok, it was easy to fix the HCR resting to accept the cooked steak and cooked fish. I just changed line 86 of hc_on_play rest to check for both Food or FOOD.
if((!FindSubString(GetTag(oEquip),"Food")) ||
(!FindSubString(GetTag(oEquip),"FOOD")))
Stuart
if((!FindSubString(GetTag(oEquip),"Food")) ||
(!FindSubString(GetTag(oEquip),"FOOD")))
Stuart
In Topic: Resting
30 May 2005 - 09:54 PM
No, I take that back, LIMITEDRESTHEAL is working. It's just that I can rest over and over with no limits.
As for the food, it must be the difference between the tags, FoodRation and FOOD_NORM -- I just haven't quite parsed it out yet.
Stuart
As for the food, it must be the difference between the tags, FoodRation and FOOD_NORM -- I just haven't quite parsed it out yet.
Stuart
- Spellhold Studios
- → Viewing Profile: Posts: stuartpierce
- Guidelines