How to overrride character animations

Place to get help with not working mods / modding interface.
LordHapless
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Sep 28, 2020 4:05 pm
Contact:

How to overrride character animations

Post 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.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: How to overrride character animations

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
LordHapless
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Sep 28, 2020 4:05 pm
Contact:

Re: How to overrride character animations

Post by LordHapless »

The nepgear playerskin has the codes i was looking for. Thanks alot for the help.
Post Reply

Return to “Modding help”