Time control!

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
Rozard
Posts: 52
Joined: December 3rd, 2009, 3:07 pm
Location: Finland

Time control!

Post by Rozard »

I was planning some time control magic to one of my factions.

I was thinkin that unit with "Time control" could when ever you want to skip time of the day in cost of a gold...
for example: afternoon -> Dusk etc.

Other one would be weapon ability that also damages enemies xp (runing enemies memories back in time...)

Are these abilities possible?
I myself am pitiful with the WML... (the only thing thats hard for making factions..)
~We go with night to harvest of life~
Creator and maintenancer of A.N.O cult faction,here.
(balacing state)
A.N.O operate in Beyond Southern Hells era,here
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Time control!

Post by Anonymissimus »

Rozard wrote:I was thinkin that unit with "Time control" could when ever you want to skip time of the day in cost of a gold...
for example: afternoon -> Dusk etc.
Yep.
You could use an event-driven ability with a turn 1 event setting a menu item which fires [modify_turns]current="$($turn_number+1)"
(untested).
Rozard wrote:Other one would be weapon ability that also damages enemies xp (runing enemies memories back in time...)
Yep. You could use an event-driven ability with an attacker hits event which modifies the attacked unit's xp (probably something like {VARIABLE second_unit.experience=0} and [unstore_unit]variable=second_unit, which just removes all experience (untested)).
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
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Time control!

Post by matsjoyce »

For the second question, if you had 1.9 you could do

Code: Select all

[modify_unit]
    [filter]
        id=$second_unit
    [/filter]
    experience=0 #or any other number
[/modify_unit]
Disclamer: untested
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Time control!

Post by Ceres »

That'd always set the experience to that number. And $second_unit is wrong. Try this or Anonymissimus' option.

Code: Select all

[modify_unit]
    [filter]
        id=$second_unit.id
    [/filter]
    experience="$($second_unit.experience-1)" #or any other number
[/modify_unit]
User avatar
Rozard
Posts: 52
Joined: December 3rd, 2009, 3:07 pm
Location: Finland

Re: Time control!

Post by Rozard »

Aww... sounds hard... I can try making exp lowering WML with your advices...

But that time control ability is bit open right now...
Wouldnt this event-driven ability make turns run?
I mean, if there where a time limit...
~We go with night to harvest of life~
Creator and maintenancer of A.N.O cult faction,here.
(balacing state)
A.N.O operate in Beyond Southern Hells era,here
User avatar
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Time control!

Post by matsjoyce »

Yes, it would. To remedy you could put add=1 into the [modify_turns] bit.
User avatar
Rozard
Posts: 52
Joined: December 3rd, 2009, 3:07 pm
Location: Finland

Re: Time control!

Post by Rozard »

matsjoyce wrote:Yes, it would. To remedy you could put add=1 into the [modify_turns] bit.
Hmm... I think I understand that...

Btw, how much should this cost? 30 gold? so with 60 gold you can jump over the day/night time?
~We go with night to harvest of life~
Creator and maintenancer of A.N.O cult faction,here.
(balacing state)
A.N.O operate in Beyond Southern Hells era,here
Post Reply