[PblWML] How to get a custom icon for MP Era?

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderator: Forum Moderators

Post Reply
Generous
Posts: 47
Joined: July 4th, 2011, 7:28 am

[PblWML] How to get a custom icon for MP Era?

Post by Generous »

According to this page - http://wiki.wesnoth.org/PBLWML#icon
icon - An image, displayed leftmost in the add-ons download dialog. It must be a standard Wesnoth file and not a custom one. A custom file will only work for users who already have the relevant add-on installed. This is not related to the icon used for entries in the campaigns menu -- see CampaignWML for more information.
However that is not correct! I have a clean install of Wesnoth of another computer (haven't got any addons yet) but I could see custom icons for some MP Eras.
E.g. I could see that Era of High Sorcery has a badass icon ;) its not a "standard Wesnoth file" (although at http://addons.wesnoth.org/1.12/ it shows a standard icon)
Era of High Sorcery is not a campaign, and its icon that I could see at in-game addons list is clearly not a standard file, but somehow I could see it...

Please tell me, how to do this trick with a custom icon for MP Era ? Any examples, such as "_server.pbl" file with removed password, are very welcome!
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Re: [PblWML] How to get a custom icon for MP Era?

Post by Elvish_Pillager »

It is a combination of several standard wesnoth icons, using Image Path Function WML. Here's the code, if you want to use it as an example.

Code: Select all

icon="units/monsters/fire-dragon.png~BLIT(units/human-magi/great-mage.png~TC(2,magenta),72,30)~BLIT(units/monsters/fire-dragon.png~CROP(125,45,35,30),125,45)~BLIT(units/monsters/fire-dragon.png~CROP(108,70,52,130),108,70)~BLIT(halo/elven/ice-halo5.png,91,8)~CROP(72,34,72,72)~BLIT(misc/blank-hex.png~BG(0,0,0)~CROP(0,0,72,12),0,60)~BLIT(misc/font8x8.png~CROP(40,24,8,8)~CS(-255,0,-255),12,62)~BLIT(misc/font8x8.png~CROP(32,24,8,8)~CS(-255,0,-255),20,62)~BLIT(misc/font8x8.png~CROP(56,24,8,8)~CS(-255,0,-255),28,62)~BLIT(misc/font8x8.png~CROP(32,24,8,8)~CS(-255,0,-255),36,62)~BLIT(misc/font8x8.png~CROP(16,40,8,8)~CS(-255,0,-255),44,62)~BLIT(misc/font8x8.png~CROP(16,40,8,8)~CS(-255,0,-255),52,62)"
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: [PblWML] How to get a custom icon for MP Era?

Post by tekelili »

You can not use anything but core files for add on server images. However like Elvish_Pillager brigtly showed, you can create complex images via IPF. In theory I guess it could be possible create a program that translate evey pixel of a custom image in a huge IPF... any voluntair? :P

Edit: by "you can not" I mean you can, but wont be displayed for users without those images installed.
Last edited by tekelili on February 16th, 2015, 10:07 pm, edited 1 time in total.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: [PblWML] How to get a custom icon for MP Era?

Post by Dugi »

You should have checked out the See Also part of the page about PblWML on the wiki. It contains a link to this page that explains it quite deeply (when creating that page, I added the link right into the icon section, but somebody moved it into See Also, and somehow, it got unnoticed).
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: [PblWML] How to get a custom icon for MP Era?

Post by Ravana »

tekelili wrote: In theory I guess it could be possible create a program that translate evey pixel of a custom image in a huge IPF... any voluntair? :P
I tried it during summer, after few hundred pixels it stopped working. So unless you optimize it you can only get really small images this way.

For my addons I have built "custom" icon only for XP mod, mostly through trial and error with Image loading tester.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: [PblWML] How to get a custom icon for MP Era?

Post by Anonymissimus »

Note that the problem with a custom image is not any better with other addon types. Campaigns have it as well .It's just so that sp campaigns have no need to transfer images over the wesnothd server (it can't), since there is only a single client, so they can afford custom images much better.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: [PblWML] How to get a custom icon for MP Era?

Post by tekelili »

@Generous: There is a way to submit a custom image that displays a mainline image for users without it installed, in case you interested. It involves the simple trick of have a custom blanck.png and use it as mask with IPF.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
Post Reply