Search the Community

Showing results for tags 'help'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included] Art, Music & Lore
    • [Oxygen Not Included] - Latest Content Update
  • Griftlands
    • [Griftlands] - General Discussion
  • Hot Lava
    • [Hot Lava] - General Discussion
  • Don't Starve Together
    • Don't Starve Together FAQ
    • [Don't Starve Together] Developer log
    • [Don't Starve Together] General Discussion
    • [Don't Starve Together] PS4
    • [Don't Starve Together] Bug Tracker
    • [Don't Starve Together] Trading
    • [Don't Starve Together] Server Bulletin
    • [Don't Starve Together] Dedicated Server Discussion
    • [Don't Starve Together] Mods and Tools
    • [Don't Starve Together] Tales of Life and Death
    • [Don't Starve Together] Suggestions and Feedback
    • [Archived Bugs]
  • Don't Starve
    • Don't Starve FAQ
    • [Don't Starve: Pocket Edition] iOS / Android
    • [Don't Starve] General Discussion
    • [Don't Starve] Mods and tools
    • [Don't Starve] Art, Music & Lore
    • [Don't Starve] Suggestions and Feedback
    • [Don't Starve] Videos
    • [Don't Starve] Bug Tracker
    • [Don't Starve] Trading
    • [Don't Starve] Testing Discussion (archive)
  • Klei Entertainment Games
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • The Off-Topic Area
    • Forum Upgrade

Categories

  • Don't Starve
    • Custom Character and Skins
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps
  • Development
  • Development
  • Released Downloads
  • Released Downloads

Categories

  • Oxygen Not Included - [Early Access]
  • Don't Starve Together
  • [Don't Starve Together] PS4
  • Don't Starve: Shipwrecked
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked

Categories

  • Oxygen Not Included - [Early Access]
  • Don't Starve Together
  • [PS4] Don't Starve Together
  • Don't Starve: Shipwrecked

Found 94 results

  1. First of all forgive my english it's not my main language and i'm not sure that i can explain correctly what i want. I'm making a custom weapon which switchable with other forms it must have a main form and with hotkeys it must change another.(I hope that it's understandable) all of weapons have different textures and different abilites (sword, bow, speat, scythe) and i don't know how to make all of them in 1 .lua i hope it is understandable
  2. I am remaking a custom character I had made in the past, I haven't tested it yet but I want to know one thing. How do I edit the animations or the placement of parts for the characters? I am completely reworking the artwork and sprites for the character and my major fear is this visual problem. I Don't know how Spriter Works And I was hoping someone had made a tutorial on creating a Custom DST character that included that aspect. Anyway, the Character I am working on is not the one in the picture it is my first character I have made, Andreas, I wanted to add more to her than a simple sanity boost during the night and figure out a way to make her sanity drain during the day. Here is a list of things I want to add to her. 1. A scythe that only she can use, it would deal a little less damage than the tentacle spike during the day, The same amount of damage at night and double the damage during the full moon. 2. I want to give her a transformation. Her transformation would trigger when her HP is low Maybe at 10% of her full health. 3. Give her a healing aura that heals .1 HP to surrounding players in a small radius. 4. Make it where she loses sanity when crowded by other players. To balance the healing aura a little more. 5. This one will most likely be more like a side mod, I want to add a new monster called the Night beast, A creature that lives in the caves. I also wanted a chance for them to emerge from the uncovered sink hole like the batalisks, 6. Give her a complete custom speech and Voice, I want her voice to be the sound of an Ocarina. I was hoping someone could help me code and put her together, her current sprites are not too good and I am re drawing them from scratch. Which is a pretty tedius process in it's self.
  3. I have a mod which adds some food recipes to the cookpot item (crock pot) The mod works fine, however when an item is cooked in warly's portable cookpot, the finished product is invisible until harvested. I found a solution for this problem by adding the recipes separately to the portablecookpot (see code below) However this causes a new problem... Within the game's stewer.lua is a bit of code that assigns priority to Warly's portablecookpot recipes What this means is, no matter what the priority value of the food, recipes added to the portablecookpot have a higher priority The result is, when I add recipes to be cooked in Warly's pot, it becomes impossible to cook some other base game recipes because they not prioritized correctly. (eg. I have a priority 1 recipe that uses eggs, but in warlys pot it takes priority over the 'perogi' or 'bacon and eggs recipe', which should have higher priority) They work fine in the normal cookpot, Does anyone have an idea to fix this? Ideally the best solution would be to fix the problem with a modded item (within the cookpot recipes) that is cooked in warly's portable cookpot being visible But I have no idea how to make that happen.
  4. Hey everyone! I'm trying to add my own sg state to Wilson. It works nicely on non-dedicated servers but on dedicated servers something wrong becames with client side :/. So what am I trying to ask... How properly should I add state on client side? I've tried to add to client same state as on server, but it fixed nothing, only added problems. Any help?
  5. I'd like to host a dedicated server and play survival on it, but pressing the ~ button and typing c_sethealth(1) in emergencies is a thing I can not resist doing because of how easy it is. I know there are probably mods that can disable console, but before I have to resort to that, I'd like to know if there's a way I could host a server without being admin in it (server seems to make me admin from the cluster key).
  6. Hey everyone! I'm trying to create my own symbol so I'll be able to override it (e.g: owner.AnimState:OverrideSymbol("swap_object", "swap_axe", "swap_axe") I've searched for some information, but I failed :/ My spriter project here Let's say that I need to be able to override a "SWAP_ICON-0" image. Any help? Oh, and if someone'll help me, I'll give you Cool Shadow Clothes! Thanks everyone for trying to help !
  7. Hello, I'm running into an issue where my character will teleport where the mouse cursor is when I perform his transform ability. Any help resolving this would be appreciated.
  8. Hello, if someone can help me with this that'd be great ! So, I was wondering if there's a way I can use a a part of the entire texture build e.g. torso like how a skin texture is & just change that texture? Like for example my character has clothes which can put a gem into it with the press of a button! Now the problem is every one of these textures were his clothes has a different gem or none has to have a entire unique texture for itself, even though the only texture actually being changed is the torso. So, because of that my character has replica textures of everything else * 8! Now the real problem is my character has a LOT more stuff like this & this was only 1 example & since every one of these textures has to have all body parts (face, head, arm, leg, ect.) for it to work it's bloating my mod's filesize a LOT!! So, is there a way I can make textures like how dst skins are & only need to swap 1 part of the character's textures like "torso" or "face" instead of having 1 texture build for every single pixel I change? Because my mod's almost over 91 MB & soon won't even be uploadable anymore unless I cut it into multiple parts & have people manually put them all together which would suck BIG time!! Plus, it's very inconvenient having so many textures which are 90% identical bloat my mod so much that it's even hard to move my folder on my desktop around or send a copy to a friend... So, help would be SUPER appreciated !!!!!! Thanks for your time & have a great day !!!!!!!!!
  9. tl;dr: How to make GetModConfigData(config_option_name,ModIndex:GetModActualName(name_of_a_mod_as_in_modinfo)) work in scripts/prefab/character_prefab.lua or load user config to it other way? Hello there I'm working on a simple character mod tweak - not really for myself (at least for now) but it'll surely come in handy in future. I want to implement options allowing users to change all character stats (health, hunger, sanity, movement speed, resistance, should it get starting items). What I struggle with is the issue of retrieving configuration_options from character prefab - I know at to load configuration option you use function GetModConfigData(config_option_name) The issue is - obviously: I understand that from places other than modmain or modworldgenmain I should retrieve configuration options with GetModConfigData(config_option_name,ModIndex:GetModActualName(name_of_a_mod_as_in_modinfo)) Now then - here the issue. Doing that will result with Adding this local ModIndex:GetModActualName = require "modindex" to character prefab results with Which is understandable (that's how Lua works, right?) Here comes my question: how to use GetModActualName in scripts/prefab/character_prefab.lua or how to pass mod config values to it, in a way that starting items and stats of character could be configured?
  10. [00:02:48]: [string "scripts/components/inventory.lua"]:637: attempt to index local 'inst' (a nil value) LUA ERROR stack traceback: scripts/components/inventory.lua:637 in (method) GiveItem (Lua) <636-769> scripts/prefabs/player_common.lua:1941 in (method) OnNewSpawn (Lua) <1937-1949> scripts/networking.lua:250 in () ? (Lua) <238-256> =[C]:-1 in (method) SendSpawnRequestToServer (C) <-1--1> scripts/mainfunctions.lua:1289 in (local) cb (Lua) <1287-1290> scripts/frontend.lua:541 in (method) DoFadingUpdate (Lua) <505-545> scripts/frontend.lua:593 in (method) Update (Lua) <553-710> scripts/update.lua:92 in () ? (Lua) <33-129> well here is crash log and here is my swords code i believe it's causes error local assets = { --sword + -- Asset("ANIM", "anim/fuingetsu.zip"), -- Asset("ANIM", "anim/swap_fuingetsu.zip"), -- Asset("ATLAS", "images/inventoryimages/fuingetsu.xml"), -- Asset("IMAGE", "images/inventoryimages/fuingetsu.tex"), -------------------------------------------------------------------------- --hammer + -- Asset("ANIM", "anim/hakai.zip"), -- Asset("ANIM", "anim/swap_hakai.zip"), --Asset("ATLAS", "images/inventoryimages/hakai.xml"), -- Asset("IMAGE", "images/inventoryimages/hakai.tex"), --------------------------------------------------------------------------- --icicle + -- Asset("ANIM", "anim/kinshara.zip"), -- Asset("ANIM", "anim/swap_kinshara.zip"), -- Asset("ATLAS", "images/inventoryimages/kinshara.xml"), -- Asset("IMAGE", "images/inventoryimages/kinshara.tex"), --------------------------------------------------------------------------- --pen --Asset("ANIM", "anim/tsuitou.zip"), -- Asset("ANIM", "anim/swap_tsuitou.zip"), -- Asset("ATLAS", "images/inventoryimages/tsuitou.xml"), -- Asset("IMAGE", "images/inventoryimages/tsuitou.tex"), -------------------------------------------------------------------------- --bow + -- Asset("ANIM", "anim/shinsou.zip"), -- Asset("ANIM", "anim/swap_shinsou.zip"), -- Asset("ATLAS", "images/inventoryimages/shinsou.xml"), -- Asset("IMAGE", "images/inventoryimages/shinsou.tex"), --------------------------------------------------------------------------- --light staff -- Asset("ANIM", "anim/raika.zip"), -- Asset("ANIM", "anim/swap_raika.zip"), -- Asset("ATLAS", "images/inventoryimages/raika.xml"), -- Asset("IMAGE", "images/inventoryimages/raika.tex"), --------------------------------------------------------------------------- --axe + -- Asset("ANIM", "anim/tobiume.zip"), -- Asset("ANIM", "anim/swap_tubiume.zip"), -- Asset("ATLAS", "images/inventoryimages/tobiume.xml"), -- Asset("IMAGE", "images/inventoryimages/tobiume.tex"), -------------------------------------------------------------------------- --scythe + -- Asset("ANIM", "anim/shirayuki.zip"), -- Asset("ANIM", "anim/swap_shirayuki.zip"), -- Asset("ATLAS", "images/inventoryimages/shirayuki.xml"), -- Asset("IMAGE", "images/inventoryimages/shirayuki.tex"), --------------------------------------------------------------------------- --spear + -- Asset("ANIM", "anim/shiden.zip"), -- Asset("ANIM", "anim/swap_shiden.zip"), -- Asset("ATLAS", "images/inventoryimages/shiden.xml"), -- Asset("IMAGE", "images/inventoryimages/shiden.tex"), --------------------------------------------------------------------------- } local prefabs = { } local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_kinshara", "symbol0") 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 onattack_kinshara(inst, attacker, target) player.components.talker:Say("Wingardium Levi... What do you expect me to do with that? Nya~") end local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst:AddComponent("talker") inst.AnimState:SetBank("kinshara") inst.AnimState:SetBuild("kinshara") inst.AnimState:PlayAnimation("idle") inst.components.weapon:SetOnAttack(onattack_kinshara) inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "kinshara" inst.components.inventoryitem.atlasname = "images/inventoryimages/kinshara.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true if owner HasTag("swarduser") then --item turning to sword local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_fuingetsu", "symbol0") 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 fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("fuingetsu") inst.AnimState:SetBuild("fuingetsu") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("sharp") inst:AddTag("fuingetsu") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("weapon") inst.components.weapon:SetDamage(40) inst.components.weapon.attackrange = 1.1 inst.components.weapon.hitrange = 1.1 inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "fuingetsu" inst.components.inventoryitem.atlasname = "images/inventoryimages/fuingetsu.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end if owner HasTag("hammeruser") then --item turning to hammer local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_hakai", "symbol0") 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 fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("hakai") inst.AnimState:SetBuild("hakai") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("hakai") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("tool") inst.components.tool:SetAction(ACTIONS.HAMMER, 1) inst.components.weapon.attackrange = 1.1 inst.components.weapon.hitrange = 1.1 inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "hakai" inst.components.inventoryitem.atlasname = "images/inventoryimages/hakai.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end if owner HasTag("bowuser") then --item turning to bow local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_shinsou", "symbol0") 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 onattack_shinsou(inst, attacker, target) if attacker and attacker.components.sanity then attacker.components.sanity:DoDelta(-5) elseif attacker and attacker.components.sanity < 10 then player.components.talker:Say("I... can't... aim... did i say it right? Nya~") end end local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.components.weapon:SetOnAttack(onattack_shinsou) inst.AnimState:SetBank("shinsou") inst.AnimState:SetBuild("shinsou") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("shinsou") inst.AddTag("bow") inst:AddComponent("weapon") inst:AddComponent("talker") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst.components.weapon:SetDamage(15) inst.components.weapon:SetRange(8, 10) inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "shinsou" inst.components.inventoryitem.atlasname = "images/inventoryimages/shinsou.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end if owner HasTag("axeuser") then --item turning to axe local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_tobiume", "symbol0") 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 fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("tobiume") inst.AnimState:SetBuild("tobiume") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("tobiume") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("tool") inst.components.tool:SetAction(ACTIONS.CHOP, 1) inst.components.weapon.attackrange = 1.1 inst.components.weapon.hitrange = 1.1 inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "tobiume" inst.components.inventoryitem.atlasname = "images/inventoryimages/tobiume.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end if owner HasTag("scytheuser") then --item turning to scythe local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_shirayuki", "symbol0") 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 fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("shirayuki") inst.AnimState:SetBuild("shirayuki") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("sharp") inst:AddTag("shirayuki") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("weapon") inst.components.weapon:SetDamage(20) inst.components.weapon.rosing = true inst.components.weapon.attackrange = 1.1 inst.components.weapon.hitrange = 1.1 inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "shirayuki" inst.components.inventoryitem.atlasname = "images/inventoryimages/shirayuki.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end if owner HasTag("spearuser") then --item turning to spear local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_shiden", "symbol0") 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 fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("shiden") inst.AnimState:SetBuild("shiden") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() inst:AddTag("shiden") if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("weapon") inst.components.weapon:SetDamage(40) inst.components.weapon.attackrange = 1.1 inst.components.weapon.hitrange = 1.1 inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "shiden" inst.components.inventoryitem.atlasname = "images/inventoryimages/shiden.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true end end return inst end return Prefab( "common/inventory/weapon", fn, assets) and here is my character's lua local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), } local prefabs = { "book_birds", "book_tentacles", "book_gardening", "book_sleep", "book_brimstone", "shadow_despawn", "statue_transition_2", } -- Custom starting items local start_inv = { "kinshara", } -- When the character is revived from human, well works local function onbecamehuman(inst) -- Set speed when reviving from ghost (optional) inst.components.locomotor.walkspeed = 4.6 inst.components.locomotor.runspeed = 7 inst.components.combat:SetAttackPeriod (0.6) end local function onbecameghost(inst) -- Remove speed modifier when becoming a ghost inst.components.locomotor.walkspeed = 8.0 end -- When loading or spawning the character local function onload(inst) inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman) inst.components.locomotor.walkspeed = 4.6 inst.components.locomotor.runspeed = 7 inst.components.combat:SetAttackPeriod (0.6 ) if not inst:HasTag("playerghost") then onbecameghost(inst) end end --Critters sanity aura local function critter_SanityAura(inst) local x, y, z = inst.Transform:GetWorldPosition() local delta = 0 local ents = TheSim:FindEntities(x, y, z, 20, {"critter_puppy", "player" , "critter_kitten"}) local bonus_sanity = nil local distsq = nil local totalDelta = nil for k, v in pairs(ents) do if v ~= inst then if v.prefab == "critter_puppy" then bonus_sanity = -TUNING.SANITYAURA_MEDIUM distsq = math.max(inst:GetDistanceSqToInst(v), 1) delta = delta + bonus_sanity / distsq elseif v.prefab == "critter_kitten" then bonus_sanity = TUNING.SANITYAURA_SMALL distsq = math.max(inst:GetDistanceSqToInst(v), 1) delta = delta + bonus_sanity / distsq elseif v:HasTag ("player") then bonus_sanity = -TUNING.SANITYAURA_SMALL distsq = math.max(inst:GetDistanceSqToInst(v), 1) delta = delta + bonus_sanity / distsq else end end totalDelta = totalDelta + delta end if #ents > 0 then totalDelta = totalDelta / #ents else totalDelta = 0 end return totalDelta end --For can not wear anything --local function OnEquip(inst) --Get the equipped item -- local hat = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD) -- local body = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.BODY) -- local hand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HAND) --If it doesn't have your unique tag drop it --if not hat:HasTag("youruniquetagname") then -- inst.components.inventory:DropItem(hat) -- end -- if not body:HasTag("youruniquetagname") then -- inst.components.inventory:DropItem(body) --end -- if not hand:HasTag("fuingetsu") then -- inst.components.inventory:DropItem(hand) -- end --end --Can't pick up chester local function OnPickup(inst) if data.prefab == "chester_eyebone" then local eyebone = data.prefab inst.components.sanity:DoDelta(-30) inst.components.inventory:DropItem(eyebone) end end --Counter freeze attack local function OnBeingAttacked(inst, data) local damage = data and data.damage if damage then local last_time_first_hit = inst.last_time_first_hit local current_time = GetTime() -- If the hit is the first, or more than 60 seconds passed, reset the damage received and the last hit time -- Else, add it up if (last_time_first_hit == nil) or (current_time - last_time_first_hit > 59.5) then inst.total_damage_received = damage inst.last_time_first_hit = current_time else inst.total_damage_received = inst.total_damage_received + damage end -- We pass 50 damage, freeze everything, then reset damage and timer if inst.total_damage_received > 49.5 then if inst.level < 40 then inst.components.talker:Say("My skills are sealed for now. Nya~") end local x, y, z = inst.Transform:GetWorldPosition() -- First table, table with "must have" tags, entities with freezable component have freezable tag -- Second table, table with "cant have" tags, player has player tag inst.components.talker:Say("It hurts! Nya~") local ents = TheSim:FindEntities(x, y, z, 20, {"freezable"}, {"player"}) for i, v in ipairs(ents) do v.components.freezable:AddColdness(10) v.components.freezable:SpawnShatterFX() end inst.total_damage_received = 0 inst.last_time_hit = nil end end end --Stat chance on moons local function PowerUpAtNewMoon(inst) if TheWorld.state.isnight then if TheWorld.state.moonphase == "new" then inst.components.combat:SetAttackPeriod (0.4) inst.components.locomotor.walkspeed = 6 inst.components.locomotor.runspeed = 10 inst.Light:Enable(true) inst.Light:SetRadius(18) inst.Light:SetFalloff(0.75) inst.Light:SetIntensity(.7) inst.Light:SetColour(70/255,230/255,12/170) inst.components.talker:Say("The curse has gone We are finally free! Nya~") elseif TheWorld.state.moonphase == "full" then inst.components.combat:SetAttackPeriod (0.8) inst.components.locomotor.walkspeed = 3.2 inst.components.locomotor.runspeed = 4 inst.components.talker:Say("I can feel the curse of moon. The moon binds us! Nya~") end elseif TheWorld.state.isdusk then if TheWorld.state.moonphase == "new" then inst.components.combat:SetAttackPeriod (0.4) inst.components.locomotor.walkspeed = 6 inst.components.locomotor.runspeed = 10 inst.components.talker:Say("I can't feel the moon. Finally i can be free. Nya~") elseif TheWorld.state.moonphase == "full" then inst.components.combat:SetAttackPeriod (0.8) inst.components.locomotor.walkspeed = 3.2 inst.components.locomotor.runspeed = 4 inst.components.talker:Say("Oh! I can feel the moon. This night will be cursed. Nya~") end elseif TheWorld.state.isday then inst.components.locomotor.walkspeed = 4.6 inst.components.locomotor.runspeed = 7 inst.components.combat:SetAttackPeriod (0.6) end end --Restat for foods local function oneat(inst, food) if food and food.components.edible and food.prefab == "fishsticks" then inst.components.health:DoDelta(50) inst.components.sanity:DoDelta(50) inst.components.hunger:DoDelta(50) inst.components.talker:Say("Itadakimasu. Nya~", 1.2, true) elseif food and food.components.edible and food.prefab == "fishtacos" then inst.components.health:DoDelta(50) inst.components.sanity:DoDelta(50) inst.components.hunger:DoDelta(50) inst.components.talker:Say("Itadakimasu. Nya~", 1.2, true) elseif food and food.components.edible and food.prefab == "fish" then inst.components.health:DoDelta(20) inst.components.sanity:DoDelta(30) inst.components.hunger:DoDelta(20) inst.components.talker:Say("Itadakimasu. Nya~", 1.2, true) elseif food and food.components.edible and food.prefab == "fish_cooked" then inst.components.sanity:DoDelta(-15) inst.components.talker:Say("Don't you know the fire is not good for me! Do not try to eat that me again!!!. Nya~", 1.2, true) elseif food and food.components.edible and food.prefab == "ice" then inst.components.health:DoDelta(5) inst.components.sanity:DoDelta(10) inst.components.talker:Say("Itadakimasu. Nya~", 1.2, true) elseif food and food.components.edible and food.prefab == not "ice" or "fish_cooked" or "fish" or "fishtacos" or "fishsticks" then local hungerboost = 5 local sanityboost = -5 local foodcheck = food.prefab == "spoiled_food" and 0 or hungerboost inst.components.health:DoDelta(0) inst.components.sanity:DoDelta(-5) inst.components.hunger:DoDelta(5) inst.components.talker:Say("I shouldn't eat that. Nya~") end end --Level system local function levelexp(inst, data) local max_exp = 999999999994650 local min_exp = -99999999999999 local level = math.min(inst.level, max_exp) local health_percent = inst.components.health:GetPercent() local sanity_percent = inst.components.sanity:GetPercent() local hunger_percent = inst.components.hunger:GetPercent() if inst.level <=999999999994650 then inst.components.talker:Say("[EXP] \n".. (inst.level)) end --level 0 (start) if inst.level >0 and inst.level <=10 then inst.components.health.maxhealth = math.ceil (50) inst.components.hunger.max = math.ceil (50) inst.components.sanity.max = math.ceil (50) --level 1 elseif inst.level >10 and inst.level <=20 then inst.components.health.maxhealth = math.ceil (55) inst.components.hunger.max = math.ceil (55) inst.components.sanity.max = math.ceil (55) --level 2 elseif inst.level >20 and inst.level <=40 then inst.components.health.maxhealth = math.ceil (60) inst.components.hunger.max = math.ceil (60) inst.components.sanity.max = math.ceil (60) elseif inst.level > 20 then inst.AddTag("fridge") --level 3 elseif inst.level >40 and inst.level <=70 then inst.components.health.maxhealth = math.ceil (65) inst.components.hunger.max = math.ceil (65) inst.components.sanity.max = math.ceil (65) --level 4 elseif inst.level >70 and inst.level <=110 then inst.components.health.maxhealth = math.ceil (70) inst.components.hunger.max = math.ceil (70) inst.components.sanity.max = math.ceil (70) --level 5 elseif inst.level >110 and inst.level <=160 then inst.components.health.maxhealth = math.ceil (75) inst.components.hunger.max = math.ceil (75) inst.components.sanity.max = math.ceil (75) --level 6 elseif inst.level >160 and inst.level <=220 then inst.components.health.maxhealth = math.ceil (80) inst.components.hunger.max = math.ceil (80) inst.components.sanity.max = math.ceil (80) --level 7 elseif inst.level >220 and inst.level <=290 then inst.components.health.maxhealth = math.ceil (85) inst.components.hunger.max = math.ceil (85) inst.components.sanity.max = math.ceil (85) --level 8 elseif inst.level >290 and inst.level <=370 then inst.components.health.maxhealth = math.ceil (90) inst.components.hunger.max = math.ceil (90) inst.components.sanity.max = math.ceil (90) --level 9 elseif inst.level >370 and inst.level <=460 then inst.components.health.maxhealth = math.ceil (95) inst.components.hunger.max = math.ceil (95) inst.components.sanity.max = math.ceil (95) --level 10 elseif inst.level >460 and inst.level <=560 then inst.components.health.maxhealth = math.ceil (100) inst.components.hunger.max = math.ceil (100) inst.components.sanity.max = math.ceil (100) --level 11 elseif inst.level >560 and inst.level <=670 then inst.components.health.maxhealth = math.ceil (110) inst.components.hunger.max = math.ceil (110) inst.components.sanity.max = math.ceil (110) --level 12 elseif inst.level >670 and inst.level <=790 then inst.components.health.maxhealth = math.ceil (120) inst.components.hunger.max = math.ceil (120) inst.components.sanity.max = math.ceil (120) --level 13 elseif inst.level >790 and inst.level <=920 then inst.components.health.maxhealth = math.ceil (130) inst.components.hunger.max = math.ceil (130) inst.components.sanity.max = math.ceil (130) --level 14 elseif inst.level >920 and inst.level <=1060 then inst.components.health.maxhealth = math.ceil (140) inst.components.hunger.max = math.ceil (140) inst.components.sanity.max = math.ceil (140) --level 15 elseif inst.level >1060 and inst.level <=1210 then inst.components.health.maxhealth = math.ceil (150) inst.components.hunger.max = math.ceil (150) inst.components.sanity.max = math.ceil (150) --level 16 elseif inst.level >1210 and inst.level <=1370 then inst.components.health.maxhealth = math.ceil (160) inst.components.hunger.max = math.ceil (150) inst.components.sanity.max = math.ceil (160) --level 17 elseif inst.level >1370 and inst.level <=1540 then inst.components.health.maxhealth = math.ceil (170) inst.components.hunger.max = math.ceil (170) inst.components.sanity.max = math.ceil (170) --level 18 elseif inst.level >1540 and inst.level <=1720 then inst.components.health.maxhealth = math.ceil (180) inst.components.hunger.max = math.ceil (180) inst.components.sanity.max = math.ceil (180) --level 19 elseif inst.level >1720 and inst.level <1910 then inst.components.health.maxhealth = math.ceil (190) inst.components.hunger.max = math.ceil (190) inst.components.sanity.max = math.ceil (190) --level 20 elseif inst.level >1910 and inst.level <=2110 then inst.components.health.maxhealth = math.ceil (200) inst.components.hunger.max = math.ceil (200) inst.components.sanity.max = math.ceil (200) --level 21 elseif inst.level >2110 and inst.level <=2320 then inst.components.health.maxhealth = math.ceil (210) inst.components.hunger.max = math.ceil (210) inst.components.sanity.max = math.ceil (210) --level 22 elseif inst.level >2320 and inst.level <=2540 then inst.components.health.maxhealth = math.ceil (220) inst.components.hunger.max = math.ceil (220) inst.components.sanity.max = math.ceil (220) --level 23 elseif inst.level >2540 and inst.level <=2770 then inst.components.health.maxhealth = math.ceil (230) inst.components.hunger.max = math.ceil (230) inst.components.sanity.max = math.ceil (230) --level 24 elseif inst.level >2770 and inst.level <=3010 then inst.components.health.maxhealth = math.ceil (240) inst.components.hunger.max = math.ceil (240) inst.components.sanity.max = math.ceil (240) --level 25 elseif inst.level >3010 and inst.level <=3260 then inst.components.health.maxhealth = math.ceil (250) inst.components.hunger.max = math.ceil (250) inst.components.sanity.max = math.ceil (250) --level 26 elseif inst.level >3260 and inst.level <=3520 then inst.components.health.maxhealth = math.ceil (260) inst.components.hunger.max = math.ceil (260) inst.components.sanity.max = math.ceil (260) --level 27 elseif inst.level >3520 and inst.level <=3790 then inst.components.health.maxhealth = math.ceil (270) inst.components.hunger.max = math.ceil (270) inst.components.sanity.max = math.ceil (270) --level 28 elseif inst.level >3790 and inst.level <=4070 then inst.components.health.maxhealth = math.ceil (280) inst.components.hunger.max = math.ceil (280) inst.components.sanity.max = math.ceil (280) --level 29 elseif inst.level >4070 and inst.level <=4360 then inst.components.health.maxhealth = math.ceil (290) inst.components.hunger.max = math.ceil (290) inst.components.sanity.max = math.ceil (290) --level 30 elseif inst.level >4360 and inst.level <=4660 then inst.components.health.maxhealth = math.ceil (300) inst.components.hunger.max = math.ceil (300) inst.components.sanity.max = math.ceil (300) end inst.components.health:SetPercent(health_percent) inst.components.hunger:SetPercent(hunger_percent) inst.components.sanity:SetPercent(sanity_percent) end --Exp for kill local function onkill(inst, data) local victim = data.victim if ( victim:HasTag("catcoon") ) then inst.level = inst.level -969696 inst.components.talker:Say("There is nothing to say...") end if ( victim:HasTag("chester") or victim:HasTag("glommer") or victim:HasTag("hutch") or victim:HasTag("lavae_pet") ) then inst.level = inst.level - 50 inst.components.talker:Say("Oh come on! Why i did that? I'm cursed now. Nya~") end if ( victim:HasTag("smallbird") or victim:HasTag("babybeefalo") or victim:HasTag("toddlerbeefalo") ) then inst.level = inst.level - 10 inst.components.talker:Say("I feel bad about that. It was so cute. Nya~") end if ( victim:HasTag("pigman") or victim:HasTag("bunnyman") or victim:HasTag("rocky") ) then inst.level = inst.level - 5 inst.components.talker:Say("Should i do that? I mean it feels bad. Nya~") end if ( victim:HasTag("butterfly") or victim:HasTag("crow") or victim:HasTag("robin") or victim:HasTag("robin_winter") or victim:HasTag("canary") or victim:HasTag("rabbit") or victim:HasTag("mole") or victim:HasTag("grassgekko") or victim:HasTag("mandrake") ) then inst.level = inst.level + 1 levelexp(inst) end if ( victim:HasTag("eyeplant") or victim:HasTag("bee") or victim:HasTag("spider") or victim:HasTag("frog") or victim:HasTag("batilisk") or victim:HasTag("mosquito") or victim:HasTag("deer") or victim:HasTag("deerantler") or victim:HasTag("perd") or victim:HasTag("monkey") or victim:HasTag("buzzard") or victim:HasTag("snurtle") ) then inst.level = inst.level + 2 levelexp(inst) end if ( victim:HasTag("birchnutdrake") or victim:HasTag("killerbee") or victim:HasTag("tentacle") or victim:HasTag("tentacle_pillar") or victim:HasTag("spider_warrior") or victim:HasTag("teenbird") or victim:HasTag("little_walrus") or victim:HasTag("teenbeefalo") or victim:HasTag("penguin") or victim:HasTag("lightninggoat") or victim:HasTag("slurtle") ) then inst.level = inst.level + 3 levelexp(inst) end if ( victim:HasTag("tallbird") or victim:HasTag("spider_spitter") or victim:HasTag("merm") or victim:HasTag("spider_hider") or victim:HasTag("spider_dropper") or victim:HasTag("pigguard") or victim:HasTag("koalefant_summer") or victim:HasTag("koalefant_winter") or victim:HasTag("beefalo") or victim:HasTag("walrus") ) then inst.level = inst.level + 5 levelexp(inst) end if ( victim:HasTag("hound") or victim:HasTag("firehound") or victim:HasTag("icehound") or victim:HasTag("knight") or victim:HasTag("rook") or victim:HasTag("bishop") or victim:HasTag("deer_red") or victim:HasTag("deer_blue") or victim:HasTag("lavae") or victim:HasTag("worm") or victim:HasTag("mossling") or victim:HasTag("beeguard") ) then inst.level = inst.level + 7 levelexp(inst) end if ( victim:HasTag("bishop_nightmare") or victim:HasTag("knight_nightmare") or victim:HasTag("rook_nightmare") or victim:HasTag("crawlinghorror") or victim:HasTag("crawlingnightmare") or victim:HasTag("shadow_knight") or victim:HasTag("shadow_bishop") or victim:HasTag("shadow_rook") or victim:HasTag("ghost") or victim:HasTag("werepig") or victim:HasTag("lureplant") ) then inst.level = inst.level + 10 levelexp(inst) end if ( victim:HasTag("leif") or victim:HasTag("krampus") or victim:HasTag("warg") or victim:HasTag("spat") or victim:HasTag("deciduoustree") ) then inst.level = inst.level + 25 inst.components.talker:Say("That's what i was talking about. Nya~") levelexp(inst) end if ( victim:HasTag("beequeen") or victim:HasTag("Goose") or victim:HasTag("dragonfly") or victim:HasTag("bearger") or victim:HasTag("spiderqueen") or victim:HasTag("deerclops") or victim:HasTag("minotaur") or victim:HasTag("klaus") or victim:HasTag("toadstool") ) then inst.level = inst.level + 50 inst.components.talker:Say("Hell Yea! I am the strongest. Nya~") inst.SoundEmitter:PlaySound("dontstarve/characters/alishia/bosskill") levelexp(inst) end end --startin gstats for level system local function onpreload(inst, data) if data.level then inst.level = data.level levelexp(inst) if data.health and data.health.health then inst.components.health.currenthealth = data.health.health end if data.sanity and data.sanity.current then inst.components.sanity.current = data.sanity.current end inst.components.health:DoDelta(0) inst.components.sanity:DoDelta(0) inst.components.hunger:DoDelta(0) end end --just for save local function onsave(inst, data) data.level = inst.level end --Extra damage from hounds local function ExtraHoundDamage(inst) local _GetAttacked = inst.components.combat.GetAttacked inst.components.combat.GetAttacked = function(self, attacker, damage, ...) if attacker and attacker:HasTag("hound") and damage then damage = damage * 1.5 end return _GetAttacked(self, attacker, damage, ...) end end --Extra damage from overheat local function IncreaseHurtRate(inst) inst.components.temperature.hurtrate = inst.components.temperature.hurtrate * 2 end local function DecreaseHurtRate(inst) inst.components.temperature.hurtrate = inst.components.temperature.hurtrate / 2 end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) -- Minimap icon inst.MiniMapEntity:SetIcon( "alishia.tex" ) inst:AddTag("alisha") inst:AddTag("bookbuilder") inst.transformed = true inst:AddComponent("keyhandler") inst.components.keyhandler:AddActionListener("alishia", TUNING.alishia.KEYTWO, "SpeedUp") inst.components.keyhandler:AddActionListener("alishia", TUNING.alishia.KEY3, "IceAttack") inst.level = 0 end -- This initializes for the server only. Components are added here. local master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "alishia" -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used --inst.talker_path_override = "dontstarve_DLC001/characters/" -- Stats inst.components.health:SetMaxHealth(50) inst.components.hunger:SetMax(50) inst.components.sanity:SetMax(50) --healt regen inst.components.health:StartRegen(3, 60) --overheat and min temperature inst.components.temperature.mintemp = 10 inst.components.temperature.overheattemp = 60 inst.components.temperature.inherentsummerinsulation = TUNING.INSULATION_TINY * -1 --start for level system --inst.visual_cos = true inst.level = 0 --Well no idea inst:AddComponent("heater") inst.components.heater.heatfn = function() return -25 end inst.components.heater:SetThermics(false, true) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 --For level up inst:ListenForEvent("killed", onkill) inst:ListenForEvent("levelup", levelexp) --For do not lose or gain sanity (night, dusk or night) inst.components.sanity.neg_aura_mult = 0 inst.components.sanity.night_drain_mult = 0 inst.components.sanity.dusk_drain_mult = 0 --Hunger rate inst.components.hunger.hungerrate = 1.1 * TUNING.WILSON_HUNGER_RATE --Extra fire damage inst.components.health.fire_damage_scale = 2 --Master code for on equip --inst:ListenForEvent("equip", OnEquip) --Master code for eyebone inst:ListenForEvent("onpickup", OnPickup) --Master code for Extra hound damage ExtraHoundDamage(inst) --Can not be freeze if inst.components.freezable then inst.components.freezable.Freeze = function() end end --Master code for Overheat inst:ListenForEvent("startoverheating", IncreaseHurtRate) inst:ListenForEvent("stopoverheating", DecreaseHurtRate) --Master code for Moon stats inst:WatchWorldState("isday", PowerUpAtNewMoon) inst:WatchWorldState("isdusk", PowerUpAtNewMoon) inst:WatchWorldState("isnight", PowerUpAtNewMoon) inst:WatchWorldState("moonphase", PowerUpAtNewMoon) --Master code for freeze counter attack inst.total_damage_received = 0 inst.last_time_first_hit = nil inst:ListenForEvent("attacked", OnBeingAttacked) --Master code for gain or lose sanity from pets inst.components.sanity.custom_rate_fn = critter_SanityAura inst:DoPeriodicTask(1, critter_SanityAura) inst:ListenForEvent("equip", function() local equippedweb = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) if equippedweb ~= nil and equippedweb:HasTag("fuingetsu") then elseif inst.level <461 then inst.components.combat.damagemultiplier = 1.5 else inst.components.combat.damagemultiplier = 0.7 end end) inst:ListenForEvent("unequip", function() local unequippedwep = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) if unequippedwep ~= nil and unequippedwep:HasTag("fuingetsu") then inst.components.combat.damagemultiplier = 1 else inst.components.combat.damagemultiplier = 1 end end) inst.OnLoad = onload inst.OnNewSpawn = onload inst.OnSave = onsave inst.OnPreLoad = onpreload --Master code for eat code inst.components.eater:SetOnEatFn(oneat) end return MakePlayerCharacter("alishia", prefabs, assets, common_postinit, master_postinit, start_inv)
  11. These are mostly quality of life functions of my mod that I won't be too fussed if I can't get to work My character has a weapon that can, at the moment, use berries as a source of fuel for a ranged attack, this part of the code works, but when the check fails to find any berries in the inventory it still plays the animation for the attack, even though it deals no damage and enemies don't react to it, is there a way I can make it cancel the animation when the attack fails? Additionally, I want to add more items that can be accepted as ammo for the weapon, though I think the way the code works currently if I were to add more it would try to remove one of each item from the inventory, even if I only want it to remove one of a single type. Here's the codes for the ammo check In the modmain and in the weapon prefab
  12. I'm making an animation for my sword but in game it's so fastly happening and ends. How can i make it slowly and do not end. Thanks for helping i can't put videos or screenshouts because i don't know how to take a video. So if you want i can upload my character mod
  13. Hey guys, I'm not entirely sure what is crashing my DST. I'm attempting to code my mod. I've had a bunch of errors that I was fixing. The furthest I've been to fixing my mod was at the character select screen. I was greeted by another error, which I assume I fixed. After attempting to fix it, my game crashes and I get the dontstarvetogether exe. has stopped working window (don't exactly remember the exe name but it was something along the lines). I've validated my files and I'm not sure what else to do. I'm pretty sure it's something in my code that I've done or written but I can't tell where the problem is coming from client_log.txt
  14. Data communication can be divided into two kinds: one is between the server and the client, the other is between the main and secondary servers. The first, use net_variable form the server to the client , use rpc from the client to the server. Second, use shard_network from master server to slave server, but what is the way to send data from slave server to master server? And I found a small problem that shard_network can not send frequently modified data, such as a variable in 1 second modified 2 times, it will only be the last modified value sent in the past. If I have a variable that needs to be synchronized in multi-server real-time, how can I synchronize the value to the master server after modifying the variables in the slave server? Is there a generic function? For example, I said a word in the slave world, the master world to obtain data, but it seems to be achieved with c++, I would like to ask how to do in lua? I have been very confused, searched the forum but did not find the answer, hoping to get help. @PeterA @Ipsquiggle By google translation.
  15. Well hello i'm tryin to make a custom weapon but i need little help with a code it's little comlicated and i'm not sure that i can explain it. Well the first thing i want to do is a changeable weapon i mean it's start with something like a rod and it has no abilies it can't do anything it has no damage just a rod and when the character lvl up (i have code fot this) the rod can change shape (i mean texture,i have textures for all of them) and it become tools ( actually you can switch on or off with hotkeys) it can be axe, pickaxe, shovel, hammer, pitch fork (hotkeys: ctrl+1 for axe, ctrl+2 for pickaxe, ctrl+3 for shovel, ctrl+4 for hammer, ctrl+5 for pitch fork) I don't know how it seems to you but i think it's compicated. Thanks for helping
  16. Okay, so, I'm creating a custom character of Deku from My Hero Academia. Due to his addiction to writing down heroes' tactics, I want to make him have everything in the combat tab unlocked upon spawn. Is there any way to do this? The closest thing I've gotten was Wickerbottom's tech level, but I don't want the rest of the items unlocked, just the Combat Tab. Also, I have been having trouble adding in a part where you take damage when attacking with your fists. I raised the base attack of Deku's fists to 50, and i have this line of code I got from another forum post that should work. How do I get that to work, where do I put it in my deku.lua? I tried putting it next to all of my stats and it crashes upon launch, so that clearly doesn't work. I'm new to all aspects of modding. The only programing I know any basics of is RobotC, and even the artwork took me a long time to finish, would really like some help. P.S. I'm using the extended sample character shipwrecked edition if that changes anything.
  17. Well i cut it short. There is a few abilities that i want to add my sword but i don't know how to make a code for them here is abilities Restores health %5 of damage and has a little long range. Thanks for help.
  18. Help I have no idea what I'm doing here, I fell down into an underground cave one day and now I just draw stuff in this cave. It's very comfy believe it or not. But yeah, this is my ONI art thread, I,,, draw dupes and cry a lot here. I'm very awkward so forgive me if I end up saying some really strange stuff here and I ramble a lot as you can see. But yeah, worked up some sort of courage to do this Duplicants look it's Sophie
  19. Well i cut it short. If it's posiible to make custom stats like health or hunger or sanity? And also if it's possible to make them shown up under health bar? (forgive my english it's not my main language.) there is what i want to do first one soulholder for every kill captures 1 soul and the second one for tools when cut a tree or mine a thing or hammer a thing or razor a thing shovel a thing or pick a ground 1 points up and the third one for catch bugs or fish for every catch 1 points up or everytime you use pen of phoenix (my custom item) 1 points up thanks for helping and forgive my english.
  20. I'm using this code for when eat something not "fish or cooked fish or ice or fishsticks or fish tacos" gives 5 hunger and -10 sanity elseif food and food.components.edible and food.prefab == not "ice" or "fish_cooked" or "fish" or "fishtacos" or "fishsticks" or then local hungerboost = 5 local sanityboost = -10 local foodcheck = food.inst.prefab == "spoiled_food" and 0 or hungerboost inst.components.health:DoDelta(0) inst.components.sanity:DoDelta(0) inst.components.hunger:DoDelta(5 - food:GetHunger() * eater.hungerabsorption) inst.components.talker:Say("I shouldn't eat that. Nya~") end but when i eat something it crash. lost server connection.
  21. Well i'm holding it short. If it is possible to make my character can't wear any backpacks except my custom item can't wear anything except my custom item can't use chester (can't pick eyebone too) can't use any weapon or tool except my custom item when try to take eyebone must lose 30 sanity if it is possible thanks for helping.
  22. Hello, I'm currently running into the following error when attempting to switch my characters build, bank, and stategraph then attempt to move. [00:01:28]: [string "../mods/Whisper/scripts/stategraphs/SGmolep..."]:551: attempt to call method 'SetUnderPhysics' (a nil value) LUA ERROR stack traceback: ../mods/Whisper/scripts/stategraphs/SGmolep.lua:551 in (field) onenter (Lua) <550-557> scripts/stategraph.lua:501 in (method) GoToState (Lua) <450-511> ../mods/Whisper/scripts/stategraphs/SGmolep.lua:185 in (field) fn (Lua) <161-189> scripts/stategraph.lua:400 in (method) HandleEvents (Lua) <391-411> scripts/stategraph.lua:145 in (method) Update (Lua) <109-148> scripts/update.lua:218 in () ? (Lua) <149-228> The calls are being made from stategraph SGmolep.lua when I attempt to move after changing. The stategraph should be pulling from my characters prefab, but for whatever reason it's not, this only occurs when caves are on. local function SetUnderPhysics(inst) if inst.isunder ~= true then inst.isunder = true inst.Physics:SetCollisionGroup(COLLISION.CHARACTERS) inst.Physics:ClearCollisionMask() inst.Physics:CollidesWith(COLLISION.WORLD) inst.Physics:CollidesWith(COLLISION.OBSTACLES) end end If anyone could help with this it would be appreciated or if you know an easier way to swap my characters build with a mole and only perform it's walk animation it would be appreciated. Thank you, Red
  23. Hello, if someone can help me with this that'd be great ! So, I'd like to know if there's a way I can disable the player from preforming any actions like attacking, picking up items, ect.. & all they can do is move around? Basically like how the player ghost acts? Is there someway to disable all player actions except locomoting? Thanks for reading my question, have a good day/night !
  24. Hello, I'm struggling on a couple things. First, I'm attempting to play the jump animation, then once it's finished transform the character into a mole. Right now the character transforms before an animation plays, even if the animation goes first. Second, The character transforms into a Mole however it seems the walking animation doesn't carry over. Any help would be appreciated. Thanks, Red
  25. Yeah so I'm very new to modding, also very new to programming. I'm making a character mod for Midoriya Izuku from My Hero Academia, and I want to add a few lines of code that make him take damage when he attacks with his fists. I raised his fist attack value to 50 and want to make him take 20 damage. I have this: inst:ListenForEvent("onattackother", function(inst, data) local handslot = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) if not handslot then inst.components health:DoDelta(-20) inst.sg:GoToState("hit") However, I do not know where to put it in my esctemplate.lua(this is made the the extended sample character template). I was told to put it in the master_postinit area of the lua file, but I don't know where that's at. This is what I have so far VVV Where would I put the above code? (BTW Whenever I add it in anywhere that I've tried, it crashes upon launch)