Search the Community

Showing results for tags 'tutorial'.



More search options

  • 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] Return of Them
    • [Don't Starve Together] PS4
    • [Don't Starve Together] Xbox One
    • [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
  • Klei Entertainment Games
  • Other Stuff

Categories

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

Categories

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



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

Found 54 results

  1. Hello and welcome to my tutorial on how to make your own custom shader for DST! This sort of knowledge is limited to very few people in the community so I thought to make a tutorial to make this knowledge available for everyone who wants to make a custom shader for their mods! What’s a Shader? Originally shaders were used to shade 3D models in video games. Today they're used to shape, change color, size and etc on textures, used in post processing and so on. They're used all the time in DST and I can show you some examples! One common shader is the “bloom” shader. In the first image here is a roaring campfire where the fire has the “bloom” shader applied that greatly brightens the fire, the 2nd picture has a campfire without the “bloom” shader. The “bloom” shader is generally used to make things bright and shiny! They’re used everywhere in the game. They’re used for the tiles you stand on, the ocean, the UI, spider webbing, haunted effect, colour cubes and much much more! (Bloom On) (Bloom Off) So what do I need to make a custom Shader? -To make a shader file(.ksh), you’ll need a vertex shader(.vs) file and a pixel/fragment shader(.ps) file Quick Explanation on Vertex and Pixel Shaders -Some basic knowledge of GLSL(OpenGL Shading Language) GLSL is the main language we’ll be using to make our custom shaders, I recommend you get some basic understanding and knowledge of the language but if you understand other languages fairly well(such as LUA, which is used for DST programming most of the time) then you should be able to figure out GLSL as you go along An important resource will be this website here! https://thebookofshaders.com/ https://thebookofshaders.com/edit.php This website has a lot of knowledge on shaders and even has an editor for making fragment shaders! Some shaders being showcased are clickable and will lead you to an editor with the code that make up that shader. Almost every shader you see on this website can be applied in DST itself, so take a gander around and see what shaders you like. Programming your Shader So let’s get to programming your shaders! In both the vertex shader and pixel shader files! Create two files like these wherever you’d like. (We will be moving these files later however) You can name them whatever you’d like. But I've named them “examplePixelShader” and “exampleVertexShader” in my case. Be sure the PixelShader file has .ps has its extension, and the VertexShader has .vs as its extension. Now open up your VertexShader.vs file and copy paste this code in. uniform mat4 MatrixP; uniform mat4 MatrixV; uniform mat4 MatrixW; attribute vec4 POS2D_UV; varying vec3 PS_TEXCOORD; void main() { vec3 POSITION = vec3(POS2D_UV.xy, 0); float samplerIndex = floor(POS2D_UV.z/2.0); vec3 TEXCOORD0 = vec3(POS2D_UV.z - 2.0*samplerIndex, POS2D_UV.w, samplerIndex); mat4 mtxPVW = MatrixP * MatrixV * MatrixW; gl_Position = mtxPVW * vec4( POSITION.xyz, 1.0 ); PS_TEXCOORD = TEXCOORD0; } Why do we put this code in? Well this code is necessary for making sure our PixelShader will only apply to the texture/entity we apply it to. What the code is doing is loading in some variables the game gives us (POS2D_UV, PS_TEXCOORD, MatrixP, MatrixV, etc) and we’re doing calculations with those variables to give the game the positions(gl_Position variable). And now the PixelShader will only apply to pixels in that position. If we just did something like gl_Position = vec4(1.0) And set that to the gl_Position variable, our Pixel Shader will run for every pixel on the screen which isn’t what we’d like. As for the code you put in your PixelShader? Well, it can be anything really! But you can find many examples in the bookofshaders website I linked earlier. For my example i’ll be using the code here! Found in: https://thebookofshaders.com/06/ This pixel shader here will switch the color of our entity/texture from yellow to blue and back constantly. You can follow along and plop the code of the example i'm using, or plop your own code in. Just like that! But before we continue, there’s something very important we need to do for my example. (This might not apply to the code you're using) Do you see that “u_time” variable there? Well we need to replace it! Unfortunately the game does not provide us with a u_time variable to use. However! That’s because there’s another variable that’s used to measure time. uniform vec4 TIMEPARAMS; We can use the TIMEPARAMS variable instead! Go ahead and replace the uniform float u_time; line with the “uniform vec4 TIMEPARAMS;” line up above. The TIMEPARAMS variable is used in the game's own shader files(anim.ksh) and that’s where I found it. Now go ahead and replace all instances of “u_time” in your code with “TIMEPARAMS.x” For example, from this To this! Of course if you don’t have the “u_time” variable anywhere in your code you can ignore this. If your pixel shader does something that's unchanging and constant then you probably don’t need a time variable to use. Compiling Our Shader Now we should be done programming our VertexShader and PixelShader files. It’s time for the fun part of compiling our files into the actual “ksh” file which is the actual shader we’ll be loading in-game. Copy your files, and head on over to this directory here “C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\tools\bin” And paste your files here. You’ll notice there’s an executable called “ShaderCompiler.exe” which will be the program we use to compile our shader. Open your command prompt (Windows Key + R, or search Command Prompt in your computer search bar) Type in “cd”, put a space and then paste the directory I gave you earlier and press Enter. Now you’re able to do the compiling as you’re in the directory with the ShaderCompiler. ShaderCompiler.exe -little “shadername” “exampleVertexShader.vs” “examplePixelShader.ps” “shadername.ksh” -oglsl Paste this line into your command prompt like this. Make sure to replace instances of “shadername” with what you’d like to name your shader. And replace “exampleVertexShader” and “examplePixelShader” with the names you have given them. And then you can execute the command by pressing Enter. If your files were prepared correctly and there are no errors, you should get something like this right after in your command prompt. If an error did pop up. Let me know and i'll try to help you out! But anyways, if you did it correctly, this means the shader compiled correctly! You should now find a file named “shadername.ksh” or whatever you set the name of your shader to be, in the directory. Yup, there it is! Grab this file, and head on over to your mod directory Make a new folder named “shaders” in your mod directory., place/paste your new shader file in there. Head on over to your “modmain.lua” and load the shader file in the Assets table like this. You’ll probably already have an Asset table filled up so just plop the Asset(“SHADER”, “shaders/shadername.ksh”) line in your assets table, and be sure to rename accordingly. It’s finally time to test in-game, will your custom shader work? Let’s find out! Create a world and enable your mod. Once you’re in, copy and paste this command and hover over any entity in the game. (Be sure to replace “shadername” with the actual name of your shader) c_select().AnimState:SetBloomEffectHandle(resolvefilepath(“shaders/shadername.ksh”)) And Congratulations you (hopefully) did it! You may use this shader on any entity/texture you’d like at any time. Have fun with this new knowledge and understanding of shaders and I hope us Modders can make some wicked stuff with this! Notes:
  2. Here's my collection of good threads/posts with great content, either explanations or code snippets. You will also find many other tutorials by following the links in the Forum Subsections paragraph below to the other tutorial collections on the forum. I keep adding to this list in a text file on my computer anyway, so I might as well keep the list here for everyone to peruse. Klei ppl: It would be awesome if this could be put in a state where it did not get archived, so I can keep updating it. UPDATE: Thanks for the pin, @JoeW! >> Link to the Newcomer Intro Post << The Newcomer Intro Post has a lot of basic information you need to start modding, plus a bunch of great tips, for example about how to debug your mods and how to search the forum effectively. Also contains links to various other resources, some similar to this thread, where you can find even more great information, albeit most of it is older than most of the things in this post, but there is still a lot of great information to find. If you're making your first player character, start by looking at the first 4-7 links in the "Player Character Stuff" section below AFTER you've been through the newcomer post. 2021 update: It has come to my attention, that the tutorials are slowly being lost to automatic archiving on the forums. Since only pinned posts and those in the "Tutorials and Guides" section seem to stay alive, I'll start converting the scattered posts into actual tutorial threads, starting with the oldest ones. Many of them need a dusting, anyway. Forum Subsections DS "Tutorials and Guides" Section DST "Tutorials and Guides" Section Link to Recezib's excellent "Guide to getting started with modding for DST (and a bit for DS, as well)" post, similar to the newcomer post, but with MANY more details. I can't guarantee that all the information in there is up-to-date, though, since the post is from December 2014 and links to other posts just as old. Link to Cheerio's old, but still good, "Guide to getting started with modding for DS" post, again similar to the newcomer post, but with many more details. I can't guarantee that all the information in there is up-to-date, though, since the post is from 2013 and links to other posts just as old. General Stuff Modinfo Guide Modicons Explanation of events and event parameters (by Serpens) Custom events Exporting music Original Music Mod tutorial (Here's a post where some person helps another person who is having trouble with this tutorial) Check if world has caves Saving and loading data for a prefab Make prefab a light source AoE Damage / Explosion Guide to differences between DS and DST modding and converting mods between the games Player Character Stuff Big Book On Character Creation - (full guide to creating a character mod for DST, written by user C_Thun) Extended Character Template Extended Character Template Fixes Extended Character Template "Remaster" (an updated guide to the Extended Character Template; I have not tried this one) Guide for character modding on Mac Making Custom Skins for Modded Characters Reskinning and Animation Guide (full guide to making a mod that reskins a monster; great source for anything with textures; redirects to a Steam Community post) Custom Character Sounds Player starting items Making basic perks (most of them are for DS only; 40+ different ones; haven't tested them, personally, but they seem legit) Making buffs (simple buff framework with examples incl. movement speed, max-health increase and damage modifier) Using the sanityaura component Affecting sanity in a dynamic way, using a custom sanity rate function and e.g. listeners Auras (can be added to any entity; the example is written for custom entities, but can be changed to be added to non-custom entities) Sanity gain or drain when around another character or certain entities (the example is a character prefab, but it can be changed to any prefab / tags you want) Custom Sleeping Stats For A Character Character transformation / beast-form Levelling system Crafting and Food Stuff Making a recipe character-specific. Also duplicating crafting recipes, plus other stuff How Cookpot Recipes Work Fun With Food (shows several different ways of changing the way food works, also character-specific changes) Item Stuff Make it so no one else can pick up a custom item (like Thor's hammer) Make an armor have 100% damage absorption against certain mobs Life-steal Creating HANDS item from scratch [Template/Tutorial] Custom crafting tab and items How to make Drying Racks
  3. I have seen a lot of people which are still new to modding having troubles with the basic character perks, therefore I decided to create a simple tutorial showing you how to create some basic perks for your character. So if you're having trouble and are working on a mod for DS, RoG, or SW (or... all) then hopefully this could help you out at least a little bit! I know that I'm not the best modder out there, and that there can be few different ways to achieve some of these things in this tutorial, but I'm gonna focus mainly on the ways that I learned how to do them. ---------------------------------------------------------------------------------------------------------------- IMPORTANT DST mods differ in their codding from the DS, RoG, and SW. So sadly this tutorial might not help you if you're working on a DST mod. ---------------------------------------------------------------------------------------------------------------- So most of you probably are already using a basic character template, which provides you with a basic modmain.lua file, same as a starter character prefab file which already has the basic list of assets, and character stats for you to manipulate. But just in case you don't have them, then here's where you can get them: Extended Sample Character << Click In this tutorial I'll show you how to: - Set/Change your characters Health, Sanity, and hunger. - Increase/Decrease/Turn off night and dusk sanity drain or reverse it. - Increase/Decrease/Turn off moisture sanity drain or reverse it. - Set a HP/Sanity/Hunger regen/damage over time. - Set a HP/Sanity/Hunger regen/damage during specified time of the day. - Set a HP/Sanity/Hunger regen/damage during specified season. - Set a HP/Sanity/Hunger regen/damage from rain or while being in caves. - Set a health/sanity/hunger regern/damage from temperature. - Set a health/sanity/hunger regern/damage from moisture. - Set a sanity/health/hunger loss/gain from attacking creatures. - Set a sanity/health/hunger loss/gain from killing creatures. - Set a Sanity regern/damage by equipping an item. - Erase/Increase/Decrease an existing sanity regen/damage on an item. - Add a sanity aura heal/damage to an item/creature. -------------------------- - Change your character's basic defense/attack power/speed. - Change defense/power/speed based on the time of the day. - Change defense/power/speed based on season. - Change defense/power/speed based on rain or caves. - Change defense/power/speed based on temperature. - Change defense/power/speed based on moisture. -------------------------- - Set your character's heat and cold resistance. - Increase/Decrease the HP damage when freezing/overheating. - Make your character fragile/resistant/immune to heat/cold. - Make your character immune to fire. - Turn your character into a monster or make it "not scary to prey". - Make the spiders/merm ignore your character (if unbothered). -------------------------- - Set/Change what your character can/can't eat. - Change the amount of sanity/health/hunger that a specified food gives. - Create a custom food type/group for your character. - Make an non-eatable item eatable to your character. --------------------------- - Give your character starting inventory items. - Make your character always start with a certain custom item (even in adventure mode). - Give your character a night vision/glow. - Unlock recipes for your character. - Change existing recipes. - Give your character custom recipes for existing items. - Remove the sanity gain/loss from picking flowers. - Mute your character. - Make your character unable to trigger spiders when walking on their webs. (All of the sections are in the same order as in the list above) BTW, I know that you'll see me repeat the same things many times in this tutorial, but that's just because I made it for people to be able to head right away to the section that they care to learn, without needing to read the whole thing. So I'm sorry if you'll find that annoying. Anyways, let's start! ========================================================================= Health / Sanity / Hunger ========================================================================= --=====BASIC=====-- -- Set/Change the character's basic stats -- -- Increase/Decrease/Turn off night & dusk sanity drain or reverse it -- -- Increase/Decrease/Turn off moisture sanity drain or reverse it -- --=====REGEN/DAMAGE BASED ON TIME OR SEASON=====-- -- Set a HP/Sanity/Hunger regen/damage over time -- -- Set a HP/Sanity/Hunger regen/damage during specified time of the day -- -- Set a HP/Sanity/Hunger regen/damage during specified season -- --=====REGEN/DAMAGE BASED ON LOCATION OR RAIN=====-- -- Set a HP/Sanity/Hunger regen/damage from rain or while being in caves -- --=====REGEN/DAMAGE BASED ON TEMPERATURE OR MOISTURE=====-- -- Set a health/sanity/hunger regern/damage from temperature -- -- Set a health/sanity/hunger regern/damage from moisture -- --=====REGEN/DAMAGE BASED ON KILL OR ATTACK=====-- -- Set a sanity/health/hunger loss/gain from attacking creatures -- -- Set a sanity/health/hunger loss/gain from killing creatures -- --=====REGEN/DAMAGE BASED ON ITEMS OR CREATURES=====-- -- Set a sanity regern/damage by equipping an item -- -- Erase/Increase/Decrease an existing sanity regen/damage on an item -- -- Add a sanity aura heal/damage to an item/creature -- ========================================================================= Defense / Attack power / Speed ========================================================================= --=====BASIC=====-- -- Change your character's basic defense/attack power/speed -- --=====INCREASE/DECREASE BASED ON TIME OR SEASON=====-- -- Change defense/power/speed based on the time of the day -- -- Change defense/power/speed based on season -- --=====INCREASE/DECREASE BASED ON LOCATION OR RAIN=====-- -- Change defense/power/speed based on rain or caves -- --=====INCREASE/DECREASE BASED ON TEMPERATURE OR MOISTURE=====-- -- Change defense/power/speed based on temperature -- -- Change defense/power/speed based on moisture -- ========================================================================= Sensibility / Numbness / Characteristics ========================================================================= --=====BASIC=====-- -- Set your character's heat and cold resistance -- -- Increase/Decrease the HP damage when freezing/overheating -- --=====FRAGILE / IMMUNE=====-- -- Make your character fragile/resistant/immune to heat/cold -- -- Make your character immune to fire -- -- Turn your character into a monster or make it "not scary to prey" -- -- Make the spiders/merm ignore your character (if unbothered) -- ========================================================================= Food ========================================================================= --=====BASIC=====-- -- Set/Change what your character can/can't eat -- -- Change the amount of sanity/health/hunger that a specified food gives -- --=====CUSTOM=====-- -- Create a custom food type/group for your character -- -- Make an non-eatable item eatable to your character -- ========================================================================= Starter inventory / Night vision / Recipes / Other ========================================================================= --=====ITEMS=====-- -- Give your character starting inventory items -- -- Make your character always start with a certain custom item (even in adventure mode) -- --=====CHARACTER=====-- -- Give your character a night vision/glow -- --=====RECIPES=====-- -- Unlock recipes for your character -- -- Change existing recipes -- --=====CUSTOM=====-- -- Give your character custom recipes for existing items -- --=====OTHER=====-- -- Remove the sanity gain/loss from picking flowers -- -- Mute your character -- -- Make your character unable to trigger spiders when walking on their webs -- ========================================================================= And that would be the end of this tutorial. It took me 5 days to compose all this, so I really hope that at least some of you might find it helpful. However, if any of this parts/sections confused you, then please feel free to ask me whatever it is that you didn't understand, and I'll try to explain it differently to hopefully help you out. Also: Please, do not ask any questions that have nothing to do with this tutorial (nor anything it shows) in here. (Just trying to avoid unnecessary mess) ^^;
  4. I tried to find tutorial for making custom structures but I didn't find anything. If you know something that could help, I would be thankful!
  5. Hey, guys, this tutorial is for people who would like to make a custom setpiece (i.e. a pre-generated chunk of land), but don't know the specifics of it. The tutorial will be kind of long and elaborate, but hopefully it will be helpful. It will require basic modding knowledge, and it is assumed that you already have your base mod (mod folder and modmain) set up. Now let's start. First half (setting up all of the properties): Now that we're all set up, we need to make some ground for our setpiece. Make sure to select the BG_TILES layer, or this won't work. Put your cursor over the tile you want (in the bottom-right corner) and click to select it. For the sake of simplicity, I'll use grass. Next, spread it around the middle of the screen simply by clicking and dragging. It should hopefully look something like this: Wonderful, now we need to create some objects! So you will need to select the FG_OBJECTS layer. Make sure to highlight both of these, top one first: And click up here on this little rectangle thingy. Now, just click where you want the object to be located in relation to the tiles you placed earlier. It should create a small, gray rectangle where you clicked. Now, you should right click the rectangle, and click Object Properties. It should bring up a little popup box. Now type in the name of the prefab you want to create in the type box (I'm going to use researchlab so it stands out). BE CAREFUL: if you type it in the name box, it WON'T WORK, so make sure to type it in the TYPE box. I speak from experience, don't make that mistake. After you've typed the name of your prefab in, press OK. You can add as many objects as you like but for the sake of simplicity, I'll leave mine at one. Once you're done with that, you're finally done (finally). You should definitely save your work so you can modify it later, but the most important part is exporting it: This will export the file into code. MAKE SURE it is set to .lua when you export it. You need to export it to /yourmod/scripts/map/static_layouts/ That is where your setpieces will go. I'm going to call mine rl (research lab). At last, we are done. With most of it. Now all you need is to add a little bit of code to initialize it. To finish, I'm going to show you how to add your setpiece to a biome (won't be making the biome). Here's the code: local Layouts = GLOBAL.require("map/layouts").Layoutslocal StaticLayout = GLOBAL.require("map/static_layout")Layouts["ResearchLab"] = StaticLayout.Get("map/static_layouts/rl")AddRoomPreInit("Forest", function(room) if not room.contents.countstaticlayouts then room.contents.countstaticlayouts = {} end room.contents.countstaticlayouts["ResearchLab"] = 1end)This code should go into your modworldgenmain, a file in the same location as your modmain. If you do all of that, you should get something like this: And voila! You should have a working setpiece! I apologize if this tutorial was hard to follow, but please tell me in the comments if you think I can edit it or make it better. Thank you for reading! setpiecemod.zip
  6. Hello everyone. I know there are some tutorials that cover this topic, but in my opinion it might seem to be too hard to follow by fresh members of this amazing forum. In fact I have learnt a lot from those ancient manuscripts, so don't get me wrong. I will try to explain you how to create custom crafting tab and custom items (on head, body, hand slots). Template is ready to download in attachment section. I think you will spot differences between original ESCTemplate and my version with items, so it's self explanatory. I have described some stuff inside .lua files, but if something will cause you trouble just let me know in the comments and I will explain it further. I have used already existing armor and hat graphisc, because I am too lazy, but you can do whatever you want. In order to decompile anim from game you can use ktools: ktools: Cross-platform modding tools for Don't Starve 4.4.0 and if you don't understand it yet, check this out: [TUTORIAL] How to use Krane from Ktools Sources Work of the Old Masters -------------------------------- [Tutorial] Using Extended Sample Character Template [Tutorial] Creating a "handslot-equippable-item" from scratch Hat Example 1.0 I hope you will find it useful my dear Newcomers. Of course I forgot to attach template. There you go. Custom items and item tab [tutorial].rar UPDATED VERSION - Custom items and item tab [template] - updated 21.04.2021.rar What to do if your game doesn't crash but your custom item is invisible? 1. Make sure that you placed location of .zip file (inside of anim folder) under local assets={} function. 2. Make sure that you saved Spriter project (.scml) as [name_of_your_custom_item].scml and marked .scml file format.
  7. I tried to find tutorial for making custom structures but I didn't find anything. If you know something that could help, I would be thankful!
  8. Hey all! For the past few days i've been working on some code to put the head/base skin option for Modded Characters. And I have finished! And felt it was optimised enough to share to the public! All I ask for you, is to credit me if you do end up using this! What do I need? -My File! : skins_api.lua (You can rename it to whatever you want, but I named it to "skins_api" for this tutorial) -Some basic knowledge of compiling -You should probably have a finished character mod before attempting skins, haha Something to note, Make sure, for the name of your skins you will HAVE to name it in the way shown below "prefab-name-of-your-character_skin-set" Some correctly named skins would be... "wagstaff_roseate" "wheeler_nature" "warbucks_victorian" "wilba_formal" The skin names below are NOT correctly named "nature_wilba" "gladiator_wheeler" "magma_wagstaff" --For reference, Here is a list of all the skin sets in the game! GoH - formal Survivor - survivor Triumphant - shadow Roseate - rose Costume - [skip] Gladiator - gladiator Snowfallen - ice Verdant - nature Victorian - victorian Magmatic - magma Hallowed - [skip] Wrestler - wrestler Now that we made that clear, You're going to want to create... well your actual skin! If you've followed the Extended Character Template (Which i'm pretty sure you obviously have) you can simply download it again, or if you already have it, and then get your exported folder and start drawing your new skin! What'd I reccomend is copying all your characters files over to this new exported folder and then start drawing your new pngs. Now you can finish drawing the assets or set it up and move on to the code and finish the art later. Once you are done your art run the game and the autocompiler should run exporting your skin into an zipped folder in the anims folder. You'll want to download the file I put in the beginning of this tutorial and put it in your mod, like this! (Again, using the name skins_api, but you can name it to whatever you like!) Now, you'll want to put this code in your modmain.lua --Hornet: I am currently using wilba as an example, youll want to change all instances of "wilba" to the prefab name of your character! --Skins local _G = GLOBAL local PREFAB_SKINS = _G.PREFAB_SKINS local PREFAB_SKINS_IDS = _G.PREFAB_SKINS_IDS local SKIN_AFFINITY_INFO = GLOBAL.require("skin_affinity_info") modimport("skins_api") --Hornet: We import the file! If you named your file something else other than skins_api then youll want to rename this function to the name of the file SKIN_AFFINITY_INFO.wilba = { "wilba_victorian", --Hornet: These skins will show up for the character when the Survivor filter is enabled } --[[ --Hornet: The table of skins youre going to have, You can have as many skins as you want! PREFAB_SKINS["wilba"] = { "wilba_none", "wilba_roseate", "wilba_victorian", } --And So on! ]] PREFAB_SKINS_IDS = {} --Make sure this is after you change the PREFAB_SKINS["character"] table for prefab,skins in pairs(PREFAB_SKINS) do PREFAB_SKINS_IDS[prefab] = {} for k,v in pairs(skins) do PREFAB_SKINS_IDS[prefab][v] = k end end AddSkinnableCharacter("wilba") --Hornet: The character youd like to skin, make sure you use the prefab name. And MAKE sure you run this function AFTER you import the skins_api file --Skin STRINGS STRINGS.SKIN_NAMES.wilba_none = "Wilba" STRINGS.SKIN_NAMES.wilba_victorian = "The Victorian" STRINGS.SKIN_QUOTES.wilba_victorian = "\"WILBA'TH DOTH NOT WANT WEARETH O' MOTHERS DRESS!\"" STRINGS.SKIN_DESCRIPTIONS.wilba_victorian = "Wilba's tendency to go Full Hog was simply not enough to stop her mother from dressing her up all fancy-like." Now that you've done that, it's time to actually create the skins code-wise! You will want to head over to your characters _none file. I named it "wilba_skins" but you can keep it as character_none! Whatever you wish --Hornet: This is how I did my skins prefab file!, Obviously youll need to change all instances of wilba to your characters prefab name local prefabs = {} table.insert(prefabs, CreatePrefabSkin("wilba_none", --This skin is the regular default skin we have, You should already have this { base_prefab = "wilba", --What Prefab are we skinning? The character of course! build_name_override = "wilba", type = "base", --Hornet: Make sure you have this here! You should have it but ive seen some character mods with out rarity = "Character", skip_item_gen = true, skip_giftable_gen = true, skin_tags = { "BASE", "WILBA", }, skins = { normal_skin = "wilba", --These are your skin modes here, now you should have 2. But I actually have 4 for WIlba! Due to her werewilba form and transformation animation werewilba_skin = "werewilba", --If your character is a character like Woodie or Wilba with multiple transformations then youll want to have multiple skin modes transform_skin = "werewilba_transform", --Usually your character should have "normal_skin" and "ghost_skin" and Yes! You can actually edit the ghost skin to your liking ghost_skin = "ghost_wilba_build", }, assets = { Asset( "ANIM", "anim/wilba.zip" ), --Self-explanatory, these are the assets your character is using! Asset( "ANIM", "anim/werewilba.zip" ), Asset( "ANIM", "anim/werewilba_transform.zip" ), Asset( "ANIM", "anim/ghost_wilba_build.zip" ), }, })) table.insert(prefabs, CreatePrefabSkin("wilba_victorian", --Now heres the fun part, Our skin! I did "wilba_victorian" but you can do whatever skin set you want! { base_prefab = "wilba", build_name_override = "wilba_victorian", --The build name of your new skin, type = "base", rarity = "Elegant", --I did the Elegant Rarity, but you can do whatever rarity you want! rarity_modifier = "Woven", --Ive put the rarity_modifier to Woven, Doesnt make a difference other than say youve woven the skin skip_item_gen = true, skip_giftable_gen = true, skin_tags = { "BASE", "WILBA", "VICTORIAN"}, --Notice in this skin_tags table I have "VICTORIAN", This tag actually makes the little gorge icon show up on the skin! Other tags will do the same thing such as forge, yotc, yotp, yotv, yog and so on! skins = { normal_skin = "wilba_victorian", --Rename your "normal_skin" accordingly werewilba_skin = "werewilba", transform_skin = "werewilba_transform", ghost_skin = "ghost_wilba_build", --And if you did a ghost skin, rename that too! }, assets = { Asset( "ANIM", "anim/wilba_victorian.zip" ), Asset( "ANIM", "anim/werewilba.zip" ), Asset( "ANIM", "anim/werewilba_transform.zip" ), Asset( "ANIM", "anim/ghost_wilba_build.zip" ), }, })) --If youd like to make more skins, simply copy the CreatePrefabSkin function and accordingly make new skins you want! return unpack(prefabs) Congratulations! You've created your prefab skin! And now, it's time to test! Congratulations! You did it! I'll be going over skin portraits and swap_icons right now You may have noticed there's no icon here. Well that's because there's no SWAP_ICON! You will find your swap_icon image in the exported folder of your skin. The image should be around 192x192. Make sure the pivot of the symbol is in the middle in the spriter file! If you for some reason don't have this swap_icon, you'll want to make a new folder named SWAP_ICON, put your 192x192 image. Go to spriter and plop the image down, and make sure the pivot of the symbol is in the middle! Next, open the game up and let the compiler run and badum! You should get something like this once you load into the game. Portraits Once you're done drawing your portrait, you'll want to have your xml and tex as usual You can use the game’s autocompiler to compile your tex and .xml from a .png or use Handsome matts Tools(https://forums.kleientertainment.com/files/file/73-handsome-matts-tools/) to manually decompile the tex. However, you’re probably going to need to change your xml file to this <Atlas><Texture filename="wilba_victorian.tex" /><Elements><Element name="wilba_victorian_oval.tex" u1="0.0009765625" u2="0.9580078125" v1="0.36181640625" v2="0.99951171875" /></Elements></Atlas> If you haven't noticed, the name variable here is going to need a "_oval" at the end of the skin name, so go ahead and put that in if it isn't like that already! Woo! And of course don't forget to declare the big portrait assets in modmain.lua like this. Asset( "IMAGE", "bigportraits/wilba_victorian.tex" ), --Into the Assets table in modmain.lua Asset( "ATLAS", "bigportraits/wilba_victorian.xml" ), And there you have it! That's all! Let's go over some obvious things Am I allowed to create skins for Official Don't Starve Together Characters? No. Am I allowed to create skins for Non DST Don't starve characters such as Walani, Wagstaff, Wheeler, Wilba, Woodlegs and Wilbur? Maybe? I get a lot of mixed answers from people and i'm not too sure on that. Obviously you can see I've been using Wilba as an example this entire time. I'm not going to release these skins without an official clear answer If there's something you don't understand please PLEASE tell me! It's my first tutorial and i'm not sure if I explained everything well. Happy modding!
  9. Getting Started: Guides, Tutorials and Examples So you want to create a mod for Don't Starve. That's awesome! Hopefully this collection of guides, tutorials and examples will help you on your quest. Just remember that modding is all about getting your hands dirty. Oftentimes you will have to figure out things for yourself. So dive in, give it a go and when get stuck, the forums are your friend. But most of all, make sure to have fun and please share your creations with the rest of us! Getting Started: How To: Install and Use Mods by CheerioBefore you Begin! by tehMugwumpModding Etiquettte by JanHTroubleshooting by tehMugwumpMod API Updates: API 6 and Post-Reign of Giants Modding (including new important pieces of modinfo.lua) by SethRArt:Using Extended Sample Character Template by DleowolfThe Artist's Guide To Character/item Modding by TheDanaAddamsA Simple Guide to Spriter by TheDanaAddamsDana's Tips for Mod Art by TheDanaAddamsA No-Talent-Hack's Guide to Art by NycidianOfficial Spriter Tutorials by BrashMonkeySpriter Source Assets by CheerioSpriter Example: Equippable Item by CheerioSpriter Example: Hat by CheerioCreating a "Handslot-Equippable-Item" from Scratch by MalacathMinimap Icon Sample by MalacathMaking a Custom Set Piece by JackSlenderEasy Character Art Tutorial by Cheerio2D Animation at Klei by Jeff Agala and Aaron BouthillierCreatures:Creature Mod Tutorial 1 - Creating a Mod by CheerioCreature Mod Tutorial 2 - Spawning a Creature by CheerioCreature Mod Tutorial 3 - Importing Animation by CheerioCreature Mod Tutorial 4 - Locomotion by CheerioCreature Mod Tutorial 5 - Stategraphs by CheerioCreature Mod Tutorial 6 - Brains by CheerioCreature Mod Tutorial 7 - Importing Sound by CheerioCreature Mod Tutorial 8 - World Spawning by CheerioScripting:Intro to Programming by Khan AcademyWots the Diff?? Prefabs, Components, Stategraphs, and Brains by IpsquiggleAPI Examples by IpsquiggleSample Mods by IpsquiggleScripting with Sublime by CheerioTips for Scripts by CheerioProfiling by CheerioEngine Architecture by KevinExample: Follow the Leader by CheerioCode Tips and Tricks by squeekSharing your Mod:Steam Workshop Uploader by IpsquigglePosting and Downloading Mods by moistedparanoiaSound:Sound Mod Tutorial by Cheerio Music Mod Tutorial by CheerioAdding Custom Sound to Your Custom Character by MalacathTranslation:Creating a translation using the PO Format by BigfootLanguage Sample Mod by IpsquiggleMisc:Asset Tools by IpsquiggleMod Tools Github Repo With Source by CheerioDownload Mod Tools for Windows by Cheerio
  10. This tutorial will teach you how to create a mod which replaces a sound in 'Don't Starve'. For this tutorial, we're going to replace the 'rabbit scream' sound with a 'bird scream'. This tutorial requires:- PC version of 'Don't Starve' and 'Don't Starve Mod Tools'- The 'Sound Mod Tutorial' mod installed through Steam Workshop or on the Klei Forum downloads. Tutorial:All sounds in 'Don't Starve' are called events. To replace an existing sound event, we need to create a new sound event using the FMOD designer and then tell the game to use that sound instead. Let's get started! To launch the designer, Double click on the 'Don't Starve Mod Tools' in steam: Now inside the designer, browse to your mod folder and open 'sound_mod_tutorial.fdp'. Next click on the events tab and scroll down till you find the 'rabbit_scream' event. Right click on the gray area under the word play list and click add sound. Add the 'bird_scream.wav' sound from the mod folder. Press 'CTRL+B' to bring up the build menu and click the build button. You can now close the designer. Browse to the mod folder and open up a file named 'modmain.lua' in your favorite text editor. Remove the two dashes next to the 'rabbit_scream' line and save the file. Now start the game and go chase some rabbits! Remember to enable your mod through the mods menu. Happy modding!
  11. Introduction Hello everyone. I hadn't seen any tutorial dedicated to this topic. At the start I need to state that I am pretty lame in everything associated with modding, so don't expect sophisticated solutions. This tutorial is simple yet effective, I have to agree that it could be better but as I have said, I am just simple man. I have used my old projects to explain you the scheme of your custom follower. Template is based on this: Main Part To make functional follower you need to introduce the follower's: - main script [creature.lua], the corpus of you follower - anchor [anchor.lua], I have called it this way, because it attaches and provides easy summoning of the creature to your DST world - brain [creaturebrain.lua], yep, that's the brain, every action you require from your creature belongs to it - stategraph [SGcreature.lua], this file gives your creature ability to perform any visible action, because it's connected with animations and their realizations Locations Main Folder -> scripts -> prefabs -> [creature.lua] Main Folder -> scripts -> prefabs -> [anchor.lua] Main Folder -> scripts -> brains -> [creaturebrain.lua] Main Folder -> scripts -> stategraphs -> [SGcreature.lua] How to make mine template yours ? That's simple! Follow me this way! At the start, change my names [name.lua] into yours. [taern.lua] That should be your character's name. into local common_postinit = function(inst) goes inst:AddTag("summonerally") Add this tag to prevent summoned creature from attacking your character and vice versa. and local master_postinit = function(inst) goes inst:AddComponent("reader") It will let you read books, which is crucial for this method of summoning follower. [creature.lua] Change name 'creature' into yours follower's name. Using Ctrl+F in Notepad++ as shown in ESCT tutorial by Dragon Wolf Leo. That's your follower's appearance [Main Folder -> exported -> creature] You can call it what you want to, but it must match [name in exported] and all other references in whole mod to work properly. [anchor.lua] Change name 'anchor' into your summoning item. [creaturebrain.lua] I am not sure if changing CreatureBrain name will affect anything but just to be sure you can try. function CreatureBrain:OnStart() local root = PriorityNode( { WhileNode(function() return IsNearLeader(self.inst, KEEP_WORKING_DIST) end, "Leader In Range", PriorityNode({ IfNode(function() return self.inst.prefab == "creature" end, "Is Duelist", PriorityNode({ WhileNode(function() return self.inst.components.combat:GetCooldown() > .5 and ShouldKite(self.inst.components.combat.target, self.inst) end, "Dodge", RunAway(self.inst, { fn = ShouldKite, tags = { "_combat", "_health" }, notags = { "INLIMBO" } }, KITING_DIST, STOP_KITING_DIST)), ChaseAndAttack(self.inst), }, .25)), IfNode(function() return self.inst.prefab == "creature" end, "Keep Chopping", DoAction(self.inst, function() return FindEntityToWorkAction(self.inst, ACTIONS.CHOP) end)), IfNode(function() return self.inst.prefab == "creature" end, "Keep Mining", DoAction(self.inst, function() return FindEntityToWorkAction(self.inst, ACTIONS.MINE) end)), IfNode(function() return self.inst.prefab == "creature" end, "Keep Digging", DoAction(self.inst, function() return FindEntityToWorkAction(self.inst, ACTIONS.DIG, DIG_TAGS) end)), }, .25)), Follow(self.inst, GetLeader, MIN_FOLLOW_DIST, TARGET_FOLLOW_DIST, MAX_FOLLOW_DIST), WhileNode(function() return GetLeader(self.inst) ~= nil end, "Has Leader", FaceEntity(self.inst, GetFaceTargetFn, KeepFaceTargetFn)), }, .25) self.bt = BT(self.inst, root) end Those lines inside of this chunk must match your prefab's name. If it won't match your follower is not going to perform those actions (fighting,mining,chopping,digging) ex. 'Creature' =/= 'creature' and your follower will not dig out objects in this case. [SGcreature.lua] Change name 'creature' into yours follower's name. If you want your creature to be non-humanoid you can play with stategraph to match your animation's frames, but I don't know how to achieve rewarding results. [modmain.lua] PrefabFiles = { "taern", "taern_none", ------------ "creature", } Change name 'creature' into yours follower's name one more. Add this: Assets = { Asset("ATLAS", "images/inventoryimages/anchor.xml"), Asset("IMAGE", "images/inventoryimages/anchor.tex"), Asset("ANIM", "anim/creature.zip"), } This will make your item [anchor] avaible to craft and use. Just remember about CAPITALS. GLOBAL.STRINGS.NAMES.ANCHOR = "Anchor" GLOBAL.STRINGS.RECIPE_DESC.ANCHOR = "Allows you to summon your custom creature into this world." GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ANCHOR = "Is this a Ouija board ?" local anchor = Ingredient( "anchor", 1 ) anchor.atlas = "images/inventoryimages/anchor.xml" local anchor = AddRecipe("anchor", { Ingredient("feather_crow", 2), Ingredient(GLOBAL.CHARACTER_INGREDIENT.SANITY, 20), Ingredient("goldnugget", 4)}, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, nil, "images/inventoryimages/anchor.xml") You will need to create additional: - [Main Folder -> exported -> anchor] for your item if you want to see it in game. - [Main Folder -> images -> inventoryimages] and place your 64x64 icon of item TEX and XML. Change names in XML too. Appendix So everything beyond 'vanilla' tutorial is added by me to make your life easier. If you have created your first custom character you won't have problems with distinguishing extraordinary files connected with custom follower. I have attached my template just few lines under this block of text. Have fun with your digital friend P.S. I know my english is not perfect, but I think it's pretty understandable. Well if not just write a comment below and I will try to help you the best I can Download the template here -----> Taern - Follower Tutorial.zip
  12. MODS IN MENU IS BACK, BABY! And this time, it's here to stay! No more hand-holding No more spammy tables in the modinfo No more crashing with every Klei update Now fully open with limitless capabilities Fully loads server mods on the clientside Able to access a mod's configuration Allows for Postinits, Prefabs, and Assets to be added Put characters in the main menu Insanely easy and user-friendly How does it work? I'll tell you! A brand new tab will appear in your mods menu. Click it and you'll be able to view mods that are compatible with Mods in Menu! And that's it! Click apply and you will be able to see changes that mod wants to make to the main menu! Ok, but how can I make my mod compatible? Simply add a modclientmain.lua file to your mod. Treat this modclientmain as if it were a second modmain that only loads clientside. (because it is) And that's it! Your mod is ready to access the clientside! Okay but in all seriousness though, there's a few important things I need to note and go over. Firstly, an explanation of what exactly is going on here to help those newer to code understand. Your modmain.lua file is essentially the starting point of your mod when it is loaded. It brings in assets, prefabs, and game changes, all starting from that single file. The new modclientmain.lua is essentially the SAME EXACT THING with all the SAME EXACT CAPABILITIES. However, it is loaded on the clientside via Mods in Menu! "Okay but why would I need that? I could just set my mod to be clientside!", I hear you audibly questioning from your brain. And I have an answer! Making your mod clientside will prevent it from being enabled serverside! This is bad for a modded character for example. This feature is mainly there for server-only mods to reach their characters and items into the main menu for users to enjoy more features! Now I've gotta cover some basic restrictions and changes that everyone should pay attention to. First, your mod's priority. It is very important that you do not reach this priority number (-2147483647) with your server mod as Mods in Menu MUST load after all server mods to prevent major issues. If you need your server mod to load on the backend then do -2147483646 instead. For those interested, all mods loaded by MiM will then load AFTER MiM using the normal priority rules. Next thing to note, is that when working with your modclientmain your goal is to use the absolute minimum code/strings/assets possible! The entire reason Klei originally moved server mods to not enable on the clientside is because they wanted to cut down on load times. Keep this in mind when working with your modclientmain and only require assets/code that is absolutely necessary for your character or changes to appear in the main menu as intended! Depending on your programming experience, there's a multitude of ways that you can use your modclientmain! Handle your modmain and modclientmain files completely separately. This is the easiest for those not too familiar with code but takes more time and effort to upkeep. Have both your modmain and modclientmain require a common file that will register all assets/prefabs/strings/etc that would otherwise be shared between both files. This makes upkeep nice and easy and it cuts out all repeating code. DO NOT DO THIS UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING. Calling modimport("modmain") will load your modmain file, leaving the modclientmain practically untouched and load your full mod as intended serverside. This will be the optimally efficient way to handle your mod but things can go south quickly if you don't do it right, it can be dangerous. There are a couple IF checks to help out with the 2nd and 3rd methods to ensure you don't load serverside things on the client! --This variable gets added to your modding environment by Mods in Menu --Use this check to see if your file is being run on a server or by Mods in Menu if is_mim_enabled then --This is a check I found while building this API actually and it can prove to be quite helpful for mods enabled on both client and server --The gamemode will always return an empty string if you're in the main menu and not in-game if TheNet:GetServerGameMode() == "" then And that's all anyone needs to know really! Attached to this post will be a modclientmain file I whipped up as an example using the Whemy The Witch mod under the first handling method. IF THERE ARE ANY QUESTIONS, PLEASE FEEL FREE TO ASK HERE! SPECIAL THANKS TO: Erik for drawing the mod icon image (isn't it awesome looking?) Hornet for encouraging me and letting me use Hamlet characters as guineapigs Von for letting me use Whemy as a guineapig Get the API on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2415978456 modclientmain.lua
  13. Something I've noticed a lot of people have been struggling with is adding stories for Walter to tell that will be compatible with ones that are already there. Many people replace his story table, which means no other stories will be told other than the ones in that specific mod. In some cases you might want this, say if you're making a joke or a meme mod. However in most cases people want these stories to be told alongside other mods and the vanilla game, so here I will show how you do it properly. In its most basic form, this all will go in your modmain. (The forums hate me when it comes to formatting, so I'll provide a download link as well) This can be used in mods that aren't exclusively for stories as well. Imagine having secrets in your mod that are hinted about by Walter when he tells stories... If someone else's mod isn't compatible and people use it alongside yours, you can still let your stories show up by putting this line at the bottom of your modinfo. priority = -10 What this does is cause your mod to load after other mods by lowering the priority of it. Their mod will have already replaced the story table by the time yours adds stories to it. Hopefully this can help people who want to add stories. I love seeing the lore-friendly ideas other people have, it's fun to read them. modmain.lua
  14. Hello and hi! I haven't seen a lot of tutorials on the subject of creating custom mobs, outside of some really old mod-tutorials by Cheerio (I think), like explaining brains, behaviours in-depth. So, here I go, making this tutorial for beginners trying to create their own mob. First of all I would like to say that creating an entirely unique mob takes time, and by unique I mean a mob with a unique mechanic, attack, behaviour etc. as it requires you to create a more complex brain, possibly a new component or a behaviour, and that takes time. In this tutorial I'll be focusing on a simple mob, without any special qualities. Worry not however as this does not mean that this tutorial won't cover much. There is a lot to cover. Notice: I've never modded in Don't Starve specifically, only Don't Starve Together so if what I'm about to present doesn't work in Don't Starve, know that you've been warned. Let's start with a quick summary: 1. What to expect? 2. What is a prefab? 3. What is a brain? 4. What is a stategraph? 5. Behaviours? Don't we already have a brain? 6. A component. 7. Creating a prefab for a mob. 8. Creating a brain. 9. Creating a stategraph. - - - - - - - And that's all! You can now spawn your mob in-game with either the console or the Too Many Items Plus mod. But wait! Why is it called MISSING NAME? That's because you have to add the appropriate strings into the strings table in modmain.lua: GLOBAL.STRINGS.NAMES.CUSTOMMOB = "Custom Mob" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.CUSTOMMOB = "..." GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WINONA.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WARLY.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WORTOX.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WORMWOOD.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WURT.DESCRIBE = "..." GLOBAL.STRINGS.CHARACTERS.WALTER.DESCRIBE = "..." NAMES for the mob name and the rest, each for one character. The dots are a placeholder. And now you're done! You can play around with the brain, components, maybe behaviours, and create a more complex creature. Looking through the code of already existing creatures is a very good practice. It will help you discover new ways you could code your mob. - - - - - - - If you spot any errors in this tutorial, comment them and I'll try to fix them as fast as possible.
  15. Hello, I'm Lucemodok and today I learned from @zarklord_klei how to load fonts into DST. So, first you need to download your font, any font will do as long as you can read it. Second, you'll need BMFont, it's a way to convert font files to bitmap fonts, which is what DST uses. You'll then need to open BMFont and open the font settings to select a font. After that, you need to set your font configurations, this is what I used. Next, open the export options and use this configuration. This makes your font work with DST and have an outline. After that, select save bitmap font as... and save it as "font.fnt" in whatever folder you want, a png with the name "font_0.png" should also appear there. Convert the png into a tex with any tex conversion tool you have, rename it "font.tex" and zip it along with the fnt into "talkingfont_yourcharacter.zip" for the game to be able to read it. Create a fonts folder in your mod folder, and put the new zip into the folder. Here comes the coding part. -- modmain.lua Assets = { Asset("FONT", "fonts/talkingfont_yourcharacter.zip"), } GLOBAL.TALKINGFONT_YOURCHARACTER = "talkingfont_yourcharacter" AddSimPostInit(function() GLOBAL.TheSim:LoadFont(GLOBAL.resolvefilepath("fonts/talkingfont_yourcharacter.zip"), GLOBAL.TALKINGFONT_YOURCHARACTER) end) Put that in the bottom of your modmain.lua and put the following in your character's common_postinit function. inst.components.talker.font = TALKINGFONT_YOURCHARACTER You should be done with your fonts, now you should test for any crashes. Enjoy!
  16. Alrighty, So I've seen a few people having this problem since the new update and decided to post this. Many new mod makers are making their character mod, they have everything perfect except for one thing, the names_character does not appear in game! what shall they do? Well, what I've seen is people look through the DST game files and come across names_gold_character and they think 'Oh! I just have to make that!' in all reality there is a much MUCH Simpler way to do it. First off, when making a new character everything is names properly. if it is not properly named then errors will occur. Edit the names_character in the art program of your choice, and Delete the xml and tex files before recompiling. NOW open up the newly compiled name_character.xml using Notepad++ or the code program you use and change <Atlas><Texture filename="names_character.tex" /><Elements><Element name="names_character.tex" u1="0.00048828125" u2="0.85498046875" v1="0.1533203125" v2="0.9990234375" /></Elements></Atlas> to <Atlas><Texture filename="names_character.tex" /><Elements><Element name="character.tex" u1="0.00048828125" u2="0.85498046875" v1="0.1533203125" v2="0.9990234375" /></Elements></Atlas> open up DST and see if it worked! It has worked for me for all of my characters! Now, For that Modicon! Some don't know how to get it to compile and many I've seen do. This took me three to four years to figure out. First off edit the Mod Icon in an art program. Next Delete the XML and TEX files Move the modIcon.png into the images folder, moving it here before recompiling the mod will make thos XML and TEX files. Recompile, then pull the new XML, TEX and png out of the images out and back to their original place, Where the Modmain and modinfo is.
  17. Hey, everybody. I'm finally back to the modding scene, and with me, I'm bringing modding live streams! Every single Saturday I will be live streaming myself modding new things into the game. Sometimes useful, sometimes vanity, and sometimes just downright silliness! I'll also be posting each new stream here from now on! Playlist of all streams done up to this point Collection of all mods done on live stream Specific streams:
  18. Hey, I'm Lucemodok (or Luce), and I'm here to teach you about making actions. (Hope this works, since I'm not sure I explained it well.) First, we'll need to well... create the action. (Remember to replace everything in square brackets (Including the square barckets) and keep the capitalization.) Then we'll need to create components (Or use existing ones) to make our action work. After that we need to finish our action. Finally, we add our component to the prefab we want using an AddPrefabPostInit. Oh yeah, I forgot to say, you'll also need to define Action, ActionHandler and ACTIONS local Action = GLOBAL.Action local ActionHandler = GLOBAL.ActionHandler local ACTIONS = GLOBAL.ACTIONS
  19. Hello. I have learned how to use Ktools by accident. Maybe I am so bad at everything that I didn't find solution for my issue in main Ktools topic, or whatever. If you have the same problem you probably click "krane.exe" twice and nothing happens. You can use Krane to decompile "anim.zip" into folders with images and .scml file from Spriter. Tutorial Part 1. Extract files from "ktools-4.4.4-win32.zip" to desktop. It should create folder called "ktools-4.4.4", rename it to "ktools". It must look like this after opening. Part 2. Open path marked with red color (your game directory) and follow up to anim folder. It will be full of .zip files. Let's find an "axe" for instance. Then open it ... ...and copy all 3 file types into your "ktools" folder in the desktop. Part 3. Press Windows (key on your keyboard) + R, then type "cmd" (console should pop up) Type "cd desktop/ktools", press "Enter" key Type "krane anim.bin build.bin name" [name -> name of folder you want your files to be decompiled into] After while you will see this Part 4. Open "ktools" folder and your "name" folder will be waiting for you. Open it. You will see .scml file and folder. That's it. I hope someone might find it useful. New community members for instance, without knowledge and experience in all this stuff. (I can't delete this picture below. Just ignore it.)
  20. A guide for my Beard Template mod, intended to be used alongside Dragon Wolf Leo's Extended Sample Character mod (which you can find here). What You Need Your character mod, which you have to provide yourself. Basic knowledge of making character mods. (If you can make a character using the ESC, you'll be fine.) An image editor with transparency support. Pretty much anything other than MS Paint should be fine. A text editor. I recommend using Notepad++. Ignoring modmain.lua and modinfo.lua This tutorial doesn't really modify the modmain.lua or modinfo.lua, since all the code to add a beard to your character goes in your character prefab file. In the Character Prefab The character prefab provided should include all the instructions needed to add a beard to your character in the form of comments. Creating the Beard Assets In the download you should find a folder called "beard templates" outside of the "exported" folder. These are the templates you'll use for making your character's beards, including Wilson's beard and versions of the ESC beard alongside the headbases and faces used. Of course, the beard you create should not include the headbase and faces used and will go to the exported folder for the game to properly export it into the game. Outside of this, all instructions you'd need to make your character are mostly unrelated to the files provided. If you can already make a character using ESC you should be good to go with this. I hope this was useful to you; I don't know how to make tutorials or guides at all and I'm pretty new-ish to Don't Starve Together modding anyways. If you have any problems with this guide, let me know. Beard Template for ESC.zip
  21. Hello, modders and skin fanatics alike! After a very long time working on it, I'm happy to announce a brand new mod API that allows one to create their very own skins for their modded characters and items! You can find the mod on the Steam Workshop here: http://steamcommunity.com/sharedfiles/filedetails/?id=835602689 WARNING: This mod is only to be used to create skins for modded characters/items. Klei strongly forbids the use of modders creating skins for any official character/item. If any mod is found using code from this mod in order to skin official characters/items it will be reported on sight. How To Use: Very special thanks to: @Kzisor who's Additional Dressware mod inspired the creation of this mod! @Dudedude who helped out with the assets. @PeterA who walked me through a lot of the Dos and Don'ts so that I wasn't stepping over any lines! @Blueberrys who made the Persistant Data module that helped make this possible. Can be found here: For anyone wanting to skin their modded characters here are the skin portrait backgrounds! Some frequently asked questions: (If you have any more questions post them down below! I'll reply as soon as I can!) Can I skin Wilson or any other official character? No, Peter has told me to make sure that everybody is very aware that this is off limits... We've been given a gift so let's not squander it! How do I use it? The tutorial is up above! It has all the usable functions inside and how to use them! Please don't rip the code and put it in your mod through... Make sure that when you upload your mod you add this mod as a required item. (It is set up this way so that the same code doesn't run multiple times if someone has multiple mods that have skins!) What is an API? An API (Application Programming Interface) is a set of functions which allows you to use advanced techniques without having to write your own code or copy/paste the code in your mod... In order to use this API you must add this mod as a requirement on your mods workshop page. Can I make clothing? No, that is off limits. (and it'd also require a lot of extra code that is not supplied within the mod...) I found a mod that skins official items/characters! What should I do? If it is not the playable pets mod (They technically have the go-ahead to skin the playable mobs) then please immediately report it! We don't want to force Klei's hand and have Modded Skins shut down. What if I made a rip-off character of one of the official characters and skinned that? Still off limits because it is still Klei's character. (even after you change one letter in the name) So this is also prohibited and must be reported if anyone is found doing this! Can this be used to give myself official skins? At the moment I'm more than certain that this is impossible... However, if a way is found to do this using my mod then it's more a fault of Klei's (for leaving a hole in skin restrictions) and not mine because all I did was some UI hacking. What mods are currently using this to make skins? Check out @Chris1488's Modded Skins thread! He's going to try his best to stay on top of what mods get skins and he'll be updating his thread whenever he possibly can! Is mayonnaise an instrument? I'm... not entirely sure? I guess you could make a song using only sounds made by a tub of mayonnaise... But then again you could technically do that with almost everything! So I propose a counter-question. Does that mean that everything is an instrument?
  22. Most of the HUD mods replace the HUD's textures themselves. That means that every time Klei updates the HUD's textures, those mods'll have to be updated too. This guide will help you make a mod that changes HUD without replacing textures! Download my HUD skins library from here Copy hud_skins.lua file to your mod's folder. In your modmain.lua file paste this line: modimport("hud_skins.lua") Create a scripts folder with img_override_data.lua file in it. Place this code in it: return { } And that's it! The setup is done. But we still need to tell the lib what textures are we using. Let's say that we want to replace a texture named clock_hand.tex from images/hud.xml atlas with our image named somename.tex with atlas images/somename.xml. To do this, you need to modify img_override_data file like this: return { ["images/hud.xml"] = -- Atlas to replace textures in { ["clock_hand.tex"] = -- Texture that we're replacing { "images/somename.xml", -- Atlas with image that we're replacing clock_hand with "somename.tex" -- Texture that we're replacing clock_hand with }, }, } And that's it, your mod should work just fine now! P.S. This lib automatically adds all of your textures referenced in img_override_data file to assets, so you don't need to manually add them. Mods that use this lib: https://steamcommunity.com/sharedfiles/filedetails/?id=2238885511 https://steamcommunity.com/sharedfiles/filedetails/?id=2329943377
  23. DISCLAIMER: This guide is for modded items only. Klei prohibited creating custom skins for official items, and this library won't be able to add them. Hey everyone! Since I haven't found up-to-date and easy to use library for creating custom skins for items, I decided to make my own one and share it with you I used @Kzisor / Ysovuka's library as a base for mine. 1. Installation First of all, you'll need to download the library from here: Then, you'll need to put it in your mod's folder. I'll be using path scripts/libs/skins_api.lua. After that, you'll need to include this library for your mod. Add this line into your modmain: modimport("scripts/libs/skins_api.lua") All set! The library is installed, and we can actually add our skins. 2. Making custom skin prefab Unlike Klei's skins, modded skins use different prefabs for every skin. So, you can different properties for every skin! They even can have different functionality. So, you have 2 options: Make a separate prefabs file for skins (or each skin) Make prefab's skins directly in the base prefab's file. To register your skin you'll need to use CreateModPrefabSkin(name, properties) function, where name is a string with the name of your skin, and properties is a table. For example: CreateModPrefabSkin("dummy_formal", { assets = { Asset("ANIM", "anim/dummy_formal.zip"), }, base_prefab = "dummy", fn = formal, rarity = "Timeless", reskinable = true, build_name_override = "dummy_formal", type = "item", skin_tags = { }, release_group = 0, }) Assets: a table of assets for your skin; base_prefab: Prefab of the items you're making a skin for. fn: Prefab's constructor. Acts like a regular prefab constructor. rarity: Your item's rarity. reskinable: Will your item be reskinable using the Clean Sweeper. build_name_override: The build of the skin. The rest of the properties is only used by Klei, so it's better to just keep them unchanged. If you're confused about the Fn, here's an example: Let's say that you want to make a skin for something similar to a carrot. You have a constructor function: local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("planted") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("pickable") inst.components.pickable:SetUp("carrot", 10) inst.components.pickable.onpickedfn = onpicked return inst end To make a skin you'll need to create a new constructor like this: local function carrot_skin() local inst = fn() inst.AnimState:SetBuild("skinned_carrot_build") return inst end Here we create a default carrot (using fn()), and then apply some changes to it (change the carrot's build). After that, we'll need to return our skin, just like a regular prefab. At the end of the file you need to put: return Prefab("carrot", fn, assets), CreateModPrefabSkin("dummy_formal", { assets = { Asset("ANIM", "anim/skinned_carrot.zip"), }, base_prefab = "carrot", fn = carrot_skin, -- This is our constructor! rarity = "Timeless", reskinable = true, build_name_override = "skinned_carrot", type = "item", skin_tags = { }, release_group = 0, }) 3. Updating the recipe and adding strings After creating your skins' prefab, you'll need to update your recipe too. After you've added your item's recipe with AddRecipe, you'll need to call MadeRecipeSkinnable(recipe_name, atlas_data), where recipe_name is the name of your recipe, and atlas_data is a table, containing info about your skin's inventory image. MadeRecipeSkinnable("dummy", { dummy_formal = { atlas = "images/inventoryimages/dummy.xml", image = "dummy_formal.tex", }, }) The second argument is the table. Here you'll add atlas and image of the skin. Here, dummy_formal is the name of the skin, the atlas is a path to .xml file, and the image is the name of the texture. After that, you'll need to name your skin, using STRINGS.SKIN_NAMES table. Is works just like adding names to regular prefabs, but the name of the prefab has to be lowercased. STRINGS.SKIN_NAMES.dummy_formal = "Formal dummy" All set! Your modded item now should have its own skin. 4. Applying skins on placers. If your item is a structure and has a placer, you'll want to apply a skin to its placer too. To do it, you'll need to modify your MakePlacer, to make it look like this: MakePlacer("dummy_placer", "dummy", "dummy", "anim", nil, nil, nil, nil, nil, nil, placer) placer here is a custom function that'll be applying the skin itself. If should look like this: local function placer(inst) inst.ApplySkin = function(inst, skin) if skin == "dummy_formal" then inst.AnimState:SetBuild("dummy_formal") end end end Here placer function adds ApplySkin function. The skin argument is the name of the skin for the item. In this example, we check if the skin is dummy_formal, and apply custom build for a placer if it's true. That's all you need to add a skin for your item! If you have any questions or feature requests, feel free to ask them in the comments! Mods that use this library (You can use them as an example) The Dummy Mod
  24. This is a guide for creating a simple music mod using TheScraps' tutorial mod for looping working music and Klei's Official Music Mod tutorial. (This mod is for anyone who is either confused or want to know how to make music mods.) What you will need: A text editor. (Possibly Notepad ++, but sometimes it could be down. So, look for an alternative you can't use or access the website.) Don't Starve Mod Tools (Download through Steam. Directions below.) TheScraps' tutorial mod (Might need WinRAR if you aren't able to open .rar files) Klei's Official Music Mod tutorial (Workshop mod or through the forums.) Audio that you would want to use (More info below.) Location for Mod Tools Click Library, then click Tools. Then find Don't Starve Mod Tools and download the files. Making your FMOD Project: When you open the tools, you are prompted with this message: Select the Launch FMOD Designer option from the list. When it launches it will be a blank project. The next part is simple. All you need to do is download the two mod tutorials. Once that is done, you will want to open the project data for Klei's mod. The file location should be in your steamapps/common/dont_starve/mods/workshop-180938116/sound_source For people who do not own Don't Starve: For people who do not own Don't Starve, they will have to go to their Music Mod Tutorial page. It's similar to TheScraps' mod tutorial. Just open the zip and extract. Next, you should open the .fdp and you'll be greeted with this screen: Once you are there, you should begin by deleting the gramaphone_... events (Except the gramaphone_ragtime) Once you have deleted the gramaphone_... events, add an event called jukebox. Then, delete music_dusk_stinger crazy and music_test_parm. (Look at the image from above about the gramaphone events.) Now for the next part. You have to copy and paste these events as follows: music_danger music_epicfight music_work These musics have Autumn, Winter, Spring, and Summer alternatives. (Autumn uses the music_work, music_epicfight, and music_danger events.) The procedure goes as follows: First, you must copy and paste the events three times for the music_danger and music_epicfight. For the music_work, you must copy the event eleven times. Then you must rename the event to the following for each copy: music_danger_winter music_danger_spring music_danger_summer For music_epicfight: music_epicfight_winter music_epicfight_spring music_epicfight_summer For music_work: music_work_dusk music_work_night music_work_winter music_work_winter_dusk music_work_winter_night music_work_spring music_work_spring_dusk music_work_spring_night music_work_summer music_work_summer_dusk music_work_summer_night Now, that you have renamed all these tracks, the next part is replacing audio. The way to replacing audio is that you must right click on the audio clip which is called, /none, and click Replace sound... Then click Add sound file... Then look for the file location for your audio and add it into the sound. Then, select it and click OK. (You can do this for all audio in here, except for jukebox.) For jukebox: Then, add your sounds from your file location. Finally, go to your Banks. From there, you can try to use this compression method. If it doesn't work for you, try changing the Compression. Make sure you save your project always because occasionally the app crashed randomly. (It could be caused by anything.) Now, there are some other audios you can add to these, such as DST_theme_portaled, which is used for the lobby. Just copy and paste the music_FE for it. I will leave my whole list of events for reference: Now, you must Build the music_mod.fsb and music_mod.fev. Use Ctrl-B to build the project. The building will take a while to complete (Based upon on what extension you used for the music. .mp3, .ogg, etc.) (.ogg is the best in my opinion.) When it is done, it should be located in a folder called sounds, where ever you saved the project. If you cannot find the folder then build again, but before you do it, click Output >> Put .fsb and .fev in a folder called sounds in your Mod's folder. Making the script: For this one, I'll just give you a already created modmain.lua (file at the end) so I don't have to explain every single detail. (It's really late the time I'm posting this.) If you want me to explain this procedure, comment and I'll reply. In TheScraps' mod, he includes a scripts folder. Copy that folder and place it into your mod's folder. Finally, copy the modinfo.lua file into the folder and edit it. (Note: This is my mod info.) What you will want to do is rename anything that is in the quotes to whatever is needs to be named. (forumthread = "" is used if your mod is a Workshop item.) DO NOT mess with anything under configuration_options. The title says it all. Finally, you can boot up your game and test out your mod from the client mods section. If any of you have any problems with this tutorial, please leave a comment and explain your problem. I hope this helped anyone in need. Sorry if I rushed the end of this tutorial. It was around 3:00 am when I finished writing this. Thanks. modmain.lua (IGNORE THESE LAST PICTURES. I COULD NOT REMOVE THEM.)
  25. The mod Island Adventures adds the boats from Shipwrecked. Sadly, the sailing animation from Shipwrecked requires a face sprite which does not exist in DST. IA adds it in a roundabout way, so you can have the DST emotes and the SW sailing in the same DST character art. Why should I bother adding this? It makes your character fancy when sailing in the IA mod. Also, you probably already have the art for it without realising. The Extended Sample Character template of 8th October 2018 added it. What is the "Sailing Face"? The sideview sailing face, also known as face-33 in the Shipwrecked animations, is the same as the sleepy face (face-11), but looking to the side. If you are using ESC 1.2.4 or later... Just draw "face_sail-0.png" as with any other face. You're done! How to add it to non-ESC characters... Step 1: Find or make it. I will be using Warly's face for screenshots. He already has a sailing face in his "face" symbols: If you need to make one, just copy the regular sideview face and put a sleepy eye on it. Step 2: Make the new symbol This part is easy! Just make a new folder "face_sail" next to "face" and move the sprite there. And rename the sprite to "face_sail-0" Step 3: Adjust the pivot This is the difficult part. Open the character project in Spriter and place the face_sail-0 symbol. You should notice a movable ball with a handle on it, that's the pivot (alias anchor). This is what the animation needs to place the face correctly. Usually, it should be on the beginning of the nose. When you are done moving it, right-click and select "overwrite default pivot" to save the position. Save the project and test the face in-game! You might need to adjust this a few times. Compare it with the other face symbols. If you have any questions regarding the Sailing Face, please ask them! (Because I got asked a few times: We cannot add the Sailing Face as face-33 because in DST, this name is used for an emote face. By adding it as face_sail-0, it will never conflict with emotes.) (Because I got asked a few times: Tropical Experience doesn't use the Sailing Face. Instead, it uses a frame of the blinking animation. This is why the characters look unusually angry when sailing in Tropical Experience.)