Jump to content

Search the Community

Showing results for tags 'coding problem'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Hot Lava
    • [Hot Lava] - General Discussion
    • [Hot Lava] - Suggestions and Feedback
    • [Hot Lava] - Bug Tracker
    • [Hot Lava] - Strats and Records
    • [Hot Lava] - Developer Log
    • Hot Lava Latest Update
  • Griftlands
    • [Griftlands] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included: Spaced Out!] - Bug Tracker
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
    • Oxygen Not Included DLC Alpha
  • 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] Beta Branch
    • [Don't Starve Together] PlayStation
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Nintendo Switch
    • [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
    • [DS + DST] Art, Music and Lore
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [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
    • Other Klei Services

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Beta Branch
  • [Don't Starve Together] Nintendo Switch
  • [Don't Starve Together] PlayStation
  • Don't Starve Together: Return of Them
  • Don't Starve Together: The Gorge
  • Don't Starve Together: The Forge
  • Don't Starve Together: The Forge (Archive)
  • [Don't Starve Together] Xbox One
  • Don't Starve: Shipwrecked
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet Closed Beta (ARCHIVE)

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [Nintendo Switch] Don't Starve Together
  • [PlayStation] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Hamlet
  • Don't Starve: Shipwrecked

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Biography


Location


Interests


Occupation


Favorite Game


Modder


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Klei Featured Artist


Early Supporter


Early Supporter


Don't Starve


Don't Starve Together


Oxygen Not Included

Found 4 results

  1. Heya, I'm making a custom character based on the grim adventures of billy and mandy. I made a similar one for dont starve many years ago and left it at a wip state. Now I want to make it properly to the end this time around. I've made much progress but run into some complications. Firstly, my character doesn't display his custom item correctly on the character select screen (but it works correctly in the inventory after selecting him and spawning into the world). I thought I did everything correctly with his custom item but apparently not quite. How can I fix it to display correctly in the character select screen? <-fixed by adding this line to my mod.main: TUNING.STARTING_ITEM_IMAGE_OVERRIDE["reaper"] = {atlas = "images/inventoryimages/reaper.xml", image = "reaper.tex"} Also, I have this pickable prefab (called grimhead) that I want removed from the world after my character picks it. grimhead.lua: It works otherwise fine but I'm having trouble despawning it from within my character.lua. thegrimreaper.lua: As I believe the problem lies in how I handle the variable 'myhead' but I've tried fidgeting with it for a while now and seem to run in circles in how to handle trying to despawn it. <-fixed in my comment The basic logic behind my character is that if he gets hit while he doesnt have a helmet on, he has a chance to drop his head (spawn grimhead, transform into headless char texture). Then he can pick his dropped head back up and regain his lost form (despawn head when picked by my character with a tag "headless" and transform back to base char texture). I'm probably breaking some sort of form in my code since it doesnt save the headless transformation (on relog my character has his head back) and I'm unable to despawn the dropped head properly...) . What can or should I do to make him I want him to work? Modmain if it is needed: I made all these by adjusting examples and my previously existing code/assets... Would REALLY appreciate general pointers or help with my specific issues.
  2. Along with my other current problem, I have discovered two more. When my mod character befriends pigmen with his working ability, they seem to refuse to attack other pigs that are not befriended, including pig guards. Similarly, the game is acting like pig guards become followers too when in range of K_K's ability by giving them friendly names and rendering me unable to attack them (unless I ctrl + click them with a weapon). Yet they still attack me like normal. Here again is K_K's prefab file for convenience, although it's basically unchanged since I made the other thread as I have made no progress towards these issues. kk.lua These three issues are I think the last thing stopping me from completing this character. Thanks again for any help!
  3. Sorry about all the follower-related threads. Just can't seem to resolve this problem. Anyway, as I've mentioned before, my character (same one) has a problem with his code that works with followers. This time (and hopefully the last time), it has to do with garden plants. Since he has a One-man Band-type ability, him doing work such as digging, etc. near plants should count as talking to them but it instead causes a crash. Here is the log: server_log_plants.txt And, for the sake of convenience and hoping the problem can be fixed, I'll paste just the follower code here too: This is the function for it: local function OnWorked(inst, data) local x,y,z = inst.Transform:GetWorldPosition() -- Get the player's location local ents = TheSim:FindEntities(x,y,z, TUNING.ONEMANBAND_RANGE, nil, {"werepig"}, {"pig", "merm", "farm_plant", "player"}) -- Find things near the player's location for k,target in pairs(ents) do -- For each valid found entity run the following code if target:HasTag("player") or target.components.follower:GetLeader() == inst then -- If the target is a player or a creature that follows you target:AddDebuff("buff_kk", "buff_kk") -- apply the buff elseif target.components.follower and not target.components.follower.leader and not inst.components.leader:IsFollower(target) and inst.components.leader.numfollowers < 10 then if target:HasTag("merm") then if target:HasTag("mermguard") then if inst:HasTag("merm") and not inst:HasTag("mermdisguise") then inst.components.leader:AddFollower(target) end else if inst:HasTag("merm") or (TheWorld.components.mermkingmanager and TheWorld.components.mermkingmanager:HasKing()) then inst.components.leader:AddFollower(target) end end else inst.components.leader:AddFollower(target) end elseif target.components.farmplanttendable ~= nil then target.components.farmplanttendable:TendTo(inst) end end end This is in the master_postinit: inst.onFollowerDeath = function(follower) -- create a function and add it to the character if inst.prefab == "kk" then -- Double check that the leader is playing KK, there should be no case where this can fail, but just in-case inst.components.sanity:DoDelta(-15) --Remove 15 sanity print ("inst.onFollowerDeath") end end inst.onFollowerLeave = function(follower) -- create a function and add it to the character follower:RemoveEventCallback("death", inst.onFollowerDeath) --Remove our ListenForEvent so we don't lose sanity from past-followers dieing follower:RemoveEventCallback("stopfollowing", inst.onFollowerLeave) --Same idea here end if inst.components.leader then --Make sure we are not messing with something that doesn't exist (For custom gamemodes and such) local oldAddFollower = inst.components.leader.AddFollower -- Store a backup of the AddFollower function for later use inst.components.leader.AddFollower = function(self, follower) -- Replace the AddFollower function with our own oldAddFollower(self, follower) -- Run the stored backup of the AddFollower function so we don't miss out on the original functionality of it follower:ListenForEvent("death", inst.onFollowerDeath) --Run the "onFollowerDeath" function when the follower dies follower:ListenForEvent("stopfollowing", inst.onFollowerLeave) --Run the "onFollowerLeave" function when the follower stops following us end end And this is the buff function itself for lowering K_K's own and other players' hunger drain in range while working: local function OnAttached(inst, target) if target and target.components.hunger ~= nil then -- Check if the target has the hunger component so we don't try messing with something that doesn't exist target.components.hunger.burnratemodifiers:SetModifier(inst, 0.1) print("Activate Hunger Drain Buff") end end local function OnDetached(inst, target) end local function OnExtended(inst, target) inst.components.timer:SetTimeLeft("buffover", 5) end local function OnTimerDone(inst, data) if data.name == "buffover" then inst.components.debuff:Stop() inst:Remove() end end local function buff_fn() local inst = CreateEntity() if not TheWorld.ismastersim then --Not meant for client! inst:DoTaskInTime(0, inst.Remove) return inst end inst.entity:AddTransform() --[[Non-networked entity]] --inst.entity:SetCanSleep(false) inst.entity:Hide() inst.persists = false inst:AddTag("CLASSIFIED") inst:AddComponent("debuff") inst.components.debuff:SetAttachedFn(OnAttached) inst.components.debuff:SetDetachedFn(OnDetached) inst.components.debuff:SetExtendedFn(OnExtended) inst.components.debuff.keepondespawn = true inst:AddComponent("timer") inst.components.timer:StartTimer("buffover", 5) inst:ListenForEvent("timerdone", OnTimerDone) return inst end Thank you for any help!
  4. So! I've been working on this for a while, but since this doesn't pertain to my other thread about this mod (it's far more specific), I'll make a separate thread for it. I'm trying to add some code to the Modmain.lua in order to have the existing characters in the game react in unique ways to my character (Different from the Player string in the speech_[character].lua file) and I pulled the code from an existing mod that had it. In my testing, it seemed characters like Wilson and Webber still used their default descriptors instead of the ones I modded in. Here's what the code looks like (Only posting a few as not to clutter this thread): My first thought was in the line "...DESCRIBE.warlock", warlock needed to be capitalized. I tried that, and it still didn't work properly. If anybody has any info I'd appreciate it! ---------------------- I tossed out using this code entirely, as nothing I tried worked and nobody seemed to have a fix for it. Instead, I ended up using a different code to use a custom speech file I made and added my character's prefab to the character interaction list. In case anybody else is looking for it, the code I used is this: GLOBAL.STRINGS.CHARACTERS.GENERIC = GLOBAL.require "speech_wils" This is for Wilson, because he uses the generic string. I took his speech file, renamed it to speech_wils so it wouldn't conflict with his existing speech file, and it worked like a dream. Hope this helps someone else!
×
×
  • Create New...