• Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Divici

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello everyone. Just wanted to share my first mod with you all. Please let me know what you think or what areas can be improved. https://steamcommunity.com/sharedfiles/filedetails/?id=2111120706&searchtext=demon+slayer A special thanks to SirDoggo who helped me with some issues and Ultroman who I would not have been able to get this done without. Inosuke Hashibira from Kimetsu no Yaiba Stats: 175 Health 150 Hunger 150 Sanity - Can chop trees faster - Gains Sanity when attacking Boss Monsters (2 per hit) - CAN NOT equip any armor apart from his own Special Items (Can still wear clothing items) - Starts with his Boar Hat in inventory SPECIAL ITEMS Inosuke's Boar Hat Costs: 5 Pig skin and 5 Rope Blocks 30% of incoming damage Has 2500 durability Gives 60 Insulation First Sword Costs: 5 Marble, 10 Cut stone, 10 Charcoal, and 20 Flint Does 50 damage. Has 1000 Durability Can chop trees ( Uses 2 durability) Can mine (Uses 5 durability) Second Sword Costs: 10 Marble, 33 Cut stone, 25 Charcoal, and 50 Flint When equipped, Inosuke gains 20% armor (Stacks with Boar Hat) When equipped, Inosuke's damage is multiplied by 1.5. If both of his swords are equipped then damage is multiplied by 1.9. Has 2500 Durability (Still missing are the character speech files)
  2. OMG!!! Thank you! That worked perfectly. Now I can finally finish the mod and release it. I knew the general code for it but had no idea what the syntax was. I'm definitely about to hit that LUA crash course =).
  3. To clarify, I still want my character to be able to wear body and head items. I specifically don't want him to be able to wear items that block damage/armor, except for the custom armor. e.g. He can equip a Dapper Vest but can not equip a Marble Suit, or can equip a Beefalo Hat but not a Football Helmet. I was asking for help with doing it for the HEAD slot assuming that I'd be able to then figure out how to add the BODY as well. Sorry if I was not clear.
  4. Also I tried the below code. I got it to block all hats except for my custom hat but couldn't block just armor. --Blocks the use of armor local _Equip = inst.components.inventory.Equip inst.components.inventory.Equip = function(self, item, old_to_active) if not item or not item.components.equippable or not item:IsValid() then return end if item.components.equippable.equipslot == EQUIPSLOTS.HEAD then if not (item.prefab == "boarhat") then self:DropItem(item) self:GiveItem(item) if inst and inst.components.talker then inst.components.talker:Say("It does not fit me.") end return end end return _Equip(self, item, old_to_active) end Any ideas on what I'm missing?
  5. Yep, I tried that without the listen event and of course nothing happened when equipping armor. After adding the listening event under the local master_postinit the game loads up to character selection and after picking my mod character, it crashes. It says that the variable 'drop' is not declared. Let me know if I should upload the crash log or character mod.
  6. Inside your characters lau file under the common_postinit=function(inst), add the line: inst:AddTag("woodcutter") The code should look something like below -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) -- Minimap icon inst.MiniMapEntity:SetIcon( "character.tex" ) -- Lets him chop wood fast like Woodie inst:AddTag("woodcutter") Also for future reference, it would be easier to get help and assistance if you name what your problem is in the topic title. Have fun.
  7. Do I need to add anything to my modmain on somewhere else in the character prefab to get it to work? It doesn't seem to be calling the function when in game.
  8. Thanks for the help. I tried the code from your Frank LUA: I ran my mod character and debug spawned a grass suit but he was still able to equip it. Did I miss something in the code? Also do you know where I can find the tags associated with different types of items? e.g. the tags for dress tab items like "hats" or something. I assume i would just add (or data.eslot ~= EQUIPSLOTS.HEAD) to line 6 and then include the item:HasTag("hats e.t.c").
  9. Hi there. A good place to start is this forum by Ultroman. It has links to many of the coding snippets and examples you will need to make your first custom mod, as well as a newcomer's link to some vital coding basics. another place to find code examples for the game is to go into the data bundles folder of the game. You should be able to find it somewhere like this: "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\databundles\scripts.zip" I'm also in the middle of making my first mod and this has all helped me greatly. Hope it can do the same for you.
  10. Hey DST community, I've been working on my first mod character, and while I've found out how to do most of what I want for the character, I've been pretty stuck on a few things. So I'm reaching out to you all for some help or to at least point me in the right direction. Thanks in advance. 1. (Biggest Priority) My character has a custom helmet that he can use. I want to block him from being able to use any other item that has an armor tag apart from his custom helmet and sword (see 2. below). I would also like to prevent him from being able to see those recipes in the first place. I was thinking that maybe I'd have to make a blacklist of the specific armors I want to block but that would not account for downloaded mods. I'm very new to coding so any help with this would be great. 2. I'm giving the character 2 swords. One is a basic weapon that does 50 damage. I want the second one to take an armor slot, which I believe I can figure out. what I'm stuck on is, I want that when equipping sword 2, the character gets an additional 50 damage on any weapon equipped. Additionally but not a priority: Is it possible to make the character hold the second weapon in his other hand? He does not need to swing it. 3. I want that each time the character dies, not only does his max health get cut but his max sanity will be cut by 50. To go along with this, each attack the character does adds 0.5 onto the maximum sanity, up to 250 where it caps. As I said above, I'm very new to coding but I'm excited to learn. From searching through the forums I found code that does similar things to the above but not quite the correct solution. Any help would be greatly appreciated. Have a nice day! edit: (Still could use assistance for the first part)