I want to make a container that is globally accessible given the right permissions. In the current case, permissions are related to which account the character is on. I would like all characters who have access to the container to make use of it simultaneously, and see the changes made by the others.

I've been trying this for a while. I've gotten pretty far by 1) Moving the container to the map the character is on (doesn't work well with multiple characters) 2) Adjusting item.cs to add special cases for determining which clients should get updates regarding the container 3) Making the character opening the container (through a command near banker in my case) the parent of the container.

Right now, I can open the container anywhere. Other characters can see changes being made to it (if they're on the same map). However, only the last player to open it can make changes (related to them being the parent). If A opens the container, and then B does, then if A tries dragging an item in the container, it will say either 1) That is too far away. or 2) The item is not yours, you'll have to steal it (or something similar). like when you're snooping someone's backpack.

I've tried overriding a ton of functions hoping to grant permission but I haven't been able to find the right place. I've overwritten TryDropItem, CheckLift, IsAccessibleTo, OnDragDrop, OnDragDropInto, CheckHold... I've set Parent, I've set the map, I've altered ProcessDelta in item.cs... I feel like what I'm trying to do shouldn't be this complicated! Any help would be appreciated.
 
I think it is in the core. There should be some range check, probably in items.cs

I think it very well might be. In the ProcessDelta in item.cs I made some changes by adding an alternative condition to CanSee && InRange check. There's a plethora of functions, though, with zero documentation on when the function is called or what it does. And many of them I've already tried to override as I've mentioned :(

I've also searched the project on the text string that appears when dragging an item in someone else's backpack, but it's also not mentioned anywhere...

Which function is used to check whether you're allowed to pick something up? CheckLift? Overriding that didn't seem to work.
 
Did you recompile afer you added the mod?

Yes. The additions I've made in item.cs so far seem to serve their purpose (making it so clients get updated if they have the box opened even if they aren't in range). But they don't allow picking up items unless they are the parent (which in my case would be whoever opened it most recently, but I'd like to get rid of needing to set a Parent altogether ideally).
 
Back