Страница 1 из 1
Factorio: Консольные команды
Добавлено: 22 окт 2018, 09:51
nucleon
Normal commands |
Command | Example | Description | Admin only |
/alerts <enable/disable/mute/unmute> <alert> | /alerts disable turret_fire | Enables, disables, mutes, or unmutes the given alert type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage. | No |
/clear | /clear | Clears the console. | No |
/color <color> | /color 20 255 255 100 | Изменяет цвет. Может быть либо одним из предварительно определенных цветов, либо значением RGBA в формате «# # # #». Доступные цвета: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid. | No |
/evolution | /evolution | Prints info about the alien evolution factor. | No |
/help [command] | /help | Prints a list of available commands, the optional argument can specify the command that should be described. | No |
/h [command] | /h | Same as /help. | No |
/mute-programmable-speaker <mute/unmute> <local/everyone> | /mute-programmable-speaker mute local | Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server. | No |
/perf-avg-frames <number> | /perf-avg-frames 100 | Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly. | No |
/permissions | /permissions | Opens the permissions GUI. | Yes |
/screenshot [x resolution] [y resolution] [zoom] | /screenshot | Takes a screenshot with the GUI hidden, centered on the player. It is saved in the "script-output" subfolder of your User data directory. Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1. | No |
/seed | /seed | Prints the starting map seed. | No |
/time | /time | Prints info about how old the map is. | No |
/toggle-action-logging | /toggle-action-logging | Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions. | Yes |
/toggle-heavy-mode | /toggle-heavy-mode | Used to investigate desyncs. Will slow down the game and make multiplayer unplayable. | Yes |
/toggle-rockets-sent-gui | /toggle-rockets-sent-gui | Toggles if the rockets sent button is shown in the upper left corner of the screen. | No |
/version | /version | Prints the current game version. | No |
[/b]
Re: Factorio: Консольные команды
Добавлено: 22 окт 2018, 15:09
nucleon
Multiplayer commands |
Command | Example | Description | Admin only |
<message> | Hello team! | Console input that does not start with / is shown as a chat message to your team. | No |
/admins | /admins | Prints a list of game admins. | No |
/ban <player> <reason> | /ban xTROLLx Throwing grenades in base | Bans the specified player. | Yes |
/banlist <add/remove/get/clear> <player> | /banlist get | Adds or removes a player from the banlist. Same as /ban or /unban. | No |
/config <get/set> <option> <value> | /config set password hunter2 | Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public. | Yes |
/delete-blueprint-library <player> | /delete-blueprint-library everybody confirm | Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players. | Yes |
/demote <player> | /demote AzureDiamond | Demotes the player from admin. | Yes |
/ignore <player> | /ignore Cthon98 | Prevents the chat from showing messages from this player. Admin messages are still shown. | No |
/ignores | /ignores | Prints a list of ignored players. | No |
/kick <player> <reason> | /kick xTROLLx Throwing grenades in base | Kicks the specified player. | Yes |
/mute <player> | /mute Cthon98 | Prevents the player from saying anything in chat. | Yes |
/mutes | /mutes | All players that are muted (can’t talk in chat). | No |
/open <player> | /open AzureDiamond | Opens another player’s inventory. | Yes |
/o <player> | /o AzureDiamond | Same as /open. | Yes |
/players [online/o/count/c] | /players | Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count) | No |
/promote <player> | /promote AzureDiamond | Promotes the player to admin. | Yes |
/purge <player> | /purge Cthon98 | Clears all the messages from this player from the chat log. | Yes |
/reply <message> | /reply oh, really? | Replies to the last player that whispered to you. | No |
/r <message> | /r oh, really? | Same as /reply. | No |
/server-save | /server-save | Saves the game on the server in a multiplayer game. | Yes |
/shout <message> | /shout Hello world! | Sends a message to all players including other forces. | No |
/s <message> | /s Hello world! | Same as /shout. | No |
/swap-players <player> [player] | /swap-players AzureDiamond | Swaps your character with the given player’s character, or if two players are given swaps the two player characters. | Yes |
/unban <player> | /unban xTROLLx | разбынивает указанного игрока | Yes |
/unignore <player> | /unignore Cthon98 | Позволяет чату показывать сообщения от этого плеера. | No |
/unmute <player> | /unmute Cthon98 | Позволяет игроку снова разговаривать в чате. | Yes |
/whisper <player> <message> | /whisper AzureDiamond thats what I see | Отправляет сообщение указанному игроку. | No |
/w <player> <message> | /w AzureDiamond thats what I see | Same as /whisper. | No |
/whitelist <add/remove/get/clear> [player] | /whitelist get | Добавляет или удаляет игрока из белого списка, в который могут присоединиться только игроки с белым списком. Введите «ничего» для «игрока» при использовании «get» для печати списка всех белых игроков. Пустой белый список отключает функцию «белый список», позволяющую любому присоединиться. | No |
[/b][/tr]
Re: Factorio: Консольные команды
Добавлено: 26 окт 2018, 12:47
nucleon
Scripting and cheat commands
Это очень мощная функция, которая также позволяет обманывать, и поскольку такие достижения будут окончательно отключены для сохранения, как только вы будете использовать команду сценария.
Command | Description |
/c <command> | Executes a Lua command. |
/command <command> | Executes a Lua command. |
/measured-command <command> | Executes a Lua command and measures time it took. |
/silent-command <command> | Executes a Lua command without printing it to the console. |
[/b]
Re: Factorio: Консольные команды
Добавлено: 26 окт 2018, 13:00
nucleon

Пример Базовых скриптов:
- Используйте скрипт как калькулятор
/c game.player.print(1234*5678)
- Zoom beyond normal bounds.
Обратите внимание, что слишком большое масштабирование может привести к поражению производительности. Быть осторожен.
/c game.player.zoom=0.1
- Mine faster
/c game.player.force.manual_mining_speed_modifier=1000
- Craft faster
/c game.player.force.manual_crafting_speed_modifier=1000
- Разблокировать и исследовать все технологии
/c game.player.force.research_all_technologies()
Отмените это с помощью команды в следующем разделе.
- Unresearch все технологии
Это не сбрасывает вручную применяемые бонусы
/c for _, tech in pairs(game.player.force.technologies) do
- tech.researched=false
game.player.force.set_saved_technology_progress(tech, 0)
end
- Reset your force
Это сбрасывает все данные для вашей силы, включая статистику убийств и производства, технологии, бонусы и статус графика.
/c game.player.force.reset()
- Всегда показывать визуализацию железнодорожного блока
Постоянно показывать визуализацию блока рельсов, а не только при удерживании сигнала рельса. Отключить, заменив true на false.
/c game.player.game_view_settings.show_rail_block_visualisation = true

Сценарии манипуляции с инвентаризацией:
- Cheat mode
Позволяет бесконечно свободно рисовать. Отключить, заменив true на false.
/c game.player.cheat_mode=true
- Заправить ресурсы (пополнить нефть, железо и т. Д.)
Удерживая курсор над игровой страницей в игре
/c game.player.selected.amount=7500
В качестве альтернативы вы можете пополнить все ресурсы на карте следующей командой. Измените ore.amount на желаемое значение.
/c surface = game.player.surface
for _, ore in pairs(surface.find_entities_filtered({type="resource"})) do
end
- Добавить предметы в инвентарь игрока.
Замените металлическую пластину внутренним именем желаемого элемента.
/c game.player.insert{name="iron-plate", count=100}
- Например, вот стопку интерфейса энергосистемы божественного режима:
/c game.player.insert{name="electric-energy-interface"}
- Добавьте мощную броню с оборудованием и некоторыми инструментами для строительства:
/c
local player = game.player
player.insert{name="power-armor-mk2", count = 1}
local p_armor = player.get_inventory(5)[1].grid
- p_armor.put({name = "fusion-reactor-equipment"})
p_armor.put({name = "fusion-reactor-equipment"})
p_armor.put({name = "fusion-reactor-equipment"})
p_armor.put({name = "exoskeleton-equipment"})
p_armor.put({name = "exoskeleton-equipment"})
p_armor.put({name = "exoskeleton-equipment"})
p_armor.put({name = "exoskeleton-equipment"})
p_armor.put({name = "energy-shield-mk2-equipment"})
p_armor.put({name = "energy-shield-mk2-equipment"})
p_armor.put({name = "personal-roboport-mk2-equipment"})
p_armor.put({name = "night-vision-equipment"})
p_armor.put({name = "battery-mk2-equipment"})
p_armor.put({name = "battery-mk2-equipment"})
player.insert{name="construction-robot", count = 25}
player.insert{name="blueprint", count = 3}
player.insert{name="deconstruction-planner", count = 1}
player.insert{name="steel-axe", count = 10}

Мировые сценарии манипуляции
- Показывать карту вокруг игрока
Показывает карту вокруг игрока, похожую на радар.
/c local radius=150
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})
или from start position
/c game.forces.player.chart(game.player.surface, {{x = -2000, y = -2000}, {x = 2000, y = 2000}})
Измените 150 на желаемый радиус, более высокие значения занимают больше времени.
Если отображается большая часть карты, она увеличивает размер файла сохранения. Следующая команда отменяет генерацию всех кусков, которые в настоящее время поставлены в очередь для генерации, и удаляет куски за пределами радиуса 32 кусков около 0,0. Обратите внимание, что это приведет к удалению объектов игрока, если они есть на этих кусках.
/c
local surface = game.player.surface;
game.player.force.cancel_charting(surface);
local chunk_radius = 32;
for chunk in surface.get_chunks() do
- if (chunk.x < -chunk_radius or chunk.x > chunk_radius or chunk.y < -chunk_radius or chunk.y > chunk_radius) then
- surface.delete_chunk(chunk)
end
end
- Выключить ночь
Включает вечный день.
/c game.player.surface.always_day=true
- Изменение скорости игры
- 0,5 - половина скорости,
1 - по умолчанию,
2 - двойная скорость и т. Д.
Минимум - 0,01.
Это можно использовать для многих вещей, например, когда вы знаете, что вам нужно будет долго ждать, чтобы что-то закончилось. Увеличение приведет к снижению производительности, будьте осторожны.
/c game.speed=X
- Expensive (marathon) or normal mode
Для перехода от обычного к дорогостоящему режиму (это изменяет стоимость исследования и промежуточную стоимость продукта)::
/c game.difficulty_settings.recipe_difficulty=1
game.difficulty_settings.technology_difficulty=1
game.difficulty_settings.technology_price_multiplier=4
To change back to normal:
/c game.difficulty_settings.recipe_difficulty=0
game.difficulty_settings.technology_difficulty=0
game.difficulty_settings.technology_price_multiplier=1
- Freeze time
Останавливает продвижение времени, если вы замените «BOOL» на «true» или размораживаете его, если вы замените его «false».
/c game.player.surface.freeze_daytime=BOOL
- Удалить все загрязнения
/c game.player.surface.clear_pollution()
- Полностью отключить загрязнение
/c
for _, surface
in pairs(game.surfaces)
do
- surface.clear_pollution()
end
game.map_settings.pollution.enabled = false
- Добавить много загрязнений
/c game.player.surface.pollute(game.player.position, 1000000)
- Disable friendly fire for your force
/c game.player.force.friendly_fire = false
- Add new resource patch
Это создает новый 11 × 11 патч ресурсов, ориентированный на характер игрока, где земля не является водой. Патч, который он создает, идеально квадратный, но он рандомизирует количество, подобное естественной генерации, с меньшим количеством руды по краям и большим количеством руды в центре. Номера по умолчанию приводят к патчу с 2500-3000 рудами.
Если вы хотите увеличить патч, измените «local size = 5» на большее число. У большего патча будет экспоненциально больше руды. Ввод числа выше 30 не рекомендуется.
Если вы хотите получить более богатый патч, измените «локальную плотность = 10» на большее число. Ввод очень большого количества не должен повредить ничего, но вам, вероятно, не нужно идти выше 100.
Чтобы выбрать, какой ресурс порожден, измените «камень» ("stone") у основания на «железную руду» ("iron-ore"), «медь-руду»("copper-ore"), «уголь»"coal" или «урановую руду» ("uranium-ore").
/c
local surface=game.player.surface
local ore=nil
local size=5
local density=10
for y=-size, size
do
- for x=-size, size do
- a=(size+1-math.abs(x))*10
b=(size+1-math.abs(y))*10
if a<b then
- ore=math.random(a*density-a*(density-8), a*density+a*(density-8))
end
if b<a then
- ore=math.random(b*density-b*(density-8), b*density+b*(density-8))
end
if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with("ground-tile") then
surface.create_entity({name="stone", amount=ore, position={game.player.position.x+x, game.player.position.y+y}})
end
end
end
- Add new oil patch
Это создает 9 пластов сырой нефти в квадрате 3 × 3.
/c for y=0,2 do
- for x=0,2 do
- game.player.surface.create_entity({name="crude-oil", amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})
end
end
или случайным образом без какого-либо столкновения:
/c local position=nil
for i=1,9 do
- position=game.player.surface.find_non_colliding_position("crude-oil", game.player.position, 0, i/2+1.5)
if position then
- game.player.surface.create_entity({name="crude-oil", amount=5000, position=position})
end
end
- Опорожнение всех труб, подземных труб и насосов
Полезно, когда трубы содержат жидкость, которую вы не хотите.
/c local surface = game.player.surface
local deleted=0
for key, entity in pairs(surface.find_entities_filtered({force=game.player.force})) do
- if string.find(entity.name, "pipe") or
- string.find(entity.name, "pump")
then
- for i=1,#entity.fluidbox do
- deleted = deleted + 1
entity.fluidbox = nil;
end
end
end
game.player.print("Fluids removed from "..deleted .." entities")
- Отключение генерации скалы
Устанавливает размер «none». Эффективен только для кусков, которые генерируются после использования этой команды.
Используйте #Remove all cliffs для удаления существующих скал.
/c local mgs = game.player.surface.map_gen_settings
mgs.cliff_settings.cliff_elevation_0 = 1024
game.player.surface.map_gen_settings = mgs
- Удалить все скалы (#Remove all cliffs)
Удаляет все утесы, существующие утесы из мира. Используйте #Turn off cliff generation, чтобы отключить создание скалы в новых кусках.
/c for _, v in pairs(game.player.surface.find_entities_filtered{type="cliff"}) do
end

Враждебные / эволюционные сценарии
- Установить коэффициент эволюции
Диапазон от 0 (новая игра) до 1.
/c game.forces["enemy"].evolution_factor=X
- Отключить эволюцию, основанную на времени, и увеличить эволюцию, основанную на загрязнении
/c game.map_settings.enemy_evolution.time_factor=0
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2
«2» в конце последней команды удваивает коэффициент загрязнения по умолчанию. Вы можете заменить другое число, чтобы увеличить (или уменьшить) коэффициент загрязнения
- Kill all biters on the "enemy" force
Обратите внимание, что это убьет только мобильные юниты, производители не будут убиты.
/c game.forces["enemy"].kill_all_units()
- Kill all enemies
Это убьет все ракеты, базы и черви. Все, что является врагом, будет полностью уничтожено.
Это касается только врагов в исследуемом мире, поэтому любые неисследованные части карты, которые все еще должны быть созданы, по-прежнему будут иметь врагов.
/c local surface=game.player.surface
for key, entity in pairs(surface.find_entities_filtered({force="enemy"})) do
end
- Enable/Disable peaceful mode
Включение мирного режима предотвращает атаки кусак, пока они не спровоцированы.
Заменить true для false для отключения.
Эта атака уже не влияет на уже существующие битеры, так что атаки могут продолжаться некоторое время после активации мирного режима.
/c game.player.surface.peaceful_mode = true
- Enable/Disable biter expansion
Экспансия кусак, позволяет кусакам создавать новые гнезда, он включен по умолчанию. Заменить true для false для отключения.
/c game.map_settings.enemy_expansion.enabled = true
Re: Factorio: Консольные команды
Добавлено: 26 окт 2018, 17:06
nucleon

Player character scripts
Команды, касающиеся игрока напрямую
- Get player position
Выводит координаты текущей позиции.
/c game.player.print(game.player.position.x .. ", " .. game.player.position.y)
- Teleport player
Перемещает игрока в указанное место. Вы должны иметь возможность телепортироваться к определенному игроку, если вы получаете их координаты через них, выполняя предыдущую команду и предоставляя их вам.
/c game.player.teleport({X, Y})
Чтобы телепортироваться в мировое начало, используйте 0,0.
- Enable god mode
Режим God удаляет персонажа вашего игрока, позволяя вам преодолевать препятствия и не наносить никакого урона.
Отключите свои элементы управления от игрока:
/c game.player.character=nil
Затем наведите указатель мыши на бесполезного игрока и уничтожьте его, набрав:
/c game.player.selected.destroy()
Чтобы отменить, создайте персонаж игрока. Это приведет к появлению нового игрока в точке появления в мире и подключит к нему свои элементы управления.
/c game.player.create_character()

Research scripts / Сценарии исследований
- Включить более быстрое исследование
/c game.player.force.laboratory_speed_modifier=1
1 - нормальная скорость, 2 - двойная скорость 3 - тройная и т. Д.
- Изучение технологии
Названия внутренних технологий можно найти в инфобоксах на соответствующих страницах.
/c game.player.force.technologies['electric-energy-distribution-1'].researched=true
/c game.player.force.technologies['steel-processing'].researched=true
- "забыть" конкретные научные технологий
Названия внутренних технологий можно найти в инфобоксах на соответствующих страницах.
/c game.player.force.technologies['electric-energy-distribution-1'].researched=false; game.player.force.set_saved_technology_progress('electric-energy-distribution-1', 0)
/c game.player.force.technologies['steel-processing'].researched=false; game.player.force.set_saved_technology_progress('steel-processing', 0)
- Включение конкретных рецептов
Внутренние названия рецептов / элементов можно найти в инфобоксах на соответствующих страницах.
/c game.player.force.recipes["electric-energy-interface"].enabled=true
/c game.player.force.recipes["rocket-silo"].enabled=true
/c game.player.force.recipes.loader.enabled=true
- Enable all recipes / Включить все рецепты
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end