Tesumoto Posted November 23, 2016 Share Posted November 23, 2016 (edited) Is it possible to create mod: the sewing kit could restore the durability of fur sleeping bag? Or maybe this mod already exists? Then please give a link to it) Edited November 23, 2016 by Tezumoto Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/ Share on other sites More sharing options...
alainmcd Posted November 24, 2016 Share Posted November 24, 2016 Here you go. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841062 Share on other sites More sharing options...
Tesumoto Posted November 24, 2016 Author Share Posted November 24, 2016 (edited) 14 hours ago, alainmcd said: Here you go. 1) This mod should work for all or only host? (need to work for all) 2) How to configure the number of repairs for fur sleeping bag? Now for the repair of fur sleeping bag splurge 20% sewing kit. You can make the settings for this mod, so people can use three options? 20% / 25% / 33% Edited November 24, 2016 by Tezumoto Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841160 Share on other sites More sharing options...
Lumina Posted November 24, 2016 Share Posted November 24, 2016 3 hours ago, Tezumoto said: 1) This mod should work for all or only host? (need to work for all) Hey, seems you missed a "Thank you very much" in your post somewhere, someone just code an entire mod for you only, it could be great to show some gratitude before asking for more ! Also, usually a well done mod works for everyone on the server. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841203 Share on other sites More sharing options...
Tesumoto Posted November 24, 2016 Author Share Posted November 24, 2016 8 minutes ago, Lumina said: Hey, seems you missed a "Thank you very much" in your post somewhere, someone just code an entire mod for you only, it could be great to show some gratitude before asking for more ! Also, usually a well done mod works for everyone on the server. I am grateful that the person has done this mod. But I still do not use him. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841205 Share on other sites More sharing options...
alainmcd Posted November 24, 2016 Share Posted November 24, 2016 @Tezumoto 1) Only the host needs it. As Lumina points out, a well-written mod should work for everyone and auto-download when needed, not you having to know about that. Notice that I have only tested the mod while hosting (both overworld-only and overworld+caves), but I haven't tested it as a pure client, please do tell me if you encounter any issues so I can fix them. 2) No configuration options. There's a couple of reasons for that: Firstly, I just looked at the thermal stone and tried to emulate that behaviour. Thermal stones are always fully repaired and it would require a significant rewrite to change that. Secondly, I encountered an issue with rounding, where three uses of exactly 1/3 of the total duration left the fur roll with still 1% left. I "solved" it by forcing it to use up 0.334 on every use. Adding customisation would require either fixing the rounding problem, which didn't seem obvious at a first glance, or testing every case and adding a hacky solution to each option. Neither sounds too appealing to me. And lastly, balance-wise I don't think there's any problem. Fur rolls only have 3 uses, so you only get one or two repairs, and they aren't all that expensive, unless you really want to avoid bunnies. So I'm happy with how the mod works. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841246 Share on other sites More sharing options...
Tesumoto Posted November 24, 2016 Author Share Posted November 24, 2016 52 minutes ago, alainmcd said: @Tezumoto 1) Only the host needs it. As Lumina points out, a well-written mod should work for everyone and auto-download when needed, not you having to know about that. Notice that I have only tested the mod while hosting (both overworld-only and overworld+caves), but I haven't tested it as a pure client, please do tell me if you encounter any issues so I can fix them. 2) No configuration options. There's a couple of reasons for that: Firstly, I just looked at the thermal stone and tried to emulate that behaviour. Thermal stones are always fully repaired and it would require a significant rewrite to change that. Secondly, I encountered an issue with rounding, where three uses of exactly 1/3 of the total duration left the fur roll with still 1% left. I "solved" it by forcing it to use up 0.334 on every use. Adding customisation would require either fixing the rounding problem, which didn't seem obvious at a first glance, or testing every case and adding a hacky solution to each option. Neither sounds too appealing to me. And lastly, balance-wise I don't think there's any problem. Fur rolls only have 3 uses, so you only get one or two repairs, and they aren't all that expensive, unless you really want to avoid bunnies. So I'm happy with how the mod works. Thank you for your work. Just have a string all_clients_require_mod = false in modinfo.lua There needs to be set to "false"? Just might be a problem on a server with caves. I think so. Just right now I have no way of checking. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841260 Share on other sites More sharing options...
alainmcd Posted November 24, 2016 Share Posted November 24, 2016 Clients do not need to download the mod. There are no new assets or strings and logic is handled by the server. I'm not sure how exactly it works, but it's the way it is. I just tested it on a hosted world as a client and it works. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841266 Share on other sites More sharing options...
Lumina Posted November 24, 2016 Share Posted November 24, 2016 Some things are only managed server-side. I know that for example, adding a drop to some things is server-side only. Component in general are often server-side only, and i guess that "repair" is a component. Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841270 Share on other sites More sharing options...
alainmcd Posted November 24, 2016 Share Posted November 24, 2016 Yes, components for the most part are server-only, but there's something going on behind the scenes so that clients know that certain actions are possible. In this case, adding the repairing mechanic is server-side, but magically clients do see the option to repair. I imagine adding a completely new action would require it to be registered client-side too, but I haven't tried anything like that, so I really wouldn't know. (I don't know how much you know about this and I don't know all that much, so I'm sorry if it sounds like I'm talking down to you.) Link to comment https://forums.kleientertainment.com/forums/topic/71951-please-help-in-the-creation-of-mod/#findComment-841278 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