IgorTheBlack Posted July 2, 2004 Share Posted July 2, 2004 I need to know if it is possible to use the scripting facility to cause an item to change in weight dependent on the players encumbrunce? Also if a bound weapon weighs anything? Link to comment Share on other sites More sharing options...
Marxist ßastard Posted July 2, 2004 Share Posted July 2, 2004 The former question? If you aren't using a custom-made external application to do this, there isn't a chance in hell. Getting the player's encumberance would prove extremely difficult, if not downright impossible, and to make the item "change" weight, you'd have to greate an object for every weight possibility and switch them out from the PC's inventory. As for the latter question, no -- they don't have any weight at all. Link to comment Share on other sites More sharing options...
IgorTheBlack Posted July 2, 2004 Author Share Posted July 2, 2004 well if i knew the way the total encumbrence is calced from the strength stat, i could use strength instead of encumbrence.But i dont :( Link to comment Share on other sites More sharing options...
Marxist ßastard Posted July 2, 2004 Share Posted July 2, 2004 Oh, total encumberance instead of current encumberance? Why didn't you say so? It's simply five times the PC's Strength. Link to comment Share on other sites More sharing options...
IgorTheBlack Posted July 2, 2004 Author Share Posted July 2, 2004 ok sorry for being vauge. Couldn't you write a script that caused an item to change weight or make a burden spell equal to the players (strength x 5)? Link to comment Share on other sites More sharing options...
Marxist ßastard Posted July 2, 2004 Share Posted July 2, 2004 Can't change the weight of an object -- you must use seperate obects. IIRC, you cannot change the magnitude of a spell, either. Doing this via spell is still viable, however, as you can use Burden (and Feather) spells of varying magnitude in combination to get a value -- for example, if you need a magnitude 79 Burden, you could add a magnitude 64 Burden, a magnitude 16 Burden, and a magnitude 1 Feather to get the desired goal. ...Yeah, really makes you wish you learned binary arithmetic sooner, don't it? Link to comment Share on other sites More sharing options...
IgorTheBlack Posted July 3, 2004 Author Share Posted July 3, 2004 So is there no variable or something that you could use in a script that held the players total encumbrence and then used that value for burden? (values such as 150, 200 and the like)? Link to comment Share on other sites More sharing options...
Marxist ßastard Posted July 3, 2004 Share Posted July 3, 2004 As I've said before, no. And as I've said before, you can't change a spell's magnitude via scripting. If you're just trying to make the PC get overencumbered, why not simply add a spell that Burdens him by 3200 points or something? If you aren't, however, doing this via a Burden spell would be quite simple. Just create Burden spells based on exponents of two (up to 128) multiplied by five, then get the binary equivalent of the player's Strength. Then, of course, the possibility of a Feather or additional Burden spell comes into effect and with it, the problem of reduced accuracy. The simplest solution here would be to just make sure there are no Feather effects present, and drop the item if there are. Something like this... Short STRR Set STRR to ( Player->GetStrength ) Short Temp Short p7 Set Temp to ( STRR - 128 ) If ( Temp > -1 ) Set p7 to 1 Set STRR to Temp Else Set p7 to 0 EndIf Short p6 Set Temp to ( STRR - 64 ) If ( Temp > -1 ) Set p6 to 1 Set STRR to Temp Else Set p6 to 0 EndIf Short p5 Set Temp to ( STRR - 32 ) If ( Temp > -1 ) Set p5 to 1 Set STRR to Temp Else Set p5 to 0 EndIf Short p4 Set Temp to ( STRR - 16 ) If ( Temp > -1 ) Set p4 to 1 Set STRR to Temp Else Set p4 to 0 EndIf Short p3 Set Temp to ( STRR - 8 ) If ( Temp > -1 ) Set p3 to 1 Set STRR to Temp Else Set p3 to 0 EndIf Short p2 Set Temp to ( STRR - 4 ) If ( Temp > -1 ) Set p2 to 1 Set STRR to Temp Else Set p2 to 0 EndIf Short p1 Set Temp to ( STRR - 2 ) If ( Temp > -1 ) Set p1 to 1 Set STRR to Temp Else Set p1 to 0 EndIf Short p0 Set Temp to ( STRR - 1 ) If ( Temp > -1 ) Set p0 to 1 Set STRR to Temp Else Set p0 to 0 EndIf Short DoOnce If ( Player->GetItemCount Some_Stupid_Item < 1 ) Player->RemoveSpell Burden_5 Player->RemoveSpell Burden_10 Player->RemoveSpell Burden_20 Player->RemoveSpell Burden_40 Player->RemoveSpell Burden_80 Player->RemoveSpell Burden_160 Player->RemoveSpell Burden_320 Player->RemoveSpell Burden_640 Return ElseIf ( Player->GetEffects sEffectBurden ) If ( DoOnce < 1 ) MessageBox "The script doesn't like you. Go away and come back without a magical summat." Player->Drop Some_Stupid_Item 1 Return Else Return EndIf Else Set DoOnce to 0 EndIf If ( p0 ) Player->AddSpell Burden_5 Else Player->RemoveSpell Burden_5 EndIf If ( p1 ) Player->AddSpell Burden_10 Else Player->RemoveSpell Burden_10 EndIf If ( p2 ) Player->AddSpell Burden_20 Else Player->RemoveSpell Burden_20 EndIf If ( p3 ) Player->AddSpell Burden_40 Else Player->RemoveSpell Burden_40 EndIf If ( p4 ) Player->AddSpell Burden_80 Else Player->RemoveSpell Burden_80 EndIf If ( p5 ) Player->AddSpell Burden_160 Else Player->RemoveSpell Burden_160 EndIf If ( p6 ) Player->AddSpell Burden_320 Else Player->RemoveSpell Burden_320 EndIf If ( p7 ) Player->AddSpell Burden_640 Else Player->RemoveSpell Burden_640 EndIf Link to comment Share on other sites More sharing options...
Switch Posted July 4, 2004 Share Posted July 4, 2004 Afrix's post deleted. Blatant spam. Read the rules please ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.