Jump to content

Webbers ability (I dont understand)


Recommended Posts

so judging from other people mods like 

 

"Wilsdow the Widow"

 

and

 

"webbers" folder

 

folder I found some codes for spider friends and spider brains but when I try to insert my character in there instead it doesn't work. Can someone explain how I can add it to my character? I tried looking up it on the forum but it doesnt seem to be working.

 

I also plan to add "instead of feeding meat = friend"

 

"Killing enemies= spawning spider warriors with 10 health" infinite loyalty. With regular attack damage they usually do. Only attacks if you attack someone or allow right click command attack

Link to comment
Share on other sites

Webber's lua file:

 

local MakePlayerCharacter = require "prefabs/player_common"local assets ={    Asset("ANIM", "anim/webber.zip"),    Asset("SOUND", "sound/webber.fsb"),    Asset("ANIM", "anim/beard_silk.zip"),    Asset("ANIM", "anim/ghost_webber_build.zip"),}local prefabs ={    "silk",}local start_inv ={    "spidereggsack",    "monstermeat",    "monstermeat",}local function common_postinit(inst)    inst:AddTag("spiderwhisperer")    inst:AddTag("monster")    inst:AddTag(UPGRADETYPES.SPIDER.."_upgradeuser")    --bearded (from beard component) added to pristine state for optimization    inst:AddTag("bearded")end--tune the beard economy...local BEARD_DAYS = { 3, 6, 9 }local BEARD_BITS = { 1, 3, 6 }local function OnResetBeard(inst)    inst.AnimState:ClearOverrideSymbol("beard")endlocal function OnGrowShortBeard(inst)    inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_short")    inst.components.beard.bits = BEARD_BITS[1]endlocal function OnGrowMediumBeard(inst)    inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_medium")    inst.components.beard.bits = BEARD_BITS[2]endlocal function OnGrowLongBeard(inst)    inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_long")    inst.components.beard.bits = BEARD_BITS[3]endlocal function master_postinit(inst)    inst.talker_path_override = "dontstarve_DLC001/characters/"    inst.components.eater.strongstomach = true    inst.components.health:SetMaxHealth(TUNING.WEBBER_HEALTH)    inst.components.hunger:SetMax(TUNING.WEBBER_HUNGER)    inst.components.sanity:SetMax(TUNING.WEBBER_SANITY)    inst:AddComponent("beard")    inst.components.beard.insulation_factor = TUNING.WEBBER_BEARD_INSULATION_FACTOR    inst.components.beard.onreset = OnResetBeard    inst.components.beard.prize = "silk"    inst.components.beard:AddCallback(BEARD_DAYS[1], OnGrowShortBeard)    inst.components.beard:AddCallback(BEARD_DAYS[2], OnGrowMediumBeard)    inst.components.beard:AddCallback(BEARD_DAYS[3], OnGrowLongBeard)    inst.components.locomotor:SetTriggersCreep(false)endreturn MakePlayerCharacter("webber", prefabs, assets, common_postinit, master_postinit, start_inv)

 

What you need to use from there is the common_init function (which you need to rename to common_postinit later), which adds 3 tags and modifies the locomotor component of webber:

    inst:AddTag("spiderwhisperer")    inst:AddTag("monster")    inst:AddTag(UPGRADETYPES.SPIDER.."_upgradeuser")    inst.components.locomotor:SetTriggersCreep(false)

"spiderwhisperer" makes your character able to give meat to spiders, so you wouldn't want that one, but it also makes spiders not drain your sanity.

"monster" makes spiders non aggressive to you, but does the opposite for pigs.

UPGRADETYPES.SPIDER.."_upgradeuser" lets you upgrade spider dens with silk.

The last line makes it so you don't wake up spiders from their dens.

 

As for making spider warriors that follow you and have 10 hp, I have no idea, you would have to look at

wathgrithr.lua for the onkilled function.

spiderqueen.lua OR wendy.lua / abigail.lua / abigailflower.lua OR chester.lua OR pigman.lua AND probably follower.lua for the followers/minions part of the code.

Which I tried to look at. And it made no sense. Because i'm terrible.

 

 

If you already tried to write the code, post it here and someone might be able to help you out.

Edited by DrSmugleaf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...