Jessesgirl74 Posted October 14, 2015 Share Posted October 14, 2015 Just wandering if someone could explain modding to me. Thanks I'm new to this. Link to comment https://forums.kleientertainment.com/forums/topic/58479-new-to-modding-can-someone-explain-how-it-works-to-me-thanks/ Share on other sites More sharing options...
Arkathorn Posted October 14, 2015 Share Posted October 14, 2015 Firstly, I suggest you take a look at the Tutorials subforum, as it contains serveral good tutorials. What follows is a rundown of the basics: ModdingA mod for Don't Starve is a collection of script, texture, and animation assets. Script Files are coded in Lua, and add functionality to the mod.Texture Files are made as PNGs, and compiled into a pair of TEX and XML files.Animations are made as Spriter Projects, and compiled into ZIP Archives.Basic File StructureWhat follows is a basic, standard infrastructure for a mod:modinfo.lua - This file contains the data that is shown in the ingame Mods Menu, Specifying name, description, version, author, etc.modmain.lua - This file, if it exists, will be executed on startup, if the mod is enabled.modicon.tex/.xml - The modinfo.lua file specifies a mod icon file, which is traditionally named modicon.tex.Tools of the TradeSeveral tools are provided for modding Don't Starve. Most of these, you can download in Steam, as the tool "Don't Starve Mod Tools".Sublime - This is a programming oriented text editor. In this, you will write your Lua code.Spriter - This is an editor used to create animations.FMOD - This has something to do with sound. (IDK)Tiled - This is an editor used for creating custom worldgen, like set pieces.The Autocompiler - Once you install Don't Starve Mod Tools, this will run every time you launch the game. The autocompiler checks every SCML file in each mod's 'exported' folder (And subdirectories) and every PNG file in each mod's 'images' folder, and compiles them into usable formats.A couple other tools that are quite useful can be found on this forum, namely:KTools - These are decompilers for animation ZIPs and TEX files, used to convert them back into editable forms.Matt's Tools - More useful tools, including another TEX decompiler, and a script to rename animation build data without decompiling it.Basic MechanicsAny assets that are in the same position, and have the same name, as vanilla assets will overwrite the normal assets. However, this is inadvisable, as it may make your mod incompatible with any other mods that use functionality you have changed. Prefabs are ingame objects. To add your own prefabs, create files for them in yourmod/scripts/prefabs. Then, add the name of the file, without the extension, as a string to a table named Prefabs, in your modmain.lua file. Components are items of functionality that can be added to prefabs. Examples include 'cookable', 'repairable', 'talker', 'fuel', and more. Add these to your prefab using :inst:AddComponent("componentfilename")Note that the file must be in yourmod/scripts/components. That is all I'm going to write right now, but my main advice to you: Look for examples in the code. It doesn't even have to be the game's code, other mods are (probably) just as functional! Don't Starve's code i largely undocumented, so you will have to figure most of it out on your own (Or with the help of the good citizens of this forum). Link to comment https://forums.kleientertainment.com/forums/topic/58479-new-to-modding-can-someone-explain-how-it-works-to-me-thanks/#findComment-680023 Share on other sites More sharing options...
Mobbstar Posted October 14, 2015 Share Posted October 14, 2015 You can examine some game code with commentary (as well as some examples and hacks) on dontstarveapi com (that's an external site, fan-made and not, I repeat, not supported by Klei in any way). I suggest you use that as some sort of science diary. Also, don't be afraid of making random mods and failing, then searching and asking around here why that is. One last tip: print() is a function that allows you to display checkmarks and values in the log.txt, and as such insanely useful for debugging. You can find it in some game code too. Link to comment https://forums.kleientertainment.com/forums/topic/58479-new-to-modding-can-someone-explain-how-it-works-to-me-thanks/#findComment-680096 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now