Page 1 of 1

downsized skins problem

Posted: Tue Jul 21, 2015 5:01 pm
by cyberman
i currently have a problem where my skins that never had this problem before get downsized. any way to fix this at all? ???

RE: downsized skins problem

Posted: Tue Jul 21, 2015 5:28 pm
by Ænima
Is the overall canvas size of the image less than 128x128? (Or whatever the limit is.)


If you have a huge sprite that's full of nothing but translucent pixels then you need to trim all that excess off.

RE: downsized skins problem

Posted: Tue Jul 21, 2015 8:02 pm
by cyberman
i guess i better re-edit the skins with the problem. (i have a plan for that atleast)

RE: downsized skins problem

Posted: Wed Jul 22, 2015 9:29 am
by Lollipop
I dont think the limit works like that. Look at this spoiler, it contains a snippet of a hosting log of and AOW2 server:
Spoiler: log snippet (Open)
2015-Jul-21 12:29:39 Sprite RAVNAD of skin RavenMech is too tall (163px, max is 94px). Downsizing.
2015-Jul-21 12:29:39 Sprite ROB1D1 of skin WolverineMech is too tall (110px, max is 94px). Downsizing.
2015-Jul-21 12:29:39 Sprite ROB1F7 of skin WolverineMech is too wide (135px, max is 110px). Downsizing.
2015-Jul-21 12:29:39 Sprite ROB3D1 of skin TitanMech is too tall (135px, max is 94px). Downsizing.
2015-Jul-21 12:29:39 Sprite ROB3E7 of skin TitanMech is too wide (140px, max is 110px). Downsizing.
2015-Jul-21 12:29:39 Sprite MADCA1 of skin MadCatMech is too tall (177px, max is 94px). Downsizing.
2015-Jul-21 12:29:39 Sprite TERMA1 of skin Guardian is too tall (131px, max is 94px). Downsizing.

As any AOW2 player knows, mechs have become significantly smaller than they used to be with one of the Z& updates. (I think it was 2.1, but I am not quite sure)
The most strange thing is that the Zdoom wiki page on SKININFO and S_SKIN provides no information about this, it actually doesn't mention any limits of any kind at all.

So the question is wether or not it is intentional that the engine automatically scales skins like this, or if there is some kind of bug...

Note: The sizes in the log are the size of the sprites after the engine has already scaled them by the amount that the SKININFO lump specifies.

RE: downsized skins problem

Posted: Wed Jul 22, 2015 9:33 am
by mr fiat
why is there even a limit to begin with?

RE: downsized skins problem

Posted: Wed Jul 22, 2015 2:24 pm
by cyberman
i don't know

RE: downsized skins problem

Posted: Wed Jul 22, 2015 2:52 pm
by Ænima
It's to prevent an old exploit where you could have a WAD in your Skins folder that would replace the player sprites with huge green squares, giving you the advantage of seeing where your opponent is through walls or in places where they should normally be hidden from your view.

RE: downsized skins problem

Posted: Fri Jul 24, 2015 2:56 am
by Hornetzero
But what if the player is meant to be tall. I'm making a Godzilla game in which the player is suppose to fight other large characters. How do I change the limit?

RE: downsized skins problem

Posted: Sat Jul 25, 2015 12:34 pm
by Torr Samaho
The code checks width and height of the corresponding player class, so a huge player class is allowed to have huge sprites. If the automatic skin resizing is not flexible enough for you, you can adjust the limits with the player pawn property Player.MaxSkinSizeFactor.

RE: downsized skins problem

Posted: Sat Jul 25, 2015 6:47 pm
by Hornetzero
Torr, how do we use this function (Player.MaxSkinSizeFactor)? There is no information about it on Zandronum wiki. I tried entering 112 on it(the max px height of the player), but it gave this:

SC_GetFloat: Bad numeric constant "health".


health is the property below it, which means that this function has different input value types.

RE: downsized skins problem

Posted: Sat Aug 01, 2015 2:19 pm
by Torr Samaho
Hornetzero wrote: Torr, how do we use this function (Player.MaxSkinSizeFactor)?
You can see how it is used in actors/shared/player.txt in zandronum.pk3. Here is the corresponding line:

Code: Select all

	Player.MaxSkinSizeFactor 3.44, 1.68 // [TP]
Can somebody add this information to the Wiki?