Newbiespud Posted January 23, 2021 Share Posted January 23, 2021 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): 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: 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: 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 More sharing options...
Recommended Posts
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.