Owl's WML (Currently: Solved)
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.
Re: Owl's WML (Currently: Solved)
Making a loss condition to trigger when a village in a certain area of the map is captured by the enemy, but it doesn't work. Any hints as to what I've done wrong in my filter?
Code: Select all
#If the Marauders take a village in the city you lose.
[event]
name=moveto
[filter]
side=2,3,5
terrain=*^V*
[filter_location]
x,y=20,20
radius=10
[/filter_location]
[/filter]
[message]
speaker=unit
message= _ "Plunder!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: Village Location Filters)
terrain= doesn't do anything in [filter] because it's not part of SUF, it's part of SLF.
Re: Owl's WML (Currently: Village Location Filters)
Ok, let's go with that being the only problem and ignore the infinitely more embarrassing problem of me having put these events outside the [/scenario] tag....
The correct version, for anyone playing along at home, is:
The correct version, for anyone playing along at home, is:
Code: Select all
#If the Marauders take a village in the city you lose.
[event]
name=moveto
[filter]
side=2,3,5
[filter_location]
x,y=15,27
radius=7
[/filter_location]
[and]
[filter_location]
terrain=*^V*
[/filter_location]
[/and]
[/filter]
[message]
speaker=unit
message= _ "Plunder!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: Solved)
Back after a long break, and I noticed a change from somewhere between 1.11 and the current dev version that is playing havoc with the old IE campaigns.
Once upon a time, after you defined a leader in the first scenario, you could start off follow up scenarios with something like:
and it would work fine. But that no longer works, and the side tags now require a valid 'type=' for the leader unit to be entered each scenario, even though the scenario is going to ignore it and recall the leader unit anyway. Assuming I've diagnosed the problem correctly (not always my strong suit!) I have to put a redundant line of code into every scenario that will just be ignored anyway.
This seems odd, but I'm assuming that it's intended behaviour. Could someone please explain the rationale for this change or point me in the direction of a thread discussing it?
Once upon a time, after you defined a leader in the first scenario, you could start off follow up scenarios with something like:
Code: Select all
[side]
side=1
controller=human
team_name=good
id=Vaniyera
[/side]
This seems odd, but I'm assuming that it's intended behaviour. Could someone please explain the rationale for this change or point me in the direction of a thread discussing 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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: Solved)
There were multiple changes to this code but from theose commit messages it seems likeand the side tags now require a valid 'type=' for the leader unit
1) previously the game refused to load when a
type=
was acidently forgotten and the game didnt print a useful error message.2) previously you'd need to use
no_leader=yes
if you dont want a default generated leader in your scenario, now its enough to just omit type=
EDIT: I also think you dont need a valid type´= attribute type=yes might be sufficient
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.
Re: Owl's WML (Currently: Solved)
Thanks for that! Seem like pretty odd reasons given the consequences, but hey, I'm sure it solves a really annoying problem somewhere...
Neither =yes or =true seem to work, seems to require a valid unittype.gfgtdf wrote:EDIT: I also think you dont need a valid type´= attribute type=yes might be sufficient
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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: Solved)
Two questions, folks:
1) I'm getting these messages in the logs when running one of my scenarios.
What do they mean and what do I do to fix them?
Event code:
Macro:
Can anybody help this perpetual n00b with either, please?
1) I'm getting these messages in the logs when running one of my scenarios.
What do they mean and what do I do to fix them?
2. I have a macro that is supposed to have units say something selected at random from a list as they enter particular coordinates, but the characters are defiantly mute. What have I done wrong?log wrote:20170119 16:31:39 warning config: Terrain 'Wdt' has evaluated to 100 (cost), which is more than 99; resetting to 99.
20170119 16:31:39 warning config: Terrain 'Qt' has evaluated to 100 (cost), which is more than 99; resetting to 99.
20170119 16:31:39 warning config: Terrain 'Wdt' has evaluated to 100 (cost), which is more than 99; resetting to 99.
20170119 16:31:39 warning config: Terrain 'Xt' has evaluated to 100 (cost), which is more than 99; resetting to 99.
Event code:
Code: Select all
# When civilians get to the signpost, they can leave
[event]
name=moveto
first_time_only=no
[filter]
x,y=26,27
type=IE Nobleman
[/filter]
[message]
x,y=26,27
message= $civescape[$rando].value
[/message]
[store_unit]
[filter]
x,y=26,27
[/filter]
kill=yes
mode=append
[/store_unit]
Code: Select all
#define FOS_ESCAPE
[set_variable]
name=rando
rand=0..8
[/set_variable]
[set_variables]
name=civescape
[literal]
x=_"On to safety."
[/literal]
[literal]
x=_"I'm getting out of here!"
[/literal]
[literal]
x=_"Thank the Imperator!"
[/literal]
[literal]
x=_"Still alive."
[/literal]
[literal]
x=_"Come on, let's go!"
[/literal]
[literal]
x=_"Good luck, Caius Regilius."
[/literal]
[literal]
x=_"Thank you for your protection"
[/literal]
[literal]
x=_"Uh, I hate Marauders..."
[/literal]
[literal]
x=_"What about my precious things? Tribune, go get them for me."
[/literal]
[/set_variables]
#enddef
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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: set_variables malarkey)
1) movement_costs has value over 99.
2) Might be from x->value.
2) Might be from x->value.
Re: Owl's WML (Currently: set_variables malarkey)
Thanks Ravana.
Oh wow. I don't think that I want to know how long usage of 100 for that has been deprecated, if it was ever allowed...Ravana wrote:1) movement_costs has value over 99.
Sorry, I don't understand this?Ravana wrote: 2) Might be from x->value.
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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: set_variables malarkey)
I mean you have $civescape[$rando].value and x=_"On to safety."
Re: Owl's WML (Currently: set_variables malarkey)
Ah, right. It should be value=_"On to safety". Thanks very much.
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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: store_unit)
Hey guys, I've run into a problem that I can't resolve using store/unstore unit, hoping you can help.
I have an event that stores an enemy leader at the end of scenario 1.
And in the next scenario I have an unstore to recall him.
But when it fires I get this funky error message:
What am I doing wrong?
I have an event that stores an enemy leader at the end of scenario 1.
Code: Select all
[store_unit]
[filter]
id=AldwylfW
[/filter]
varible=chaser
[/store_unit]
Code: Select all
[unstore_unit]
variable=chaser
[/unstore_unit]
Code: Select all
20170125 13:03:10 error scripting/lua: game_error: creating unit with an empty type field
stack traceback:
[C]: in field 'create_unit'
lua/wml-tags.lua:1027: in local 'cmd'
lua/wml-utils.lua:137: in field 'handle_event_commands'
lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
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.
But perhaps 'maintainer' is too strong a word.
Re: Owl's WML (Currently: store_unit)
Well... first you check what the variable actually contains, right before you unstore it. That leads you to see that the variable doesn't actually even exist. That leads you to take a closer look at where you think you're putting something into that variable, since that's where the mistake must lie (at least if/when you know you can't have possibly cleared that variable somewhere in between).
Re: Owl's WML (Currently: store_unit)
It seems like you've written
Thats why it acts like the variable doesnt exist. (:
varible=chaser
but it has to be variable=chaser
Thats why it acts like the variable doesnt exist. (:
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Owl's WML (Currently: store_unit)
No matter how many times you think you've proofread something...Bitron wrote:It seems like you've writtenvarible=chaser
but it has to bevariable=chaser
Thats why it acts like the variable doesnt exist. (:
Thanks, Bitron, that's the problem alright!
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.
But perhaps 'maintainer' is too strong a word.