Jump to content

Search the Community

Showing results for tags 'coding'.

  • 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] - 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)
  • Griftlands
    • [Griftlands] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • 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
  • Klei Entertainment Games
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • Other Klei Services

Categories

  • Don't Starve
    • Custom Characters
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve
  • 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 [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet [ARCHIVE]
  • Don't Starve: Shipwrecked [ARCHIVE]
  • Don't Starve: Hamlet Early Access [archive]
  • 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
  • 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

  1. Hello, I am making a character mod again, and with help I was able to write custom quotes for when he gets hit, and even dies (as well as depending on who kills him). However, unlike my other character mod Garamonde, I am struggling to get his standard death quotes to work. I copied the working code from Garamonde's prefab file, and I even added a SetTaskInTime delay for the quote to show up, but still nothing. I've tried dying in multiple ways but nothing. Here's his prefab file if anyone can see what I may've done wrong! Thank you! kk.lua
  2. I cannot figure out how to add any kind of speed multiplier or anything to my ability/transformation without the game crashing. And if anyone knows how to make a timer than I would be happy to change it to a timed ability here is the Mod Info and Main Lua: (pls help) modmain.lua Line 90 to end I have the button press working just not the stat increases. modinfo.lua Just the key options.
  3. I'm making a custom Character, and trying to figure out how to code the perks I want him to have. They are; -Sanity gain around another custom Character -Night vision -Slowed hunger depletion -Starts with an Axe and a Shovel -Can't be put to sleep by mandrake based items -Speed boost If anyone could help me figure out the coding for this I would greatly appreciate it!
  4. Hi everyone! I am very new to the modding thing. I am trying to make a character mod for Don't Starve Together. He's gonna be a Rock person. Following along with the tutorial on the Klei website, it all seems fairly straightforward. However, I've run into a little snag (being that I have no coding experience, and don't want to screw up my game) I need help with a few things. Firstly, a slightly slower sanity drain, I set his sanity to 50, but i'd like it to drain a bit slower. Found someone else's thread to help here! Secondly, how to make it so he can mine boulder and etc, with his fists. Thirdly, how he can give off a warmth aura exactly like a thermal stone. Fourthly, how to drain his sanity near pickaxes. And lastly, how to make food non edible, but minerals edible for him. Any help would be appreciated.
  5. Is it possible to assign the mine action to empty hands? Looking at the Zinnia mod I know you can move it to a new tool. But what about no tool? local function DoToolWork(act, workaction) if act.target.components.workable ~= nil and act.target.components.workable:CanBeWorked() and act.target.components.workable:GetWorkAction() == workaction then act.target.components.workable:WorkedBy( act.doer, ( ( act.invobject ~= nil and act.invobject.components.tool ~= nil and act.invobject.components.tool:GetEffectiveness(workaction) ) or ( act.doer ~= nil and act.doer.components.worker ~= nil and act.doer.components.worker:GetEffectiveness(workaction) ) or 1 ) * ( act.doer.components.workmultiplier ~= nil and act.doer.components.workmultiplier:GetMultiplier(workaction) or 1 ) ) return true end return false This seems to be the check for the right tool in your hand, I'm just not sure how to bypass it.
  6. So I was trying to make a character mod, but it crashes the game, and the error log shows this to me: [string "../mods/mod-bell/modmain.lua"]:1: attempt to call global 'require' (a nil value) And this is what I have in string 1: local MakePlayerCharacter = require ("prefabs/player_common") Which I feel little confused, I will be very appreciated if someone can give me any suggestion to solve this problem
  7. whenever i try to run the code it will work till the actually action happens saying "attempt to index combat (nil value)" it happens whenever the attack happens and this only actually accrues when caves are turned on; any help is appreciated local touch = State{ name = "touch", tags = { "doing", "busy", "prechanneling","touch" }, onenter = function(inst) inst.AnimState:PlayAnimation("channel_pre") inst.AnimState:PushAnimation("channel_loop", true) inst.sg:SetTimeout(0.7) end, timeline = { TimeEvent(7 * FRAMES, function(inst) inst.components.locomotor:Stop() inst.sg:RemoveStateTag("busy") end), }, ontimeout = function(inst) inst:PerformBufferedAction() ---------> this is when the error happens inst.AnimState:PlayAnimation("channel_pst") inst.sg:GoToState("idle", true) end, } AddStategraphState("wilson_client", touch)
  8. So, somehow I'm actually on college to learn programming but LUA's kicking my ass hard. I need some help making a function (or anything, really) that makes him get a speed boost on two separate wetness levels, as in: >29, speed is multiplied from 1 to 1.05 >59, speed is multiplied from 1 to 1.2 Everything else on the code is sorted out correctly, this is the only thing that's being a problem to me right now. An optional thing I'd like to add but, once again, is optional and not required, is making held weapons slip more easily than on a vanilla character since he's pretty clumsy. I tried some codes I found on the forums, but none of them worked properly. One did manage to kiiiind of work, until I got the wetness above 59. Then the game crashed. Current attempted code screenshots as follows: (on local functions before master_postinit) inside master_postinit I've tried other methods but this one was the least buggy one up to now.
  9. Hi, I have this troublemaker in my master_postinit, but no matter how hard I try I just can't succeed. I want it to be dependent on % chance, but as I said this is far above my reach. I know that first part... handle.deststate = function(inst) return "doshortaction" end ... proceeds without executing the rest of code, but when I want to manipulate all those lines to be harmonized it just ends with clusterdisaster. local master_postinit = function(inst) local function custperc(inst) local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK] if math.random() < 0.5 then handle.deststate = function(inst) return "doshortaction" end return if math.random() < 0.5 then "doshortaction" end end else inst.components.talker:Say("I have to rest...", 2.5,true) end end Thank you kind stranger, just in advance.
  10. I want to make the character in my mod able to transform when attacked or below a certain amount of sanity. I do understand some code but not all of it, I looked at Woodie's code but some of the code that allows him to transform I don't really understand, so I was hoping to get a little bit of help with how to make my character transform when attacked or below a certain amount of sanity.
  11. Hello! I'm very green to the modding scene, and have been working on updating an old mod. She works just fine, thankfully! I've just been looking to balance out some of her features, and I can't seem to find anything on preventing a character from using healing items (poultices and bandages, for example). Is it something that can go in the character or modmain luas? Could somebody help me out?
  12. I wanted to give my character a life steal ability, similar to Wigfrid's ability to gain HP and Sanity. Is it also possible to transform during battle? After consecutively attacking mobs the character will gain stacks (like filling a gauge) and then transform, gaining a damage boost and speed boost but lose sanity.
  13. I was trying to tackle this myself thinking some of the ideas wouldn't be too bad but I ended up not being able to wrap my head around it. Trying to find item codes that were similar didn't help me out much, either. I wanted to make a set of usable cards (similar to Wickerbottom's books). I was trying to reference Wickerbottom's books but wasn't sure where to go with it. The recipes are done and placed in my character's modmain file. I made a custom crafting tab as well but haven't been able to test it yet. There are four cards I wanted to make: 1. Grants a 50% damage boost for 15s at the cost of 10 Sanity. 3 uses. 2. Grants a 50% defense boost for 20s at the cost of 10 Sanity. 3 uses. 3. Restores 40 Sanity. 3 uses. 4. Restores 50 HP OR revives a Player at the cost of 10 Sanity. 1 use. I was trying to use both the Life Giving Amulet and the Tell Tale Heart as reference for the 4th card but I didn't see anything I could use in either prefab file. If possible I want to use the same animation as when Wickerbottom uses her books. I'd received a lot of help with coding here on the forums for previous endeavors and was hoping I could at least tackle doing items on my own but I soon realized I bit off more than I could chew. I know it's kind of dumb for me to try making things beyond my capability but I thought it'd be really cool to bring my character to life in this game. Any assistance would be greatly appreciated.
  14. I was making custom items using Wickerbottom's books as a base when I came across this issue: the items go invisible with no name when dropped on the floor. I figured out what was causing the items to disappear but am not sure how to go about fixing it. inst.AnimState:PlayAnimation(def.name) This is the code for the "idle" animation. I copied and pasted the anim zip file for Wickerbottom's books and changed the names to my needs since I wanted to use the same "reading" animation. Since the "idle" animations were each individual book's name they are now obsolete with my name changes. I thought to edit the scml file myself but I couldn't get ktools to work to get said scml file. That brings us to: is there a way to get around this problem? I was thinking maybe I can override the base anim zip just for the idle animations (I'd have a separate anim similar to "swap" for equippables that'd be used only so the items show up on drop), but I have no idea if that is actually doable. If it is I would appreciate any help in doing so. Alternatively, if anyone else is able to get the scml file out of the anim zip then I can freely work with that and get everything in place. If that's possible I've attached the file. arcana.zip
  15. I've recently started making a custom Character, and I'd like them to have Night vision but am unsure how to go about this. For this character only I'd like it to be like the light of a full moon all the time, without affecting the other players. How might I be able to achieve this? I can't seem to figure out how to look at other mods code to find examples, so I'm at a loss here.
  16. I want to add a DESCRIBE string for my character and its pair character so that it recognizes itself (another player using the same mod) and its pair. Ex. Wilson describing another Wilson as being his doppleganger and greets all other characters and the player with with different quotes. I saw a couple attempts at this in other mods but they didn't work when I tested them. There were two ways I saw it attempted: the first put the coding in the modmain.lua, the second was put it in the prefab/character.lua. Both used the same coding. The coding was as follows: STRINGS.CHARACTERS.GENERIC.DESCRIBE.[CHARACTERNAME] = { GENERIC = "quote here", ATTACKER = "quote here", MURDERER = "quote here", REVIVER = "quote here", GHOST = "quote here", FIRESTARTER = "quote here." } To my understanding the game doesn't recognize if you just slap your mod character's name in the string, so is there a way to actually get it to work? And is it possible to describe another mod character?
  17. In the two (well, one and a half) mods I've made so far, I was coding for functionality only ("just make it work.") I was on a deadline and I didn't know the environment (or Lua) very well, and I did get everything working, but the result was very messy code. I ended up with 1647 lines of code in my modmain file. Now I'm about to start working on a new mod, something bigger and possibly with other people too, so this style of work is not a good approach - and I don't like it either, coming from a background of coding with a strong emphasis on design, style and conventions. So what I'm looking for here is some advice from veteran Don't Starve script writers. What are some good practices and rules of thumb for coding in Lua for Don't Starve Together? Some design patterns would also be nice (for example, I always try to wrap an existing function with my extra code rather than replace it with a copy of the original that has my additions in it.) I know there's an option for importing modules which can help reduce the size of modmain and organize the code better, but I think that when I tried using it I had some trouble accessing the GLOBAL variable (my memory's kind of fuzzy on that part). Thanks in advance. =)
  18. Ok. I have finally got my stuff to work after a several month long hiatus. On to what I need to know and where to possibly find it if you are willing to help. I am making a wilson bot that will eventually become an interact-able npc. One that will act and work with you. It's like having actual friends but not really. The actual ai I have planned is a bit far in the future for how complicated I want to make it. What I have so far: I have a wilson that stands around doing nothing and has a third arm holding an invisible tool. What I plan on: An AI that will walk around randomly and do tasks based off what he sees. What I need help with: First is sight range. I have no way of measuring units on the screen and I don't know how much "sight" to give wilson so it seems realistic. What is the range of sight that is given to a player? High hopes for my first don't starve mod yes but taking it a step at a time will eventually get me to my goal. BTW sorry if this is confusing but I am still at the beginning and there's not much to ask for but I still need help for each step along the way. I made this a general ask because, I will be coming back here to ask more questions about this topic. I did a previous ask article but it was archived due to my long hiatus. I fixed my previous problem of stategraph basics now I am here. Join me along the ride as I make a mod that somehow has over 300 steam subscribers despite me blatantly saying it doesn't work. Also if you haven't already noticed I am a noob coder. Gotta start somewhere right?
  19. Been working on a character mod for DST and DS with a friend for a could of days now and one of the traits we wanted to add was having the character be "friends with frogs." Which means that the frogs in the game with ignore them no matter what. The issue here is i have no idea how to do that. I've tried adding the "frog" tag into the code, i tried a string of custom code i found online that didn't work. I'm not sure what to do anymore. Anyone know how to make the frogs in the game friendly to one character?
  20. Hi again guys, I want to make an item like Lucy that talks to a player and rejects characters other than my modded one, would anybody be able to give me a bit of help on how to do this? Also, would it be possible to have this effect only trigger at low sanity? Thanks in advance!
  21. I'm looking for someone who, unlike me, knows what they're doing with coding for don't starve together. I've tried looking into files and workshops but nothing seems to work out, if any one could help me with it I'd appreciate it! What I've been trying to code into my mod character is the ability to clone themselves, pretty much like Maxwell's perk, but not in shadow form, I've seen people in the workshop who have done this before so I know it must be possible. Here are some examples of what I mean: https://steamcommunity.com/sharedfiles/filedetails/?id=885818848& https://steamcommunity.com/sharedfiles/filedetails/?id=485694807& https://steamcommunity.com/sharedfiles/filedetails/?id=644104565& Any help is very much appreciated, thanks! I have managed to get what I wanted ^^
  22. Hey guys, Found a mod called Taronci with night vision configuration but I found that his night vision uses inst.Light instead of color cubes. My night vision uses Color Cubes. so I tried to change the inst.Light part into inst.components.playervision. My code doesn't work and I think I'm using the wrong statement for this. What statement should I be using for Color Cubes, instead of inst.light? Any help is appreciated, thanks
  23. Hi there, I want to monitor the value change of a variable, say "inst.gcp = 0 or 1". How can I push event when the value of "inst.gcp" changes so that I could listen for event in the character.lua? Would someone please tell me how to do push event? I tried put on the code, it doesn't crash but it doesn't work either. This is my code Would someone care to answer? Really appreciate it. Regards, Nick
  24. Hi there, I have the idea of creating a brand new prototyper with new tabs and items. I tried reading the "scienceprototyper.lua" but couldn't understand it well and was confused with some concept including "component("prototyper")", "techtree", "parent.prefab == "researchlab2"" and "return createmachine(......)". Related files: [scienceprototyper.lua] [researchlab2_pod.lua] [researchlab2_pod_alt.lua] [techtree.lua] and [tuning.lua]. (All under script.zip) I guess I need help with understanding the relations among these code files and how they work. Or maybe someone who has previous experience with prototypers could show me a path through? Or is there an existing mod that does something similar? Any piece of help would be appreciated. Regards,
  25. Hey guys! 3 things today... 1. Like in woodie's transformation, his nightvision only activates in werebeaver form. I'd like to only have my night vision turn on for my lycan transformation but what should I put in my code that would tell it so? I'm using Kzisor/Ysovuka's transformation code As of now this is my night vision code local function RestoreNightvision(inst) inst:DoTaskInTime(3, function(inst) inst.Light:Enable(true) inst.Light:SetRadius(1) inst.Light:SetFalloff(20) inst.Light:SetIntensity(.1) inst.Light:SetColour(245/255,40/255,0/255) end, inst) end local function UpdateNightVision(inst, phase) local enable = phase == "night" inst:DoTaskInTime(enable and 0 or 1, function(inst) inst.components.playervision:ForceNightVision(enable) inst.components.playervision:SetCustomCCTable(enable and {} or nil) end) end local function OnInitNightVision(inst) if TheWorld.ismastersim or inst.HUD then inst:WatchWorldState("phase", UpdateNightVision) UpdateNightVision(inst, TheWorld.state.phase) end end this is in my local common_postinit inst:DoTaskInTime(0, OnInitNightVision) 2. Also what colorcube codes should I use to get this sort of look? Original picture from SuperDavid. As of now my night vision is super bright a fully lit as if there were no difference from the day time and night time. I'd like to have it dimmer and bluer similar to how it looks when there's a full moon at night 3. I'd also like to only eat raw meats while in lycan form, but I'm not sure where to put that or how to do it. Oh one more thing, this is alot to ask but much feedback from steam has been conflicted with people clamoring for night vision or not to have it at all. I'd like to add a configurable setting to the mod where you can choose to play with it or without it. Does anyone know how to do this? If anyone has answers I'd love to hear them, thanks so much guys! Much appreciated!
×
  • Create New...