Jump to content

Desblat

Registered Users
  • Posts

    393
  • Joined

  • Last visited

Reputation

640 Excellent

1 Follower

Recent Profile Visitors

4269 profile views
  1. Dig Wurt code Item affinity lines. A simple way to implement what you want.
  2. I need to set variable of the custom fence to be in the "ON" mode in the set piece. As this fence is used to protect some treasures. I did this: But this doesn't seem to give needed results. What am I doing wrong? Thans in advance. P.S. I know that I can make new prefab with fence mode set to "ON" from the begining, but I don't want to go this way, because fences will have a tricky usage. It's 4 colours allign system in both Start, End modes, and I don't want to make 8 prefabs.
  3. I was trying to decompile ocean fish. Precizely "oceanfish_medium_2.zip". I tool ANIM and TEX files from it and also BUILD file from "oceanfish_medium.zip" and used "krane.exe" tools to decompile. I managed to get something working, but the decomplied file is so bad that it's useless. I can not compile it because animations are broken - that's common problem, but the error is deeper: I can't even do "inst.AnimState:OverrideSymbol("shoal_head", "des_lead_oceanfish_medium_2", "shoal_head")" because some names of images inside SCML texture folders swapped their places/names thus OverrideSymbol gives odd results. For example underwater fish siluetes are randomly swapped with above water textures. Thanks in advance.
  4. I feel like there must be a world tag for that. I just put that into mod config. Also I make crafting reciped that don't strickly require caves. Btw you should keep in mind that some people use cave content on surface mods.
  5. I don't know how this sanityfn you used would work. Do this in main fn of character: inst:DoPeriodicTask(3, function() local ents = ..... ---use some function that find creatures, dig combat component DoAreaAttack function for that local playersnum = #ents local sanity = player*0.1 inst.components.sanity:DoDelta(sanity) end)
  6. Hallo there. What kind of cute items are you talking about? I am a coder and I am currently working on a mod that will be adding custom biome, new materials and probably new mobs, it's about radioactivity, plutonuim and such, also featuring electricity and some other things, too much to write right now. We are open to work with artists. PM me if you would like to discuss this. You can check my other mods here: https://steamcommunity.com/profiles/76561198094270300/myworkshopfiles/?appid=322330
  7. If loot table is a local variable you can not modify it. You need to create New one and assign it to the mob.
  8. Basically I need to get following upon inspecting my custom machine: Character quote + current fuel level My approach: inst.components.inspectable.getspecialdescription=GetDescription local function GetDescription(inst) local character_quote = ???? return character_quote .. "Fuel "..math.ceil(inst.components.fueled:GetPercent()*100).."%." end Thanks in advance.
  9. into character fn: inst:DoPeriodicTask(3, function() if inst.sg:HasStateTag("idle") then inst.components.health:DoDelta(-1) end end
  10. It's not possible to spawn lighterfire_common_willow because it's not a prefab it's a template. Use nightstickfire prefab. It's bright and it's simple as that. if inst.fire2 == nil then inst.fire2= SpawnPrefab("nightstickfire") --inst.fire2.Transform:SetScale(.125, .125, .125) inst.fire2.entity:AddFollower() inst.fire2.Follower:FollowSymbol(owner.GUID, "swap_object", 56, -40, 0) end
  11. Make your-own lighterfire prefab with brighter light and uncomment last section in onequipm but only for willow. That should do.
  12. It is still there, but it's more complex, klei made it so it uses different lights for different skins of lighter. The approach is the same. Here is the code. local function onequip(inst, owner) ------ EDIT FUEL ------ if owner.prefab ~= "willow" then inst.components.burnable:Ignite() end ---- end edit fuel ---- local skin_build = inst:GetSkinBuild() if skin_build ~= nil then owner:PushEvent("equipskinneditem", inst:GetSkinName()) owner.AnimState:OverrideItemSkinSymbol("swap_object", skin_build, "swap_lighter", inst.GUID, "swap_lighter") else owner.AnimState:OverrideSymbol("swap_object", "swap_lighter", "swap_lighter") end owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") owner.SoundEmitter:PlaySound("dontstarve/wilson/lighter_on") if inst.fires == nil then inst.fires = {} for i, fx_prefab in ipairs(inst:GetSkinName() == nil and { "lighterfire" } or SKIN_FX_PREFAB[inst:GetSkinName()] or {}) do local fx = SpawnPrefab(fx_prefab) fx.entity:SetParent(owner.entity) fx.entity:AddFollower() fx.Follower:FollowSymbol(owner.GUID, "swap_object", fx.fx_offset_x, fx.fx_offset_y, 0) fx:AttachLightTo(owner) ------ EDIT LIGHT ------ if owner.prefab == "willow" and fx.Light then fx.Light:SetIntensity(.6) fx.Light:SetRadius(.5) fx.Light:SetFalloff(.6) fx.Light:SetColour(180 / 255, 195 / 255, 225 / 255) end ---- end edit light ---- table.insert(inst.fires, fx) end end --[[if inst.fire == nil then inst.fire = SpawnPrefab("lighterfire") --inst.fire.Transform:SetScale(.125, .125, .125) inst.fire.entity:AddFollower() inst.fire.Follower:FollowSymbol(owner.GUID, "swap_object", 56, -40, 0) end]] end
  13. What are you trying to do? Why do you need table?
×
  • Create New...