(Resolved) Vanilla Graphic over-ride

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

(Resolved) Vanilla Graphic over-ride

Post by TheSAguy »

Hi,

I'm trying to replace the vanilla Rail graphics.
I have the new rail images in these folders (All the vanilla images. Same names as vanilla):

Code: Select all

\Bio_Industries_1.0.0\graphics\entities\wood_products\curved-rail-concrete
\Bio_Industries_1.0.0\graphics\entities\wood_products\straight-rail-concrete
I tried adding to my data-updates.lua the following:

Code: Select all

	require("prototypes.Wood_Products.demo-railpictures-concrete")
	data.raw.item["straight-rail"].pictures = railpictures_concrete()
	data.raw.item["curved-rail"].pictures = railpictures_concrete()
And in "demo-railpictures-concrete":
demo-railpictures-concrete
But I must be missing something, since the vanilla graphic is still in place.
Thanks.

EDIT: I just re-created the entities and that worked. Not sure why the above did not though.
Last edited by TheSAguy on Fri Jun 24, 2016 1:34 pm, edited 1 time in total.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Vanilla Graphic over-ride

Post by bobingabout »

I think it's one of those cases of "You're doing it wrong".
Don't get me wrong, I don't see the error in what you're doing, but I have had a similar experience before.

My ores mod for example, one of the things I was changing was the autoplace tag on resources.
No matter what I did, my changes were effectively ignored. I made several small changes over and over again, and even re-wrote the whole thing twice from scratch... until... It just works, and I have no idea what I even did differently.

Both the working, and nonworking versions include the data.raw.resource[resource].autoplace = <new data> line.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Vanilla Graphic over-ride

Post by TheSAguy »

bobingabout wrote:I think it's one of those cases of "You're doing it wrong".
Don't get me wrong, I don't see the error in what you're doing, but I have had a similar experience before.
.
I'm my case, it's always something I'm doing wrong.
Well I found the error... so obvious. Rail entity is not an item...

Fix:

Code: Select all

	data.raw["straight-rail"]["straight-rail"].pictures = railpictures_c()
	data.raw["curved-rail"]["curved-rail"].pictures = railpictures_c()
Post Reply

Return to “Modding help”