Messing around with Shader files. Ghost entities?

This is the place to request new mods or give ideas about what could be done.
Post Reply
Taurondir
Inserter
Inserter
Posts: 43
Joined: Tue Apr 05, 2016 9:34 am
Contact:

Messing around with Shader files. Ghost entities?

Post by Taurondir »

Due to the fact that my eyesight is not the best, and having searched the net and asked around, I had for 0.16, and now for 0.17, modified Shader files to allow me to play online with basically "always daylight" (because the constant night-day-night-day contrast changes give me headaches) and I have also removed the "TV screen random noise" that you get when you zoom into a radar view (because my right eye basically does that - and worse - already).

Another thing on my list is to try and make the "ghost entities" that are placed down via blueprints be more easily discernible from already placed entities.

I am fully aware that most of you can see them fine, but I can't, so every trick matters.

Does anyone know if the ghost entities are rendered through a Shader file? I wouldn't mind making them green-ish, personally.

sathill
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Mon May 29, 2017 10:16 am
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by sathill »

I know my friend its not what you are looking for, but before modified Shader files appear consider cheating/modding power armor with nightvision. There are mods that add starting equipment. Or in 0.16 was mod called new game+ that transfer items from previous game so you can cheat there and then move to next map with just power armor nightgoogles and some personal solar + battery.

Not best solution but always some solution.

Taurondir
Inserter
Inserter
Posts: 43
Joined: Tue Apr 05, 2016 9:34 am
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by Taurondir »

I'd like to state for the record that "being able to see the game in order to play it" is not "cheating", and I cannot, for the life of me, understand what exactly I'm "cheating" at.

This is not a competitive first person shooter where I can now see people through walls, I have done what I have done because when It goes dark I might as well just read a book until lights come back on, and the constant light-dark-light-dark is headache inducing, regardless of default Night Vision glasses.

I'm already playing games with a 43 inch television about 40 cm from my face because otherwise I can't read the text in most menus. If you can see? well, great for you, but "removing" my ability to see what I'm trying to do in a game where the objective is to make factories? I might as well not play.

My other issues at the moment are Ghost Entities and the text color in chat. Everytime someone says something, half the time I have to either squint or go to map view and zoom out until the text is sitting on "void" background to read it, that's how bad it is with me. To give you another idea, on my 42" TV, if I change the default 100% UI size over to 80%, my right eye - left is almost fine, meaning I cover my left decent eye - can't read the text anymore, as my vision is vastly different in both eyes (I have Amblyopia, and I kind of see like this - https://covdblog.files.wordpress.com/20 ... trabby.jpg)

sathill
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Mon May 29, 2017 10:16 am
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by sathill »

"Cheating"its reference to using console, writing commands.
You can also use mods.
There its mod that comes with night-vision:
https://mods.factorio.com/mod/FasterStart
Or use ingame mod-thing and look for fasterstart

Use "~" button (below ESC). Then use commands:
/c game.player.insert{name="power-armor", count=1}
/c game.player.insert{name="night-vision-equipment", count=1}
/c game.player.insert{name="fusion-reactor-equipment", count=1}

You can ctrl+c ctrl+v them.

After you use first one game will write something like this (i dont have factorio in english): player Taurondir use command that will disable achivements, use it again if sure what are you doing.

So you need to copy first command twice. Achivements will be disabled because its considered cheating. Its not like you are cheating its only a term, so calm tits down nobody are telling that you are bad boy lol.

Better solution it will be shader like you ask but im personally too dumb to do it so its work-around solution until somebody smart will do it.

I dont know how far you go with factorio, probably you know this but i will tell anyway. After you put this commands in your inventory will appear 3 items. Power armor, night googles and fusion reactor. Equip armor. It will appear in right down corner of screen. Right click it and special grid will appear. Put there googles and fusion reactor.
Now night its bright(er).

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by GrumpyJoe »

Taurondir wrote:
Sat Mar 02, 2019 4:36 pm
Due to the fact that my eyesight is not the best, and having searched the net and asked around, I had for 0.16, and now for 0.17, modified Shader files to allow me to play online with basically "always daylight"

/c game.player.surface.always_day=true
Also makes solar panels working 24/7 :mrgreen:
I believe if a mod does that instead of a console comand, you might even get ingame achievments. I use that on my test maps via Creative Mode surface settings.

If you knew that already, sorry for the ping, i might have misunderstood what you meant with shader files.
And I understand thats not what you are after, for ghost entities. There i cant help unfortunatly.

Koub
Global Moderator
Global Moderator
Posts: 7197
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by Koub »

What OP wants is just a graphical change, not a gameplay change. So that solar is not buffed, only what is displayed on his screen should be. It's like people who alter colors in the game files because they're colorblind.
At least that's what I understand.
Is there a way to keep the core game the same, with the same day/night mechanism, but keep what's displayed onscreen as contrasted and bright as ingame noon time ?
I'll move this to Request for mods section, because can't be part of the vanilla game obviously.
[Koub] Moved to Ideas and Resquests For Mods
Koub - Please consider English is not my native language.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by keyboardhack »

Took a while but i figured out how to change the shader so ghosts looks like normal entities. Here is how to do it.

Go into the shader called sprite-ycocg.frag. You can open the file as any other text file.
Change line 28 from

Code: Select all

    fragColor = YCoCgToRGB(param, param_1) * vTint;
to

Code: Select all

    fragColor = YCoCgToRGB(param, alpha);
Do note that ghosts will now look exactly like normal entities.
If you want to distinguish ghosts then you could change the line to something like

Code: Select all

    fragColor = YCoCgToRGB(param, alpha) * max(vTint, vec4(0.8, 0.8, 0.8, 0.8));
Also afaik it's not possible to change shaders with mods so i don't think it fits as a mod request.
Waste of bytes : P

Taurondir
Inserter
Inserter
Posts: 43
Joined: Tue Apr 05, 2016 9:34 am
Contact:

Re: Messing around with Shader files. Ghost entities?

Post by Taurondir »

Yep that's the Shader file I wanted. Very good, TYVM.

I've made the line (28) as:

fragColor = YCoCgToRGB(param, alpha) * max(vTint, vec4(1.0, 0.1, 0.1, 0.1));

Green didn't work well, Red seems ok. Hard(er) to miss them now. It should work well.

Post Reply

Return to “Ideas and Requests For Mods”