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
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Owl's WML (Currently: Variable Alignment)

Post by zookeeper »

I believe variations persist across levelups automatically, assuming of course that the unit type being leveled up into has such a variation.
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Variable Alignment)

Post by UnwiseOwl »

Ok, I never was any good at wml, and I don't mind saying this is beyond me.
I've made a start and put this in the unit .cfg file, and plugged in the only way I know how to random, but...who can show me how to get the event to use [object] trigger the variation?

Code: Select all

    [variation]
	name=_"adapted"
	alignment=neutral
    [/variation]
    [event]
	name=prerecruit
        first_time_only=no
        {RANDOM 1..2}
        [if]
            [variable]
                name=random
                numerical_equals=1
            [/variable]
            [then]
		
            [/then]
	[/if][/event]
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
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Owl's WML (Currently: Variable Alignment)

Post by James_The_Invisible »

Here you go:

Code: Select all

[object]
  silent=yes
  [effect]
    apply_to=variation
    name="adapted"
  [/effect]
[/object]
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Variable Alignment)

Post by UnwiseOwl »

Thank you all!

EDIT: Turns out I also needed a {[heal_unit] amount=full} in there, as variation units that had resilient were being recruited with less than full health. Seems a bit odd, so I just thought that I'd mention it.
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.
Vanagandr
Posts: 36
Joined: May 17th, 2014, 5:48 pm

Re: Owl's WML (Currently: Variable Alignment)

Post by Vanagandr »

Sounds like this bug maybe: https://gna.org/bugs/index.php?22178
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Variable Alignment)

Post by UnwiseOwl »

Sure does. Easy workaround, but I'm glad the dev team are on to it.
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
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Changes to MESSAGE?)

Post by UnwiseOwl »

Hello all, it's that time of year again, so I'm back to Wesnoth and again stuck in the WML mire. I'm trying to port some of the old 1.10 campaigns to 1.12, and am getting stuck. Below is the code of my first scenario, which is a very simple one that just displays a message to get the player to choose between two modes, but the game appears to be skipping the scenario completely now.

My thoughts were that some change has been made to priorities of prestart and message, potentially? Can anyone shed any light on what changes I would need to make to get this scenario to function again?
Spoiler:
Thanks, wOl.
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
tamanegi
Posts: 161
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Owl's WML (Currently: Changes to MESSAGE?)

Post by tamanegi »

Messages are not shown during "prestart" events in the current version. You should use "start" event instead. ;)

(see http://wiki.wesnoth.org/EventWML for details)
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Changes to MESSAGE?)

Post by UnwiseOwl »

Thank you, that worked (after a fashion), but was this a change? I could have sworn this scenario worked fine as it was back in 1.10.
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.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: Owl's WML (Currently: Solved)

Post by gfgtdf »

Yes this is a change, [message]s with [option]s were disabled in 1.12 for the following reason: during prestart events the screen is usually black and also chat does not work, so if in multiplayer one player has to make a choice (for example with [message][option]) during a prestart event then the other players have to wait for him while seeing a black screen and not knowing whats going on (and in some 1.11.x versions the game also crashed while clicking on that black screen).

It is possible to work around this limitation with lua if you really need that in sp.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Solved)

Post by UnwiseOwl »

Nope. I'm all good. Lua is a slippery slope that I'm perfectly happy staying well away from.

Thanks very much for the prompt replies.
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
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Solved)

Post by UnwiseOwl »

Not actually a WML question for once, but I noticed that the Imperial Era fellows aren't appearing in units.wesnoth.org because there's some kind of parsing error. Can anyone tell me where this error might be and what I can do to rectify it?
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: Solved)

Post by zookeeper »

I don't know about that, but when I tried the 1.12 version and started just one local test match, I immediately ran into this:

Code: Select all

error engine: could not find unit 'IE Arendian Falcon'
User avatar
UnwiseOwl
Posts: 516
Joined: April 9th, 2010, 4:58 am

Re: Owl's WML (Currently: Solved)

Post by UnwiseOwl »

Thanks Zook!...I didn't get the error message (I'm running 12.4, do I have to turn errors on somewhere, or is it a dev_version feature?), but I've identified and hopefully fixed the issue with a new version on the 1.12 server.

Kind of embarrassing that I didn't catch that when I uploaded that version (a year ago...) and sad that no-one has noticed... Does it work for you now?
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
Temuchin Khan
Posts: 1800
Joined: September 3rd, 2004, 6:35 pm
Location: Player 6 on the original Agaia map

Re: Owl's WML (Currently: Solved)

Post by Temuchin Khan »

UnwiseOwl wrote:Thanks Zook!...I didn't get the error message (I'm running 12.4, do I have to turn errors on somewhere, or is it a dev_version feature?), but I've identified and hopefully fixed the issue with a new version on the 1.12 server.

Kind of embarrassing that I didn't catch that when I uploaded that version (a year ago...) and sad that no-one has noticed... Does it work for you now?
Actually, I did notice. But if I remember rightly, the problem only effected the stable version of the Arendians and not the development branch, so I just used the development branch. But double check to be sure!

Also, it's good to see you back at work on the IE!
Post Reply