Don't Starve Together

Don't Starve Together

[DST] Musha
Makise Kurisu 12 Apr, 2021 @ 2:42pm
Here are fixes for Musha version:t 13.7.3 [Game version: Release (v458972)]
Update
The mod needed to many fixes and line changes to add all instructions here so I uploaded the fixed version here https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2463027103


I just felt like playing DST and couldn't find any other chars and cool as Musha, sadly found the mod broken and Sunnyholic gone for a couple years so I fixed the mod myself.

I'm not a modder so i don't know whether these edits will cause any other crashes later or not but my 5 hours or so playthrough has been going well so far.

Below are instructions to fix all the problems i have encountered so far:

Crash on server load
Comment the lines 170 and 171 in ..\Don't Starve Together\mods\workshop-439115156\modmain.lua

Change:
Asset( "ANIM", "anim/willow.zip"), Asset( "ANIM", "anim/wathgrithr.zip"),
To:
--Asset( "ANIM", "anim/willow.zip"), --Asset( "ANIM", "anim/wathgrithr.zip"),

Left click items on containers
Comment the last three lines in ..\Don't Starve Together\mods\workshop-439115156\data\components\container.lua

Change:
AddComponentPostInit("container", ContainerPostInit) AddComponentPostInit("container_relica", ContainerPostInit) AddPrefabPostInit("container_classified", ContainerPostInit)

To:
-- AddComponentPostInit("container", ContainerPostInit) -- AddComponentPostInit("container_relica", ContainerPostInit) -- AddPrefabPostInit("container_classified", ContainerPostInit)

Error when in combat and yamche trying to flee(?)

Change the line 406 in ..\Don't Starve Together\mods\workshop-439115156\scripts\brains\mushasmallbrain.lua:

math.max(owner_combat.laststartattacktime, owner_combat.lastdoattacktime or 0) + COMBAT_TIMEOUT > t

To:
math.max(owner_combat.laststartattacktime or 0, owner_combat.lastdoattacktime or 0) + COMBAT_TIMEOUT > t

The click on container fix effectively removes some of the code that i couldn't figure out the exact purpose, i haven't encountered any problems so far but I have only played solo and it seemed to be multiplayer related.

Weapons and hats not changing shape more than once unless reload

For every file below:
Phoenix sword: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\mushasword.lua Frost Phoenix Sword: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\mushasword_frost.lua Phoenix Glaive: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\phoenixspear.lua Phoenix Axe: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\mushasword4.lua Frost Hammer: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\frosthammer.lua Blade-Bow: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\bowm.lua Bunny scout hat: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\hat_mbunny.lua Iron bunny helmet: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\hat_mbunnya.lua Phoenix helmet: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\hat_mphoenix.lua Iron cat helmet: ..\Don't Starve Together\mods\workshop-439115156\scripts\prefabs\hat_mwildcat.lua
Replace every instance of:
inst.components.useableitem:StopUsingItem()
By:
inst:DoTaskInTime(0.1, function () inst.components.useableitem:StopUsingItem() end)

Crops getting harvested but not giving loot

Open the file:
\Don't Starve Together\data\databundles\scripts.zip

Extract this file:
..\scripts\components\pickable.lua

To, overwrite the existing file:
..\Don't Starve Together\mods\workshop-439115156\scripts\components\pickable.lua

At this point, Musha herself and other players should be able to harvest crops and receive all the loot normally.

[Optional steps]
The old file intended to allow Yamchee to be able to harvest things if ordered.
The instructions below restores this purpose, but Yamchee itself will require further fixes to actually do so as the current code does not seem to perceive the new crops. I will investigate such fix later.

Open the file and replace everything from lines 474 to 515 by:

if picker ~= nil then local target = nil if picker.components.inventory ~= nil and not picker:HasTag("yamcheb") and not picker:HasTag("critter") then target = picker.components.inventory elseif picker.components.container ~= nil and (picker:HasTag("yamcheb") or picker:HasTag("critter")) then target = picker.components.container end if target ~= nil and (self.product ~= nil or self.use_lootdropper_for_product ~= nil) then if self.droppicked and self.inst.components.lootdropper ~= nil then local pt = self.inst:GetPosition() pt.y = pt.y + (self.dropheight or 0) if self.use_lootdropper_for_product then self.inst.components.lootdropper:DropLoot(pt) else local num = self.numtoharvest or 1 for i = 1, num do self.inst.components.lootdropper:SpawnLootPrefab(self.product, pt) end end else if self.use_lootdropper_for_product then loot = {} for _, prefab in ipairs(self.inst.components.lootdropper:GenerateLoot()) do table.insert(loot, self.inst.components.lootdropper:SpawnLootPrefab(prefab)) end if not IsTableEmpty(loot) then picker:PushEvent("picksomething", { object = self.inst, loot = loot }) end for i, item in ipairs(loot) do if item.components.inventoryitem ~= nil then target:GiveItem(item, nil, self.inst:GetPosition()) end end else loot = SpawnPrefab(self.product) if loot ~= nil then if loot.components.inventoryitem ~= nil then loot.components.inventoryitem:InheritMoisture(TheWorld.state.wetness, TheWorld.state.iswet) end if self.numtoharvest > 1 and loot.components.stackable ~= nil then loot.components.stackable:SetStackSize(self.numtoharvest) end picker:PushEvent("picksomething", { object = self.inst, loot = loot }) target:GiveItem(loot, nil, self.inst:GetPosition()) end end end end end


Note

To Sunnyyyyholic: Feel free to apply these fixes and update the mod if you ever come back.
Last edited by Makise Kurisu; 20 Apr, 2021 @ 7:55am
< >
Showing 1-15 of 16 comments
吃饱饱 13 Apr, 2021 @ 10:19pm 
Thank you, but I found that the weapon can only be used and unloaded, not turned off。
Makise Kurisu 14 Apr, 2021 @ 10:49am 
I haven't gotten far in my playthrough yet, which weapon are you referring to?
吃饱饱 14 Apr, 2021 @ 9:49pm 
all weapon,All weapons will not change back when they change shape, but will automatically change back when they re-enter the game。
Makise Kurisu 15 Apr, 2021 @ 3:30am 
I haven't seen any weapons changing shapes yet, how do you get one to do so? I'll figure out some fix when i see the bug happening.
吃饱饱 15 Apr, 2021 @ 6:58am 
thank you,You can't change a weapon back when it's a shovel. Please see what the problem is
Makise Kurisu 15 Apr, 2021 @ 3:15pm 
Originally posted by 你是笨比吗:
thank you,You can't change a weapon back when it's a shovel. Please see what the problem is

Figured out the problem with weapons (was happening with the hats too), added fixes in the starter, check: "Weapons and hats not changing shape more than once unless reload".
Last edited by Makise Kurisu; 15 Apr, 2021 @ 3:16pm
76561198357641952 16 Apr, 2021 @ 12:18am 
Thanks for the fix.
And for everyone who are going to change the weapons and helmets texts, use Ctrl+R and copy the first text in the search line and the second text in the replace line, and just press replace all.
Hope this help you, and sorry if I misspell something, english isn´t my mother language
吃饱饱 16 Apr, 2021 @ 4:47am 
Thanks for the fix.It is ready for normal use.You're really very good,
Makise Kurisu 16 Apr, 2021 @ 6:41am 
You are welcome, let me know if you find any other bugs.
吃饱饱 16 Apr, 2021 @ 6:58am 
OK,I will tell you.
Captain Thomas 18 Apr, 2021 @ 11:27am 
When my friend tries to harvest a plant (self-grown crops) it harvests the plant but no item gets added to the inventory, this started happening only after I downloaded Musha so its probably a bug from the mod. We can still harvest the plants by using a shovel but there are benefits to harvesting by hand so if there would be a fix thatd be super amazing!
Makise Kurisu 19 Apr, 2021 @ 6:07am 
Originally posted by Captain Thomas:
When my friend tries to harvest a plant (self-grown crops) it harvests the plant but no item gets added to the inventory, this started happening only after I downloaded Musha so its probably a bug from the mod. We can still harvest the plants by using a shovel but there are benefits to harvesting by hand so if there would be a fix thatd be super amazing!

Figured this one out, check "Crops getting harvested but not giving loot".

Let me know if you find any other bugs.
Captain Thomas 20 Apr, 2021 @ 1:13am 
Originally posted by Makise Kurisu:

Figured this one out, check "Crops getting harvested but not giving loot".

Let me know if you find any other bugs.

awesome, thanks a ton!
吃饱饱 20 Apr, 2021 @ 5:53am 
I found that building the hive game would collapse.But I don't know if it caused it.
Makise Kurisu 20 Apr, 2021 @ 7:52am 
Originally posted by 你是笨比吗:
I found that building the hive game would collapse.But I don't know if it caused it.

Figured this one out but it required too many changes to fix so I re-uploaded the mod with all the fixes: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2463027103

Just follow instructions there to play with the fixed version. I'll upload any other fixes there.
< >
Showing 1-15 of 16 comments
Per page: 1530 50