Luaコンソール(チャット欄)からコマンドを実行することができる
コンソール表示はデフォルトで @(Windows) ^(Linux)
変更は「キーコンフィグ」「ゲーム内操作」「Luaコンソールの表示切り替え」(@はat、^はasciicircumと表示)
コマンド
- /c <command> LUAコマンドを実行する(許可されていれば)
- /players プレイヤー一覧を表示
- /w <player> <message> 指定プレイヤーにメッセージを送信する
- /r <message> ささやきを返信する
- /h ヘルプを表示
LUAコマンドの一部
数値は 0x** で16進数表記可能スピード系は1が基本速度
アイテム名は英語
マルチ使用の複数プレイヤー存在データでは game.player を game.local_player に
- 計算を行う
/c game.player.print(1234 * 5678) - バイターの進化の度合いを表示
/c game.player.print(game.evolution_factor) - 画面ズーム
小さい値を指定すると通常より広い範囲まで表示可能
/c game.player.zoom = 0.1 - プレイヤーカラー変更
/c game.player.color={r=255, g=50, b=200, a=.9} - オフラインプレイヤーのデータ削除
/c game.removeofflineplayer("username") - ピースフルモード変更
変更後も既存の敵は攻撃してくるので必要ならバイターを殺すコマンドも実行する
ピースフルモードをオフにした場合は既存の敵も即攻撃してくる
/c game.peaceful_mode=true - バイターの進化の度合いを変更
/c game.evolution_factor=0.5 - 動いてるバイターを殺す
/c game.forces['enemy'].kill_all_units() - 常に昼になる
/c game.always_day=true - ゲーム進行速度変更
/c game.speed=2 - 指定範囲の視界を得る
/c game.forces.player.chart(game.player.surface,{lefttop={x=-512, y=-512}, rightbottom={x=512, y=512}}) - インベントリにアイテムを加える
/c game.player.insert{name="iron-plate",count=100} - 資源の量変更
原油・鉄鉱石等にカーソルを合わせた状態で
/c game.player.selected.amount=1000 - 資源を生成
/c game.surfaces.nauvis.create_entity({name="stone",amount=1000,position={game.player.position.x,game.player.position.y}}) - 特定の研究を終了させる
/c game.player.force.technologies['electric-energy-distribution-1'].researched=true - すべての研究を終了させる
/c for n,t in pairs(game.player.force.technologies) do t.researched=t.enabled end - 手動採掘速度変更
/c game.player.force.manual_mining_speed_modifier=10 - 手動アイテム制作速度変更
/c game.player.force.manual_crafting_speed_modifier=10 - 研究速度変更
/c game.player.force.laboratory_speed_modifier=10 - コマンド作成
例)game.player.print()の働きをするprint()というコマンドを作成
/c print = function(text) game.player.print(text) end - ループ処理
/c for x=-2,2 do game.player.print(x) end