This mod exists because of Hurricane.
I've used Hurricane's building graphics in a lot of my own mods. Hurricane has made a huge amount of high-quality art and released it under CC BY so the whole community can use it. A lot of the modded Factorio we play looks the way it does because of that generosity.
The more of his graphics I used, the more I wanted them in one place, set up and ready to drop into a mod. That's what HurricaneGraphicEasy is: a collection of his buildings with ready-made sprite definitions, icons and technology icons. That way you can spend your time on the mod itself, not on working out frame counts and shifts.
The art is all Hurricane's. I've organised it and made minor additions to it. If you use these graphics, please credit Hurricane, and take a look at his full collection:
https://www.figma.com/proto/y1IQG08ZG2jIeJ5sTyF4MP/Factorio-Buildings?node-id=14934-304
Thank you, Hurricane, for making Factorio modding better for all of us.
HurricaneGraphicEasy – Modder's Guide
What this mod gives you
HurricaneGraphicEasy gives your mod ready-made graphics for 24 of Hurricane's buildings in three steps: add a dependency, require a building, copy its graphics into your entity. You never work out frame counts, sprite sizes or shifts yourself.
The mod adds nothing to the game on its own. Each building has one Lua file in prototypes/ that returns a table with:
name,iconandicon_size(64)collision_boxandselection_boxfor the building's footprintgraphics_set, with the animation, shadow and glow layerstechnology, technology icon sized 256x256px for each of the buildings
You still write the entity yourself: its type, recipe, crafting categories, energy use and so on. This mod only supplies the looks.
Not all of Hurricanes buildings have the frozen state, so it has been left out of this mod, if you need it, find it in the link in the description.
Step 1: Add the dependency
Open your mod's info.json and add HurricaneGraphicEasy to dependencies:
{
"name": "my-mod",
"version": "0.1.0",
"factorio_version": "2.1",
"dependencies": [
"base >= 2.1",
"HurricaneGraphicEasy >= 1.0.0"
]
}
Step 2: Load a building in data.lua
In your data.lua (or any file it requires), load a building with require and the path to its file:
local arc_furnace = require("__HurricaneGraphicEasy__/prototypes/arc-furnace")
arc_furnace is now a table holding the arc furnace's icon, boxes and graphics_set. The path is always __HurricaneGraphicEasy__/prototypes/ followed by the building's file name, without .lua.
Step 3: Build an entity with the graphics
The easiest way is to copy a vanilla entity of the right type and swap in the graphics. This example makes a 5x5 arc furnace from the steel furnace:
local arc = require("__HurricaneGraphicEasy__/prototypes/arc-furnace")
-- Entity: copy the steel furnace, then swap in the arc furnace graphics
local furnace = table.deepcopy(data.raw["furnace"]["steel-furnace"])
furnace.name = "my-arc-furnace"
furnace.minable = {mining_time = 0.5, result = "my-arc-furnace"}
furnace.icon = arc.icon
furnace.icon_size = arc.icon_size
furnace.collision_box = arc.collision_box
furnace.selection_box = arc.selection_box
furnace.graphics_set = table.deepcopy(arc.graphics_set)
furnace.fast_replaceable_group = nil -- the steel furnace is 2x2, this is 5x5
furnace.next_upgrade = nil
furnace.crafting_speed = 4
data:extend({furnace})
The same pattern works for every building.
Don't change scale, width, height, frame_count or line_length. They are set to match the sprite sheets, and a wrong value makes the game refuse to load.