本篇教程由作者设定未经允许禁止转载。

效果图展示

基于SFM的赛特斯自增可堆叠扩展方案-第1张图片

基于SFM的赛特斯自增可堆叠扩展方案-第2张图片


写在前面

  1. 由于偷懒的缘故,所以并不会对机器区分输入或输出,所以会把需要设置输出或输出的机器全部设置为顶部输入/输出(能量也是)

  2. a机器用于合成赛特斯

  3. b机器用于粉碎赛特斯得到赛特斯粉

  4. c机器用于充能赛特斯

  5. 后缀带in/out的就是对应机器的出入口缓存

  6. 点亮机器需提前准备好128赛特斯,部署机器完成后把128赛特斯放到a-cache

  7. 上面的截图少了out输出的标签,自行加上


正文时刻

-- 传电
every tick do
    input fe:: from power top side
    output fe:: to each fe top side
end

-- 传水
every 20ticks do
    input fluid:: from water top side
    output fluid:: to each a top side
    output fluid:: to each c top side
end

-- 判断总赛特斯>=128的时候给a-in和b-in各分配64(堆叠起来后可以多分点),后期可以把上面的判断值拉大
-- 比如拉到(128->2048和64->1024),我堆叠了12*12能刚好拉满(注意耗电)
-- 此时会存在一个bug,output给b-in的数值大于64时会出现配不平的情况(不知道什么情况)
-- 下面的128和64改与不改有两种方案,测试改了会有问题(应该是抽屉限制了64)
--         方案1:不改,只需要把这一段代码(从every 20ticks do到end)复制粘贴多几遍就好
--         方案2:把b-in/out和c-in/out从抽屉改成桶,就可以相应的把下面的128和64改掉了
-- every 20ticks do
--     if "a-cache" has >= 2048 then
--     if ( "b-in" has <= 1024 ) and ( "b-out" has <= 1024) then
--     if  ( "c-in" has <= 1024 ) and ( "c-out" has <= 1024 ) then
--         input 128 from "a-cache" top side
--         output 64 to "b-in" top side
--         output 64 to "c-in" top side
--     end
--     end
--     end
-- end
every 20ticks do
    if "a-cache" has >= 128 then
    if ( "b-in" has <= 64 ) and ( "b-out" has <= 64) then
    if  ( "c-in" has <= 64 ) and ( "c-out" has <= 64 ) then
        input 128 from "a-cache" top side
        output 64 to "b-in" top side
        output 64 to "c-in" top side
    end
    end
    end
end

-- 从b-in拉取物品到b生产赛特斯粉,从b拉取产物到b-out
every 20ticks do
    input from "b-in" top side
    -- 终极粉碎机可以同时处理9个物品,每台机器保持9个即可
    output retain 9 to each b top side
end
every 20ticks do
    input from each b top side
    output to "b-out" top side
end

-- 从c-in拉取物品到c生产充能赛特斯,从c拉取产物到c-out
every 20ticks do
    input from "c-in" top side
    output retain 64 to each c top side
end
every 20ticks do
    input from each c top side
    output to "c-out" top side
end

-- 从b-out和c-out中各拉取16个物品生产赛特斯
-- a中有可能物品数量不对导致没有进行生产物品,但是不要慌。
-- 因为每次从a-cache分配出去的数量都是配平的,并且还有`retain 16 each`确保每个机器都只包含16个b/c的产品,所以不会导致卡配方的情况
every 20ticks do
    input from "b-out" top side
    output retain 16 each to each a top side
end
every 20ticks do
    input from "c-out" top side
    output retain 16 each to each a top side
end

-- 把a生产的赛特斯挪回a-cache
every 20ticks do
    input from each a top side
    output to "a-cache" top side
end

-- 最后就是当a-cache累计到了一定量之后把产物移到out上
-- out才是真正可以供我们平常使用的量
-- 切勿直接拿取a-cache的赛特斯使用
-- 后期产出量大以后会跟不上输出,同样复制粘贴多几遍就好
every 20ticks do
    -- 1128随便改成啥都行,确保a-cache剩余128即可
    -- 因此不建议把1128设置成太低
    if "a-cache" has > 1128 then
        input from "a-cache" top side
        output 100 to out top side
    end
end


如果觉得上面代码还是不够快,不够疯狂,代码不够短,那就试试下面的代码(只适用于已经有一定量赛特斯后使用)

原理:把强制配平的b-in/out和c-in/out给取消掉,直接从a-cache发给b和c(前期量不够的情况下使用下面的代码大概率会卡住)

every tick do
    input fe:: from power top side
    output fe:: to each fe top side
end

every 20ticks do
    input fluid:: from water top side
    output fluid:: to each a top side
    output fluid:: to each c top side
end

every 20ticks do
    input from "a-cache" top side
    output retain 18 to each b top side
    output retain 64 to each c top side
end

every 20ticks do 
    input from each b top side
    input from each c top side
    output retain 16 each to each a top side
end

every 20ticks do
    input from each a top side
    output to "a-cache" top side
end

every 20ticks do
    if "a-cache" has > 16384 then
        input from "a-cache" top side
        output 128 to out top side
    end
end