異星工廠 修改秘籍大全 背包物流電塔太陽能槍塔等
背包格子、物流機器人、電塔耗能+材料、石牆血量、太陽能板+蓄電池、槍塔等等~~修改!
本帖子內容基於三大媽0.94漢化版,其他版本不保證一定能找到相關程式碼下面修改涉及的檔案不保證其他修改會動到,為防止覆蓋掉你們其他修改功能,已修改的檔案我就不放了。
先來第一個:背包格子數
用記事本打開這個檔案
“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還會導致遊戲崩潰,怕壞了檔案所以這點沒做測試,各位慎改。
有圖有真相,為了截圖改的窗口模式,果斷看不到首位了。
應求給出修改是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"
}
}
)
槍塔修改
打開這個檔案
X:\Factorio\data\base\prototypes\entity\demo-turrets.lua
搜索ammo-turret往下看程式碼(雜項不改的部分我直接省略號了,直接往下找就行)
type = "ammo-turret",
name = "gun-turret",
icon = "__base__/graphics/icons/gun-turret.png",
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "gun-turret"},
max_health = 200,——》生命值
corpse = "small-remnants",
collision_box = {{-0.4, -0.9 }, {0.4, 0.9}},
selection_box = {{-0.5, -1 }, {0.5, 1}},
rotation_speed = 0.015,
preparing_speed = 0.08,——》這倆是旋轉速度跟瞄準速度,參考上面的雷射塔,建議改小,這貨的射擊頻率太低了
folding_speed = 0.08,——》折疊速度,同樣參考上面
dying_explosion = "huge-explosion",
inventory_size = 1,
automated_ammo_count = 10,
……
attack_parameters =
{
ammo_category = "bullet",
cooldown = 6,——》冷卻速度,也就是射速, 越小越快,原本的就很快了,還得考慮彈藥消耗的問題,改小的話建議搭配論壇裡的啟動器用,可以無限彈藥
damage_modifier = 2,——》雷射塔修改用到過的傷害放大,沒測試,你可以試試,這段程式碼需要自行添加
projectile_center = {0, 0.6},
projectile_creation_distance = 1.2,
shell_particle =
{……
},
range = 17,——》射擊距離,適當改大,25~30足夠了
太陽能板和蓄電池
E:\333\Factorio\data\base\prototypes\entity\entities.lua
type = "solar-panel",
name = "solar-panel",
icon = "__base__/graphics/icons/solar-panel.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "solar-panel"},
max_health = 100,
corpse = "big-remnants",
collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
energy_source =
{
type = "electric",
usage_priority = "primary-output"
},
picture =
{
filename = "__base__/graphics/entity/solar-panel/solar-panel.png",
priority = "high",
width = 104,
height = 96
},
production = "6000kW"
},
找下面這個檔案
X:\Factorio\data\base\prototypes\entity\entities.lua
這裡面有倆要改的,一個太陽能板一個蓄電池,就是建造的基礎電池。太陽能只管發電不管存儲到了晚上沒法發電的時候如果再沒有蒸汽機就會全面斷電。
所以,先來第一個
太陽能板
搜索solar-panel
{
type = "solar-panel",
name = "solar-panel",
icon = "__base__/graphics/icons/solar-panel.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "solar-panel"},
max_health = 100,
corpse = "big-remnants",
collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
energy_source =
{
type = "electric",
usage_priority = "primary-output"
},
picture =
{
filename = "__base__/graphics/entity/solar-panel/solar-panel.png",
priority = "high",
width = 104,
height = 96
},
production = "60kW"——》發電功率。為了足夠大,部門改成MW,數字隨意了,M部門比K部門天然大1000
},
然後是蓄電池,同樣這個檔案搜索basic-accumulator
type = "accumulator",
name = "basic-accumulator",
icon = "__base__/graphics/icons/basic-accumulator.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "basic-accumulator"},
max_health = 150,
corpse = "medium-remnants",
collision_box = {{-0.9, -0.9}, {0.9, 0.9}},
selection_box = {{-1, -1}, {1, 1}},
energy_source =
{
type = "electric",
buffer_capacity = "5MJ",——》電池容量,部門同樣改成GJ,數字要比上面的太陽能板大點,不然意義不大了就
usage_priority = "terciary",
input_flow_limit = "300kW",——》最大充電功率,如果跟容量數字相同就是秒衝滿,不過建議別那麽大,改成MJ就差不多了
output_flow_limit = "300kW"——》最大放電功率(自動調整),最好不要超過放電功率,不然白天沒法充電到了晚上一樣抓瞎,部門同樣改成MJ
},
科技消耗瓶子數量修改
一、採礦機
Factorio\data\base\prototypes\entity\demo-mining-drill.lua 採礦機檔案
兩種鑽頭 第一個basic-mining-drill是用電鑽頭,name = "burner-mining-drill"火鑽頭,燒煤的那種。
max_health = 100, 生命值
mining_speed = 採礦速度 數值越高採礦速度越快
energy_usage = 數值越小採礦耗費的能源越少
resource_searching_radius = 採礦範圍 數值越大採礦範圍越大
二、石頭熔爐
Factorio\data\base\prototypes\entity\demo-entities.lua
name = "stone-furnace" 石頭熔爐
smelting_energy_consumption = 功率 數值越小消耗燃料越少
smelting_speed = 熔煉速度 數值越大速度越快
三、升級少用藥瓶方法
Factorio\data\base\prototypes\technology\technology.lua 為升級科技所需藥瓶
將所有count 數量,修改為1 則所有升級所需藥瓶數量為1
需新建異星工廠遊戲,不支援存檔。
點擊進入3DMGAME《異星工廠》遊戲論壇專區