饥荒
Item Info
Chris547 2020 年 1 月 21 日 下午 12:32
Hambat Crash
Here is a stacktrace for the "hambat crash" reported by many in the comments. I distinctly recall not having this crash at other times, but with my current save I can reproduce it easily. I haven't yet tested to see if it is a mod interaction. I will report back if I find out more.

[00:04:19]: scripts/mainfunctions.lua(960,1) LUA ERROR stack traceback:
D:/SteamLibrary/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(960,1)
[00:04:19]: scripts/mainfunctions.lua(961,1) ...orkshop-1800299402/scripts/widgets/iteminfo_desc.lua:298: attempt to perform arithmetic on field 'HAMBAT_MIN_DAMAGE_MODIFIER' (a nil value)
LUA ERROR stack traceback:
D:/SteamLibrary/steamapps/common/dont_starve/data/../mods/workshop-1800299402/scripts/widgets/iteminfo_desc.lua:298 in (method) GetWeaponDamage (Lua) <290-304>
D:/SteamLibrary/steamapps/common/dont_starve/data/../mods/workshop-1800299402/scripts/widgets/iteminfo_desc.lua:553 in (method) AddWeaponRow (Lua) <552-573>
D:/SteamLibrary/steamapps/common/dont_starve/data/../mods/workshop-1800299402/scripts/widgets/iteminfo_desc.lua:759 in (method) UpdateInfo (Lua) <714-786>
D:/SteamLibrary/steamapps/common/dont_starve/data/../mods/workshop-1800299402/scripts/widgets/iteminfo_desc.lua:824 in (method) ShowInfo (Lua) <820-828>
D:/SteamLibrary/steamapps/common/dont_starve/data/../mods/workshop-1800299402/modmain.lua:117 in (method) OnGainFocus (Lua) <113-124>
D:/SteamLibrary/steamapps/common/dont_starve/data/scripts/widgets/widget.lua:474 in (method) SetFocusFromChild (Lua) <464-481>
D:/SteamLibrary/steamapps/common/dont_starve/data/scripts/widgets/widget.lua:498 in (method) SetFocus (Lua) <483-508>
D:/SteamLibrary/steamapps/common/dont_starve/data/scripts/frontend.lua:554 in (method) Update (Lua) <425-593>
D:/SteamLibrary/steamapps/common/dont_starve/data/scripts/update.lua:46 in () ? (Lua) <3-50>
[00:04:19]: scripts/frontend.lua(773,1) SCRIPT ERROR! Showing error screen
< >
正在显示第 1 - 4 条,共 4 条留言
Chris547 2020 年 1 月 21 日 下午 12:46 
This is easily reproduced by starting a DS-only world (with no DLC compatibility enabled) and c_give("hambat"). Any DLC combination I tried worked fine.
ramanD 2020 年 4 月 23 日 下午 4:01 
引用自 Chris547
This is easily reproduced by starting a DS-only world (with no DLC compatibility enabled) and c_give("hambat"). Any DLC combination I tried worked fine.

does this mean, I can not play vanilla with this mod?
Smoku Znad Potoku 2020 年 4 月 26 日 上午 4:00 
引用自 Bassmaen
引用自 Chris547
This is easily reproduced by starting a DS-only world (with no DLC compatibility enabled) and c_give("hambat"). Any DLC combination I tried worked fine.

does this mean, I can not play vanilla with this mod?

You can play Vanilla with this mod but you cannot build Hambat, otherwise it will crash your game :/
AlexWight 2023 年 2 月 7 日 下午 2:29 
Or you can find the mod in your steam directory: My path to this mod is as follows:
Steam\steamapps\common\dont_starve\mods\workshop-1800299402\scripts\widgets
Now you need to open the iteminfo_desc.lua file in a text editor.
Now go to lines #297...298.
In this line you will find the following lines:
damage = TUNING.HAMBAT_DAMAGE * self:GetPerishFreshness(inst)
damage = Remap(damage, 0, TUNING.HAMBAT_DAMAGE, TUNING.HAMBAT_MIN_DAMAGE_MODIFIER * TUNING.HAMBAT_DAMAGE, TUNING.HAMBAT_DAMAGE)

Now, if you want to play with this mod in vanilla, just delete line 298 and leave 297 in place.
You should get something like this
else
damage = TUNING.HAMBAT_DAMAGE * self:GetPerishFreshness(inst)
end
After this change you can play on vanilla and craft hambat, but damage displayed with this mod will be inaccurate. Because hambat on vanilla have constant damage.
For more accurate damage you can tune formula for yourself)
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50