Helwdrokin Posted September 23, 2021 Share Posted September 23, 2021 so i am new at moding, and i was trying to understand how the inventory works in dont starve so in the gamesfiles have three inventories inventory.lua inventory_replica.lua inventory_clasified.lua can you help me to undestand the diference between them ? Link to comment https://forums.kleientertainment.com/forums/topic/133901-help-me-understand-the-three-inventories/ Share on other sites More sharing options...
Nelzanger Posted September 24, 2021 Share Posted September 24, 2021 (edited) I'm still struggling with the network features, so I cannot lend a helpful hand here. However I suggest you read Rezecib's guide for more information on replicas and classified, at the part where he explains the major engine differences (replicas, classifieds, netvars, and RPCs). Also, you might check this : Simplex's explanation of the purposes of replicas and classifieds: Spoiler On 12/25/2014 at 6:30 AM, simplex said: There's a lot of overlap between replicas and classified, and there isn't something that can be done with one that can't be done with the other. The major functional difference is their main goal: replicas are mostly used to make data available on clients, while classifieds are mostly used to respond to changes on serverside data. Other than that, it's mostly a matter of efficiency. Netvars are each bound to an entity, and every netvar bound to a single entity must have a unique name (by name I mean the second parameter to their constructors). If binding many netvars to a single entity, in order to achieve uniqueness a longer name must be used, which incurs network overhead since that string must be transmitted (at least on initialisation, when pairing server and client netvars, but depending on how the engine implements it the string may be transmitted whenever the netvar's value changes). By using a separate entity to hold netvars, the classified entity, shorter names may be used without the risk of clashes. Edited September 24, 2021 by Nelzanger Link to comment https://forums.kleientertainment.com/forums/topic/133901-help-me-understand-the-three-inventories/#findComment-1497960 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now