Szturmowiec and his struggles with WML
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.
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Szturmowiec and his struggles with WML
Hello everyone,
Here's my thread describing all my problems faced while making my own scenarios.
The first question is: how can I trigger something (like displaying a message), when a particular map tile is discovered from the shroud?
Here's my thread describing all my problems faced while making my own scenarios.
The first question is: how can I trigger something (like displaying a message), when a particular map tile is discovered from the shroud?
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
Re: Szturmowiec and his struggles with WML
I think this ought to do it (untested):
The [filter] block is there simply as an optimization; the visibility check is a bit heavy to perform on every hex of every move, so better to first limit the event to side 1 units only (or whatever you need).
Code: Select all
[event]
name=enter_hex
[filter]
side=1
[/filter]
[filter_condition]
[have_location]
x,y=8,9
[filter_vision]
side=1
[/filter_vision]
[/have_location]
[/filter_condition]
[message]
...
[/message]
[/event]
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
Wow, it works, thank you so much for such a quick reply!
But that was not the end... It was just a beginning...
My next question is: in my scenario I'm using shroud and fog. The problem is that when something gest cowered by the fog after my units have left the area, a few tiles under the fog don't display correctly - there's a message "Image not found". Can someone explain to me what are the possible causes of this?
But that was not the end... It was just a beginning...
My next question is: in my scenario I'm using shroud and fog. The problem is that when something gest cowered by the fog after my units have left the area, a few tiles under the fog don't display correctly - there's a message "Image not found". Can someone explain to me what are the possible causes of this?
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
-
- Inactive Developer
- Posts: 503
- Joined: April 24th, 2016, 4:18 pm
Re: Szturmowiec and his struggles with WML
Might be able to optimize a bit further if you know the general area where side 1 might be moving. For example, if side 1 starts in the top-left corner and the target tile is in the bottom-right, you might filter for movement into a hex in the lower-right area on the assumption that no move in the other areas could possibly expose the hex you're interested in.
I forked real life and now I'm getting merge conflicts.
Re: Szturmowiec and his struggles with WML
No idea whatsoever. Doesn't make any sense the way you described it.Szturmowiec wrote:My next question is: in my scenario I'm using shroud and fog. The problem is that when something gest cowered by the fog after my units have left the area, a few tiles under the fog don't display correctly - there's a message "Image not found". Can someone explain to me what are the possible causes of this?
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
Well, I guess it's not actual anymore... I've just opened my scenario once more and the problem disappeared... Strange...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
Here comes another problem...
Could someone explain why this code:
Sometimes work, but sometimes doesn't? Also in the other scenario I've got something very similar:
And it refuses to work at all. The gold is simply not added. Why?
Could someone explain why this code:
Code: Select all
#ifdef EASY
[gold]
side=1
amount=200
[/gold]
#endif
#ifdef MEDIUM
[gold]
side=1
amount=180
[/gold]
#endif
#ifdef HARD
[gold]
side=1
amount=160
[/gold]
#endif
Code: Select all
[event]
name=side 1 turn 18
#ifdef EASY
[gold]
side=4,5
amount=200
[/gold]
#endif
#ifdef MEDIUM
[gold]
side=4,5
amount=220
[/gold]
#endif
#ifdef HARD
[gold]
side=4,5
amount=250
[/gold]
#endif
[/event]
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
- skeptical_troll
- Posts: 500
- Joined: August 31st, 2015, 11:06 pm
Re: Szturmowiec and his struggles with WML
one reason could be that typically difficulty levels are EASY,NORMAL,HARD, there is no 'MEDIUM'. So I'm not surprised if it doesn't work in that case.
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
Hm, such a stupid mistake... That would explain a lot...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
Re: Szturmowiec and his struggles with WML
As far as I know you can define difficulties in the main.cfg such as "difficulties=EASY,HARD,NIGHTMARE" and so on.
So you might define MEDIUM as well.
So you might define MEDIUM as well.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Re: Szturmowiec and his struggles with WML
Sure, but if you have to pick between whether you use NORMAL and MEDIUM, then you should choose NORMAL because it's the standard one. Just like you should choose HARD instead of, say, DIFFICULT.Heindal wrote:As far as I know you can define difficulties in the main.cfg such as "difficulties=EASY,HARD,NIGHTMARE" and so on.
So you might define MEDIUM as well.
Re: Szturmowiec and his struggles with WML
What zookeeper said, plus, keep in mind that they are relative to the actual difficulty.
"Normal" is usually meant as "exactly how the author wants it to be" and easy/hard are variations of that level for players who are not experienced enough or those who find "normal" too easy.
"Normal" is usually meant as "exactly how the author wants it to be" and easy/hard are variations of that level for players who are not experienced enough or those who find "normal" too easy.
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
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
hi everyone,
Just another question. After finishing my exams I wanted to celebrate it via uploading my campaign to 1.13 server, but it doesn't work. I simply copied it from the 1.12 add-ons folder and I can launch it through the game, but in the add-ons section there isn't any button to upload it. Please help.
Just another question. After finishing my exams I wanted to celebrate it via uploading my campaign to 1.13 server, but it doesn't work. I simply copied it from the 1.12 add-ons folder and I can launch it through the game, but in the add-ons section there isn't any button to upload it. Please help.
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
- Pentarctagon
- Project Manager
- Posts: 5565
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Szturmowiec and his struggles with WML
There should be a shield with a up arrow on it next to your add-on. That will upload it to the add-on server.Szturmowiec wrote:hi everyone,
Just another question. After finishing my exams I wanted to celebrate it via uploading my campaign to 1.13 server, but it doesn't work. I simply copied it from the 1.12 add-ons folder and I can launch it through the game, but in the add-ons section there isn't any button to upload it. Please help.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- Szturmowiec
- Posts: 44
- Joined: June 5th, 2017, 6:06 pm
Re: Szturmowiec and his struggles with WML
Oh yeah, I'm so blind... Just moved into 1.13 (since it was described as better for campaign developers) and expected same separate buttons as in 1.12...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.