Creative Mode (Fix for 0.16)


Based on the old Creative Mode mod created by Y.Petremann, then patched by Pac0master, and also the Test Mode mod created by rk84. By enabling Creative Mode in the game, you can access objects that can generate unlimited items, fluid or energy, or nullify them. Perfect for testing purpose or making initial setup for games. Quick patch for 0.16 until an official release - everything should work now.

Content
6 years ago
0.16
68
Cheats

b Instant Blueprint + Landfill

6 years ago
(updated 6 years ago)

As the title says, the game produces an error trying to place a blueprint of landfill. It has definitely worked in 0.16 with your fix in a SeaBlock game I started a while ago. The error, posted below, is a quick new game running Creative Mode and Landfill Painting. Using Bot Landfill instead produces the same error.

Error while running event creative-mode-fix::on_tick (ID 0)
Error while running event LandfillPainting::on_robot_built_tile (ID 47)
LandfillPainting/control.lua:20: attempt to index field 'item' (a nil value)
stack traceback:
creative-mode-fix/scripts/util.lua:159: in function 'raise_event'
creative-mode-fix/scripts/util.lua:251: in function 'raise_event_for_revived_tile_ghosts'
creative-mode-fix/scripts/util.lua:274: in function 'revive_tile_ghost_and_raise_event'
creative-mode-fix/scripts/cheats.lua:2800: in function 'tick'
creative-mode-fix/scripts/events.lua:177: in function <creative-mode-fix/scripts/events.lua:146>

Update: I found a post on r/factorio about this error starting in 0.16.18 with mods (Bot Landfill per the post) using the on_robot_built_tile event.

6 years ago

I may have fixed this; let me know if it keeps crashing and where, as there were a few spots that needed changing, and some of those spots had a large amount of abstraction so I may have made errors with the fix. The implemented fix is only a partial fix so far.

6 years ago

It works perfectly.Thanks.

New response