Jump to content

[MOD] Smart Containers


Carlzilla

Recommended Posts

Hi there, I am not playing in multiplayer so I don't have this issue.

I need to figure out what function to call in order to grant access in multiplayer context.

Give me some time and I will figure it out.

 

Update:

 

I think I got it, at line 46 of BlockSmartLoot.cs replace "IsOwner" by "IsUserAllowed" and compile again with SDX.

I don't have mutilple player to test, so let me know.

 

I put your V2 on a test server with the changes you suggested. When someone tries to use the smart loot feature it removes the appropriate items from their inventory, but fails to place them in the storage container. If memory serves me, Carlzilla's original version did the same thing as it was built of singleplayer.

 

Thanks for giving it a shot. Your setup of the smart loot being controlled by what is already in the box would have been a good fit for multiplayer as everyone could configured their loot as they wanted to.

Link to comment
Share on other sites

I put your V2 on a test server with the changes you suggested. When someone tries to use the smart loot feature it removes the appropriate items from their inventory, but fails to place them in the storage container. If memory serves me, Carlzilla's original version did the same thing as it was built of singleplayer.

 

Thanks for giving it a shot. Your setup of the smart loot being controlled by what is already in the box would have been a good fit for multiplayer as everyone could configured their loot as they wanted to.

 

Indeed it is more complicated than I thought, the container lists are saved locally to the client, however we need them to be saved on the server side for this to work in multiplayer. So for now I am just trying to understand how it work. If one of the experts in the community have some clue they are welcome. ie How to create and/or load a file from and to the server? I need some sample code so I can adapt it to this mod.

Link to comment
Share on other sites

Indeed it is more complicated than I thought, the container lists are saved locally to the client, however we need them to be saved on the server side for this to work in multiplayer. So for now I am just trying to understand how it work. If one of the experts in the community have some clue they are welcome. ie How to create and/or load a file from and to the server? I need some sample code so I can adapt it to this mod.

 

That was the problem I ran into as well. Also, if you get it working in multiplayer, there's a chance it will break it for single player, since different methods are fired depending on whether the game is single or multi-player from what I understand.

 

Good luck.

Link to comment
Share on other sites

That was the problem I ran into as well. Also, if you get it working in multiplayer, there's a chance it will break it for single player, since different methods are fired depending on whether the game is single or multi-player from what I understand.

 

Good luck.

seems like it'll possibility need to check if it's being used on MP or not then and act accordingly, or make two versions of the mod. When I get something decent with understanding how to mod I'll join in because I got big plans coming and this mod will be the start of them.

Link to comment
Share on other sites

  • 1 year later...
This seems like a great mod. I'll have to see if I can convert it to work with A17. I am a relatively new to mods, but I'll try.

doesn't work on multiplayer, chest removes/hides content when someone else opens it. this has been true since a16. so fix that while you're at it?

Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...