※/c系のコンソールコマンドを使用すると実績の解除ができなくなります。
チャットウインドウ(デフォルトでは@キー)に特定の文字列を入力することでコンソールコマンドが使えます。
チートの様に使える物もあるので乱用するとゲームに飽きるのが早くなるかもしれません。各自、気をつけて使って下さい。
ゲームのアップデートやMod導入の有無など、プレイ環境によってコマンドが使えない場合があります。
詳しい方はぜひコマンドの追加・編集をお願いします。
基本 
変数の値を表示する 
変数値を変更する前に初期値を調べておくと、戻す時に便利。
/c game.player.print(VARIABLE).
例:ゲーム速度の変数値を表示する
/c game.player.print(game.speed).
全ての変更を元に戻す 
テクノロジーや速度も含むが自チームのみ
/c game.player.force.reset()
レシピ・技術アンロック 
コマンドを使う前に使いたいレシピや技術の内部名称を調べておいてください。
Factorio\data\base\locale\ja内のbase.cfgのレシピなら[item-name]や[recipe-name]、
技術なら[technology-name]などで確認できます。
面倒なら英語名を小文字に直しスペースを-に置き換えれば一部を除き入力可能です。
個別のレシピ 
[""]内に開放したいレシピ名を入れる。
trueをfalseに変えるとレシピを削除出来る。
例:自チームの組立機2のレシピを開放
/c game.player.force.recipes["assembling-machine-2"].enabled = true
個別の技術 
['']内に技術名を入れる。
trueをfalseに変えると研究前の状態に出来る。
例:自チームの物流学3の技術を開放
/c game.player.force.technologies['logistics-3'].researched = true
個別の技術(∞研究) 
['']内に∞研究できる技術名を入れる。
例:自チームの掘削効率の∞研究を100にする。上限4294967295
/c game.player.force.technologies['mining-productivity-16'].level=100
全技術研究完了 
自チームの全技術研究完了
/c game.player.force.research_all_technologies()
全ての手作りのアイテムを解除 
自分が作成できるすべてのアイテムを材料無し、加工時間無しで入手できるようにする
/c game.player.cheat_mode = true
アイテムの手作りの速度変更 
自チームの全員のアイテムの手作りの速度変更
初期値1、2で速度2倍、etc.
/c game.player.force.manual_crafting_speed_modifier=X
鉱物・設置物の採掘速度変更 
自チームの全員の鉱物・設置物の採掘速度変更
初期値1、2で速度2倍、etc.
/c game.player.force.manual_mining_speed_modifier=X
アイテム個数変更 
指定したアイテムを好きな個数出す 
内部名称はFactorio\data\base\locale\ja内のbase.cfgの[item-name]などで確認するか、
ゲームの言語を英語に変えて目的のアイテムを探し、
大文字を小文字に変え半角スペースを-に置き換えて入力する。
例:車=car、銅鉱石=copper-ore、組立機3=assembling-machine-3
例外としてFlamethrower、Flamethrower ammo、Iron armor、
Regular magazine、Piercing rounds magazine、
Efficiency module、Shotgun shells、Piercing shotgun shells等がある
/c game.player.insert({ name = "欲しいアイテムの内部名称" , count = 個数 })
列車関連アイテム全種所持&無限化 
技術開発していなくても列車が使えるようになり、レールや機関車をいくら設置しても減らなくなる。
/c name={"locomotive" , "cargo-wagon" , "fluid-wagon" , "rail" , "train-stop" , "rail-signal" , "rail-chain-signal"} for _,n in pairs ( name ) do game.player.insert( {name = n , count = 5} ) end
script.on_event( defines.events.on_built_entity , function( event ) local p = game.players[event.player_index] for _ , n in pairs ( name ) do local c = p.get_item_count( n ) if ( c < 5 ) then p.insert( {name = n,count = 5 - c } ) end end end)
枯渇した資源を再生成する 
完全に掘り尽くした資源を再生成する。指定した資源がマップ上に残っている場合は無効。
/c game.regenerate_entity("再生成したい資源のエンティティ名")
資源を生成する 
自分を中心に、指定した資源を生成する。
OREの部分をiron-oreなど資源名に変える。Zで資源の個数、
rでプレイヤーの座標からどの程度の範囲で生成するかを指定する。
/c local r=5 local name="ORE" local amount=Z
local surface = game.player.surface local pos = game.player.position for y =pos.y-r, pos.y+r do for x = pos.x-r , pos.x+r do surface.create_entity({name=name, amount=amount, position={x,y}}) end end
ユーティリティ系 
ゲーム速度変更ボタン追加 
自分の画面の左上に速度変更ボタンを2つ追加する。TimeButtonsというModでも同じ事が出来る。
/c game.player.gui.top.add{type = "button" , caption = "1倍速" , name = "1x"} game.player.gui.top.add{type = "button" , caption = "2倍速" , name = "2x"} script.on_event( defines.events.on_gui_click , function( event ) local p = game.players[event.player_index] if ( event.element.name == "1x" ) then p.print( "1倍速" ) game.speed = 1 elseif ( event.element.name == "2x" ) then p.print( "2倍速" ) game.speed = 2 end end)
データロード後にボタンが無効になるため以下のコマンドを入力して再度有効化する必要がある。
/c script.on_event( defines.events.on_gui_click , function( event ) local p = game.players[event.player_index] if ( event.element.name == "1x" ) then p.print( "1倍速" ) game.speed = 1 elseif ( event.element.name == "2x" ) then p.print( "2倍速" ) game.speed = 2 end end)
ゲームの速度を変更する 
上記のシンプル版。初期値1で普通の速度、2ならば2倍。
/c game.speed = X
プレイヤー全員の体力が常に回復 
時間経過(1tick)するたびにプレイヤーの体力を100回復します。ただし、即死ダメージを受けると死にます。
ゲームが重くなる場合があります。
/c script.on_event( defines.events.on_tick , function( event ) for _ , p in pairs ( game.players ) do if( p.character ~= nil ) then p.character.damage( -100 , p.force) end end end)
プレイヤー無敵化 
自身の体力ゲージを無くし死なないようにします。
副次的効果としてプレイヤーがバイターの攻撃対象から外れます(近づく、攻撃する、巣を破壊など何をしても無視されます)。
/c game.player.character.destructible=false
自分の位置を確認 
/c game.player.print("("..game.player.position.x..", "..game.player.position.y..")")
自分の位置をテレポート 
/c game.player.teleport({X, Y})
常に昼時間にする 
自分の居るディメンションを常に昼時間にする
trueで常に昼時間になり、夜にならなくなる。falseで元に戻す。
/c game.player.surface.always_day=true
時間の流れを止める 
自分の居るディメンションの時間の流れを止める
ゲームは動作するが、進化ファクターの増加などが止まる。falseで元に戻す。
/c game.player.surface.freeze_daytime(true)
ピースフルモードにする 
ゲームの途中でピースフルモードにする。(0.13対応版)
ピースフルモードに変更し
全ての「敵」のモードになっているバイターを消去する
/c game.player.surface.peaceful_mode=true game.forces["enemy"].kill_all_units()
マルチプレイ関連 
他のプレイヤー全員を自分の位置にテレポートさせる 
/c local p = game.player for _ , player in pairs ( game.players ) do player.teleport( p.position , p.surface ) end
自チームのスポーン地点を変更する 
スポーン地点にしたい場所に移動して使用する。
/c local p = game.player p.force.set_spawn_position( p.position , p.surface )
その他 
一定時間ごとに敵が攻撃してくる 
一定時間ごとに敵の襲撃を受け、襲撃のたびに数が1匹ずつ増える。
(3*60*60)の数字が時間(tick)を、attack_count + 1の数字が1回ごとに増える数を意味する。
/c local targetselect = function(surface) local targets = {} for _ , player in pairs(game.players)do if player.surface == surface then table.insert(targets,player.character) end end if (#targets > 0)then return targets[math.random(#targets)] end return nil end script.on_event(defines.events.on_tick , function( event ) if(game.tick % ( 1 * 60 * 60 ) == 0) then if( attack_count ~= nil ) then attack_count = attack_count + 100 else attack_count = 500 end for _ , surface in pairs(game.surfaces)do local target = targetselect(surface) if ( target ~= nil ) then surface.set_multi_command{command = {type = defines.command.attack , target = target}, unit_count = attack_count} end end end end)
全てのバイターを消去 
enemyチームのすべてのユニット(巣、ワーム等)を消す。
/c local surface = game.player.surface for key, entity in pairs(surface.find_entities_filtered({force= "enemy"})) do entity.destroy() end
現在のバイターの進化ファクターの数値を表示 
※このコマンドは、/cは必要ありません。直接書いてください。
/evolution
巣の拡張を止める 
/c game.map_settings.enemy_expansion.enabled=false
進化ファクターの数値を変更 
Xは0.0から1.0の間の数値。
/c game.evolution_factor=X
バージョン0.15以降ではこちらを使用してください:
/c game.forces["enemy"].evolution_factor=X
強制的にマップを開く 
まだplayerチームが見ていない場所のマップを開く。座標は(-W,-X)~(Y,Z)の矩形。
※実行する前に、まず自分の位置の座標を確認するのがよい。
※一度行うと、元に戻せない。セーブデータの容量が増えるので、事前にデータをセーブした上で慎重に行うこと。
/c game.forces.player.chart(game.player.surface, {{x = -W, y = -X}, {x = Y, y = Z}})
開いたマップの情報を更新する 
プレイヤーやレーダーで既に開いているplayerチームのマップの各チャンクについて、
バイターの巣の情報などを更新する。
/c game.forces.player.rechart()
全マップを未探索状態に戻す 
プレイヤーやレーダーで既に開いているplayerチームのマップを
全て探索していない状態にする(完全に黒色にする)。
※ただし、地図情報は残る。つまりマップが黒くなるだけでセーブデータの容量が減る訳ではないので注意。
/c game.forces.player.clear_chart()
プレイヤーを中心に指定範囲のオブジェクトを消去する 
自分のX,Y座標を中心に、指定した範囲の全ての設置物を消去する。鉱物資源だけでなく、建物も含むので注意。
XPOS,YPOSで、プレイヤーのX,Y座標からどの程度の座標の範囲で消去するかを指定する。
/c for key, entity in pairs(game.player.surface.find_entities_filtered{ area={{game.player.position.x-XPOS, game.player.position.y-YPOS}, {game.player.position.x+XPOS, game.player.position.y+YPOS}}, name="ORE/OBJECT"}) do entity.destroy() end
巨大なスクリーンショットを撮影する 
例えば4000x4000ピクセルのSSを撮りたい場合、XPOS,YPOSに4000,4000を入れる。
撮影されたSSは、「mods」のフォルダ内にある「script-output」に保存される。
/c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}
自身の近くを埋め立てる 
自身を中心とした半径r以内にある水、もしくは深水タイルを草タイルへと置き換える
/c local r = 2 local tiles = {} local p = game.player.character.position local s = game.player.surface for x = p.x-r, p.x+r do for y = p.y-r, p.y+r do tilename = s.get_tile( x , y ).name if ( tilename == "deepwater" or tilename == "water" or tilename == "deepwater-green" or tilename == "water-green")then table.insert( tiles , { name = "grass-1" , position = { x = x , y = y }}) end end end s.set_tiles(tiles)
池を生成する 
プレイヤーの位置から左上に池を生成する。
w = 幅 h = 高さ tile_name = water(水) または deepwater が指定可能、sand-1 を指定すると砂地に埋め立てが可能です。
/c local w = 20 local h = 10 local tile_name = 'water' local tiles = {} local surface = game.player.surface local pos = game.player.position for y =pos.y-h-1, pos.y-1 do for x = pos.x-w , pos.x do table.insert(tiles,{name = tile_name, position={x,y}}) end end surface.set_tiles(tiles)
最新の10件を表示しています。 コメントページを参照