• Announcements

    • JoeW

      Oxygen Not Included - Early Access Coming May 18   05/03/2017

      Oxygen Not Included Entering Early Access First off, we would like to extend a major thanks for the amazing community response to the Oxygen Not Included Alpha. When we released the game on the forums we'd hoped for a few dozen people to try it out and give feedback, but instead over a hundred thousand of you played the game. This was the best surprise we could have received. We're now excited to announce that Oxygen Not Included will be entering Steam Early Access on May 18th. It will cost $24.99, and anyone who owns an existing Klei game on Steam will receive a 20% loyalty discount. Players who purchased Oxygen Not Included in Alpha will not need to purchase the game again. Upcoming Agricultural Upgrade Additionally, we have been working with a handful of dedicated members of the community over the last few weeks to test an experimental build branch in preparation for Early Access. These players have been working with us to provide feedback on the new Agricultural Update content, and we're happy to say it's now in a place where we are ready to share with you all. It will be released on May 18th along with Early Access. Join us on the livestream!
      We'll be showing off the Agricultural Upgrade today at 3:30PDT! Come check us out on Twitch: http://twitch.tv/kleientertainment
        Check out the official post for more details!

Search the Community

Showing results for tags 'beginners'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Categories

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

Categories

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

Categories

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

Categories

There are no results to display.


Found 1 result

  1. It seems people have a lot of difficulty following the existing guides... which also happen to be somewhat out of date... so with this, I'm aiming to present an up-to-date guide that is easy to follow for artists, who really don't have the first clue about coding, and all that technical nonsense. Custom characters with custom items are definitely what the majority of folks want to create, so hopefully this guide will walk you through it in a manner that anybody can follow, regardless of technical skill. What you'll need An image editor: Photoshop, GIMP... doesn't matter - as long as it has a layer system, and can output PNG files with alpha, it'll work.The sample mods/templates: You can download them here. You probably want to make a character, so be sure to get the character and portrait templates.Tex conversion software: The Windows tool can be found here; a Unix (Mac/Linux) tool can be found here.Build renaming software: You will need to be able to change buildnames - you can use the Build Renamer tool here on Windows, or do it "the hard way" and use a Hex Editor on Mac/Linux. I personally use Hex Fiend.Zip editing software: You need to be able to edit the contents of a zip without decompressing it. (I've found that the files don't work if you decompress, change the files, and recompress.) I believe WinRar can do this, on Windows. On Mac, I use BetterZip.Code editor: Any text editor can be used, but something with Lua syntax highlighting is beneficial. You can use Notepad++ on Windows. On Mac, I use TextWrangler.PatienceFirst things first I'll walk you through the creation of a character, starting with making the art. Take the template sheet into your image editor. (I want to stress that this is not the only way to do it, but it is the way that I personally feel works best.) Once it's loaded in, you should blow the image up to 200% or 400% - this will ensure better quality in the final assets. As the character sheet is fairly large, I find 400% gets a bit data-heavy, so 200% should be enough. Small things like items, we can easily go to 400% with no problems. Now that we've blown the template up to our 'working' resolution, make a layer above the template, and drop the template image's opacity - this will make it easier to focus on your new art. Using the template as your guide, draw everything you need - keeping things in line with the template is the best way for it all to be properly aligned in-game, but you may need to adjust things later, depending how far you deviate from the template. The facial expressions, by my observations, are: A - part of speech animation B - transition in front blink C - default front D - rubbing eyes - also used in blink transition E - side blink F - Alternate side blink G - default side H - transition to side blink I - Eating J - death K - frontal blink L - shocked/scared M - part of speech animation & used when picking food/swapping equip N - startup - laying unconscious Once that's all done, you're going to want to do the portrait, big portrait, and save slot art. Again, follow the template. Now that you have all your textures finished, shrink them back down to the original size - then you need to convert them to the .tex format. A guide explaining how to do this with Matt's TexTools can be found here. On a Unix system, follow the usage guide by Simplex on his tool's download page. Now that we have our .tex files We're ready to start getting things into the game. So, duplicate the Sample Character Mod folder, and let's get to work! You will see several files and folders. Let's start with bigportraits. Inside, we will find wod.tex and wod.xml. Rename the .xml from 'wod' to a unique name for your character. You should limit it to three letters, and avoid starting with a number. Now delete wod.tex, and replace the file with your converted bigportrait .tex - which you must name in the same way as the .xml. Following this, we need to edit the .xml - open it with your text editor, and replace both instances of "wod.tex" with your filename. Now open the 'images' folder, and you will see two more folders. One for the select screen portrait, and one for the save slot portrait. The process for the save slot and select screen portrait is identical to the bigportrait. Rename the files, replace the tex with your new one, and edit the xml. To be on the safe side, I do rename and update the wod_silho files, but I don't believe they are necessary. Replacing the in-game character art is a little trickier, but not that hard. First, rename the wod.zip to your filename. Now open it with your zip program. You will see two files - "atlas-0.tex" and "build.bin" - first, you will need to extract the build.bin file. We need to edit this. Most of you will just need to use the build renamer tool. But for those using a hex editor, like me: Just edit the highlighted section, changing it to the name you've been working with, and save. With that done, we need to put our new files in the .zip. Rename your new character art to atlas-0.tex. Now, using the zip software, replace the files in what used to be wod.zip with your new build.bin and atlas-0.tex, and save the changes. And that's all the art taken care of! So let's get down to the code. Since it won't take long, let's edit modinfo.lua - everything inside is pretty straightforward. Most importantly, make sure your api_version is set to 6. Now, let's move on to modmain.lua - here you will see a bunch of assets and things. All we need to do in here, is change every instance of 'wod' to our working name. Almost there, now! Let's go into scripts/prefabs, and get to work on the last lua file! Rename it, of course, just as we've done with the previous files. The first thing we need to change, is this: -- Don't forget to include your character's custom assets! Asset( "ANIM", "anim/wod.zip" ),}Change wod, again, just as we have done every other time. The next thing we will want to change is this: -- choose which sounds this character will play inst.soundsname = "wolfgang"Replace "wolfgang" with the character whose sound you want to use. Your options are: "wendy""wes""wickerbottom""willow""wilson""wolfgang""woodie""wx78""maxwell"Replace "wolfgang" with the name of your choice shown above. Here comes the trickier stuff: Look for: -- todo: Add an example special power here.end At this point, we need to do some detective work. Open Don't Starve's "data" folder - found in the same directory as the "mods" folder. Then go to scripts/prefabs/ and scroll down to the "w"s. Here we can see the prefab files for the different characters. Let's have a look at Wendy - she deals less damage than other characters, so let's find out how. In the equivalent section of the wendy.lua file, you will see: inst.components.sanity.night_drain_mult = TUNING.WENDY_SANITY_MULT inst.components.sanity.neg_aura_mult = TUNING.WENDY_SANITY_MULT inst.components.combat.damagemultiplier = TUNING.WENDY_DAMAGE_MULTThese are the little things that overwrite the "default" stats. They represent different aspects of different components. These files reference the "tuning" file. What is usually helpful, is to use Wilson as your reference point. So let's take this line: inst.components.combat.damagemultiplier = TUNING.WENDY_DAMAGE_MULTThen change Wendy to Wilson and add it to our character's prefab .lua file, so we have something like this: -- todo: Add an example special power here. inst.components.combat.damagemultiplier = TUNING.WILSON_DAMAGE_MULTend Which means that our character will have the damage multiplier of Wilson. Awful boring, isn't it? So, let's spice it up, and make our character deal twice the damage that Wilson does! We can change the line to: inst.components.combat.damagemultiplier = (TUNING.WILSON_DAMAGE_MULT * 2)Which tells the game to take Wilson's damage multiplier, and multiply it by 2. Alternatively, we can just give it a set value that doesn't refer to the tuning file at all: inst.components.combat.damagemultiplier = 4This multiplies the damage by 4, as opposed to multiplying it by double whatever Wilson's multiplier happens to be. (It's 1, but this is an example.) We can look at other character prefabs, and see how they're doing their stat perks... or we could get a little deeper, and start examining the components. You will find these in data/scripts/components/ - but keep in mind that you're not going to want all of them for your character. Let's see if we can find out how to give our new character a health boost, and open the health.lua component. Right at the top, we can see this: local Health = Class(function(self, inst) self.inst = inst self.maxhealth = 100 self.minhealth = 0 self.currenthealth = self.maxhealth self.invincible = false self.vulnerabletoheatdamage = true self.takingfiredamage = false self.takingfiredamagetime = 0 self.fire_damage_scale = 1 self.nofadeout = false self.penalty = 0 self.absorb = 0"self.maxhealth = 100" looks like what we want! So let's go back to our character prefab, and add to our perks list: inst.components.health.maxhealth = 100But we don't want 100 max health - we want to boost it! So we have two options again. You can change that 100 to whatever number value you want... or you can reference the tuning files. You can find tuning.lua in the data/scripts folder. Inside tuning.lua, we can find: WILSON_HEALTH = wilson_health,Wilson_health having been earlier specified through: local wilson_health = 150So we know Wilson's health value is 150. Now let's update our character's perk. We can use: inst.components.health.maxhealth = (TUNING.WILSON_HEALTH * 2)And this will give us double Wilson's health - which amounts to 300. So, now you can pick and choose which components and values you want to buff or debuff for your character, and add them all to the list, there. Once you've finished, we can move on to the strings: -- First up, the character select screen lines-- note: these are lower-case character nameSTRINGS.CHARACTER_TITLES.wod = "The Template"STRINGS.CHARACTER_NAMES.wod = "Wod"STRINGS.CHARACTER_DESCRIPTIONS.wod = "* An example of how to create a mod character."STRINGS.CHARACTER_QUOTES.wod = "\"I am a blank slate.\""As before, change 'wod' to your file's name, and then edit the information as you would like. It is worth noting that you can add multiple lines to the CHARACTER_DESCRIPTIONS line by adding "\n" (without quotes) - this will cause a line break. I'm quite sure the instruction included above the next few lines speaks for itself: -- You can also add any kind of custom dialogue that you would like. Don't forget to make-- categories that don't exist yet using = {}-- note: these are UPPER-CASE charcacter nameJust change the name as always from WOD to whatever you're using. If you don't want to add any custom quotes, you can just comment out the Evergreen description, like so: --STRINGS.CHARACTERS.WOD.DESCRIBE.EVERGREEN = "A template description of a tree." Change the last remaining instance of wod, here: return MakePlayerCharacter("wod", prefabs, assets, fn) And we've finished our character! Put your mod into the mods folder, and let's take it for a spin. Enable it through the mod menu, and start a new game. At this stage, you'll want to check that all the textures are lining up right, and that you haven't gotten any floating pixels, or anything. But what about items? We want to give our character a custom item! Make ourselves feel all special. This is a bit more involved. First, you'll want to choose the item you're basing it on - equippable items will generally require two anim .zip files: prefab.zip, and swap_prefab.zip. For this demonstration, I will be using a specific example, and base it on the Bunny Hood from my Link mod, to make a custom hat. So, take the .zip from the anim folder, and decompress it. Use the .tex converter software to convert the atlas-0.tex file found within to png - this will give us a template to work against. Just as you did with the character art, create the art for your new item, convert it to tex, and rename it to atlas-0. Rename the build, just as you did before - I should note that anyone using the hex edit method should be sure to replace any extra characters with hex value 00. In my example, I have taken "bunnyhood" and changed it to "cutehat" - but at first, I was left with "cutehatod" and had to replace the extra 'o' and 'd' with hex values of 00. Replace the files in your duplicated-and-renamed base prefab anim .zip with your new stuff, and add the new .zip to the 'anim' folder of your mod. The item also needs an inventory image, so let's make one - it just needs to be a 64x64 image. This also needs an xml, so we must create a matching xml file. The contents of which should look like this: <Atlas><Texture filename="YOUR_PREFAB_HERE.tex" /> <Elements><Element name="YOUR_PREFAB_HERE.tex" u1="0" u2="1" v1="0" v2="1" /></Elements></Atlas> Put your YOUR_PREFAB_HERE.tex and YOUR_PREFAB_HERE.xml into a new folder called "inventoryimages" and place that folder inside your mod's "images" directory. We're almost there, now, so let's copy the contents of your base prefab's .lua file that you found in scripts/prefabs into a new document. The first thing to change is the assets list. You want to have something like so: local assets={ Asset("ANIM", "anim/YOUR_PREFAB_HERE.zip"), Asset("ATLAS", "images/inventoryimages/YOUR_PREFAB_HERE.xml")} Everything else gets a bit more dependent on your item, but things you want to keep an eye out for are, as a few examples... Override Symbols: local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_hat", "YOUR_PREFAB_HERE", "swap_hat") Set Build: anim:SetBank("featherhat") anim:SetBuild("YOUR_PREFAB_HERE") anim:PlayAnimation("anim") The final line: return Prefab( "common/inventory/YOUR_PREFAB_HERE", fn, assets) And, of course, the inventory image must be specified like so: inst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/YOUR_PREFAB_HERE.xml" But we've only copied an item verbatim, right now - in the same way we added perks to the character, by looking at components, and looking at other items, we can add custom attributes and effects to our new item. To my hat, I want to add a dapperness component, so I have added to the constructor (the "function fn(Sim)" part): inst:AddComponent("dapperness") inst.components.dapperness.dapperness = (TUNING.DAPPERNESS_MED * 2) You can get more advanced than this, but that's all I want to do with this particular item, so let's save it, and drop it in our mod's scripts/prefabs folder. But we're not done yet! We need to add it to our character! Open the modmain.lua file, and look for the part right at the top: PrefabFiles = { "YOU",} We need to add our item to this list, so we end up with: PrefabFiles = { "YOU", "YOUR_ITEM",} We also mustn't forget to give our item a name and description, which we can do by adding this to the very top, above the prefab list: GLOBAL.STRINGS.NAMES.YOUR_PREFAB_HERE = "NAME"GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.YOUR_PREFAB_HERE = "DESCRIPTION" We should now be able to debug spawn it. But we want our character to start with it! So let's add a little bit of code to our character's prefab .lua file. Just above the line "local fn = function(inst)" we need to add a new section, like so: local start_inv ={ "YOUR_ITEM",}local fn = function(inst) So it's now added to our start inventory. (We found out how to do this with some detective work, looking at how other characters add start inventories.) We must also change the last line, so the game knows to check the start inventory: return MakePlayerCharacter("YOU", prefabs, assets, fn)Becomes: return MakePlayerCharacter("YOU", prefabs, assets, fn, start_inv) And finally, we are done! Go make yourself some nice tea to celebrate, and then sit down and enjoy your very own character! These same methods and principles can be applied to just about anything, and by looking at the existing files, and other mods, you can work out how to do more and more complex things. It's all about detective work. Good luck, everyone! Here is a link to the character I created while writing this.