Don't Starve Together

Don't Starve Together

Extra Equip Slots+3
Meteor 6 Feb, 2023 @ 7:31pm
教大家自行适配作者没有适配的装备(A guide helps you adapt the mod to what you want.)
The English version is located below.
鉴于mod作者已经弃坑(我不是作者哈),看到留言有很多小伙伴让作者改适配的,我昨天看了一下代码,稍微修改了一下卡尼猫的装备就适配上了,感觉除了部分比较困难的适配可能都可以通过以下操作适配到,急需的同学可以试试。

该mod的id为2798599672,文件夹路径位于`Steam\steamapps\workshop\content\322330\2798599672`
整个文件夹用`VSCode`(微软的一款轻量级编辑器)或者其它工具打开(能方便地进行文件夹搜索文件内容即可)。
进入"modmain.lua"这个文件,你会发现其按照装备类型定义了很多条目。

1. 护甲:`EQUIP_TYPES.ARMOR`
2. 服装:`EQUIP_TYPES.CLOTHING`
3. 护符:`EQUIP_TYPES.AMULET`。

比如说我要加个卡尼猫mod的护身符,在`-- Amulets --护符`的类目下添加一行,如下。


local items_types = {
-- Life vests
.....

-- Armors--护甲
......

-- Clothing--服装
......

-- Amulets --护符
["carney_hushenfu"] = EQUIP_TYPES.AMULET, --卡尼猫-护身符
}

这样,卡尼猫的护身符就不会跟背包抢占位置了,会自动被mod归类为护身符。

那么,卡尼猫的护身符的代码`"carney_hushenfu"`怎么获取呢?

获取卡尼猫的mod的id,一样的方法,用vscode打开对应的mod文件夹,用`VSCode`的全局搜索搜这个物品的名字,你在搜索的结果中就能看到作者为其定义的`code`。

如果,你要改变的装备是游戏默认的装备,那其实这个操作我没有试过也不知道行不行,不过你可以试试....怎么获取它的code嘛,直接网上搜这个东西怎么从控制台拿出来就行了,你会得到一个类似c_give("装备code", 数量); 这样的代码,里面的装备Code就是你想要的。

然后把自己改动的mod通过饥荒的mod工具上传到创意工坊即可,这样你就可以订阅自己的mod,用修改后的功能了。
注意:提及出处以及作者,或者干脆仅自己可见/仅自己朋友、组可见,尊重作者的劳动成果。

---

I'm not a native speaker in English. I wrote this article to improve my English expression. Hope you can understand the meaning of my writing.

Hey guys, the mod's creator had been AFK(I'm not the mod's creator) and here is a guide that could help you adapt the mod to what you want.

1. First, find the directory of the mod on your computer.

e.g. the mod's id is '2798599672', and its directory path is "Steam\steamapps\workshop\content\322330\2798599672".

2. Using VS Code(a light editor formed by Microsoft) or other editors that have the function of global text search, to open the mod's directory.

3. Opening the file `modmain.lua`. Then you can see many definitions of the equipments, and they can be sorted into three types: `EQUIP_TYPES.ARMOR`, `EQUIP_TYPES.CLOTHING`, `EQUIP_TYPES.AMULET`

4. Defining the equipment you want in the object `items_types`. e.g.:

local items_types = {
-- Life vests
.....

-- Armors--护甲
......

-- Clothing--服装
......

-- Amulets--护符
["carney_hushenfu"] = EQUIP_TYPES.AMULET, --卡尼猫-护身符
}

I add an Amulets item name `carney_hushenfu` and define it as `EQUIP_TYPES.AMULET`. So the amulet, coding name `carney_hushenfu`, will not conflict with `BACKPACK` in the role mod name `carney cat`.


5. How to find the code definition of the equipment? Simply, you can use the VS Code editor to open the directory of the mod which conflicts with the equipment mod. Use the VS Code function of the global search to input the name of the equipment so that you can find the code definition in the search result.
If the equipment is the game's default setting and you don't know where its code is, I think you can search "get the xxx in the Don't Starve by console" in google, and then you would get its code from the search result, the command "c_give(code, count)".

6. Finally, use the Don't Starve Mod Tools to upload your rewriting mod to the workshop, and subscribe to it as your server mod.
If you worry that the mod's creator would object to others uploading their mod, I think you can choose the option read "privately upload" or "only your friend and group could see" and refer the mod's creator when you using the Don't Starve Mod Tools to upload your rewriting mod. Possibly, Getting authorization from this mod's creator also is a good idea.
Last edited by Meteor; 9 Feb, 2023 @ 4:05am
< >
Showing 1-8 of 8 comments
Mickmane 6 Feb, 2023 @ 9:55pm 
How do I tell it to put heavy stuff into the armor slot, rather than backpack?

Also, the bunny pillow armors so far go into the backpack slot.

If I try to add gem armor from https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1737837745 would the creator of this mod not object to uploading it?
Meteor 7 Feb, 2023 @ 2:19am 
Originally posted by Mickmane:
How do I tell it to put heavy stuff into the armor slot, rather than backpack?

Also, the bunny pillow armors so far go into the backpack slot.

If I try to add gem armor from https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1737837745 would the creator of this mod not object to uploading it?

Hello, about your question, actually the game treats the armor, backpack, compass as the same equipment by default.
This equipment mod's function is to support extra equipment slots for the other mod's equipment which conflicts with the normal slot.
How does it support? Define the equipment you need and assign an equipment type for it in this mod's file "modmain.lua"

so you can add the below into the "modmain.lua".
local items_types = {
["TheEquipmentCode"] = EQUIP_TYPES.ARMOR,
}
e.g. if the bunny pillow armor's code is "bunny_pillow".
local items_types = {
["bunny_pillow"] = EQUIP_TYPES.ARMOR,
}

Completing above, the armor named bunny pillow is treated as its ARMOR type instead of the game's default type by this mod's extra equipment slots.
And, if you add the gem armor from the Gemstone Armor V.N Model, I think the equipment mod will treat it as the default type....
Finally, upload the rewriting mod to the workshop, remove this equipment mod and subscribe to your rewriting mod, you can enjoy the function of your rewriting.
Last edited by Meteor; 9 Feb, 2023 @ 4:09am
Mickmane 7 Feb, 2023 @ 2:30am 
Originally posted by Meteor:
Originally posted by Mickmane:
How do I tell it to put heavy stuff into the armor slot, rather than backpack?

Also, the bunny pillow armors so far go into the backpack slot.

If I try to add gem armor from https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1737837745 would the creator of this mod not object to uploading it?

Hello, about your question, actually the game treats the armors, backpacks, compasses and hats as the same equipment by default.
This equipment mod's function is to support extra equipment slots for the other mod's equipment that conflict with the normal slot.
how does it support? defining the equipment you need into this mod's file "modmain.lua" as its extra equipment type.

so you can add the below into the "modmain.lua".
local items_types = {
["TheEquipmentCode"] = EQUIP_TYPES.ARMOR,
}
e.g. if the bunny pillow armor's code is "bunny_pillow".
local items_types = {
["bunny_pillow"] = EQUIP_TYPES.ARMOR,
}

Completing above, the armor named bunny pillow is treated as its ARMOR type instead of the game's default type by this equipment mod.
And, if you add the gem armor from the Gemstone Armor V.N Model, I think the equipment mod will treat it as the default value.
Finally, upload the rewriting mod to the workshop, remove this equipment mod and subscribe to your rewriting mod, you can enjoy the function of your rewriting.

Thanks. I think. Having some problems following you. :)

Btw, the bunny armor is not from a mod, and I have no idea what its internal name is.
https://dontstarve.fandom.com/wiki/Year_of_the_Bunnyman


I'll try adding the gem armor, at least there I might be able to find out the names. :)


What about heavy objects?

Would the same work for the following?
"sculpture_rooknose"
"sculpture_knighthead"
"sculpture_bishophead"

"chesspiece_hornucopia_marble"
"chesspiece_hornucopia_stone"
"chesspiece_hornucopia_moonglass"
...

Isn't there some way to include all heavy objects without having to tend each one? There's also vegetables, potato bags,... who knows what else.


And what about the mod creator, would they not object to others uploading their mod?
Meteor 7 Feb, 2023 @ 2:49am 
Originally posted by Mickmane:
Originally posted by Meteor:

Hello, about your question, actually the game treats the armors, backpacks, compasses and hats as the same equipment by default.
This equipment mod's function is to support extra equipment slots for the other mod's equipment that conflict with the normal slot.
how does it support? defining the equipment you need into this mod's file "modmain.lua" as its extra equipment type.

so you can add the below into the "modmain.lua".
local items_types = {
["TheEquipmentCode"] = EQUIP_TYPES.ARMOR,
}
e.g. if the bunny pillow armor's code is "bunny_pillow".
local items_types = {
["bunny_pillow"] = EQUIP_TYPES.ARMOR,
}

Completing above, the armor named bunny pillow is treated as its ARMOR type instead of the game's default type by this equipment mod.
And, if you add the gem armor from the Gemstone Armor V.N Model, I think the equipment mod will treat it as the default value.
Finally, upload the rewriting mod to the workshop, remove this equipment mod and subscribe to your rewriting mod, you can enjoy the function of your rewriting.

Thanks. I think. Having some problems following you. :)

Btw, the bunny armor is not from a mod, and I have no idea what its internal name is.
https://dontstarve.fandom.com/wiki/Year_of_the_Bunnyman


I'll try adding the gem armor, at least there I might be able to find out the names. :)


What about heavy objects?

Would the same work for the following?
"sculpture_rooknose"
"sculpture_knighthead"
"sculpture_bishophead"

"chesspiece_hornucopia_marble"
"chesspiece_hornucopia_stone"
"chesspiece_hornucopia_moonglass"
...

Isn't there some way to include all heavy objects without having to tend each one? There's also vegetables, potato bags,... who knows what else.


And what about the mod creator, would they not object to others uploading their mod?


Q: "the bunny armor is not from a mod"
A: "Maybe I understand what you said, Do you mean the bunny armor is the game's default equipment that you can't find its code?If my comprehension is correct, I think you can search 'how to get the game's equipment in console', then you can get a command such as c_give(“equipment code”, number)".

Q: "Isn't there some way to include all heavy objects without having to tend each one?"
A: "Sorry, I just play the game for about 30 hours....if I get the other way I will share it with you :) . In my way I think I would try to learn lua script then use it to collect the other mod's equipment code, sort their code into three equipment types, then export their objects, finally import them into this mod's lua file and apply them"

Q: "And what about the mod creator, would they not object to others uploading their mod?"
A: "Use the options read `privately upload` or` only your friend and group could see ` in the Don't Starve Mod Tools and refer the mod's creator in your rewriting mod if you worry about it, and actually this mod also has its former creator....."
Last edited by Meteor; 12 Feb, 2023 @ 5:14am
凛子不是林子  [developer] 10 Apr, 2023 @ 11:30pm 
Originally posted by Mickmane:
Originally posted by Meteor:

Hello, about your question, actually the game treats the armors, backpacks, compasses and hats as the same equipment by default.
This equipment mod's function is to support extra equipment slots for the other mod's equipment that conflict with the normal slot.
how does it support? defining the equipment you need into this mod's file "modmain.lua" as its extra equipment type.

so you can add the below into the "modmain.lua".
local items_types = {
["TheEquipmentCode"] = EQUIP_TYPES.ARMOR,
}
e.g. if the bunny pillow armor's code is "bunny_pillow".
local items_types = {
["bunny_pillow"] = EQUIP_TYPES.ARMOR,
}

Completing above, the armor named bunny pillow is treated as its ARMOR type instead of the game's default type by this equipment mod.
And, if you add the gem armor from the Gemstone Armor V.N Model, I think the equipment mod will treat it as the default value.
Finally, upload the rewriting mod to the workshop, remove this equipment mod and subscribe to your rewriting mod, you can enjoy the function of your rewriting.

Thanks. I think. Having some problems following you. :)

Btw, the bunny armor is not from a mod, and I have no idea what its internal name is.
https://dontstarve.fandom.com/wiki/Year_of_the_Bunnyman


I'll try adding the gem armor, at least there I might be able to find out the names. :)


What about heavy objects?

Would the same work for the following?
"sculpture_rooknose"
"sculpture_knighthead"
"sculpture_bishophead"

"chesspiece_hornucopia_marble"
"chesspiece_hornucopia_stone"
"chesspiece_hornucopia_moonglass"
...

Isn't there some way to include all heavy objects without having to tend each one? There's also vegetables, potato bags,... who knows what else.


And what about the mod creator, would they not object to others uploading their mod?

i have added
Mickmane 11 Apr, 2023 @ 12:53am 
Originally posted by 凛子不是林子:
Originally posted by Mickmane:

Thanks. I think. Having some problems following you. :)

Btw, the bunny armor is not from a mod, and I have no idea what its internal name is.
https://dontstarve.fandom.com/wiki/Year_of_the_Bunnyman


I'll try adding the gem armor, at least there I might be able to find out the names. :)


What about heavy objects?

Would the same work for the following?
"sculpture_rooknose"
"sculpture_knighthead"
"sculpture_bishophead"

"chesspiece_hornucopia_marble"
"chesspiece_hornucopia_stone"
"chesspiece_hornucopia_moonglass"
...

Isn't there some way to include all heavy objects without having to tend each one? There's also vegetables, potato bags,... who knows what else.


And what about the mod creator, would they not object to others uploading their mod?

i have added

Thanks, but which? :) Heavy items, or also gem armour? Bunny armour?
凛子不是林子  [developer] 11 Apr, 2023 @ 1:27am 
Originally posted by Mickmane:
Originally posted by 凛子不是林子:

i have added

Thanks, but which? :) Heavy items, or also gem armour? Bunny armour?
Gemstone Armor
Mickmane 11 Apr, 2023 @ 1:29am 
Originally posted by 凛子不是林子:
Originally posted by Mickmane:

Thanks, but which? :) Heavy items, or also gem armour? Bunny armour?
Gemstone Armor

Ah, thanks. :)

But without heavy items going into armor slot, and bunny armor too, it's not really usable.
< >
Showing 1-8 of 8 comments
Per page: 1530 50