Search the Community
Showing results for tags 'custom'.
-
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 = "..." GLOBAL.STRINGS.CHARACTERS.WANDA.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. - - - - - - -
-
Hello, I'm making a chainsaw and I want to replace the axe chopping animation (player_actions_axe) with a more realistic animation for a chainsaw. Can anyone suggest how to do this?
-
I cant see my item i mean yes its in game but no images,no animation... its invisible and i cant craft it because its say: |Another survivor know how to craft this| what? why? how? is someone know how to fix this? notes: i have item.zip in anim foulder, i added my item name in prefabfiles = {...} here is code of recipe:
-
Hi everyone ! I have came across something really annoying and I don't know how to fix it. I think that I tried everything in this case, but if I am wrong and I just overlooked something...well...execute me at the dawn. So, in my mod I created item that is ingredient for other custom items. Generally it's fine, I can see this item (star) on the ground and in my inventory and containers, but one main issue is that I can't see it in crafting tab. All what I see is just name of it (when I move my mouse there) on a empty icon field. If someone here knows the solution or met something like this before let me know. Info: - modmain.lua --STAR Data GLOBAL.STRINGS.NAMES.STAR = "Star" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.STAR = "A reward for my patience!" GLOBAL.STRINGS.RECIPE_DESC.STAR = "A reward for my sacrifice!" local star = Ingredient( "star", 1 ) star.atlas = "images/inventoryimages/star.xml" local star = AddRecipe("star", { Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 200)}, namwar, TECH.NONE, nil, nil, nil, nil, "usmccaptain", "images/inventoryimages/star.xml") Assets Its prefab file is included in PrefabFiles section. Speak of the devil, so here it is. local Assets = { Asset("ANIM", "anim/star.zip"), Asset("ATLAS", "images/inventoryimages/star.xml"), Asset("IMAGE", "images/inventoryimages/star.tex") } local prefabs = { } local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("star") inst.AnimState:SetBuild("star") inst.AnimState:PlayAnimation("idle", true) inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "star" inst.components.inventoryitem.atlasname = "images/inventoryimages/star.xml" inst:AddComponent("inspectable") inst:AddComponent("stackable") inst.components.stackable.maxsize = 40 MakeHauntableLaunch(inst) return inst end return Prefab( "common/inventory/star", fn, Assets) Thank you for your time and have a nice day/night !
- 3 replies
-
- recipe
- ingredient
- (and 4 more)
-
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.
-
mercury.lua Hi, I've attached my LUA file here to ask for some help with this mod, I am currently trying to make him immune to thorns and fix the goop issue. The goop function somewhat works. However, sometimes he drops goops that cannot be picked up (or examined). This isn't so bad except that when you're placing items or structures down it will get in the way, the only way to fix this is to refresh the game. I've tried looking online for similar problems but I cannot get them to work. the immunity to getting prickled does not work at all, I've tried digging into to cactus, spikey bushes and bramble armour code files but nothing seems to work. I've even tried looking for similar mods with this function but I couldn't find any. Just as an extra note, this mod is pretty outdated as well (I remembered I had it and wanted to get back into making characters) But there's no crashes with it, there's just minor bugs that I would like to get fixed. These would be nice to fix, but are not my priority right now. When he gets hit, he drops goops and will shrink -- This function works well. The more he shrinks the slower (maybe weaker too?) he gets -- This doesn't work, it only works when he dies and gets revived, but eating removes this penalty and I'm not sure what I did wrong. Freezes and overheats faster -- not fully tested but I think I got the freezing faster one to work?? (needs more testing) I am not an expert on LUA, If anyone can have a look and tell me the issue I will really appreciate it, thanks for for reading!
-
I have a character that I have made able to eat rot and become stronger over eating large amounts of it, similarly to wx78. He is kind of a slime as of now, rot has the correct functionality and values when spawned in through console, however if rot is spawned via and item spoiling, it seems to behave such like normal rot and harms my character. is there a way to access the naturally generating rot as well as when it spawns in the console? I would appreciate any tips or examples on how to do this Thank you in advance to anyone who takes the time to help a young modder modmain.lua slurg.lua
-
I am making a hud-like pannel for my character stats like level experience boss kill etc... Well it works fine but it does not update itself when the character level ups how i can make it check for any changes? Anyway im leaving my codes. this is for my character to level up if inst.experience >= inst.expneededforlevel then inst.experience = 0 inst.SoundEmitter:PlaySound("kitsura/characters/kitsura/level up") inst.level = inst.level + 1 inst.expneededforlevel = (inst.expneededforlevel * 0 + inst.level * 10) inst.components.talker:Say("Level Up!! Level \n".. (inst.level) ) end and this is the screen shot of the menu when this photo taken my character was lvl 1(i am sure he is) and he had some experience with 1 koalefant kill but none of them were updated. i don't know how to check for if the variables are changed or not.
-
You have X% when you walk in a worm hole to appear in that dimension..(maybe the X% can be affected from your sanity..less sanity more probabilities..)that dimension conected all wormholes and can be really usefull to access to any zone of the map with a wormhole(is a weird zone with a lot of wormholes..anyone conected with other from the normal dimension..maybe like the sea with spiderwebs above with the wormholes and myst dark zone..i don't know..but very weird..XD),but is inabitated by the dimensional Worm(boss)or worms(like tall birds and hounds..)What you think about that..isn't really creative idea,but maybe with other add's can be interesting..What you think can be add's to it or need be changed?..
-
Hey, dear reader! I'm scheming on a custom turf, that would be an only-craftable one, so it shouldn't be generated in the world at start. My tragedy is, I don't really know how to get started to it, what ingredients make a complete turf. I've tried to look up already existing mods that do the same, but they're compiled, so I've made no progress. Is there a noob-friendly guide or sample that I could use to achieve my master plan? I'm once again asking for your modding support (please :)) Thanks in advance!
-
So recently, I got back into relearning how to make custom characters using the extended character template. As a good friend of mine wanted me to make two for him. And all was going well until I went to test out my progress in game, only for it to turn up invisible. I searched for some answers and found the animation folder wasn't compiling after deleting it. I've looked through my folder and I can't seem to find the issue. So far I have only changed around the names and mod info and drew all the assets for the character. I'd be very thankful if anyone could help me out. I included a zip of the character folder. szuzu.zip
-
im trying to make it where the item is only pick up by the character and no one else im also trying to make it where she can only make her crock pot recipe and no one else can make it but can eat it i look in to Lucy the axe but cant find anything that i understand that says only Woodie can use this or pick up and i also look in to Warly because i was told he has crock pot recipes that he can make but ever one else cant angel WIP.rar
-
So, once again I'm here to ask for some modding help, this time about an old character I decided to give a custom voice. I tried to follow some of the steps presented here on other tutorials and also checked some of the custom characters I have saved as well just in case, but something about the coding's not working according to the game it seems. Error says I need to add a "}" after ASSET{, but there is one after the asset packages; the lines I added inside it were the SOUNDPACKAGE and SOUND one as follows: And inside the mod folder itself, I did add a sound folder: My guess is that happened because of the fsb being a "bank" file instead of the usual fsb, but somehow I cannot make a fsb file in a different manner following the tutorials and I'm pretty confused about it myself. Under the ASSET{ [...] } part, I added these, as character mods such as Wynn and Womp do: And, on woofer.lua, on master_postinit: Tried changing the death_voice to "death" since that's what it is called on the FMOD files, but same error. I don't know what exactly is not working here; FMOD files attached for possible analysis since I may be doing something wrong here. Edit: I FORGOT TO PRINT IT AFTER THE "WAVERLY" WAS CHANGED TO "WOOFER" MY BAD, ERROR STILL STANDS woof.fev woof_bank00.fsb
-
problem with custom speed up code
AkaiNight posted a topic in [Don't Starve Together] Mods and Tools
here is the code i use local function SpeedUp(inst) if inst:HasTag("playerghost") then return end if TheWorld.state.isday then if inst.transformed and inst.components.hunger.current>=5 and inst.components.sanity.current>=5 and inst.level >= 41 then inst.components.hunger.current = inst.components.hunger.current - 5 inst.components.sanity:DoDelta(-5) inst.components.locomotor.walkspeed = 6 inst.components.locomotor.runspeed = 8 inst.components.sanity.night_drain_mult = 1.5 inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 3) inst.components.combat:SetAttackPeriod(0.5) inst.components.talker:Say("Ikuzoo! Nya~", 1, true) elseif inst.transformed and inst.components.hunger.current< 5 then inst.components.talker:Say("Well better eat something before run. Nya~", 1, true) elseif inst.transformed and inst.components.sanity.current< 5 then inst.components.talker:Say("Run? Do i know how to run? Nya~", 1, true) elseif inst.transformed and inst.level < 41 then inst.components.talker:Say("I must be lvl 3 for use this. Nya~", 1, true) end elseif TheWorld.state.isnight then if TheWorld.state.moonphase == "new" then if inst.transformed and inst.components.hunger.current>=5 and inst.components.sanity.current>=5 and inst.level >= 41 then inst.components.hunger.current = inst.components.hunger.current - 5 inst.components.sanity:DoDelta(-5) inst.components.locomotor.walkspeed = 8.5 inst.components.locomotor.runspeed = 12 inst.components.sanity.night_drain_mult = 3 inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 2) inst.components.combat:SetAttackPeriod(0.3) inst.components.talker:Say("Ikuzoo! Nya~", 1, true) elseif inst.transformed and inst.components.hunger.current< 5 then inst.components.talker:Say("Well better eat something before run. Nya~", 1, true) elseif inst.transformed and inst.components.sanity.current< 5 then inst.components.talker:Say("Run? Do i know how to run? Nya~", 1, true) elseif inst.transformed and inst.level < 41 then inst.components.talker:Say("I must be lvl 3 for use this. Nya~", 1, true) end end elseif TheWorld.state.moonphase == "full" then if inst.transformed and inst.components.hunger.current>=15 and inst.components.sanity.current>=15 and inst.level >= 41 then inst.components.hunger.current = inst.components.hunger.current - 10 inst.components.sanity:DoDelta(-10) inst.components.locomotor.walkspeed = 6.5 inst.components.locomotor.runspeed = 7.5 inst.components.sanity.night_drain_mult = 1.7 inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 4) inst.components.combat:SetAttackPeriod(0.5) inst.components.talker:Say("Ikuzoo! Nya~", 1, true) elseif inst.transformed and inst.components.hunger.current< 10 then inst.components.talker:Say("Well better eat something before run. Nya~", 1, true) elseif inst.transformed and inst.components.sanity.current< 10 then inst.components.talker:Say("Run? Do i know how to run? Nya~", 1, true) elseif inst.transformed and inst.level < 41 then inst.components.talker:Say("I must be lvl 3 for use this. Nya~", 1, true) end elseif TheWorld.state.isdusk then if TheWorld.state.moonphase == "new" then if inst.transformed and inst.components.hunger.current>=5 and inst.components.sanity.current>=5 and inst.level >= 41 then inst.components.hunger.current = inst.components.hunger.current - 5 inst.components.sanity:DoDelta(-5) inst.components.locomotor.walkspeed = 7.5 inst.components.locomotor.runspeed = 10 inst.components.sanity.night_drain_mult = 2.5 inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 2.5) inst.components.combat:SetAttackPeriod(0.35) inst.components.talker:Say("Ikuzoo! Nya~", 1, true) elseif inst.transformed and inst.components.hunger.current< 5 then inst.components.talker:Say("Well better eat something before run. Nya~", 1, true) elseif inst.transformed and inst.components.sanity.current< 5 then inst.components.talker:Say("Run? Do i know how to run? Nya~", 1, true) elseif inst.transformed and inst.level < 41 then inst.components.talker:Say("I must be lvl 3 for use this. Nya~", 1, true) end elseif TheWorld.state.moonphase == "full" then if inst.transformed and inst.components.hunger.current>=7 and inst.components.sanity.current>=7 and inst.level >= 41 then inst.components.hunger.current = inst.components.hunger.current - 7 inst.components.sanity:DoDelta(-7) inst.components.locomotor.walkspeed = 7 inst.components.locomotor.runspeed = 8 inst.components.sanity.night_drain_mult = 2 inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 3) inst.components.combat:SetAttackPeriod(0.4) inst.components.talker:Say("Ikuzoo! Nya~", 1, true) elseif inst.transformed and inst.components.hunger.current< 7 then inst.components.talker:Say("Well better eat something before run. Nya~", 1, true) elseif inst.transformed and inst.components.sanity.current< 7 then inst.components.talker:Say("Run? Do i know how to run? Nya~", 1, true) elseif inst.transformed and inst.level < 41 then inst.components.talker:Say("I must be lvl 3 for use this. Nya~", 1, true) end end end inst.transformed = not inst.transformed return true end here is the log i cant figure what is wrong (the code is in modmain.lua) client_log_2019-11-12-06-54-35.txt client_log.txt -
Hello. I am working on custom animation for shooting a rifle. I don't have a clue how to replace original attack animation with custom for specific custom weapon (I have tried to use tags). If someone is willing to help me I would be glad. Have a nice day!
-
Hello, I have question to anybody willing to help me. In the configuration menu you can change values of certain item for example. But can you make perk (from charactername.lua in scripts folder) switchable between on and off option ? I have no clue how to start it, so I am here for help. local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK] handle.deststate = function(inst) return "doshortaction" end Here's where did I get this perk @no_signal's solution in this topic
-
Recently I created my second mod and everything appear to be working, but I found out that my function that makes my item unpickable for other characters crushing my game while putted into chest or at the fight agains toadstool. The game says smth wrong with inventory-dropitem line (nil value). I suggest that non-player inventory such as chest's don't have inventory as their variable.
-
crash MOD HELP Hat item is invisible
Bunnyash posted a topic in [Don't Starve Together] Mods and Tools
I'm trying to add a hat to my custom character, the original template I used is hat_bee_bw which is from this file here: However when I change the prefab file name it disappears! and I don't know why! It works with the original name, but as soon as I change it, it becomes invisible in the inventory bar, I can't click it or wear it, and there's no name to show up, I've not yet started the drawing. I've made custom items before and I've never had this issue, I've looked though all the files to try and find the problems but I can't see anything, any help with this will be very much appreciated, thank you! I've attached my mod here, her name's Poppy, and her hat is renamed too "poppyhat". Poppy.zip