loyal icon

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
TL
Posts: 511
Joined: March 3rd, 2007, 3:02 am

Re: loyal icon

Post by TL »

Well, really, since the only loyal units are ones that are put there by scenario designers no there's not much implementation actually required. If you've got an icon for it there's nothing stopping you from adding it to loyal units. (Still, I agree this would be a cool addition to mainline campaigns as well).
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: loyal icon

Post by vicza »

TL wrote:Well, really, since the only loyal units are ones that are put there by scenario designers no there's not much implementation actually required. If you've got an icon for it there's nothing stopping you from adding it to loyal units.
But still, there can be some problem, because creating of loyal units is not unified.

So, if it's just loyal unit, w/o any other traits, macro LOYAL_UNIT is used.

If he has some other traits, it's setting explicitly:

Code: Select all

        [unit]
            description=Haldiel
            user_description= _ "Haldiel"
            type=Horseman
            x=23
            y=24
            side=1
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
        [/unit]
Besides, enemies can have loyal units using the same LOYAL_UNIT macro:

Code: Select all

 {LOYAL_UNIT 2 (Sea Orc) 16 18 (Bugg) ( _ "Bugg")}
and I doubt they need any "loyal-icon" -- let enemy leaders care of them themselves.
JAP wrote:vicza: something in bronze without anything extra was made by megane earlier in the tread.
Indeed, it was. And summarizing all of them, I'd say, I'd prefer his one (the Haldiel has) or yours one the thief (next to Kalenz) has.
Attachments
loyal.png
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Re: loyal icon

Post by turin »

The obvious solution : the {LOYAL_UNIT } macro should be abolished. It is an abomination.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: loyal icon

Post by vicza »

turin wrote:It is an abomination.
Why? :o
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Re: loyal icon

Post by turin »

vicza wrote:Why? :o
Because I don't think macros shouldn't be used to replace one tag. Don't use a macro to make a unit, just use the [unit] tag. It makes it clearer what you're doing.

Plus using macros all the time just encourages sloppy WML - I've seen someone use {UNIT } to create a unit, then store the unit (using {STORE_UNIT }, of course!), give him traits (with another macro)*, and then unstore the unit. That expanded to about 100 lines of WML. Just using the [unit] tag would have been about 10.

Macros just make the code seem shorter, they don't actually make it shorter. That's my main problem with them. If you want your code to just look shorter, do this:

Code: Select all

[unit]
side,type,x,y,description,unit_description=2, Sea Orc, 16, 18, Bugg, _"Bugg"
[/unit]
It has the same effect (and is just as clear, if not more) while not encouraging idiotic macro usage like I described above.

*: Actually I don't remember exactly what they did - I think it was give traits, but I'm not sure. In any case, it was something that was trivial to do inside a [unit] tag.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Lim-Dul
Posts: 105
Joined: March 6th, 2006, 1:45 pm
Location: Europe -> Poland -> Warsaw
Contact:

Re: loyal icon

Post by Lim-Dul »

By the way - is it just me or is the heart icon - nice as is is - a bit off to the right?
War does not determine who is right - only who is left. - Bertrand Russell
--
Project StD - Save the Drakes - we want more branches! =)
User avatar
Iris
Site Administrator
Posts: 6744
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: loyal icon

Post by Iris »

turin wrote:
vicza wrote:Why? :o
Because I don't think macros shouldn't be used to replace one tag. Don't use a macro to make a unit, just use the [unit] tag. It makes it clearer what you're doing.

Plus using macros all the time just encourages sloppy WML - I've seen someone use {UNIT } to create a unit, then store the unit (using {STORE_UNIT }, of course!), give him traits (with another macro)*, and then unstore the unit. That expanded to about 100 lines of WML. Just using the [unit] tag would have been about 10.

Macros just make the code seem shorter, they don't actually make it shorter. That's my main problem with them. If you want your code to just look shorter, do this:

Code: Select all

[unit]
side,type,x,y,description,unit_description=2, Sea Orc, 16, 18, Bugg, _"Bugg"
[/unit]
It has the same effect (and is just as clear, if not more) while not encouraging idiotic macro usage like I described above.

*: Actually I don't remember exactly what they did - I think it was give traits, but I'm not sure. In any case, it was something that was trivial to do inside a [unit] tag.
There is a simpler solution:

Code: Select all

{LOYAL_UNIT (Foobar Lord) (King Foobar) ( _ "King Foobar") 1 10 10}
[+modifications]
    {TRAIT_RESILIENT}
[/modifications]
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm (now available for Wesnoth 1.14.x and 1.15.4+).
JAP
Art Contributor
Posts: 175
Joined: October 31st, 2007, 12:36 am

Re: loyal icon

Post by JAP »

By the way - is it just me or is the heart icon - nice as is is - a bit off to the right?
Yes it is, you have god eyes to notice :wink:
I made it so because of the strange irregular form the orb thingy has.
If you try to position something that small in dead center in front of it, a couple of pixels from the orb will show up on the right side but none on the left,
so i thought the best solution was to shift it one pixel to the right.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Re: loyal icon

Post by turin »

Shadow Master wrote:There is a simpler solution:

Code: Select all

{LOYAL_UNIT (Foobar Lord) (King Foobar) ( _ "King Foobar") 1 10 10}
[+modifications]
    {TRAIT_RESILIENT}
[/modifications]
Does that work? I wouldn't have expected

Code: Select all

[unit]
(stuff)
    [modifications]
    (more stuff)
    [/modifications]
[/unit]
[+modifications]
(even more stuff)
[/modifications]
To have the same effect as

Code: Select all

[unit]
(stuff)
    [modifications]
    (more and even more stuff)
    [/modifications]
[/unit]
:?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
JAP
Art Contributor
Posts: 175
Joined: October 31st, 2007, 12:36 am

Re: loyal icon

Post by JAP »

Its starting to feel like am spamming these but there quite fun to make :wink:
In this one i used a different solution so the heart is centered.

vicza: In this one i tried to use the best from meganes picture and the best from that of my hearts you liked.
I am quite happy whit this one :)
Attachments
loyal-icon.png
loyal-icon.png (687 Bytes) Viewed 3069 times
bronze_centered_example.png
bronze_centered_example.png (14.52 KiB) Viewed 3069 times
mihoshi
Posts: 52
Joined: February 16th, 2008, 10:18 pm

Re: loyal icon

Post by mihoshi »

So far I liked a simple "minus" icon most. It looks cool and in theme with crowns.

Btw, loyal mark can be made in "stealth" way, so it will not noticed by those that doesn;t know what too look for :) For example, loyal units get a black border around movement orb.

As for macros, is it possible to make a WML, that browses through all units and adds repsective trait icons to them?
User avatar
Iris
Site Administrator
Posts: 6744
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: loyal icon

Post by Iris »

turin wrote:...
Indeed my code doesn't work. Here is the correct code:

Code: Select all

{LOYAL_UNIT (Foobar Lord) (King Foobar) ( _ "King Foobar") 1 10 10}
[+unit]
    [+modifications]
        {TRAIT_RESILIENT}
    [/modifications]
[/unit]
As for macros, is it possible to make a WML, that browses through all units and adds repsective trait icons to them?
Of course, but that would cause useless run-time load. It's plain better to stick to the [unit] declaration/appending syntax when creating units:

Code: Select all

{LOYAL_UNIT (Foobar Duke) (Duke Foobar) ( _ "Duke Foobar") 1 11 11}
[+unit]
    overlays=misc/loyal-icon.png
[/unit]

[unit]
    type=Foobar Count
    description=Foobar Count
    user_description= _ "Foobar Count"
    x,y=12,12
    side=1
    overlays=misc/loyal-icon.png
[/unit]
At the moment LOYAL_UNIT doesn't enforce any specific icon, by the way.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm (now available for Wesnoth 1.14.x and 1.15.4+).
Post Reply