-
Content Count
291 -
Joined
-
Last visited
Community Reputation
19 GoodAbout Tesumoto
-
Rank
Member
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Enable-
Prohibition on equipping item
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Should this work? AddPrefabPostInit("greenamulet", function(inst) if GetModConfigData("wilson_ezrecipe") > 0 and GLOBAL.TheWorld.ismastersim then local function onequip_green(inst, owner) if owner.prefab ~= "wilson" return end owner.AnimState:OverrideSymbol("swap_body", "torso_amulets", "greenamulet") owner.components.builder.ingredientmod = TUNING.GREENAMULET_INGREDIENTMOD inst.onitembuild = function() inst.components.finiteuses:Use(1) end inst:ListenForEvent("consumeingredients", inst.onitembuild, owner) end end end) Oh, error, need add "then". I don't know why, but AddPrefabPostInit don't work. I use this code: if owner.prefab == "wilson" then owner.components.builder.ingredientmod = TUNING.WILSON_GREEN else owner.components.builder.ingredientmod = 1 end -
Hello! What I need? How I can prohibition equipping "greenamulet" for players who plays for Wilson?
-
Starting item with incomplete durability
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Error Need little fix for this: for k,v in pairs(start_items) do local item = GLOBAL.SpawnPrefab(v) if item.components.fueled ~= nil and item.prefab == "winterhat" then item.components.fueled:SetPercent(.5) end player.components.inventory:GiveItem(item) end item.components.fueled:SetPercent:(.5) -> item.components.fueled:SetPercent(.5) ":" this not need =) Thx for help -
Starting item with incomplete durability
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
This for all items? I just need for one item) -
Hello! I wanted to ask your advice. Is it possible to do so that the starting item has a durability of 50%? This need for "winterhat". local OnPlayerSpawn = function(src, player) player.prev_OnNewSpawn = player.OnNewSpawn player.OnNewSpawn = function() local start_items = {} --for spring if GLOBAL.TheWorld.state.isspring or (GLOBAL.TheWorld.state.iswinter and GLOBAL.TheWorld.state.remainingdaysinseason < 3) then table.insert(start_items, "grass_umbrella") end --for summer if GLOBAL.TheWorld.state.issummer or (GLOBAL.TheWorld.state.isspring and GLOBAL.TheWorld.state.remainingdaysinseason < 3) then table.insert(start_items, "watermelonhat") end --for winter if GLOBAL.TheWorld.state.iswinter or (GLOBAL.TheWorld.state.isautumn and GLOBAL.TheWorld.state.remainingdaysinseason < 3) then for i = 1, 3 do table.insert(start_items, "cutgrass") end for i = 1, 2 do table.insert(start_items, "log") end table.insert(start_items, "winterhat") end for k,v in pairs(start_items) do local item = GLOBAL.SpawnPrefab(v) player.components.inventory:GiveItem(item) end if player.prev_OnNewSpawn ~= nil then player:prev_OnNewSpawn() player.prev_OnNewSpawn = nil end end end local function ListenForPlayers(inst) if GLOBAL.TheWorld.ismastersim then inst:ListenForEvent("ms_playerspawn", OnPlayerSpawn) end end AddPrefabPostInit("world", ListenForPlayers)
-
Function of prohibit targets
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Yes, I could only that. I can prohibit using as a target what can be destroyed with a hammer (spellcaster.lua) (line: 141-146): local function IsWorkAction(action) return action == ACTIONS.CHOP --or action == ACTIONS.DIG --or action == ACTIONS.HAMMER or action == ACTIONS.MINE end I just add "--" for ACTION.DIG and ACTION.HAMMER. It is working and people can't use tornado staff on structures and plants. But this is only a prohibition of the target, but the impact itself remains. If you use the tornado staff on a living creatures, then the buildings and plants are destroyed nearby. -
Function of prohibit targets
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Oh, thanks, but I'm not good at it all. I decided to use this: function remove_staff_tornado(prefab) local rec = GLOBAL.AllRecipes[prefab] rec.level = GLOBAL.TECH.LOST rec.nounlock = true end remove_staff_tornado("staff_tornado") -
Function of prohibit targets
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
I already ended work with the "firestaff". I was also able to prohibit the use "staff_tornado" on buildings. But if you use "staff_tornado" on a living creature near to a building, it destroed. Is it possible to completely remove the impact on buildings for "staff_tornado"? -
Hello. I need your help with the function. I want to prohibit the use "firestaff" and "staff_tornado" if the target has a tag (ownershiptag). if target:HasTag(ownershiptag) and target:HasTag("structure") then end
-
I want to give a golden ax in player's inventory when players respawn (start item). But only by that players who have administrator rights on the server. Can someone help me with this?
-
I want my character to collect twig with sapling and grass twice as fast. And cut down the tree in half the time. This can be done?
-
Please help with the editing of the character
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
I've finished with walls =) Now mod not only improves walls HP, but also increases the resistance to hammer blows. -
Please help with the editing of the character
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Maybe you can help me with this? How to edit the effect for objects on the sanity of the character? I want to change the effects of items from the tab "magic": 1) Negative effect on sanity increased twice. (Fire Staff, Ice Staff, Telelocator Staff, One-man Band, Night Light, Night Armour, Dark Sword, Bat Bat). 2) The positive effect on sanity down twice. (Life Giving Amulet, Chilled Amulet, Nightmare Amulet, Belt of Hunger). -
Please help with the editing of the character
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
It's a pity. I created a mod to increase the health of the walls. Then came another player and destroyed my wall with a hammer for 3 hits. And I understood, my mod useless. -
Please help with the editing of the character
Tesumoto replied to Tesumoto's topic in [Don't Starve Together] Mods and Tools
Hello! Is it possible to create mod, that only the owner of the walls be able to destroy walls with a hammer? And other players can only beat your walls with an ax or spear (other weapons).