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
4 months ago
0.17 - 1.1
80.0K
Cheats

g Error loading Creative mod

4 years ago
(updated 4 years ago)

getting the following error loading the creative mod
Error ModManager.cpp:1385: Error while loading item prototype "creative-mod_enemy-object_colossal-biter" (item): Key "icon" not found in property tree at ROOT.item.creative-mod_enemy-object_colossal-biter
Modifications: Creative Mod. Using 18.4.

logs

https://pastebin.com/49uXPqS2

4 years ago
(updated 4 years ago)

Something similar:

   9.627 Mods to disable:Failed to load mods: The given sprite rectangle (left_top=0x0, right_bottom=64x64) is outside the actual sprite size (left_top=0x0, right_bottom=32x32).
If this is being used as an icon you may need to define the icon_size property.: __Natural_Evolution_Buildings__/graphics/icons/behemoth-biter_32.png

Mods to be disabled:
• creative-mod

The only place where that file is referenced in Natural Evolution Buildings is this:

  {
    type = "unit",
    name = "tame-behemoth-biter",
        order = "204",
    icon = "__Natural_Evolution_Buildings__/graphics/icons/behemoth-biter_32.png",
    icon_size = 32,
    […]
  },

It seems your mod copies entities of type "unit" and sets their icon_size to 64 in data-final-fixes.lua:

local function clone_enemy_entities_in_data_raw_and_create_recipe(raw_name)
[…]
                if
                    (raw_name == "unit" and has_spawner_for_enemy_unit(entity)) or
                            (raw_name ~= "unit" and not has_item_for_enemy_entity(entity))
             then
[…]
                       -- Create item for the entity.
                    table.insert(
                            new_data,
                            {
                                    type = "item",
                                    name = item_name,
                                    localised_name = entity_localised_name, -- Item does not know the entity's custom localised name, so we have to also use custom localised name for it.
                                    icon_size = 64,
                                    icon_mipmaps = 4,
                                    icon = entity.icon,
[…]

This doesn't work if the original icon has a smaller size. Obviously, the easiest fix would be to use 64x64 icons in NE. However, I don't have access to the sources of the graphics, and scaling up a 32x32 icon from PNG won't give nice results. So it would be nice if you could add a check for the original icon_size before changing it to something bigger.

4 years ago

It would also be nice if it made a check for composite graphics using the "icons" (rather then "icon") as is the case with some of the angels expansion aliens. So check for "icons" and check for icon size

4 years ago

still getting this issue with 1.3.1 update

4 years ago

This should be fixed in version 1.3.2

4 years ago

i have tested on my end all good now

4 years ago

Yep, can confirm it works with Natural Evolution now. Thank you! :-)

This thread has been locked.