kyupita Posted March 6 Share Posted March 6 I'm not sure how that template works since whenever I make an item I just use another item from the game as a base, but you should be fine to name it whatever without the "custom_" part. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853186 Share on other sites More sharing options...
Echsrick Posted March 6 Author Share Posted March 6 take an allready existing base game item? thats possible? Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853192 Share on other sites More sharing options...
kyupita Posted March 6 Share Posted March 6 Yep, you can either go into the game's files or go to this github link to more easily search for certain files. However, it seems all the game's hats are put into a singular file, so it's a little trickier. Looking at the custom item template's hat file though, it seems to have everything you need for your helmet. If you want, I can show you how I make items (Including how I made a bag/armor slot item), and how some components work to make your hat do what you want it to do. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853201 Share on other sites More sharing options...
Echsrick Posted March 6 Author Share Posted March 6 2 hours ago, kyupita said: Yep, you can either go into the game's files or go to this github link to more easily search for certain files. However, it seems all the game's hats are put into a singular file, so it's a little trickier. Looking at the custom item template's hat file though, it seems to have everything you need for your helmet. If you want, I can show you how I make items (Including how I made a bag/armor slot item), and how some components work to make your hat do what you want it to do. ok....ok...spriter works now it seems there was something i messed up earlyer where the items dit not show up so i redit everything of deleting everything from the anim folder and deleting every single instance of tex and xml file...still not so sure what to do with these zip folders that have the same immages as the other ones where i know to replace art inside...then went into the ++ places to replace every template name instance with either "brohammer" or "brohat" exchept for the string one that one i gave a differend name because i think thats the one name that will actualy show up in the playable area...for the hat i even removed the component of it being under the "DRESS" tab with the "WAR" tab and the whole part of it loosing durability when worn and being repairable with sewing kit i think so, only other thing was give the weapon a differend damage number, durability on use i dit not see that probably been in the armour file that i deleted completly...probably just get a new one and look in body armour template about durability and do the rest of helmet art asets but thats for tomorrow as i got tired out from this....brain excersise you could say haha...and thank you again for everything you cant immagine how much this means to me Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853217 Share on other sites More sharing options...
Echsrick Posted March 6 Author Share Posted March 6 allright then, not much for today, i dit the rest of the helmet art and i think i gave the armour helmet like durability aswell with the weapon one zip folder still confuses me what to do with it and i wonder if i can just simply put the item folder into the same folder as the character just as it is Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853277 Share on other sites More sharing options...
kyupita Posted March 6 Share Posted March 6 Did the zip files come with the template? If so, you can delete those and they'll be remade with the autocompiler. The item's scripts go into the prefabs folder, but if you're talking about the sprites keep them in the exported folder separate from your character's sprites. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853296 Share on other sites More sharing options...
Echsrick Posted March 6 Author Share Posted March 6 uhm...i am not sure how i sould read this....maybe something here is off but i realy dont know what its trying to tell me Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853301 Share on other sites More sharing options...
kyupita Posted March 6 Share Posted March 6 Copy and paste the code or screenshot the blueprint.lua file where it shows line 68 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853304 Share on other sites More sharing options...
Echsrick Posted March 6 Author Share Posted March 6 14 minutes ago, kyupita said: Copy and paste the code or screenshot the blueprint.lua file where it shows line 68 modmain "images/inventoryimages/brohat.xml") brohammer inst.components.inventoryitem.atlasname = "images/inventoryimages/brohammer.xml" brohat wait....is it because its an empty space? wow realy? if so i dit not expect nothing be the reason of not workin removing the line 68 is not changing anything then Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853306 Share on other sites More sharing options...
kyupita Posted March 7 Share Posted March 7 Can you show the whole file? The empty spaces don't really do anything as they're ignored by the game, they're more so used to make it easier to read code. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853319 Share on other sites More sharing options...
Echsrick Posted March 7 Author Share Posted March 7 29 minutes ago, kyupita said: Can you show the whole file? The empty spaces don't really do anything as they're ignored by the game, they're more so used to make it easier to read code. sorry its probably something realy stupid and easy the solution but i am not sure maybe i accitendaly deleted something or not noticed something? mod main PrefabFiles = { "brohat", "brohammer", } -- Load in some assets globally Assets = { Asset("ATLAS", "images/inventoryimages/brohat.xml"), Asset("IMAGE", "images/inventoryimages/brohat.tex"), Asset("ATLAS", "images/inventoryimages/brohammer.xml"), Asset("IMAGE", "images/inventoryimages/brohammer.tex"), } -- Load our item icon XMLs into the Minimap! AddMinimapAtlas("images/inventoryimages/brohat.xml") AddMinimapAtlas("images/inventoryimages/brohammer.xml") -- Declare global variables local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS local Ingredient = GLOBAL.Ingredient local RECIPETABS = GLOBAL.RECIPETABS local TECH = GLOBAL.TECH -- Custom strings! STRINGS.NAMES.CUSTOM_HAT = "Hammer bro helmet" STRINGS.RECIPE_DESC.CUSTOM_HAT = "Sadly not ressistance to jumps" STRINGS.CHARACTERS.GENERIC.DESCRIBE.CUSTOM_HAT = "That's one scientific hat." STRINGS.NAMES.CUSTOM_HANDITEM = "Hammer bro hammer" STRINGS.RECIPE_DESC.CUSTOM_HANDITEM = "Throw one throw two throw many!" STRINGS.CHARACTERS.GENERIC.DESCRIBE.CUSTOM_HANDITEM = "That's one scientific item." -- Custom recipes! --[[ Default recipetabs: RECIPETABS.TOOLS RECIPETABS.LIGHT RECIPETABS.SURVIVAL RECIPETABS.FARM RECIPETABS.SCIENCE RECIPETABS.WAR RECIPETABS.TOWN RECIPETABS.SEAFARING RECIPETABS.REFINE RECIPETABS.MAGIC RECIPETABS.DRESS Default tech levels (science level you need to craft the item): TECH.NONE TECH.SCIENCE_ONE TECH.SCIENCE_TWO TECH.SCIENCE_THREE TECH.MAGIC_TWO TECH.MAGIC_THREE ]] AddRecipe("brohat", { Ingredient("rope", 1), Ingredient("pigskin", 1) }, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, nil, -- <- Custom character tag would go here if you wanted only that character to craft your item "images/inventoryimages/brohat.xml") AddRecipe("brohammer", { Ingredient("rocks", 3), Ingredient("twigs", 2)}, Ingredient("rope", 1), RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, nil, -- <- Custom character tag would go here if you wanted only that character to craft your item "images/inventoryimages/brohammer.xml") brohammer local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/brohammer.zip"), Asset("ANIM", "anim/brohammer_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/brohammer.xml"), Asset("IMAGE", "images/inventoryimages/brohammer.tex"), } local function OnEquip(inst, owner) -- This will override symbol "swap_body" of the equipping player with your custom build symbol. -- Here's what this function is overriding: -- owner.AnimState:OverrideSymbol(Player's_symbol, Your_build(*.zip_filename), Symbol_from_your_build(name_of_subfolder_with_art) owner.AnimState:OverrideSymbol("swap_object", "brohammer", "swap_object") -- Players have 2 left arms - one of them is hidden when we are not holding an item and vice versa. -- Since we want to show an item on equip - hide ARM_normal and show ARM_carry. owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("brohammer.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("brohammer_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("brohammer_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("brohammer") MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "brohammer" inst.components.inventoryitem.atlasname = "images/inventoryimages/brohammer.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip(OnEquip) inst.components.equippable:SetOnUnequip(OnUnequip) inst:AddComponent("weapon") inst.components.weapon:SetDamage(40) inst.components.armor:InitCondition(250) MakeHauntableLaunch(inst) return inst end return Prefab("common/inventory/brohammer", MainFunction, Assets) brohat local Assets = { Asset("ANIM", "anim/brohat.zip"), Asset("ATLAS", "images/inventoryimages/brohat.xml"), Asset("IMAGE", "images/inventoryimages/brohat.tex"), } local function OnEquip(inst, owner) -- This will override symbol "swap_body" of the equipping player with your custom build symbol. -- Here's what this function is overriding: -- owner.AnimState:OverrideSymbol(Player's_symbol, Your_build(*.zip_filename), Symbol_from_your_build(name_of_subfolder_with_art) owner.AnimState:OverrideSymbol("swap_hat", "brohat", "swap_hat") -- Show/Hide some of the layers of the character while equipping the hat. owner.AnimState:Show("HAT") owner.AnimState:Show("HAIR_HAT") owner.AnimState:Hide("HAIR_NOHAT") owner.AnimState:Hide("HAIR") -- If the equipping guy is the player, do some additional stuff. if owner:HasTag("player") then owner.AnimState:Hide("HEAD") owner.AnimState:Show("HEAD_HAT") end -- If we should lose usage percent over time while wearing the hat - start dropping the percentage when we're equipping the hat. if inst.components.fueled ~= nil then inst.components.fueled:StartConsuming() end end local function OnUnequip(inst, owner) -- Clear the hat symbol from wearer's head. owner.AnimState:ClearOverrideSymbol("swap_hat") -- Show/Hide some of the layers of the character while unequipping the hat. owner.AnimState:Hide("HAT") owner.AnimState:Hide("HAIR_HAT") owner.AnimState:Show("HAIR_NOHAT") owner.AnimState:Show("HAIR") -- If the unequipping guy is the player, do some additional stuff. if owner:HasTag("player") then owner.AnimState:Show("HEAD") owner.AnimState:Hide("HEAD_HAT") end -- Stop consuming usage percent if the hat is not equipped. if inst.components.fueled ~= nil then inst.components.fueled:StopConsuming() end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("brohat.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("brohat") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("brohat") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("brohat") -- Waterproofer (from waterproofer component) - this tag can be removed, but it's here just in case, to make the game run better. inst:AddTag("waterproofer") MakeInventoryFloatable(inst, "small", 0.1, 1.12) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") -- Allow "trading" the hat - used for giving the hat to Pigmen. inst:AddComponent("tradable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "brohat" inst.components.inventoryitem.atlasname = "images/inventoryimages/brohat.xml" inst:AddComponent("equippable") inst.components.equippable.equipslot = EQUIPSLOTS.HEAD inst.components.equippable:SetOnEquip(OnEquip) inst.components.equippable:SetOnUnequip(OnUnequip) inst:AddComponent("armor") -- Durability = 320, resistance to damage = 80% inst.components.armor:InitCondition(320, 0.8) inst:AddComponent("waterproofer") -- Our hat shall grant 20% water resistance to the wearer! inst.components.waterproofer:SetEffectiveness(0.2) MakeHauntableLaunch(inst) return inst end return Prefab("common/inventory/brohat", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853320 Share on other sites More sharing options...
kyupita Posted March 7 Share Posted March 7 Is this your blueprint.lua file? Line 68 and the code surrounding it seem to look fine to me 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853321 Share on other sites More sharing options...
Echsrick Posted March 7 Author Share Posted March 7 blueprint lua? i dont see any blueprints actualy....these taps are kind of out dated or not? could it be something regarding this? being in tab "WAR" despite it maybe have been changes all these tabs? wait...could not that it the wilson folders that are inside can it? Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853327 Share on other sites More sharing options...
Echsrick Posted March 7 Author Share Posted March 7 last guess i remember i manualy replaced the immages inside the immage folder with my own inventory icons....i feel like i am stretching it Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853333 Share on other sites More sharing options...
Echsrick Posted March 7 Author Share Posted March 7 i was hoping i found the problem i replacedd the armor with weapon and CUSTOM_HAT and CUSTOM_HANDITEM with BROHAT and BROHAMMER respectivly..... but its....still this... Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853384 Share on other sites More sharing options...
Echsrick Posted March 7 Author Share Posted March 7 looked at another mod to maybe get smarter they had it this for weapon durability instead of mine sadly i still get the same error every time no matter what i change i am helpless now like i realy dont know what it is at this point Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853392 Share on other sites More sharing options...
Echsrick Posted March 8 Author Share Posted March 8 progress, a friend helped with makin the items work, so now i put them into the same folder and copy paste the mod main of the items into the same mod main of the character and some other crashing shehanigans happens and so on where it dont even show me text and then i worked around with it a bit and then i am not sure what to do anymore what they mean they could not load it? its in the files and all or not? Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853404 Share on other sites More sharing options...
kyupita Posted March 8 Share Posted March 8 Sorry, I was really busy today. Are you able to show a crash log? (In case you don't know where they're located, it's "Documents/Klei/DoNotStarveTogether" and then send the client_log.txt) From the most recent screenshot you sent, I can only guess a file/asset is missing or can't be found by the game due to an error or something. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853415 Share on other sites More sharing options...
Echsrick Posted March 8 Author Share Posted March 8 54 minutes ago, kyupita said: Sorry, I was really busy today. Are you able to show a crash log? (In case you don't know where they're located, it's "Documents/Klei/DoNotStarveTogether" and then send the client_log.txt) From the most recent screenshot you sent, I can only guess a file/asset is missing or can't be found by the game due to an error or something. dont worry you have your own life to look after too but heres the files for now server_log.txt the current state right now is: i can activate the mod, but somehow the character is not shown and if i click on go i get locked into a white screen that i have to ALTF4 to get out off Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853421 Share on other sites More sharing options...
kyupita Posted March 8 Share Posted March 8 Send your mod here and I'll look at it when I have time. 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853422 Share on other sites More sharing options...
Echsrick Posted March 8 Author Share Posted March 8 6 minutes ago, kyupita said: Send your mod here and I'll look at it when I have time. hammer bro.zip thank you for trying to help me Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853424 Share on other sites More sharing options...
Echsrick Posted March 8 Author Share Posted March 8 wait big update hammer bro.zip its...starting to work together now, the forward look with helm is good....the back one is ok...the side one...i dit try to change but nothing works trying to change the immages like its not even generating new anim files and all that anymore but at least its there.......what i do wish how ever...scroll down to see SCROLL HERE and you can see that...you cant see the items be on the ground anymore wich uhm...where i hold the grass they would be there but....well i dont understand why its not there i litteraly have all the png files and all made and replaced and all that stuff so i am not sure what i missed then another thing but that seems to crash is trying to make it so only this character can make the items by just adding the word "hammerbro" like the prefab name in this location directly after the blue text and the , but i guess i need to add a custom line of code there somewhere hammer bro.zip Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853431 Share on other sites More sharing options...
kyupita Posted March 8 Share Posted March 8 Should be fixed now. They weren't showing up on the ground since they still had the template's name in the scml file and weren't renamed (the bottom right area where it lists animation layers), and I found out the "blueprint.lua" error was because AddRecipe isn't used anymore, so I replaced the recipe code in your modmain to AddCharacterRecipe. hammer bro.zip 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853449 Share on other sites More sharing options...
Echsrick Posted March 8 Author Share Posted March 8 5 hours ago, kyupita said: Should be fixed now. They weren't showing up on the ground since they still had the template's name in the scml file and weren't renamed (the bottom right area where it lists animation layers), and I found out the "blueprint.lua" error was because AddRecipe isn't used anymore, so I replaced the recipe code in your modmain to AddCharacterRecipe. hammer bro.zip 6.95 MB · 0 downloads thank you!!!! there on the ground now, noticed you alsol gave the crafting items the builder tag so only he can build it but the character got no builder tag so cant make it so i added in this line here thinkin it would work exchept it seems there was some error in this...i feel like i had the right idea but maybe the words are differend or placed differendly Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853467 Share on other sites More sharing options...
kyupita Posted March 8 Share Posted March 8 Oh oops sorry - I forgot about that You put it in the right place, but "builder_tag" is tied to the recipe function. Replace what you put with inst:AddTag("hammerbro") 1 Link to comment https://forums.kleientertainment.com/forums/topic/169938-how-does-makin-mods-even-work/page/2/#findComment-1853472 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