Jump to content

robob27

Member
  • Posts

    4
  • Joined

  • Last visited

robob27's Achievements

  1. Thanks for your reply! I did try to find some sort of unique ID property on items, but I wasn't able to find anything built in.. thinking about it again though.. perhaps I could set some sort of unique identifier on the Shopping List at creation myself, store it in mod data, and then server side I could use the unique ID in the mod data/playerIndex to lookup the item
  2. I am trying to write a shopping list mod and am having trouble with a key piece. I already have the recipe, UI for editing the list etc complete, but when I was testing with a friend we noticed that when I made changes to a list after it was created he was not able to see the updates. I started looking into sendClientCommand and sendServerCommand and was able to successfully pass my playerIndex to the server, and have the server send a message back to the client.. but I can't for the life of me figure out how to tell the server to update the mod data on the specific item I just updated on the client since sendClientCommand won't accept complex inputs like an InventoryItem. Anything I can think of seems like it would be prone to not working 100% of the time. Like if I were to make sure the item was on the player first (not ideal) and then find it by name, type, category, there are possibilities for the wrong list to be updated. There seems to be quite a few methods around transmitting mod data, but none of them seem to work with an InventoryItem, and I can't find any ways to convert an InventoryItem into something that has any of the mod data transmission methods either. Is this possible to do or am I chasing a unicorn here?
×
×
  • Create New...