Enlarging default unit images for portraits (1.12)

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
tommy2teeth
Posts: 46
Joined: February 28th, 2015, 8:30 pm

Enlarging default unit images for portraits (1.12)

Post by tommy2teeth »

Was wondering where the code is that decides the size of the unit image when a message/speaker/unit code is used ?

If there is no portrait provided/coded for a unit, the default image when a message occurs is the unit's (in-game) image, correct? Is there a way to increase the size of that image (during messages) for all units who do not have a portrait?

Basically, is it possible to enlarge the size (2x, 4x, etc) of all "portraits" for all units that do not have one, without going to each individual unit and coding it?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Enlarging default unit images for portraits (1.12)

Post by zookeeper »

Aside from explicitly setting each such unit's portrait (to their unit image TC'd and scaled), no, not really. Of course, doing that isn't impossible, but it would be pretty clunky.
User avatar
Paulomat4
Moderator Emeritus
Posts: 730
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Enlarging default unit images for portraits (1.12)

Post by Paulomat4 »

For umc units you can use a new Image path function, i used it recently myself, but i forgot the Name. ~XRBZ() or something. You have to Set the Unit Sprite as Portrait and append it with the wanted scaling between the brackets
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Post Reply