Decals

by folk

Allows you to spray-paint decals on the ground.

6 years ago
0.14 - 0.16
9
Owner:
folk
Source:
https://github.com/folknor/factorio-mydecals
Homepage:
https://forums.factorio.com/viewtopic...
License:
CC-BY-NC 4.0
Created:
7 years ago
Latest Version:
0.1.12 (6 years ago)
Factorio version:
0.14 - 0.16
Downloaded by:
9 users

Decals

Gives you the ability to spray-paint decals on the ground wherever you want! When you join/start a game you are automatically provided with a purple book in your inventory that contains all the decals, so no crafting or technologies are required.

Requires that the setting "Show decoratives" in Graphics options is on, or the decals will be invisible.

The decal blueprints contained in the book can not be removed or otherwise used for anything else. If you try to remove one, it will just go back to the book instantly. If you Shift+Click one to clear it, just click any one of them to reset the book.

The book has no extra slots - it has exactly enough slots for all registered decals. No more, no less. And can not be used for non-decal blueprints. Note that if you do try to put a standard blueprint into the book, the blueprint will be destroyed instantly.

The decal blueprints can only be used by picking up the book and using Shift+Mouse Wheel (or the binding) to flick through them.

Most of the decals included are white-only, but they do not have to be - you can add custom decals with as many colors as you want.

You can remove a decal from the ground by building a tile on it. If you remove it by mistake, just apply it again :-)

Note that, uncompressed, all the image files in the mod (as of 0.1.0) only amount to 700kb of data, so it's quite small.

Adding your own decals

INSIDE the zip file you download from here, there is a folder called "customdecals_0.1.0". Unzip this one to your factorio/mods folder (so that it looks like factorio/mods/customdecals_0.1.0/) and open the file inside called "data-updates.lua".
Drop a 256x256 + 32x32 (icon) PNG file inside this folder and put this line in the data-updates.lua file where it's marked:

data.zdecals.add("__customdecals__/myawesomedecallulz.png", "__customdecals__/myawesomedecallulz-icon.png")

Alternatively, if you give the icon file the same name as the decal with "-icon.png" at the end instead of ".png", the line you add to data-updates.lua can look like this:

data.zdecals.add("__customdecals__/myawesomedecallulz.png")

And lastly, rename the file called "fake.fakejson" to "info.json".

Wishlist / Todo

If you can help with any of these items then that would be rocking.
1. Test multiplayer
2. Ability for the host/admin to restrict decals per force/faction
3. Ability to put an overlay color that fills in the white, for example. And have the host/admin be able to set per-force/faction team colors.

Help

Please help!
If you've any experience with making mods for Factorio, please look through the code for any ways it can be improved.
Also obviously most of the included decals should be replaced with community-created ones!

Factorio Developers

There's a few things the game could do to make this stuff easier:
1. Allow access to Lua i/o during the data stage.
2. Fix blueprint.item_to_clear, it doesn't care what you put there now and is ignored.
3. -- I will add more things here, I want to get this uploaded for now.

Change notes

0.1.12: Make sure we check that all items are valid before manipulating them in any way.
0.1.10-11: The mod now ensures that all players have a book of decals when: a player is created for the first time, a player joins a game, the mod configuration changes, and when the mod is first loaded into a game. Also, the "customdecals" mod depends on "mydecals" now, which makes sure that the main mod loads before any local custom decals.
0.1.9: 0.16 bump.
0.1.8: Fix problem when you build a lamp from blueprint before using a decal.
0.1.7: Update for 0.15.10.
0.1.6: Removed some items and recipes (hidden) that are no longer needed as of 0.15.
0.1.5: Simply got it working in 0.15, not really changed it to use any of the new modding/scripting features.
0.1.4:
- Moved decals to their own item group so that they are filtered
more sanely in the combinator signals (dont use them, they can
change between mod updates!)
- Prevent 3rd party decal mods from adding new decals with
the same filenames as the core ones
- You can now ignore making an icon for your custom decals and
it will use the question-mark icon.
0.1.3: Added psshh-pssshh sound when spraying!
0.1.0-0.1.2: Initial upload

Acknowledgements

The origin of the pssh-pssh sound is an "explosion" sound I found at opengameart.org by the user "Damaged Panda", licensed under CC-BY 3.0. The original sound was modified by me.

Legal

This mod comes loaded with a large set of decals I "borrowed" from other games, because I am not a graphics artist!
This is probably what they would call "fair use". I hope. If you own any of the artwork then obviously tell me if it should be removed.
Some images are copyright Paradox Interactive and some are copyright Blizzard Entertainment.