Don't Starve Together

Don't Starve Together

Sanae Kochiya
Alodo 25 Nov, 2018 @ 7:27am
Bugs: suwako_hat cannot be picked up by anyone AND console/log spam
(Note: This post is addressed towards the mod author directly. So if anyone else reads this, don't get confused by the various "you" and "yours" scattered across this post. =v=')

Greetings there,

Obligatory opening statement: Very nice mod! c: The whole faith system is an interesting take on mana systems in DST, and playing with the super-powerful ranged attacks is also quite fun. Totally overpowered, sure, but very fun nonetheless.

Now, I'm writing because of two issues I've come across.

The first issue is quick and simple to explain:
The server console get spammed with random numbers constantly, leading to some unneccessarily huge server logs on long-running servers.

After a quick code dive, it seems like you forgot to remove a few print statements for debug purposes in sanae_shrine.lua and sanae_shrine2.lua.
There are 5 effective occurrances in total, which are as follows:
sanae_shrine.lua:103
sanae_shrine.lua:104
sanae_shrine.lua:436
sanae_shrine2.lua:68
sanae_shrine2.lua:69
If you could remove those, or put them into comments like you did with your other debug outputs, that would be very much appreciated. =~='

The second issue is a bit more complicated.
The suwako_hat becomes impossible to pick up from the ground (by any character, *including Sanae*) when certain other mods are installed alongside this mod.

In my case, the mod that caused this "conflict" was the Kotori mod. (workshop id: 489184199, if you want to test it yourself)
After a quick look through the code, it looks like you copy/pasted the code for the "characterspecific" component from either this or another mod. However, the code is effectively unused if your mod is installed on its own. The central "CanPickUp" method is never called by anything in your mod.
That is, unless you have a mod installed that implemented this exact same component to its full extent, and thus actually executes that method to disallow other characters from certain interactions with it. Which the Kotori mod does.

I assume that you intended to make the suwako hat exclusive to Sanae. But in the code, you for some reason set the owner to "suwako". (at suwako_hat.lua:123) Meaning, only the character "suwako" can pick the item up.
The character "suwako" doesn't exist though, rendering the item effectively un-pickup-able. (Or, if your mod is installed on its own: Nothing happens at all. Again, the implementation of the component in your mod is incomplete.)

So, either switch the owner character from "suwako" to "sanae" there, so that Sanae can pick up the hat even if other mods add the proper component handling, or, my personal suggestion: Completely remove that component from your code. If your mod's installed on its own, that component has no effect in the first place. So that way, you could easily get rid of all the cross-mod conflicts while losing nothing. (And personally, I believe making items un-pickup-able by other characters is a terrible idea. Just imagine 5 other characters with characterspecific items on your map, all of them dumping their stuff in your chests, and then you have to manage the chests. You can't. And once one of those other players stops playing, nobody can.)

Or, if you *really* want the hat to be exclusive to Sanae, make it so the item only checks who is using it when it is equipped. That way, anyone can still pick up and move the hat item around, but only Sanae can actually *use* it. Though I have a feeling this change might become a bit more involved. Not impossible, but definitely a bit complicated.
But yeah, at that point, we're talking about opinions, so feel free to disregard that particular statement. This is your mod after all.
I'd still suggest looking into a solution for this particular cross-mod conflict though.

All that being said though, very nice work so far. Your efforts worked out pretty well in the end! c:

If you got further questions or need further assistance, feel free to hit me up.

Sincerely - Alodo