Ok, first question, is there a way to change the color of an existing entity? Like, if I wanted to make another tier of the assembling machine, is there a code I could write that would take the existing graphics of the assembling machine but change the color, so I wouldn't have to create whole new graphics (I stink at that)?
Second, are there any rules about publishing mods with stuff from franchises? My younger brother and I love How to Train Your Dragon, and I made a fun little mod only for me and my brother with dragons from the franchise. I doubt I'd ever publish it (dragons don't really fit with factorio), but if I did, or any other mod with stuff like that, would that be legal?
Thanks in advance guys!
A couple questions about mods.
- firestar246
- Inserter
- Posts: 29
- Joined: Sun Feb 19, 2017 11:25 am
- Contact:
A couple questions about mods.
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: A couple questions about mods.
You can tint graphics by adding tint = {r= 1, g = 1, b = 0, a = 0.3} (with your color obviously) to the prototype definition, right next to the file name. This will tint the whole graphic thought and so it looks only semi-nice.
As for using assets you didn't make that obviously depends on if you have permission. Some countries have "fair use" policies. But as a general rule i'd say: If you're unsure if you have permissoin, than the answer is usually that you do not have permission. And even if you had permission, it might still be a problem to publish it on the mod portal because you're not the one operating the mod portal, and wube might not have permission to redistribute. (So far nothing happend when people do it anyway, but who knows what'll happen in the future).
As for using assets you didn't make that obviously depends on if you have permission. Some countries have "fair use" policies. But as a general rule i'd say: If you're unsure if you have permissoin, than the answer is usually that you do not have permission. And even if you had permission, it might still be a problem to publish it on the mod portal because you're not the one operating the mod portal, and wube might not have permission to redistribute. (So far nothing happend when people do it anyway, but who knows what'll happen in the future).
- firestar246
- Inserter
- Posts: 29
- Joined: Sun Feb 19, 2017 11:25 am
- Contact:
Re: A couple questions about mods.
Thank you.
I don't have any entities in my mod yet, so I tried it on an item and it didn't seem to work. Factorio didn't block my mod for an invalid code, but nothing appeared different. This is what I had:
When I placed the item down, it looked just like the recipe image, which doesn't have the tint. Am I putting tint in the wrong place? Or does it only work for entities? Thanks!
I don't have any entities in my mod yet, so I tried it on an item and it didn't seem to work. Factorio didn't block my mod for an invalid code, but nothing appeared different. This is what I had:
Code: Select all
{
type = "item",
name = "tidal-token" ,
tint = {r= 100, g = 1, b = 0, a = 0.3}
icon = "__dragon_mod__/graphics/icons/tidal-token.jpg",
icon_size = 30,
flags = {"goes-to-main-inventory"},
subgroup = "token",
order = "a[tidal-token]",
stack_size = 99
},
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord.
Re: A couple questions about mods.
Tinted image must be grayscale. I use tinting for entities (and items) in this mods:firestar246 wrote:Thank you.
I don't have any entities in my mod yet, so I tried it on an item and it didn't seem to work. Factorio didn't block my mod for an invalid code, but nothing appeared different. This is what I had:
Am I putting tint in the wrong place? Or does it only work for entities? Thanks!
https://mods.factorio.com/mod/RITEG
https://mods.factorio.com/mod/df_belt_graphics
https://mods.factorio.com/mod/Loader-Furnace
https://mods.factorio.com/mod/CannonAlpha as mask
https://mods.factorio.com/mod/NuclearFurnace
https://mods.factorio.com/mod/HeavyWagon as mask
https://mods.factorio.com/mod/GreenTies
and this mod was my first mod with entity tint: https://mods.factorio.com/mod/LinearInserters
Item tint: viewtopic.php?f=34&t=51574
- firestar246
- Inserter
- Posts: 29
- Joined: Sun Feb 19, 2017 11:25 am
- Contact:
Re: A couple questions about mods.
So I can't tint already existing graphics? Because as far as I know, no current graphics for the game are greyscale.darkfrei wrote:Tinted image must be grayscale. I use tinting for entities (and items) in this mods:firestar246 wrote:Thank you.
I don't have any entities in my mod yet, so I tried it on an item and it didn't seem to work. Factorio didn't block my mod for an invalid code, but nothing appeared different. This is what I had:
Am I putting tint in the wrong place? Or does it only work for entities? Thanks!
https://mods.factorio.com/mod/RITEG
https://mods.factorio.com/mod/df_belt_graphics
https://mods.factorio.com/mod/Loader-Furnace
https://mods.factorio.com/mod/CannonAlpha as mask
https://mods.factorio.com/mod/NuclearFurnace
https://mods.factorio.com/mod/HeavyWagon as mask
https://mods.factorio.com/mod/GreenTies
and this mod was my first mod with entity tint: https://mods.factorio.com/mod/LinearInserters
Item tint: viewtopic.php?f=34&t=51574
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: A couple questions about mods.
You can tint icons and non-greyscale images just fine, as i said before. Tinting a greyscale mask just looks significantly better than tinting a colored graphic. Vanilla uses tinted masks to show force colors, for example on cars, cargo wagons, turrets and your character.
Icon tinting only works on .icons and not on .icon, so you have to change that if you want to tint a prototype that currently uses .icon. There's an example on the wiki:
Tinting the icon will have no effect on the entity (or depending on some other circumstances on the recipe icon). To tint an entity you have to change the entity prototype. For exemple (untested):
data.raw['assembling-machine']['assembling-machine-2'].animation.layers[1].tint={r= 1, g = 1, b = 0, a = 0.3}.
Icon tinting only works on .icons and not on .icon, so you have to change that if you want to tint a prototype that currently uses .icon. There's an example on the wiki:
Code: Select all
item.icons={ --we can make compound icons using this format
{
icon = item.icon,
},
{ --and we can tint them
icon = "__base__/graphics/icons/iron-plate.png",
tint = {r= 1, g = 1, b = 0, a = 0.3},
},
}
data.raw['assembling-machine']['assembling-machine-2'].animation.layers[1].tint={r= 1, g = 1, b = 0, a = 0.3}.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: A couple questions about mods.
it doesn't have to be, it works if it isn't, it just looks really damn odd and gives unexpected colours if it isn't.darkfrei wrote:Tinted image must be grayscale.
Re: A couple questions about mods.
"Should be", in Russian it's the samebobingabout wrote:it doesn't have to be, it works if it isn't, it just looks really damn odd and gives unexpected colours if it isn't.darkfrei wrote:Tinted image must be grayscale.