• Content Count

  • Joined

  • Last visited

Community Reputation

43 Excellent

About krylincy

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. you need to write that in a (personal tuning) mod for your modmain.lua function custom_tuning() TUNING["SPIDER_HEALTH "] = 110 end AddGamePostInit(custom_tuning) AddSimPostInit(custom_tuning) I dont know which of the to add functions are right, I use both.
  2. sounds good, save in in the prefab if the component should/is added or not. and then do so on load.
  3. Ok looks like the two mods workshop-619159773 and workshop-1378549454 are not compatible. you should reduce the mods that change inventory/container as much as possible.
  4. have you add those functions to your prefab? in the main function of your prefab you need to add inst.OnSave = onsave --set the save inst.OnLoad = onload --and the load functions And the functions like local function onsave(inst, data) data.eatTimes = inst.eatTimes end local function onload(inst, data) if data and data.eatTimes then inst.eatTimes = data.eatTimes end end so in this example i save the eatTimes of each inst. why are you return an object from your save function?
  5. Can you share your whole source code of this mod somewhere (git, codepen, upload zip)?
  6. lots of network problems. can you try to remove all if TheSim:GetGameID() =="DST" from your code? you are in DST, no need to check. and i#m not sure if this statement will be true anyway.
  7. okay great. i do not understand what that snippet in your modmain should do AddCookerRecipe("cookpot", monstermashpie) for k, v in pairs(monstermashpie) do = k v.weight = v.weight or 1 v.priority = v.priority or 0 end local foodprefabs = {} return monstermashpie The "AddCookerRecipe" function is okay i think, i found the on in the utils. but what it this for loop for? you already added monstermashpie to the cooker recipe. same question for the foodbrefabs {} (i think that line is not nessasary at all) and the last line, the return ... why this one. afaik the modmain is not returning anything. so to sum up: put your addCookerRecipe function at the end, when all stuff whithin "monstermashpie" is done. delete the last 2 lines as they have no usage/function. if that is still not helping, can you look up the log file for more information? are you testing with caves (als client) or without as host?
  8. so at least in the prefab function there is the net part missing inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end this must be placed BEFORE any component definition, in your case i would suggest after inst:AddTag("preparedfood") not sure if tags added before or after, i have seen both. but the error message sounds more like a syntax error, like if there is a bracket not closed. but i didn't find anything about that in your code. Edit: And I am not sure if a AddCookerRecipe function exist. maybe you should look inside some dst mods instead of the ds mods, they are a bit different.
  9. The dst size is 268x268 to have a preview image without black background/border.
  10. then you should try to add the event to the player, not the armor inst.
  11. why are you using this line? inst:ListenForEvent("attacked", OnAttacked) is the "onTakeDamage" function not enough? i think the attacked event is only fired on the player inst, not the amor inst. it should work when you put the function body directly into the take damage function. inst.components.armor.ontakedamage = function(inst, damage_amount) print('attacked') --if math.random() < 0.25 then print('A0') if data.attacker ~= nil and data.attacker.components.combat then print('A') data.attacker.components.combat:GetAttacked(inst, data.attacker.components.damage) print('A1') TheWorld:PushEvent("ms_sendlightningstrike", data.attacker:GetPosition()) print('A2') print('A3') data.attacker.components.combat:SetTarget(data.attacker) print('A4') data.attacker.components.combat:ShareTarget(data.attacker, 30, ShareTargetFn, 1) print('A5') end --end end
  12. Especially for recipes I use this switch in my mods local function AddModRecipe(_recName, _ingrList, _tab, _techLevel, _recType, _placer, _spacing, _proxyLock, _amount) if GLOBAL.CAPY_DLC and GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC) or GLOBAL.IsDLCEnabled(GLOBAL.PORKLAND_DLC) then return GLOBAL.Recipe(_recName, _ingrList , _tab, _techLevel, _recType, _placer, _spacing, _proxyLock, _amount) else return GLOBAL.Recipe(_recName, _ingrList , _tab, _techLevel, _placer, _spacing, _proxyLock, _amount) end end
  13. in the tallbird lua there is the function where it is decided to target or not local function IsValidTarget(guy) return not and inst.components.combat:CanTarget(guy) --smallbirds that aren't companions are parented --to other tallbirds, so don't target them! and (not inst:HasTag("smallbird") or inst:HasTag("companion")) end So the quick and dirty fix for you could be to just add the smallbird tag to the grasgeckos AddPrefabPostInit("grassgekko", function(inst) inst:AddTag("smallbird") end) The correct way would be to rewrite this "IsValidTarget" function in the tallbird lua. Not sure if removing the combat component may help but you can try it this way: AddPrefabPostInit("grassgekko", function(inst) if inst.components ~= nil and inst.components.combat ~= nil then inst:RemoveComponent("combat") end end) But I think this will also end up that nobody can kill them at all.
  14. Okay, it in nearly the same thing. the params the function will have are name, ingredients, tab, level, placer, min_spacing, nounlock, numtogive, builder_tag, atlas, image, testfn, product, build_mode, build_distance so you put your "goldnugget.tex" in the "altlas" position, but ist must go in the next one, the image. please set is with my example code eg myGoldnugget = AddRecipe(...) myGoldnugget.image = "..." or find out the atlas name and add it instead (not sure if thats the correct altas name): AddRecipe("goldnugget2", { GLOBAL.Ingredient("goldnugget", 1), }, GLOBAL.RECIPETABS.REFINE, GLOBAL.TECH.SCIENCE_TWO, nil, nil, nil, nil, nil,"goldnugget.xml", "goldnugget.tex")
  15. I thougt it would be the same as in DS: local lightberry = AddModRecipe("lightberry", {Ingredient("lightbulb", 8)}, RECIPETABS.LIGHT, TECH.SCIENCE_TWO) lightberry.product = "wormlight" lightberry.image = "wormlight.tex" lightberry.numtogive = 3 STRINGS.NAMES.LIGHTBERRY = "Wormlight x 3" STRINGS.RECIPE_DESC.LIGHTBERRY = "Now I see you" Did you tried it that way too?