Aquaterion Posted January 6, 2015 Share Posted January 6, 2015 (edited) I was trying to experiment with modding on DST and I thought why not try to make a simple recolored chest for practice, After about 6 errors, I got an error that I can't seem to fix.The log.txt give the following error:..\source\animlib\animmanager.cpp(429) :: Tried to add build [treasure_chest] from file [../mods/mymod/anim/newchest.zip] but we've already added a build with that name!My thought is that because of copying the build.bin and anim.bin from: Don't Starve Together Beta/data/anim/treasure_chest.zip. I'm not sure how to open or edit the .bin files or if the problem is even them. I tried opening them the ktools krane, but it just made the atlas-01.png which really didn't help, probably did something wrong. The mod is now working fine except for 1 thing, my chest has a hitbox of 9 chests together(3x3) as if it was a big chest. Any help would be appreciated. (Code can be found in a post below) Edited January 7, 2015 by Aquaterion Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/ Share on other sites More sharing options...
Aquaterion Posted January 6, 2015 Author Share Posted January 6, 2015 Forgot to mention, If any code is needed, just ask. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-597932 Share on other sites More sharing options...
DarkXero Posted January 6, 2015 Share Posted January 6, 2015 Inside build.bin there is a treasure_chest id, that you need to change. http://forums.kleientertainment.com/topic/27247-new-asset-tools-animations-textures-sounds-and-layouts/ Try using Spriter. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-597940 Share on other sites More sharing options...
Aquaterion Posted January 6, 2015 Author Share Posted January 6, 2015 Inside build.bin there is a treasure_chest id, that you need to change. http://forums.kleientertainment.com/topic/27247-new-asset-tools-animations-textures-sounds-and-layouts/ Try using Spriter. Hey, thanks for the Reply and confirming where the problem was. I installed spriter but I'm not sure how good I am at using it. I tried putting my newchest.png at x=0 y=0 and saving it as .scml like the post says, but it says you need some sort of Mod tools installed which I can't find where to get. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-597944 Share on other sites More sharing options...
Kzisor Posted January 6, 2015 Share Posted January 6, 2015 @Aquaterion, in Steam click on LIBRARY and select Tools. Scroll down to Don't Starve Mod Tools and install. That is the mod tools which everyone talks about. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-597945 Share on other sites More sharing options...
Aquaterion Posted January 6, 2015 Author Share Posted January 6, 2015 (edited) (Sorry for double post, Can't seem to find the edit button)Is there a way to rename this "id" with krane? In the read-me it had this"--rename-build <build name>Renames the input build to the given name." If that is usable and I could know what exactly to write to do it, that would be perfect. Thanks. Edit: The Edit button finally appeared! Edit2: I Downloaded the Tools thing, Thanks. At least now I know how to upload the mod once I get it to work since I still don't have a clue on how to use Spriter. Edited January 7, 2015 by Aquaterion Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-597946 Share on other sites More sharing options...
Aquaterion Posted January 7, 2015 Author Share Posted January 7, 2015 Ok So I managed to use krane to get the .scml and I also put the .png in my mods/mymod/anim folder together with the .scml like the tutorial said but when it starts compiling it only compiles the singleplayer mod "screeher" which I didn't download.(I know it's a KLEI made mod) Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598145 Share on other sites More sharing options...
Aquaterion Posted January 7, 2015 Author Share Posted January 7, 2015 Ok So instead I used Matt's Build Renamer and fixed the build.bin problem, but now the anim.bin has the same problem. Is there any renamer program for that? Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598189 Share on other sites More sharing options...
Crazybait24 Posted January 7, 2015 Share Posted January 7, 2015 (edited) Ok So instead I used Matt's Build Renamer and fixed the build.bin problem, but now the anim.bin has the same problem. Is there any renamer program for that? What do you mean by anim.bin has the same problem? Did you copy the anim.bin from the treasurechest.zip or did you create your own? Ok so the anim.bin shouldn't change unless your editing the animation of said item.. Edited January 7, 2015 by Crazybait24 Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598200 Share on other sites More sharing options...
Aquaterion Posted January 7, 2015 Author Share Posted January 7, 2015 What do you mean by anim.bin has the same problem? Did you copy the anim.bin from the treasurechest.zip or did you create your own? Ok so the anim.bin shouldn't change unless your editing the animation of said item..Yea I just figured it out like 5 minutes ago from a thread on about making a new axe and using the same axe anim.bin. Thanks. The Mod is working find but when I craft it to place it, it has a huge hitbox that makes it have to be around 2 chests away from other items to be able to be placed, how can i change that? Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598207 Share on other sites More sharing options...
Crazybait24 Posted January 7, 2015 Share Posted January 7, 2015 Send me your code and I'll take a look. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598209 Share on other sites More sharing options...
Aquaterion Posted January 7, 2015 Author Share Posted January 7, 2015 require "prefabutil"local assets={ Asset("ANIM", "anim/ui_chest_3x3.zip"), Asset("ANIM", "anim/foodchest.zip"), }local function onopen(inst) inst.AnimState:PlayAnimation("open") inst.SoundEmitter:PlaySound("dontstarve/wilson/chest_open")end local function onclose(inst) inst.AnimState:PlayAnimation("closed") inst.SoundEmitter:PlaySound("dontstarve/wilson/chest_close")end local function onhammered(inst, worker) inst.components.lootdropper:DropLoot() inst.components.container:DropEverything() SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst.SoundEmitter:PlaySound("dontstarve/common/destroy_wood") inst:Remove()endlocal function onhit(inst, worker) inst.AnimState:PlayAnimation("hit") inst.components.container:DropEverything() inst.AnimState:PushAnimation("closed", false) inst.components.container:Close() endlocal function onbuilt(inst) inst.AnimState:PlayAnimation("place") inst.AnimState:PushAnimation("closed", false) endlocal function chest(style) return function() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddMiniMapEntity() inst.entity:AddNetwork() inst.MiniMapEntity:SetIcon(style..".png") inst:AddTag("structure") inst.AnimState:SetBank("chest") inst.AnimState:SetBuild("foodchest") inst.AnimState:PlayAnimation("closed") MakeSnowCoveredPristine(inst) if not TheWorld.ismastersim then return inst end inst.entity:SetPristine() inst:AddComponent("inspectable") inst:AddComponent("container") inst.components.container:WidgetSetup("treasurechest") inst.components.container.onopenfn = onopen inst.components.container.onclosefn = onclose inst:AddComponent("lootdropper") inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(2) inst.components.workable:SetOnFinishCallback(onhammered) inst.components.workable:SetOnWorkCallback(onhit) inst:AddComponent("hauntable") inst.components.hauntable.cooldown = TUNING.HAUNT_COOLDOWN_SMALL inst.components.hauntable:SetOnHauntFn(function(inst, haunter) local ret = false if math.random() <= TUNING.HAUNT_CHANCE_OCCASIONAL then if inst.components.container then local item = inst.components.container:FindItem(function(item) return not item:HasTag("nosteal") end) if item then inst.components.container:DropItem(item) inst.components.hauntable.hauntvalue = TUNING.HAUNT_MEDIUM ret = true end end end if math.random() <= TUNING.HAUNT_CHANCE_VERYRARE then if inst.components.workable then inst.components.workable:WorkedBy(haunter, 1) inst.components.hauntable.hauntvalue = TUNING.HAUNT_MEDIUM ret = true end end return ret end) inst:ListenForEvent("onbuilt", onbuilt) MakeSnowCovered(inst) return inst endendreturn Prefab( "common/foodchest", chest("foodchest"), assets), MakePlacer("common/foodchest_placer", "chest", "foodchest", "closed")I'm guessing it's something to do with placer, because if I make a normal chest, I can put it very close to the new chest. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598215 Share on other sites More sharing options...
Crazybait24 Posted January 7, 2015 Share Posted January 7, 2015 (edited) Can you put 2 of the new chests near each other? Edited January 7, 2015 by Crazybait24 Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598218 Share on other sites More sharing options...
Aquaterion Posted January 7, 2015 Author Share Posted January 7, 2015 Can you put 2 of the new chests near each other?Nope, when trying to place down a new chest, it has a hit box of around 9 chests(3x3), no matter what the other things are next to it. But a normal chest has a hitbox of not even 1 chest. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598221 Share on other sites More sharing options...
Crazybait24 Posted January 7, 2015 Share Posted January 7, 2015 (edited) Well I doubt I would be any help with my low lua knowledge Edited January 7, 2015 by Crazybait24 Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598223 Share on other sites More sharing options...
DarkXero Posted January 8, 2015 Share Posted January 8, 2015 You have to use "common/treasurechest_placer" instead of "common/foodchest_placer". Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598513 Share on other sites More sharing options...
Aquaterion Posted January 8, 2015 Author Share Posted January 8, 2015 You have to use "common/treasurechest_placer" instead of "common/foodchest_placer". I tried that yesterday. I have about 8 chests made all in 1 lua, so when i did that, the placer took the texture of the last chest I made a placer for, so when ever I go craft a chest, even the default one, it would use the texture of chest8, and it still had the same hitbox, not sure how.. Link to comment https://forums.kleientertainment.com/forums/topic/48569-adding-a-new-container/#findComment-598651 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