Jump to content

How to set storage limit on container


amokrun1

Recommended Posts

Putting the limit on it isn't the problem as much as what to do in the event the limit is reached ... but definitely doable .

 

Script on the container like this ...

 

~~~~~~~~~~~~~~~~~~~~

SCN MyContainerScript

 

Short IsFull

 

Begin OnActivate

 

If IsFull == 1

Show MyMessage ; use a message with button choices

Else

Activate

endif

End

 

Begin MenuMode 1008 ; container screen

 

If GetContainerInventoryCount > 200

Set IsFull to 1

else

Set IsFull to 0

 

endif

End

 

Begin OnAdd

 

; not sure what could do with this block yet ?

End

 

Begin MenuMode 1001 ; message screen

 

; can't remember the message screen scripting

; But this function https://geckwiki.com/index.php?title=GetButtonPressed

 

End

 

Begin GameMode

 

; would do something here for when player closes container

; and ultimately might want a Quest/quest script for on/off switch

; to minimize the impact of an on going GameMode block

; Or even use quest stages

 

End

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Anyways , just an idea to get you started ... but think through what you want the player to experience , and what will happen when the limit is reached.

Because making the container unusable is easy , but what to do with items exceeding the limit , and how to pick which items ?

Link to comment
Share on other sites

Thanks for the reply! I don't want anything terribly complicated, it's a "virtual" container that you access through terminals, I just want to put a max on it so that it won't break the game. I pretty much want it to behave how the inventory capacity works with companions, where there is a carry weight that you cannot surpass, only it wouldn't be carry capacity but rather storage capacity.

Link to comment
Share on other sites

Are you saying you show the container inventory through a terminal ? Or you just open the container screen with a terminal ?

But with just opening a container from a terminal ... why would that break the game as apposed to any other container with respect to inventory count ?

 

But anyways ... if I understand your intention correctly. You simply want to not be able to access the container screen from a terminal if it has 200+ items ?

 

Which unfortunately the terminal condition field does not have "GetContainerInventoryCount" So can't simply use that to turn off the menu item that executes opening the container.

But you can use "GetScriptVariable" And select the container reference which you put this script on it's base form.

 

~~~~~~~~~~~~~~~~~~~~

SCN MyContainerScript

Short IsFull

Short IsTerminal

Begin OnActivate

If IsActionRef Player == 1

Set IsTerminal to 0

Set IsFull to 0 ; but must empty container to < 200 or terminal won't work again

Activate

Else

Set IsTerminal to 1

Activate

endif

End

Begin MenuMode 1008

If (IsTerminal == 1 && GetContainerInventoryCount >= 200)

Set IsFull to 1

TapControl 5 ; close container

endif

End

~~~~~~~~~~~~~~~~~~~~~~~

Then in the condition of the Terminal Menu Item use ... GetScriptVariable : YourContainerRef : IsFull == 0

And I would suggest have another Terminal Menu Item that turns on with == 1 to tell you it is full.

Which I am just guessing your intentions , are to drop items while out and about ... but then freely access the container when at its location ?

In which this scripting should do that ... hopefully ; )

Add Edit : Changed "Begin OnAdd" to "Begin OnMenuMode 1008" since the OnAdd block will not run when not in same cell as player , or Ugrids to load range.

Link to comment
Share on other sites

So how are you opening a container in a remote cell with the terminal ? Not working for me.

But also there is something wrong with that script in the "IsFull" variable getting set. Even with a terminal in the same cell , the script seems to be still seeing the player as the action ref through the terminal.

So the only thing I have been able to end up doing in putting a limit on it ... is in the container becoming useless once full.

Albeit you could transfer the contents to another container some other way ... just not really clear what you are wanting to see happen as an end result ?

 

But to be clear ... there is no way to create a hard limit on the container , just script trickery . And were you to use a dummy npc as your remote container with the carry weight limit . You could still infinitely fill their inventory , since they never have to move.

Link to comment
Share on other sites

I pretty much want it to behave how the inventory capacity works with companions, where there is a carry weight that you cannot surpass, only it wouldn't be carry capacity but rather storage capacity.

 

If that's what you want, you could do the same thing I did with my Mojave Express dropbox mod: make the container itself not the container, but a proxy access point to an NPC's inventory. (Make sure to give them unplayable gear with absurd stats so they don't equip anything you store on them

 

 

 

 

were you to use a dummy npc as your remote container with the carry weight limit . You could still infinitely fill their inventory , since they never have to move.

Not so; the npc container menu will just refuse to accept any more items once it hits the character's limit or the item you're trying to add will go over the limit. You can see this readily with the vanilla companions. The NPC *may* have to be a teammate, but I do not recall that being the case with my aforementioned mod.

Edited by Radioactivelad
Link to comment
Share on other sites

 

I pretty much want it to behave how the inventory capacity works with companions, where there is a carry weight that you cannot surpass, only it wouldn't be carry capacity but rather storage capacity.

 

If that's what you want, you could do the same thing I did with my Mojave Express dropbox mod: make the container itself not the container, but a proxy access point to an NPC's inventory. (Make sure to give them unplayable gear with absurd stats so they don't equip anything you store on them

 

 

 

 

were you to use a dummy npc as your remote container with the carry weight limit . You could still infinitely fill their inventory , since they never have to move.

Not so; the npc container menu will just refuse to accept any more items once it hits the character's limit or the item you're trying to add will go over the limit. You can see this readily with the vanilla companions. The NPC *may* have to be a teammate, but I do not recall that being the case with my aforementioned mod.

 

 

Oh cool ... I stand corrected. Which I admit my only experience of this would have been Fo3 ... But does it happen when slowed before completely being immobile , at immobile , or somewhat past that limit ?

Anyways ... ya that would be the way to go , using an already coded hard limit that can be tailored with stats/perks

But what about using a creature/robot so they won't equip stuff ?

Link to comment
Share on other sites

 

 

 

Oh cool ... I stand corrected. Which I admit my only experience of this would have been Fo3 ... But does it happen when slowed before completely being immobile , at immobile , or somewhat past that limit ?

Anyways ... ya that would be the way to go , using an already coded hard limit that can be tailored with stats/perks

But what about using a creature/robot so they won't equip stuff ?

 

 

I'm pretty sure NPCs don't get overencumbered at all, should you bypass the Refusal like giving them a ton of items through the console or geck. I haven't checked though, and it wouldn't surprise me since Oblivion had NPCs getting overencumbered. Either way it doesn't matter since for all intents an purpose, the NPC used for this method will never be directly interacted with.

 

Yeah I don't think there's any reason you couldn't use a Creature (that doesn't have a weapon list with playable items). I think I only used a human because I had them doing something silly as an easter egg for people who got curious about how the mod worked.

 

Link to comment
Share on other sites

Suriously ? ha he ... new word I just learned.

 

And not what I meant .

 

Your Ogre/Orcish pic I guess ?

 

A derivation of "Surly" I meant ... but not that your words have ever been.

Link to comment
Share on other sites

 

Yeah I don't think there's any reason you couldn't use a Creature (that doesn't have a weapon list with playable items). I think I only used a human because I had them doing something silly as an easter egg for people who got curious about how the mod worked.

 

 

Sorry back on topic ... I hope Amok will forgive me :pirate:

 

Do you mind sharing the scripting on the container link ?

 

Writing ... sharing here I mean .

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...