代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
1
2二十三.背包格子增大至39格
3
4 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/backpack.lua文件,
5
6 1.将下列内容:
7
8for y = 0, 3 do
9 table.insert(slotpos, Vector3(-162, -y*75 + 114 ,0))
10 table.insert(slotpos, Vector3(-162 +75, -y*75 + 114 ,0))
11
12 替换为:
13
14for y = 0, 12 do
15 table.insert(slotpos, Vector3(-162, -y*75 + 350 ,0))
16 table.insert(slotpos, Vector3(-162 +75, -y*75 + 350 ,0))
17 table.insert(slotpos, Vector3(-162 +150, -y*75 + 350 ,0))
18
19 2.将下列内容:
20
21 inst.components.container.widgetanimbank = "ui_backpack_2x4"
22 inst.components.container.widgetanimbuild = "ui_backpack_2x4"
23 inst.components.container.widgetpos = Vector3(-5,-70,0)
24
25 替换为:
26
27 --inst.components.container.widgetanimbank = "ui_backpack_2x4"
28 --inst.components.container.widgetanimbuild = "ui_backpack_2x4"
29 inst.components.container.widgetpos = Vector3(-25,-50,0)
30
31 即可让普通背包格子增大至39格.将游戏设置(options) - (Settings) - HUD size项设为0,即显示最小物品条,才可完整显示