Jump to content

Making a custom Fatigued icon goes awry


Recommended Posts

TL;DR: Invulnerable/Personality argument images don't fill up the frame currently, and .png images to textures get really pixel-crunched when downscaling, especially at lower resolutions.

Now that Fatigued has individual icons for each character, I thought I should see about making one for Arint! And I'm... most of the way there.

Here's the image I'm trying to use (drawn by @onetinybee):

Arint_Fatigue.png.dc692b9dd8ee2dc366a21b4fbbc65f6d.png

I'm using this code to override Fatigued's OnInit and append my own check:

local old_fatigued = Content.GetNegotiationModifier("FATIGUED")
local old_fatigued_init = old_fatigued.OnInit

function old_fatigued.OnInit(self, source)
      old_fatigued_init(self, source)
      if self.negotiator.agent:GetContentID() == "PC_ARINT" then
            self.icon = engine.asset.Texture( "ARINTMOD:textures/Arint_Fatigue.png", true )
      end
end

Note that simply self.icon = "ARINTMOD:textures/Arint_Fatigue.png" causes a crash when Fatigue is added. (bad argument #2 to 'SetTexture' (Not a valid texture asset))

This is what this setup currently looks like in-game:20210123155416_1.thumb.jpg.34c9af8df2720ffbc521b491d1a6d2fc.jpg

20210123160227_1.thumb.jpg.7b76628954522938b595548340ce4d65.jpg

It's a little hard to tell, but there's a gap, a sliver of transparency, on the top and bottom of the frame for Fatigued. It's not filling the frame.

It's a square image, 256x256, and it still turns out this way even with an upscaled 512x512 version. When I use this image for another modifier's icon, like Arint's core argument, it looks much better:

20210123163303_1.thumb.jpg.b59e9cbce7f5ab5b8f5f4bb953497880.jpg

Here it's filling the frame and not as roughly downscaled.

So I can only assume it's possibly the reassignment of the icon and/or the engine.asset.Texture() call that's messing things up? I'm a bit stumped.

EDIT: Wait, every Personality/Invulnerable argument seems to have this framing issue. The roughness of the downscaling is still very noticeable, though, especially at lower windowed resolutions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...