來源:3DM
作者:phantomyao
先來第一個:背包格子數
用記事本打開這個檔
“X:\Factorio\data\base\prototypes\entity\demo-entities.lua”
搜索player找到下面這堆代碼,修改紅色字體部分即可
type = “player”,
name = “player”,
icon = “__base__/graphics/icons/player.png”,
flags = {“pushable”, “placeable-player”, “placeable-off-grid”, “breaths-air”, “not-repairable”},
max_health = 100,
healing_per_tick = 0.5,
collision_box = {{-0.2, -0.2}, {0.2, 0.2}},
selection_box = {{-0.4, -1.4}, {0.4, 0.2}},
crafting_categories = {“crafting”},
mining_categories = {“basic-solid”},
inventory_size = 60,
running_speed = 0.3,
distance_per_frame = 0.13,
maximum_corner_sliding_distance = 0.7,
subgroup = “creatures”,
order=”a”,
建議不要修改過大,我自己改成了240,因為沒有捲軸,我1920*1080解析度的螢幕必須全屏才能看完。
另外理論上改成超過255還會導致遊戲崩潰,怕壞了檔案所以這點沒做測試,各位慎改。
有圖有真相,為了截圖改的視窗模式,果斷看不到首位了
應三樓同志的要求給出”stardv“同志的帖子地址,他的修改是9999疊加
http://bbs.3dmgame.com/thread-4262139-1-1.html
第二個,物流機器人和施工機器人
物流機器人在這個檔
“X:\Factorio\data\base\prototypes\entity\entities.lua”
搜索logistic-robot(物流機器人)找到下面這堆代碼,修改紅色字體部分即可
type = “logistic-robot”,
name = “logistic-robot”,
icon = “__base__/graphics/icons/logistic-robot.png”,
flags = {“placeable-player”, “player-creation”, “placeable-off-grid”, “not-on-map”},
minable = {hardness = 0.1, mining_time = 0.1, result = “logistic-robot”},
max_health = 100, ——》最大血量
collision_box = {{0, 0}, {0, 0}},
selection_box = {{-0.5, -1.5}, {0.5, -0.5}},
max_payload_size = 1,
speed = 1, ——》移動速度,改大(傳送帶?啥玩意?)
transfer_distance = 0.5,
max_energy = “300kJ”, ——》能量儲備,不要動,可以稍微改小,kj 是千 j,去掉k直接縮小1000倍單位,下同
energy_per_tick = “0.001J”, ——》目測是每次停靠箱子時的耗能,改小並且去掉K
energy_per_move = “0.001J”, ——》關鍵:每移動1m消耗能量,改小同上
min_to_charge = 0.002, ——》最小能量回充時間,改小
max_to_charge = 0.095, ——》最大能量回充時間,改小
ps1,機器人的修改一定要留意,速度別修改太快,不然耗電依舊很快,這玩意充電的時候會嚴重加大電網負荷,切記
PS2,在這段代碼下面緊挨著的就是施工機器人,代碼相同,改的地方也一樣
然後是小牆牆~
石牆也在這個檔
“X:\Factorio\data\base\prototypes\entity\entities.lua”
搜索“wall”找到下面代碼
type = “wall”,
name = “wall”,
icon = “__base__/graphics/icons/wall.png”,
flags = {“placeable-neutral”, “player-creation”},
collision_box = {{-0.49, -0.49}, {0.49, 0.49}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
minable = {mining_time = 1, result = “wall”},
max_health = 35000,——》血量,原版350
corpse = “wall-remnants”,
重頭戲:電塔耗能修改,讓石牆見鬼去吧,爺就是要用電塔當圍牆!
電塔在這個檔
“X:\Factorio\data\base\prototypes\entity\turrets.lua”
搜索“electric-turret”找到關鍵代碼,吐槽一句,這貨代碼很長,不需要改的地方不少,我揀關鍵的貼上來,省略部分用……代替
type = “electric-turret”,
name = “laser-turret”,
icon = “__base__/graphics/icons/laser-turret.png”,
flags = { “placeable-player”, “placeable-enemy”, “player-creation”},
minable = { mining_time = 0.5, result = “laser-turret” },
max_health = 250,——》血量
corpse = “small-remnants”,
collision_box = {{ -0.4, -0.4}, {0.4, 0.4}},
selection_box = {{ -0.4, -0.4}, {0.4, 0.4}},
rotation_speed = 0.01,——》回轉速度
preparing_speed = 0.05,——》準備速度 PS:吐槽一下這個命名,搞不懂是嘛玩意,要麼是回轉後的發呆時間、要麼就是射擊間隔,反正我沒改,誠聘小白鼠~
dying_explosion = “huge-explosion”,
folding_speed = 0.05,——》折疊速度,炮臺會自動收起來,這個是展開與折疊狀態的切換速度
ammo_type =
{
……
energy_consumption = “0.001J”,——》關鍵:能量消耗,看到我改多小了吧?
……
},
energy_source =
{
type = “electric”,
buffer_capacity = “1J”,——》緩衝能量:理解為小電池吧,改小
input_flow_limit = “0.12W”,——》充能速度:給上面充能的,改小
drain = “0.006W”,——》固定佔用電量值,改小
PS:這三個是關鍵的耗電環節,第三個是不開火情況下消耗的能量,開火時是要消耗能量,射擊後通過第二個來充電,這個充電是額外的,電塔耗電兇殘也就是關鍵的第二個。第一個不清楚是不是每次射擊時預先儲備的微電池電量,穩妥起見一併改小,萬一真是,下面充電速度那麼慢電塔就要大喘氣了。
usage_priority = “primary-input”
},
……
attack_parameters =
{
ammo_category = “electric”,
cooldown = 20,
damage = 2,——》沒試出來這貨能幹嘛,不知道是不是基礎傷害值
damage_modifier = 2,——》這個原文沒有,自行添加。傷害加成,1是1倍
projectile_center = {0, 0},
projectile_creation_distance = 0.6,
range = 25,——》射程,涉及距離儘量不要超過255
……
}
},
福利:電塔製造材料修改
製造材料資料夾在X:\Factorio\data\base\prototypes\recipe
這個資料夾下面的都是製造清單,有(kan)時(hui)間(fu)我會繼續更新材料表,今天就先上個電塔的
打開X:\Factorio\data\base\prototypes\recipe\turret.lua看到下面的代碼
data:extend(
{
{
type = “recipe”,
name = “laser-turret”,
enabled = “false”,
energy_required = 5,
ingredients =
{
{“steel-plate”, 5}, ——》鋼條:替換為【{“iron-plate”, 5},】鐵板5個,注意逗號
{“electronic-circuit”, 5},——》綠電板:幹掉
{“battery”, 3} ——》電池:留著意思意思,好歹是高級貨PS:注意每行後面的英文逗號,最後一行不加
},
result = “laser-turret”
}
}
)