Search the Community
Showing results for tags 'damage'.
Found 10 results
-
I was creating a mod to edit character resistances. In this case, I wanted to give damage vulnerabilities in a percentage, using the game's own code. Any idea how I could do this? --Exemple: local armorset = (-0.5) -- 50% Vulnerable inst.components.health:SetAbsorptionAmount(armorset) -- This code doesn't work
-
[SOLVED] taking more damage
sjtdhiqbwczfzpu posted a topic in [Don't Starve Together] Mods and Tools
Hi. I'm trying to make the character take more damage. Several years ago I made a mod in which I managed to do this. But I lost this mod and now I don't remember how I did it. I try to do it with this: inst.components.health.absorb = -0.5 But "absorb" doesn't seem to work anymore to increase damage, only to decrease. -
Hello, I have a question. So I want to give my character the ability to give others a damage boost when using a staff item, is there something like "inst.components.locomotor:SetExternalSpeedMultiplier(inst, "mycharacter_speed_mod", 1)" but for damage instead of speed that i could use. ive looked trough the combat.lua component but couldnt find anything that i could use. I believe wont be able to use "inst.components.combat.damagemultiplier" because i believe that'l mess up characters like wolfgang and wigfrid (and modded characters). Unless this isnt the case i'd really appriciate the help!
-
Trying to set it up so that the damage that Bernie gets from shadow creatures is also applied to shadow creatures themselves. And, subsequently so that they would also teleport within a radius of Bernie upon attacking him, just like they do when a player attacks them. I've looked through many OnBlocked functions, from scalemail, to cactus picking to even single player's SW cactus armor damage, but NOTHING works! This is my final code that I've come down to: local function OnAttacked(inst, data) if data.attacker ~= nil and data.attacker.components.combat and data.attacker:HasTag("shadow") then data.attacker.components.combat:GetAttacked(inst, data.attacker.components.damage) --data.attacker.components.health:DoDelta(data.attacker.components.damage) data.attacker.components.combat:SetTarget(data.attacker) data.attacker.components.combat:ShareTarget(data.attacker, 30, ShareTargetFn, 1) end end And it doesn't work. Does anybody have any idea as to why and how I could fix it? Mind you, I'm still using that "make a copy of an original file into the mod and edit it" strat, so this code is placed within berniebrain.lua.
-
I was wondering if there was a way to scale damage higher the lower sanity gets. Is an incremental scaling based off the character losing sanity is something that would be possible of would I have to do it based off it they hit X amount?
-
Hello! I was wondering if I could get some assistance on a few perks. * How can you consume a normally non-consumable item and get your character to gain health from it such as Dark Petals? * Make it so your character has more/less natural protection due to the more or less hunger they have. i.e if a character was at 130/150 hunger they'd get a 25% buff from damage, but if they were at 15/150 hunger they'd take 30% more damage. * Can you inversely insulate a beard? i.e cools you in summer and winter instead of providing cold protection in winter * Instantly die at 0 hunger. Also I was working on making it so the character has increased damage at night, normal damage at dusk, and less damage in the day but the code I was using doesn't seem to work for DST. It gives me the following error: I've uploaded a copy of the mod down below. Any help at all would be very appreciated! shadowwilson.zip
- 5 replies
-
- hunger
- character mod
-
(and 3 more)
Tagged with:
-
I've been incessantly updating my character Pith the Pyromancer and ran into a few problems. My character mod, Pith the Pyromancer, was created just a few weeks before DST ROG came out. Later I updated him so he can be played in Reign of Giants. A few errors have occurred which I have been eagerly trying to fix. But this one leaves me stumped. In the normal DST Pith takes rain damage similar to WX-78, however I realized WX-78's coding is different in ROG compared to the original. I tried to look in the forums to see if the same problem occurred for someone else and found nothing. So, I'm looking for a code that I can simply paste in. I need to know which file, and which section inside the file. Thanks for your help.