Irrelevant scripts break materials?

Fri Jan 21, 2022 6:56 pm

Okay, guys. I've got a tough one for you all to chew on. So I've got this issue with a mod I've been building. My explosive barrels have a PBR texture attached to them that's been working like a charm, but now after a few additions to the mod, it seems to work differently (only part of the barrel is shiny). I've experimented by stripping the mod of everything that's not essential to this effect and then gradually putting things back in. It turns out that the few ACS scripts I have seem to mess it up, but only if more than one or two are added. They have nothing whatsoever to do with materials or barrels (one of them pertains to universal reverb!). Does anyone know why this phenomenon would be occurring?

Re: Irrelevant scripts break materials?

Fri Jan 21, 2022 10:18 pm

Update: I have solved the problem. I could try to remove the post, but in case other people have problems like this, I think the solution is worth sharing. It turns out that the Graphics directory in my PK3 was listed above everything else, and when I moved it to the bottom, the problem went away. So maybe because it came before Models or before Materials or whatever it was somehow breaking it. Maybe someone can explain the reason for that, because I can't. But there you have it.

Re: Irrelevant scripts break materials?

Fri Jan 21, 2022 10:49 pm

Does one of your script files have the same name as something in your materials setup?

Re: Irrelevant scripts break materials?

Mon Jan 24, 2022 10:28 am

Don't think so, but I'll look out for things like that. There seems to be a whole host of things that break this particular PBR/barrel attachment, though I've also reinstalled Slade since it was having issues. That might finally fix it.

Re: Irrelevant scripts break materials?

Mon Jan 24, 2022 10:52 am

In fact, okay, get this. So I moved the Graphics directory to the bottom and that fixed the problem. Well, then I went to replace some textures that are in no way connected to the barrels. I added the new ones over top of the old ones and the barrels' PBR textures were fine. Right. But when I deleted the old versions and ran it again, they were broken. It seems like they're super sensitive for some reason.

Re: Irrelevant scripts break materials?

Mon Jan 24, 2022 12:24 pm

It really does sound you have clashing names somewhere in the mod and that moving the folders around inside the archive simply gives the ones that you want priority.

If things are set up correctly, then the whole mod should be loadable from a folder, or a standard archive, where moving folders around to change their load order wouldn't really be a thing. Relying on a load order created in an archive is liable to break if you ever load and then save the archive in any other archive handling program (7zip, WinZip, WinRAR, even Windows Explorer).

Re: Irrelevant scripts break materials?

Mon Jan 24, 2022 12:40 pm

What makes it really complicated is that there are no names I can find that connect the textures to the barrels or their PBR textures. Now I'm swapping models and it's the same thing. If there are clashing names, that's manifesting in seemingly irrelevant places. So I'm ready and willing to believe it's the problem, it's just that the changes that cause the problem offer no clues as to where to look.

Re: Irrelevant scripts break materials?

Mon Jan 24, 2022 12:58 pm

You might just be tying yourself up in knots with the order within the archive. Why not recreate the archive structure inside a folder and see what happens when you load the folder? That way you should be able to get things working (I'm not saying it won't require some tweaking) and then you can just zip up the folder contents once you are done, rename it to PK3 and you should be good to go.