Jump to content

Recommended Posts

well yes, they just dont have parts that are required like networking, function order, and replicas.

 

alright. ive looked at the coding and it doesnt seem to use replicas or networking. im going to attach a semi complete file that will show the proper structure of a dst custom item. it doesnt have a replica, since it doesnt use inventory slots like a backpack. so you are gonna have to look at the backpack from the games code to figure that out.

 

I made my own mod, but when I choose my character and start the game it gives me the error code (Attachment to post)

 

Here's what I have in my leifbackpack.lua prefab file.

local assets ={	Asset("ANIM", "anim/leifbackpack.zip"),	Asset("ANIM", "anim/swap_leifbackpack.zip"),}local function onequip(inst, owner)    owner.AnimState:OverrideSymbol("swap_body", "swap_leifbackpack", "leifbackpack")    owner.AnimState:OverrideSymbol("swap_body", "swap_leifbackpack", "swap_body")    inst.components.container:Open(owner)    endlocal function onunequip(inst, owner)    owner.AnimState:ClearOverrideSymbol("swap_body")    owner.AnimState:ClearOverrideSymbol("leifbackpack")    inst.components.container:Close(owner)endlocal function fn()	local inst = CreateEntity()    	inst.entity:AddTransform()	inst.entity:AddAnimState()	inst.entity:AddSoundEmitter()    inst.entity:AddMiniMapEntity()    inst.entity:AddNetwork()    MakeInventoryPhysics(inst)    inst.AnimState:SetBank("backpack1")    inst.AnimState:SetBuild("swap_leifbackpack")    inst.AnimState:PlayAnimation("anim")        inst.foleysound = "dontstarve/movement/foley/backpack"    if not TheWorld.ismastersim then        return inst    end    inst.entity:SetPristine()        inst:AddComponent("inspectable")        inst:AddComponent("inventoryitem")    inst.components.inventoryitem.cangoincontainer = true	inst.components.inventoryitem.atlasname = "images/inventoryimages/leifbackpack.xml"    inst:AddComponent("equippable")    inst.components.equippable.equipslot = EQUIPSLOTS.BODY        inst.components.equippable:SetOnEquip(onequip)    inst.components.equippable:SetOnUnequip(onunequip)    inst:AddComponent("container")    inst.components.container:WidgetSetup("backpack")    MakeHauntableLaunchAndDropFirstItem(inst)    return instendreturn Prefab("common/inventory/leifbackpack", fn, assets)

post-525858-0-63643200-1420685923_thumb.

you still need to write the replica. replicas go into the modmain i think. im not sure. and your photo doesnt tell us anything. i will take a look at the log.

 

edit: at the very bottom of your log is:

..\source\animlib\animmanager.cpp(429) :: Tried to add build [backpack] from file [anim/backpack.zip] but we've already added a build with that name!
...where i found this kinda bothers me. this tells you exactly whats wrong. located in the simplest place to find. the logs arent very hard to read btw, you can usually read and fix your issues yourself if you look in it.
using the same exact file doesnt work for dst. you need to extract out the animations for the backpack using krane. with this you get a spriter project. all you would have to do is rename this and a bit of other work. its not hard to read these bruh.
Edited by WitchDoctEr16

 

you still need to write the replica. replicas go into the modmain i think. im not sure. and your photo doesnt tell us anything. i will take a look at the log.

 

edit: at the very bottom of your log is:

..\source\animlib\animmanager.cpp(429) :: Tried to add build [backpack] from file [anim/backpack.zip] but we've already added a build with that name!
...where i found this kinda bothers me. this tells you exactly whats wrong. located in the simplest place to find. the logs arent very hard to read btw, you can usually read and fix your issues yourself if you look in it.
using the same exact file doesnt work for dst. you need to extract out the animations for the backpack using krane. with this you get a spriter project. all you would have to do is rename this and a bit of other work. its not hard to read these bruh.

 

That was an old log before I fixed it. That was the log that I fixed after reading it. But now I get this.

 

It's like there was a problem with the game loading it's whole interface.

 

*EDIT*: And yes, I renamed the builds.

post-525858-0-66747200-1420686616_thumb.

Edited by DegradedScroll

its looking for something atlas related called FROMNUM.

[Fixed] SPAWNING PLAYER AT: (454.00, 0.00, 154.00) Serialize session to session/091000688AF11848/KU_cLk9USklWARNING! Invalid resource handle for atlas 'FROMNUM', did you remember to load the asset?Looking for default texture '(null)' from atlas 'FROMNUM'.2718746151

idk what this is, but you might.

 

 

its looking for something atlas related called FROMNUM.

[Fixed] SPAWNING PLAYER AT: (454.00, 0.00, 154.00) Serialize session to session/091000688AF11848/KU_cLk9USklWARNING! Invalid resource handle for atlas 'FROMNUM', did you remember to load the asset?Looking for default texture '(null)' from atlas 'FROMNUM'.2718746151

idk what this is, but you might.

 

Upon searching for FROMNUM, it appears to be one of the vanilla files. One named

'dontstarve_steam.exe' which is in Dont Starve Together Beta/bin,

and

'dontstarve_steam.pdb' which is also in Don't Starve Together Beta/bin.

Judging by the log I attached before, I can only assume my mod is the culprit behind to why this is not working. But why?

 

custom items work very differently than base items. what you should do is pretty much make your own inventory item that looks like a backpack. or you know, customize it to hell. its not easy to just start with a backpack :/ or maybe it is.

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