The World of Layonara

NWN Discussions and Suggestions => NWN Ideas, Suggestions, Requests => Topic started by: Leafgreen on August 25, 2005, 07:38:00 pm

Title: max weight limit
Post by: Leafgreen on August 25, 2005, 07:38:00 pm
The DOA gold weight system isn't used here (has it's own problems) so weight isn't that touchy an area, but here is a script you might want to consider.  It sets an upper weight limit and a character cannot move once they reach that limit, and must put down items.  I remember I had the upper limit varied depending on the stats, but maybe that was a script I tweaked out of the DOA gold encumbrance system. Durned if I can find the exact script now, but anybody who uses the vault heavily knows how THAT works. Pretty sure you are using a map script that cleans the map of items on the ground if no players are on the map for X amount of time, so items dropped should not be too much of a problem. Instantly stops miners from carrying small hills on their backs.


Original script (http://nwvault.ign.com/View.php?view=scripts.Detail&id=2227)


void main()
{
object oItem = GetModuleItemAcquired();
object oPC = GetItemPossessor(oItem);
int weight = GetWeight(oPC);
if (weight > 6000) {
    AssignCommand(oPC, ActionPutDownItem(oItem));
    AssignCommand(oPC, ActionSpeakString("I cannot hold more than 600 pounds worth of equipment.  I must get rid of some of it..."));
SendMessageToPC(oPC,"Thats just too much weight, You need to put it down.");
}
}

put in a line getting the pcs strength, attach that to a weight table, voila.  A good basis for a max weight system if nothing else.