《饥荒》普通背包数据修改方法(包含位置/尺寸)

《饥荒》普通背包数据修改方法(包含位置/尺寸)

《饥荒》游戏中如何修改背包数据(位置/尺寸)?下面给大家带来玩家分享的修改方法,有兴趣的玩家们可以参考尝试一下。

首先是大家都知道的,文件位置:data\DLC0001\scripts\prefabs\backpack.lua,不开DLC则是data\ scripts\prefabs\backpack.lua

下面是原始数据:

for y = 0, 3 do

table.insert(slotpos,Vector3(-162, -y*75 + 114 ,0))

table.insert(slotpos,Vector3(-162 +75, -y*75 + 114 ,0))

一、每列(竖)格数的修改

for y = 0, 3 do 代表 3+1-0=4格

for y = 1, 5 do 代表 5+1-1=5格

(数字可以是负数,一下通用)

二、列数及列距修改

table.insert(slotpos, Vector3(-162, -y*75 +114 ,0))

table.insert(slotpos, Vector3(-162 +75,-y*75 + 114 ,0))

代表两列

table.insert(slotpos, Vector3(-162, -y*75 +114 ,0))

table.insert(slotpos, Vector3(-162 +75,-y*75 + 114 ,0))

table.insert(slotpos, Vector3(-162 +150,-y*75 + 114 ,0))

table.insert(slotpos, Vector3(-162 +225,-y*75 + 114 ,0))

代表四列,几列就几行,列距是+75,这个数字的正号代表下一列在位置参考列的右边

三、行距

table.insert(slotpos, Vector3(-162, -y*75 +114 ,0))

table.insert(slotpos, Vector3(-162 +75,-y*75 + 114 ,0))

中-y*75的75代表行距

四、位置

这个位置虽然每一行数据都修改,但是都代表第一列的参考位置

table.insert(slotpos, Vector3(-162, -y*75 +114 ,0))

table.insert(slotpos, Vector3(-162 +75,-y*75 + 114 ,0))

-162代表水平位置,负是左,这个值一般不设正值,因为-50左右就是右边边界了

+ 114代表垂直位置,正是上负是下。

觉得我讲的不清楚的可以直接看数据对应图片,理解起来应该是十分容易的

数据

for y = 1, 3 do

table.insert(slotpos, Vector3(-600, -y*78 + 100 ,0))

table.insert(slotpos, Vector3(-600 -75, -y*78 + 200 ,0))

table.insert(slotpos, Vector3(-600 -150, -y*78 + 300 ,0))

table.insert(slotpos, Vector3(-600 -225, -y*78 + 400 ,0))

table.insert(slotpos, Vector3(-600 -300, -y*78 + -100 ,0))

table.insert(slotpos, Vector3(-600 -375, -y*78 + -200 ,0))

table.insert(slotpos, Vector3(-600 -450, -y*50 + 100 ,0))

table.insert(slotpos, Vector3(-600 -525, -y*50 + 100 ,0))

table.insert(slotpos, Vector3(-600 -600, -y*100 + 200 ,0))

table.insert(slotpos, Vector3(-600 -675, -y*100 + 200 ,0))

end

图片

✨ 相关推荐

怪物猎人OL 大名盾蟹怎么打 大名盾蟹打法介绍
det365在线平台

怪物猎人OL 大名盾蟹怎么打 大名盾蟹打法介绍

📅 06-27 👀 9126
英雄联盟:劫的三大克星,对阵的第一名全方面压制劫!
2006年德国世界杯介绍
det365在线平台

2006年德国世界杯介绍

📅 06-27 👀 4435