Creative Mod

by jodli

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. Quick patch for 0.17 until an official release - if ever...

Content
3 months ago
0.17 - 1.1
79.9K
Cheats

b Crash on mining item-on-ground

10 months ago
Error while running event creative-mod::on_player_mined_entity (ID 67)
LuaItemStack API call when LuaItemStack was invalid for read.
stack traceback:
  [C]: in function '__index'
  __creative-mod__/scripts/events.lua:706: in function <__creative-mod__/scripts/events.lua:691>
  (...tail calls...)
  __creative-mod__/scripts/events.lua:1283: in function <__creative-mod__/scripts/events.lua:1257>
9 months ago

Event isn't checking that the item stack is valid_for_read prior to trying to print it's parameters - since it starts empty in the event (you're supposed to fill it yourself if you want to alter the items it gives) it can't be read.

Fix is fairly easy, just need to replace the message printing with :

        if stack.valid_for_read then
            message = message ..
                ', stack = {type = "' .. stack.type .. '", name = "' .. stack.name .. '", count = ' ..
                stack.count .. "}"
        else
            message = message ..
                ', stack.valid_for_read = false'
        end

that way if its not valid it'll just note it. If another mod has already altered the item stack because it's on_player_minded_entity ran first it should list what items were added (if i'm remembering how Factorio events work).

3 months ago

I've uploaded a new release for 1.8.2 that contains a fix for this problem.
Thanks to Silari! <3

This thread has been locked.