Jump to content

Recommended Posts

I still making my mods but now i have problem with invisible object i tried to solve this problem by 4 hours but my swap_animations and "craftings images" are still invisible 

"craftings images"

Spoiler

20180121173703_1.thumb.jpg.67c4691b636f365107979e9b62ba871e.jpg

 

chemicals+.rar

Edited by orlyx
i forgot to add .rar

Not much to go by, go here to post your don't starve together mod problems (judging by the picture it has elements that don't starve doesn't have):

https://forums.kleientertainment.com/forum/79-dont-starve-together-mods-and-tools/

For your item missing in your crafting tab you'd have to declare this diamond like so:

local diamond= Ingredient( "diamond", 1 ) --you need to declare a mod item as a crafting item
diamond.atlas = "images/inventoryimages/diamond.xml" --WARNING part of code is a guess but that diamond part is more or less how you add it
local diamond_cutter_recipe = AddRecipe("diamond_cutter", { Ingredient("gears", 1),  Ingredient("goldnugget", 8), diamond}, nil, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "images/inventoryimages/diamond_cutter.xml")

I can't guess for your swap animations cause there's not much to go by.

Well theres a number of problems besides the swap animations being invisible. So i'll just give a idea more or less on what's missing and such:

local function onequip(inst, owner) --reference
    owner.AnimState:OverrideSymbol("swap_object", "swap_diamond_cutter", "diamond_cutter") --here is the main problem the second argument is for the equip images(aka swap_item), the third argument however is where the build name from the scml file should be.

local function fn(Sim) --reference

local anim = inst.entity:AddAnimState() --reference
    inst.entity:AddNetwork() --this is missing makes the item tradable to other players and npcs if you want to

anim:SetBank("diamond_cutter") --this one should be the build name in the scml
    anim:SetBuild("diamond_cutter") --this one should more or less remain the same as the prefab name

inst:AddTag("sharp")--reference
    if not TheWorld.ismastersim then --used heavily in dst
   return inst
end

inst.entity:SetPristine() --idk what it does but it keeps a lot of the weird errors from poping up

Last notes if it doesn't go through the build name in the scml is different than the scml's name. The build name is when you open spriter up and see the name under animations, there will be the name and a drop down with idle, build or something like that. I only checked the diamond cutter as some of the others aren't included (modmain wise) and well its your mod so your work.

Edited by K1NGT1GER609

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