Jump to content

Recommended Posts

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 by Tezumoto
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.

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.

@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.

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.

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.

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.)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...