Owl's WML (Currently: Solved)

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Owl's WML (Currently: Off-centre unit sprites)

Post by Bitron »

Have you tried to create a new 72x72 png and just copy the unit inside the new one?
maybe there's something off with some meta data of the png, if there's any that could cause that problem.

Just an idea from someone who doesn't have a clue what's going on there. ^^
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Off-centre unit sprites)

Post by UnwiseOwl »

Nice idea!

Just tried it, but unfortunately, it doesn't seem to have made a difference. :(

Attaching one of the offending sprites, in case anyone wants to look at the file.
Attachments
samnis.png
samnis.png (1.53 KiB) Viewed 1787 times
Maintainer of the Imperial Era and the campaigns Dreams of Urduk, Epic of Vaniyera, Up from Slavery, Fall of Silvium, Alfhelm the Wise and Gali's Contract.
But perhaps 'maintainer' is too strong a word.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Owl's WML (Currently: Off-centre unit sprites)

Post by zookeeper »

It's because of those not-completely-transparent pixels at the edges. It's a good idea to always use a magic wand tool to check your images for stuff like that and make sure that areas that are supposed to be fully transparent actually are (and preferably are of the same colour too, such as black). You get smaller filesizes through better compression, less glitches in various circumstances like this, and so on.
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Owl's WML (Currently: Off-centre unit sprites)

Post by Bitron »

There's the same error in my addon when I replace a unit's sprite with yours.
I took one of my .psd files from my own sprites, copy-pasted the unit from the original file and saved it as .png again.
Now it's fixed in my game, should be fixed for you as well.

Here is the file:
hunter.png
hunter.png (4.86 KiB) Viewed 1783 times
EDIT
To what zookeeper said:
I did not copy-pasted the whole 72x72 picture, just like 2-3 pixels around the unit itself.
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Off-centre unit sprites)

Post by UnwiseOwl »

Aha! Thanks guys!
Maintainer of the Imperial Era and the campaigns Dreams of Urduk, Epic of Vaniyera, Up from Slavery, Fall of Silvium, Alfhelm the Wise and Gali's Contract.
But perhaps 'maintainer' is too strong a word.
Post Reply