Runtime Transparency?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
kizrak
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Jul 19, 2018 1:27 am
Contact:

Runtime Transparency?

Post by kizrak »

Hello Engineers! 🧡

I was look at Types/Animation and Types/Sprite hoping to find a way to make existing Animations and Sprites transparent (or more transparent).

I noticed that both Animations and Sprites have:
  • apply_runtime_tint
  • blend_mode
  • premul_alpha
Given their similarities, I would hope these Animations and Sprites properties are treated identically as far as modders are concerned.

I assumed by their name/documentation that there should be some type of runtime/boot-up process of increasing (decreasing?) Animations and Sprites alpha values (to make them more transparent; reduce opacity). Is this wishful thinking? Or would I need to create new image files for every Animations or Sprites that I want to make (more) transparent? I've tried every combinations of things to try to get this working without luck. Apparently my graphic lingo isn't strong enough.

I also noticed Types/SpriteFlags used by both Animations and Sprites, but I'm not sure which flag(s) I would use to apply a transparency change.

Thanks 🤓,
-Kizrak

Search terms: prototypes opaque startup

Adamo
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Runtime Transparency?

Post by Adamo »

kizrak wrote:
Sun Jul 12, 2020 8:04 pm
Dude, I feel like at this point I have kicked around every color/alpha value in this game, and I still don't quite know how they all layer. In your case I think you should try the runtime tint first. Set r, g, and b to whatever, then the a value to your desired transparency. See what happens. I got that to work once with player mask colors on a vehicle (since vehicles apply player colors as runtime tints): if the player had alpha less than 1, it made the vehicle transparent. Generally speaking I would start with altering the animation value for whatever prototype you're messing with, and hope that you can find a way to do it there, because I've had only mediocre success doing much with the other values.

Post Reply

Return to “Modding help”