Akul5 Posted July 26, 2009 Share Posted July 26, 2009 I have trekked many websites; explored many forums; searched and discovered. However, I have not found my question ANYWHERE I have looked. My questions is simple, yet specific: is there a way to mod a container (or items in that container) to have an infinite count? I have downloaded-ttomwv's RR Companion Vault (http://fallout3nexus.com/downloads/file.php?id=3644) and-X Flipster X's A Item Room (http://fallout3nexus.com/downloads/file.php?id=5478).I would like to have a place to go (particularly those mod locations) to get as many of whatever items (weapons, armor, ammo, etc.) that I need. I am surprised that something similar has not been asked. I hope someone can help me. Thanks in advance,Akul5 Link to comment Share on other sites More sharing options...
BadPenney Posted July 26, 2009 Share Posted July 26, 2009 My questions is simple, yet specific: is there a way to mod a container (or items in that container) to have an infinite count?How about an object script that includes: if (ContainerREF.GetItemCount Caps001 < 1000 ) ContainerREF.AddItem Caps001 1000 endif I think that would replenish the supply the next time it is opened, making it inexhaustible if not literally infinite.Infinity is not a number with a digitally computational representation to the best of my knowledge. Link to comment Share on other sites More sharing options...
Akul5 Posted July 26, 2009 Author Share Posted July 26, 2009 How about an object script that includes: if (ContainerREF.GetItemCount Caps001 < 1000 ) ContainerREF.AddItem Caps001 1000 endif That would probably suffice for the intended purposes. Would there be a way to edit that so the number never climbs above a certain number. For instance, I don't want to take 1 ___ and it add 1000 ___ each time. I would lke to restrict the max quantity of that object, if possible. Infinity is not a number with a digitally computational representation to the best of my knowledge. I know that a 3D engine cannot (at least in this age) create infinite objects. I suppose what I meant was, in essense, what your object script does: make the appearance of infinity by never becoming empty. Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted July 26, 2009 Share Posted July 26, 2009 int maxCount int currentCount int subtraction set maxCount to 1000 set currentCount to containerRef.GetItemCount Caps001 set subtraction to maxCount - currentCount if (if subtraction > 0 ) ContainerREF.AddItem Caps001 subtraction endif that should serve your needs. Also, usually in order to represent infinity we set an int to a negative number such as -1(maybe a separate boolean if we plan on having negative numbers). But that's usually decided by the people who made the game engine, so that's not a possibility in the geck. At least not to my knowledge. Link to comment Share on other sites More sharing options...
Akul5 Posted July 26, 2009 Author Share Posted July 26, 2009 int maxCount int currentCount int subtraction set maxCount to 1000 set currentCount to containerRef.GetItemCount Caps001 set subtraction to maxCount - currentCount if (if subtraction > 0 ) ContainerREF.AddItem Caps001 subtraction endif that should serve your needs. Thanks. What Begin blocktype would the object script have? (Sorry, I'm new-ish to the ESM/ESP modding scene.) Also, usually in order to represent infinity we set an int to a negative number such as -1(maybe a separate boolean if we plan on having negative numbers). But that's usually decided by the people who made the game engine, so that's not a possibility in the geck. At least not to my knowledge. Yeah. I realized that GECK uses -1 to mean items that cannot be dropped/sold from the inventory. Do they not utilize any other boolean for infinity? My assumption is that they don't since there is no infinity in the original/unmodded game content (that I know of). Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted July 26, 2009 Share Posted July 26, 2009 I think it would be best for OnClose. Link to comment Share on other sites More sharing options...
Akul5 Posted July 26, 2009 Author Share Posted July 26, 2009 I get this error...SCRIPTS: Script 'InfItem', line 11: Syntax Error. Undefined function 'if'....for line "if (if subtraction > 0 )". Link to comment Share on other sites More sharing options...
Warll Posted July 26, 2009 Share Posted July 26, 2009 remove the if statement from within the brackets. Link to comment Share on other sites More sharing options...
Akul5 Posted July 26, 2009 Author Share Posted July 26, 2009 remove the if statement from within the brackets. So you mean to create:if ContainerREF.AddItem Caps001 subtraction endif When I do that, I obviously get:SCRIPTS: Script 'InfItem', line 13: Syntax Error. No condition specified for 'if' or 'elseif'. Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted July 26, 2009 Share Posted July 26, 2009 if (if subtraction > 0 ) try this instead: if (subtraction > 0) You have a second if statement within the condition statement of the original if. Link to comment Share on other sites More sharing options...
Recommended Posts