Purswader Posted December 16, 2014 Share Posted December 16, 2014 Hey, i ran into some difficulties. My mod works fine if u just copy the files into the mod folder. But if i upload it to the workshop and try to run it, it crashes with: ..\source\animlib\animmanager.cpp(429) :: Tried to add build [izim_smoke] from file [../mods/zim together/anim/izim_smoke.zip] but we've already added a build with that name!I can't figuere out how to fix this. Code for izim_smoke: local assets ={ Asset("ANIM", "anim/izim_smoke.zip"),}local function onupdate(inst, dt) if inst.sound then inst.SoundEmitter:PlaySound("dontstarve/characters/wx78/spark") inst.sound = nil end inst.i = inst.i - dt * 2 if inst.i <= 0 then inst:Remove() endendlocal function StartFX(proxy, animindex) local inst = CreateEntity() inst:AddTag("FX") --[[Non-networked entity]] inst.entity:SetCanSleep(false) inst.persists = false inst.entity:AddTransform() inst.entity:AddAnimState() if not TheNet:IsDedicated() then inst.entity:AddSoundEmitter() end local parent = proxy.entity:GetParent() if parent ~= nil then inst.entity:SetParent(parent.entity) end inst.Transform:SetFromProxy(proxy.GUID) inst.AnimState:SetBank("poopcloud") inst.AnimState:SetBuild("izim_smoke") inst.AnimState:PlayAnimation("idle") inst.AnimState:SetFinalOffset(-1) inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh") local dt = 1 / 20 inst.i = .9 inst.sound = inst.SoundEmitter ~= nil inst:DoPeriodicTask(dt, onupdate, nil, dt)endlocal function OnRandDirty(inst) if inst._complete or inst._rand:value() <= 0 then return end --Delay one frame in case we are about to be removed inst:DoTaskInTime(0, StartFX, inst._rand:value()) inst._complete = trueendlocal function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddNetwork() inst:AddTag("FX") inst.Transform:SetScale(2, 2, 2) inst._rand = net_tinybyte(inst.GUID, "_rand", "randdirty") inst._complete = false inst:ListenForEvent("randdirty", OnRandDirty) if not TheWorld.ismastersim then return inst end inst.entity:SetPristine() inst.persists = false inst:DoTaskInTime(1, inst.Remove) inst._rand:set(math.random(3)) return instendreturn Prefab("common/fx/izim_smoke", fn, assets)It's more or less a copy from vanilla sparks. And like i said, it worked fine if u just copy the exakt same files in the mod folder. Link to comment Share on other sites More sharing options...
Developer PeterA Posted December 16, 2014 Developer Share Posted December 16, 2014 Do you happen to have both your local mod, as well as the workshop mod enabled? Link to comment Share on other sites More sharing options...
Purswader Posted December 16, 2014 Author Share Posted December 16, 2014 (edited) Do you happen to have both your local mod, as well as the workshop mod enabled? No I turned off my local first and then enable the workshop one. Whoops, its working now. Dont know why, but must be my fault. Edited December 16, 2014 by Purswader Link to comment Share on other sites More sharing options...
Developer PeterA Posted December 16, 2014 Developer Share Posted December 16, 2014 No I turned off my local first and then enable the workshop one. Whoops, its working now. Dont know why, but must be my fault. Good to know!I've been tracking down a rare bug caused by the way our mods are temporarily enabled when joining a server with them. It's possible that this was causing your mod to be enabled twice (the local version and the workshop version). If you happen to run into this scenario again, could you send me your log.txt file, That should be located in C:\Users\<username>\Documents\Klei\DoNotStarveTogether Thanks! Link to comment Share on other sites More sharing options...
Purswader Posted December 16, 2014 Author Share Posted December 16, 2014 Good to know!I've been tracking down a rare bug caused by the way our mods are temporarily enabled when joining a server with them. It's possible that this was causing your mod to be enabled twice (the local version and the workshop version). If you happen to run into this scenario again, could you send me your log.txt file, That should be located in C:\Users\<username>\Documents\Klei\DoNotStarveTogether Thanks! Was quite simplie to reproduce the crash. If i have both versions in the mod folder an disable one and enable the other it will happen. I attached the log. Let me know, if you need anything more.log.txt Link to comment Share on other sites More sharing options...
Developer PeterA Posted December 16, 2014 Developer Share Posted December 16, 2014 @Purswader, thanks for the information! Could you try disabling both versions of the mod. Hosting a game,(where the mod shouldn't show up), and then quitting the server, enabling your workshop mod and then creating a new server? Link to comment Share on other sites More sharing options...
Purswader Posted December 17, 2014 Author Share Posted December 17, 2014 @PeterA, so i started the game with the workshop mod enabled and the other disabled. Disabled both. Created a new server. Choosed wilson. Ate a berry. Closed the server. Enabled the workshop mod. Created a new server. Choosed new character. And all worked just fine.I have the log file just right here:log.txt Link to comment Share on other sites More sharing options...
Developer PeterA Posted December 17, 2014 Developer Share Posted December 17, 2014 Great, thanks for the info @Purswader! Link to comment Share on other sites More sharing options...
Purswader Posted December 17, 2014 Author Share Posted December 17, 2014 PeterA, I 'm glad I could help. Keep up the good work, DST is a lot of fun Link to comment 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