Pyrobolser

  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Pyrobolser

  • Rank
    Junior Member
...

Badges

Recent Profile Visitors

450 profile views
  1. Hi there ! Maybe it's not what you're trying to do, but did you know you can specify directly what can and can't go in your container ? I did a similar item for my 'blacksmith' mod. It's a furnace that take 3 item (rock, flint,...) and combine it to create one new item (iron, steel,...). I put this in my mod main : -- This test what items can go in the furnacefunction params.furnace.itemtestfn(container, item, slot) if item.prefab == "flint" or item.prefab == "rocks" or item.prefab == "ash" or item.prefab == "charcoal" or item.prefab == "iron" or item.prefab == "goldnugget" or item.prefab == "moonrocknugget" or item.prefab == "sharp_crystal" then return true end return falseendI can give you all the code if you think it can help =)
  2. Try to add a "OnSave" function that saves your current level when you save the game (or exit the game). And a "OnLoad" function that loads your level. I think there are similar functions with the robot character.
  3. "background" is a custom anim/image I made. It's in the asset "anim/furnace.zip". It is for the background of the container menu (without the 3 item slot and the button). I think you can comment out or suppr lines 68 & 69. inst.components.container.widgetanimbank = "background" inst.components.container.widgetanimbuild = "background" Same goes for : animbank = "background", animbuild = "background", But you know if you just copy past the code I gave you, it won't work. It is just some part of the file, not all the code.
  4. I think the same ! This modding community is great =) True !Every time I post some of my code, @rezecib appear and tells me how to improve it. And I am just like "Oh ? You can DO this ? Woooooohh !" It's like the Djinni of DST modding =P
  5. I think it is a problem with your assets. Or something related to wrong image name, or wrong call of an image. Maybe you changed the name of your character, but not the name of the images, or something like that.
  6. I am currently working on a Blacksmith mod. I created an placable item named Furnace that can refine 3 minerals to create one new item. I can't do all the code for you, but I think my code can help you a lot =) Here is a part of my modmain.lua : Some assets I made. Don't use mine, it won't work for you. Asset("ANIM", "anim/furnace.zip"), Asset("ATLAS", "images/inventoryimages/furnace.xml"), Asset("IMAGE", "images/inventoryimages/furnace.tex"),The setting of the furnace : local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal OldIsRecipeValid = GLOBAL.IsRecipeValidlocal function IsRecipeValid(recipe) return OldIsRecipeValid(recipe) and ((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded)endGLOBAL.IsRecipeValid = IsRecipeValidlocal Recipe = GLOBAL.Recipelocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECH-- This will allow a player to make a furnacelocal recipes = { Recipe("furnace", {Ingredient("cutstone", 4), Ingredient("charcoal", 6), Ingredient("goldnugget", 6)}, RECIPETABS.TOWN, TECH.SCIENCE_TWO,"furnace_placer" ),}-- This is for the images one the tab to create the furnacefor k,v in pairs(recipes) do v.tagneeded = true v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end-- This is the setting of the furnace as a container_G = GLOBALlocal params={} params.furnace ={ widget = { slotpos = { _G.Vector3(0, 32 + 4, 0), _G.Vector3(0, -(32 + 4), 0), _G.Vector3(0, -(64 + 32 + 8 + 4), 0), }, animbank = "background", animbuild = "background", pos = _G.Vector3(100, 0, 0), side_align_tip = 100, buttoninfo = { text = "Refine", position = _G.Vector3(0, -165, 0), } }, acceptsstacks = false, type = "cooker",}-- This test what items can go in the furnacefunction params.furnace.itemtestfn(container, item, slot) if item.prefab == "flint" or item.prefab == "rocks" or item.prefab == "ash" or item.prefab == "charcoal" or item.prefab == "iron" or item.prefab == "goldnugget" or item.prefab == "moonrocknugget" or item.prefab == "sharp_crystal" then return true end return falseendAnd the name for the fonction you want to apply when using the button : function params.furnace.widget.buttoninfo.fn(inst)Now this is from the prefab furnace.lua : local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddLight() inst.entity:AddNetwork() inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end MakeObstaclePhysics(inst, .5) inst.Light:Enable(false) inst.Light:SetRadius(.6) inst.Light:SetFalloff(1) inst.Light:SetIntensity(.5) inst.Light:SetColour(235/255,62/255,12/255) inst.AnimState:SetBank("furnace") inst.AnimState:SetBuild("furnace") inst.AnimState:PlayAnimation("idle") inst:AddComponent("inspectable") inst:AddTag("structure") inst:AddComponent("container") inst.components.container:WidgetSetup("furnace") inst.components.container.widgetanimbank = "background" inst.components.container.widgetanimbuild = "background" inst.components.container.onopenfn = onopen inst.components.container.onclosefn = onclose inst:AddComponent("playerprox") inst.components.playerprox:SetDist(3,5) inst.components.playerprox:SetOnPlayerFar(onfar) return instendreturn Prefab("common/furnace", fn, assets, prefabs), MakePlacer( "common/furnace_placer", "furnace", "furnace", "idle" )I hope it helps =) Pyrobolser
  7. Thanks for the feedbacks =) They didn't tell us what is wrong when the item got banned. We just guessed it was her partial nudity. Steam support is not answering. No possible dialogue, i don't know how much time to wait. Plus I will be unable to publish any user generated content untill tomorrow. I don't really know why, but they banned me for 1 day... Maybe they are afraid I remove her skirt. Well, I guess we'll have to hide her little boobies.
  8. Hello ! This is a mod i made with June (my GF). She did the art and I did the code. But one day after the release on SteamWorkshop, the mod got banned because "it violates the Steam Terms of Service". Well in the Terms of Service, they tell us to not upload pornographic content. Personnally, I don't see the pornography in this, but I am 25 years old, so maybe someone younger can be chocked. So please, can you guys tell me if this is chocking ? Effie the Bunny Hunter A brand new character for Don't Starve Together !! Art by June Scripts by Pyrobolser Concept by both Stats : Health : 75 Hunger : 150 Sanity : 160 Perks : *Good hunter with her blow dart. *Gets cold quickly. Effie talk bad engrish ! She has a special craftable blow dart with multiple uses (70). She moves very slightly faster. She has a very bad inherent insulation meaning she gets cold quickly. Enjoy playing our character ! June & Pyrobolser
  9. Yes, this is the "cleaner way" i was talking about. Thx rezecib, i'll use this on my mods from now =)
  10. If both you and the host have a mod enabled, but have a newer version than the host, it will crash. If some mods are for friends only, and you are not friend with the host, it will crash. If the host have some characters mods, and one is instable, you will crash only if you select this specific character. Note that sometimes it may takes a lot of time to load all the mods, and you will have a black screen freezing for 2 or 3 minutes, that's normal ! As soon as you see the "loading..." in the bottom left corner, it means the mods are downloaded and ready, and the game is now launching. Sorry I can't help you more =/
  11. Hello !! First you have to make the prefab "nightmarefuel" edible ! Copy the prefab nightmarefuel.lua in your mod and add the following : --------------------- Mod edition : inst:AddComponent("edible") inst.components.edible.foodtype = FOODTYPE.HORRIBLE inst.components.edible.oneaten = function(inst, eater) if eater.prefab == "yourcharacter" then eater.components.health:DoDelta(x) eater.components.hunger:DoDelta(y) eater.components.sanity:DoDelta(z) endend --------------------- End of mod editionDon't forget to change "yourcharacter" with the name of your character (but keep the " " ). And x, y and z with the correct values (can be negative if you want). Now you have to create a custom food type for your character, in the modmain.lua. You can use the code from my mod "Hulot the Grumpy Owl" : local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal Eater = require "components/eater"local Text = require "widgets/text"local Image = require "widgets/image"-- Create foodtype 'Owlfood'GLOBAL.FOODTYPE.OWLFOOD = "OWLFOOD"local owl_food = {"bee", "butterfly", "fireflies", "mosquito", }local function AddOwlFood(inst) inst:AddTag("edible_"..GLOBAL.FOODTYPE.OWLFOOD)endfor k,v in pairs(owl_food) do AddPrefabPostInit(v, AddOwlFood)endchange owlfood with your custom foodtype's name. And the name of the prefabs with all the edibles items you want your character to eat. Finally, on your character's prefab : inst.components.eater.foodprefs = { FOODTYPE.OWLFOOD, FOODTYPE.INSECT, FOODTYPE.SEEDS, FOODTYPE.MEAT, FOODTYPE.GENERIC, }You can add all the foodtypes your character eats. Again this is from my mod, try to adapt the name so it matches what you did in the modmain.lua. It should work, now. I know there are some cleaner ways to make the food edible. But I am a beginner in lua =) Hope it helps. Pyrobolser
  12. Try this putting this fonction on your character prefab : local function oneat(inst, food) if food and food.components.edible and food.components.edible.foodtype == "OTTERFOOD" then inst.components.sanity:DoDelta(32) endend Then call it like this : inst.components.eater:SetOnEatFn(oneat)Remember, this will ad a sanity bonus when your character eat something in the foodtype. It will give the same amount of sanity for all items you eat as long as it is in the foodtype "OTTERFOOD". If the item already gave sanity, this bonus will add.
  13. Post the "modmain.lua" too please =) I am not sure, but it may be caused by a wrong character name. Something like calling her "nidalee" somewhere and "Nidalee" elsewhere (caps on first letter count).