Page 1 of 1

How to overrride character animations

Posted: Mon Sep 28, 2020 4:16 pm
by LordHapless
Good day one and all, im a brand spanking new modder to factorio who specializes in 3d/sprites so im rearing to make a graphical overhaul for the game.
however i am somewhat stumped as to how to convince the game to load my images instead of the vanilla ones.
From the info i have found so far i need to change the code related to the character in the data stage but im to dumb to understand the wiki's explanation.

From my understanding the lines in data should look similar to to this:
data.raw.wall["stone-wall"].pictures.single.layers[1].filename = "__base__/graphics/entity/wall/wall-single.png"

Unfortunately im not sure how to apply this to the character animations.
I would be in the debt of anyone who can help me find a workaround.

Re: How to overrride character animations

Posted: Mon Sep 28, 2020 4:59 pm
by eradicator
Character skins are one of the most complicated graphical assets of the game because they consist of many different files. Mining/Shooting/Running animation for each of the three armor types, each with seperate shadow and "mask" layers for the in-game team color. Also telling the game a new filename isn't enough, you also have to tell it the size and row/column count of the new sprite sheet.

You should have a look at /base/prototypes/entity/demo-character-animations.lua

The Nepgear character skin mod has a relatively simple structure that just replaces the pictures of the vanilla character without even touching shadows or masks.

Re: How to overrride character animations

Posted: Mon Sep 28, 2020 5:07 pm
by LordHapless
The nepgear playerskin has the codes i was looking for. Thanks alot for the help.