Malacath

  • Content Count

    780
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by Malacath

  1. Okay, it's two against one all opinions I value. So I will go with the solution I have that worked until now. Thank you all for the good and fast responses ^^ I'm feeling way more confident about his now!
  2. Sure it's just a table but I don't know where it's used and if there would be any consequences coming from that.
  3. Thanks, I value your opinion so hearing that is great. function HF_unlockallreleasedchars(self) local playerprofileclasshook = GLOBAL.PlayerProfile playerprofileclasshook.IsCharacterUnlocked = function() return true endendAddGamePostInit(HF_unlockallreleasedchars) Guess where I learned doing it like this ; ) And also thanks for agreeing with Sqeek This sounds like a cleaner idea to me, I will definately try that and see/try to find out if it does any harm.
  4. Well at least someone else necroed it earlier today ; ) But I agree anyways.
  5. So I've been doing this for the first time for the Waverly mod and I had a quite queasy feeling back then because I had to mess with the PlayerProfile. Now I'm getting in the position where I have to do it again and ideally I would like the two mods to be compatible and adjusted my code accordingly function ModPlayerProfile(PlayerProfile) local oldIsCharacterUnlocked = PlayerProfile.IsCharacterUnlocked function PlayerProfile:IsCharacterUnlocked(character) local oldres = oldIsCharacterUnlocked(self, character) if character == "waverly" and not self.persistdata.unlocked_characters[character] then return false end return oldres endendAddGlobalClassPostConstruct("playerprofile", "PlayerProfile", ModPlayerProfile)Assuming all mods would do it like this I think that it would work just fine but I'd really like an opinion of a good modder, or maybe two... hell the opinion of any modder coming by would be a great thing. Main reason I'm asking this is because I'm just not feeling to confident messing with things like the PlayerProfile So thanks to everyone considering to help me here ^^
  6. Btw, have you seen Cheerios mod which basically makes it super easy to add the rabbit as a follower for you? Idk if you might've actually already done that, just wanted to let you know in case.
  7. Version 1.0

    3012 downloads

    This is a simple sample mod for adding your custom minimap icons. Nothing fancy, but the more samples the better.. I guess.
  8. Uhhh, I tried to not have it spawn in Adventure Mode because I felt that messing with worldgen there was to risky. So I hope it doesn't spawn there, but if you ever see it summon me so I can fix it.
  9. Well, she hits like everyone else I think. And as far as sanity goes, you just need to find a way to increase sanity, which isn't that hard once you figure out what's going on with her. I could add a visual cooldown in the next update. But I have currently 0 motivation to do that : / I hope that comes by the weekend
  10. 1) because this is not really the release thread and it's way cooler finding stuff out on your own 2) because Wavely is crazy 3) it has a cool down which you easily find out by continuing to play 4) because our artist didn't get to it yet, sadly
  11. See post above this. You'll have to download them from Steam for free and do what Cheerio said and you're fine.
  12. Oh my god, that's a good question. You can definately install Steam and download the Tools for free, if I'm not mistaken you can even download Don't Starve from Steam if you have the standalone, no promises though. @Cheerio If Blazingice26 has the standalone version and the Mod Tools from Steam will they interplay or will it only work with the Steam version?
  13. Perfect, I uploaded the OP with a screenshot where you can find the dropdownmenu to "Tools" on Steam. This is where you can find the "Don't Starve Mod Tools" which should make the tutorial work again ; )
  14. First off, seronis already told you that *.xml is not an image format, it's a text file. Every image in the *.tex format has an *.xml file besides it that looks like this <Atlas> <Texture filename="myitem.tex" /> <Elements> <Element name="myitem.tex" u1="0" u2="1" v1="0" v2="1" /> </Elements></Atlas>Where "myitem.tex" is in the same folder as "myitem.xml" So if you are on Windows you have to download "Don't Starve Mod Tools" from Steam which will automatically create these files if you put the "myitem.png" in the right position, that is the "images" folder in your modfolder. If you are on Linux or Mac you will have to use ktech to convert the *.png file to a *.tex file and write the *.xml yourself according to the template above. All of this is mentioned in the tutorial except for the template. I will edit it hough so it contains a basic guide for how to do it. So getting back to specifically you: Are you on Windows or not?
  15. Well, if it's related to this tutorial I would actually prefer if you keep it here (additionally to your own thread if you want it there) so in the event that others have a similiar problem they will get the answer here.
  16. To clear this up, the crucial part here is, that this tutorial is for people who fulfill one of the two conditions: 1) They work on Windows 2) They know someone who works on Windows Ass soon as the Tools are ported this is no longer the case and anyone can follow it. So if you are on Windows you need to download the "Don't Starve Mod Tools" from Steam which automize the steps you are missing. In that regard this tutorial is complete because the DSMT are mentioned as a requirement for the tutorial.
  17. Look in the "Magic" crafting tab. There is the spelltome you'll need to craft. But you can only craft a single one (unless you're Waverly) so be sure you don't put it in the wilderness. And also, I believe you won't have the possibility to cut down the tree as Waverly, she loves it just to much : P
  18. If you find the Weeping Willow as Waverly you'll have all the same benefits without cutting down the tree plus a house to take a nap in for every night
  19. The chance for lightning should actually be 50% and you can simply pickup your axe again and keep chopping. Eventually the tree will go down. Alternatevly (I hate that word) you can burn it down which will destroy all its loot though. Waverlys Familiar should habe a three day cooldown. If it doesn't work again after three days I should check that. BTW: If you ever have the crash again can you please post a log.txt here. I can't seem to reproduce it.
  20. I was waiting for someone to find such a glitch xD I already removed three occasions of her reapearing but I knew I must've forgotten something. Thanks
  21. There will be a "log.txt" in your Documents folder Klei/DoNotStarve/log.txt Would be very much appreciated if you post it here ^^
  22. He, yeah I can't attach files to my post here so I'm gonna do it like this shrooms caps Hope it's of help
  23. *cough* *cough* what are you talking about *cough* No, srsly, thanks for pointing that out. It was the last (I hope) leftover of the code for the staffs. Since I never used the argument I simply didn't really care. They usually get the colour to specify the animations that are being used.
  24. Preface: This whole tutorial will lead you through the process of creating a "handslot-equippable-item", not including the creation of artwork. That means we will convert an inventoryimage, create a "ground"-animation and create a swappable build, that is when the player holds it in his hand. Why would you want to do this instead of the usual build-renaming of existing animations? Well, this here is a thousand times more flexible and easier to troubleshoot because, honestly, everyone can make mistakes when using other peoples files as a basis. It also feels a lot less "hackish" than renaming the builds and the endproduct will be completely yours. Also please keep in mind that when making your own mod you should always refrain from using generic names like I do in this tutorial. So do not use "myitem"! Currently the full tutorial works sadly only for Windows user as the *.tex/animation compiler Klei provides is not yet ported to Mac or Linux. For the relevant parts (I will mark these) you will have to push the mod to a Windows user and have them convert it. 0 Prerequisites To successfuly finish this tutorial you will need: -the "Don't Starve Mod Tools" which you can download from Steam -image assets you want to use for your item -some patience -maybe a drink (coffee or tea would be good) -alternatevly some good music -preferably a bit of knowledge about "Don't Starve" modding 1 Setting up our mod Let me assume that you already have your artwork in the form of an inventoryimage of size 64x64 pixels, an image you intend to use for the "ground"-animation and an image you intend to use for the swappable build all in the *.png format. With those we aim for the following folder structure in our mod-folder mymod exported |-> myitem |-> ground_myitem |-> ground_myitem.png swap_myitem |-> swap_myitem |-> swap_myitem.png images |-> inventoryimages |-> myitem.png scripts |-> prefabs |-> myitem.lua modmain.lua You can in fact use more than one image to create your animations and get as complex as you want with your folder structure, but let us keep it basic while still maintaining a certain level of structure for the sake of this tutorial. If you ever work on something more complicated keep in mind that a good structure can be crucuial to a good workflow. We will also want to set up our two necessary scripts "modmain.lua" and "myitem.lua". The first of these is easy to do PrefabFiles = { "myitem",}If you already have other prefabs registered for your mod then you have to expand the table "PrefabFiles", you should neither create a new one nor override your old one. "myitem.lua" will be a totally generic "handslot-equippable-item" without any use for now. We can go back later and make it a tool, a weapon, a staff... anything you want to do with it basically. local assets={ Asset("ANIM", "anim/myitem.zip"), Asset("ANIM", "anim/swap_myitem.zip"), Asset("ATLAS", "images/inventoryimages/myitem.xml"), Asset("IMAGE", "images/inventoryimages/myitem.tex"),}prefabs = {}local function fn() local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_myitem", "swap_myitem") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() local sound = inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) anim:SetBank("myitem") anim:SetBuild("myitem") anim:PlayAnimation("idle") inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "myitem" inst.components.inventoryitem.atlasname = "images/inventoryimages/myitem.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) return instendreturn Prefab("common/inventory/myitem", fn, assets, prefabs) Do not forget that all instances of "myitem" in these two scripts as well as all following appearances of it have to be replaced by whatever name you choose for your item. Starting your game now will cause an error because the assets specified at the top are missing. Why? Of course because we did not create them yet. But we will fix that next. 2 Creating the inventoryimage If you put your "myitem.png" file where I told you... then you are basically done. If you want to test it you will want to comment out lines 3-4 and 29-31 in "myitem.lua". Thus the file should look like this: local assets={ --Asset("ANIM", "anim/myitem.zip"), --Asset("ANIM", "anim/swap_myitem.zip"), Asset("ATLAS", "images/inventoryimages/myitem.xml"), Asset("IMAGE", "images/inventoryimages/myitem.tex"),}prefabs = {}local function fn() local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_myitem", "swap_myitem") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() local sound = inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) --anim:SetBank("myitem") --anim:SetBuild("myitem") --anim:PlayAnimation("idle") inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "myitem" inst.components.inventoryitem.atlasname = "images/inventoryimages/myitem.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) return instendreturn Prefab("common/inventory/myitem", fn, assets, prefabs) Start the game and you should see a "cmd" window pop up. It will say some stuff and close itself and run "Don't Starve". Activate your mod, load/create a save, open the console and while having the cursor close to the player type DebugSpawn("myitem")and hit enter. Hit the spacebar to pick up your item (since it will be invisible you cannot use the mouse) and see the new inventoryimage in all its tiny glory. If you need you can close the log which overlays the screen by pressing "Ctrl"+"L" If you are on Linux or Mac you can use simplex's program to convert your image to the "*.tex" format, for which you can find a thread here. Put the converted "myitem.tex" into "mymod/images/inventoryimages/" and create a simple text file next to it, change its name to "myitem.xml" and write the following content inside it <Atlas> <Texture filename="myitem.tex" /> <Elements> <Element name="myitem.tex" u1="0" u2="1" v1="0" v2="1" /> </Elements></Atlas> Note that you need to change the filetype here and I actually don't know if this functionality is hidden by default in Mac or Linux like it stupidly enough is in Windows, but I trust you know what you're doing. Alternatevly you can give the mod to someone who has Windows and ask them to start the game once while it's enabled and give it back to you. 3 Creating the "ground"-animation Now comes the stuff that makes this approach worthwhile. Start up "Spriter" via the "Mod Tools" through Steam or if you have it installed seperately you can use that as well (i.e. when you are on Mac or Linux). Choose "File"-"New Project" or "Ctrl-N" and navigate to your mods folder. Choose to create a new project in "mymod/exported/myitem/ground_myitem" The first thing you will want to do is change names. In the lower right corner you can see "entity_000" and "NewAnimation". Rename "entity_000" to "myitem", this will be the name of our bank (which is important while coding) Now rename "NewAnimation" to "idle", this will be... well... the name of our animation. You can add more animations by clicking the third button from the left above the name of the bank. But for this tutorial it will not be necessary. Now you need to add the image by "drag-and-dropping" the image in the top right corner of the window into the grey area in the middle. You can adjust its position simply by "drag-and-dropping" it again within that area. The cross can see in that area is the origin of your animation. That means that in "Don't Starve" this will be the point where your item makes contact with the ground and where the shadows and the collisions centers are (if you add those of course). So adjust the position of the image accordingly. Save that file as "myitem.scml", without the ".scml" this will be the name of our build. Now get back to your prefabs file. Uncomment lines 3 and 29-31 if you commented them out earlier. When you run the game now you will see the "cmd" window again. This time it will say something about exporting animations and atlasing files, nothing we really care about though. Load a save and spawn the item like you did before (part 2) and it should now be visible. Take a few minutes to admire the beauty of your creation and then go on. If you are on Linux or Mac there is currently no way of compiling the animation yourself. You will have to give the mod to a Windows user and have them run the game once and give the mod back to you. 4 Creating the swappable build This part is very close to the last one, but you will have to look out for a few things. Create a new project in "Spriter" in the "mymod/exported/myitem/swap_myitem". Raname "entity_000" to "swap_myitem" and be careful about the name of the animation. We do not have a free choice here, in order to create a swappable build we need to name it "BUILD". Drag and drop the image into the grey area again. For swappable builds we do not much care for the size, rotation or position of the image, instead you need to move the pivot, that is the red circle in the top left of the bounding box of the image we just dropped into the workspace. When you come close to it it will grow and you can drag and drop it. Wherever you put that pivot will be where the players fist grabbing the item will be. So you will want to move it to the handle of your item, for my example I have to move it a bit lower because the image is very small so that the fist could almost completely cover it. Now right-click on the pivot and choose "Overwrite default pivot". Save the file as "swap_myitem.scml". Note that the window popping up to save your file is very problematic for this task. You will need to write exactly "swap_myitem.scml" as the filename, if you skip the ".scml" part you will jump into the folder with the same name. Now uncomment line 4 in your prefabs file. Start the game, watch the white text rush by, load a save, spawn the item and equip it. Lo and behold you have created your own "handslot-equippable-item" and it did not even take that long. If you are on Linux or Mac there is currently no way of compiling the animation yourself. You will have to give the mod to a Windows user and have them run the game once and give the mod back to you. 5 Polishing and finishing up The best part of this is how easy it is to polish your artwork now. You can simply edit your images in your favourite image editor and the "Mod Tools" will compile the animations/inventoryimage again. You can also tweak the animation files and have them compiled in the next startup of the game. Spriter Example: Equippable Item This is the finished product created by Cheerio using the assets uploaded with this post. Confused? Curious? Feel free to post your questions here and pray that you will get a good answer ^^ I might expand this tutorial at a later point in time, depending on what questions come up and if people want it. But for now I hope this will help, enjoy your cold coffee : P