Changing border tiles within a scenario
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.
Changing border tiles within a scenario
I am trying to change a few border tiles within a scenario following the instructions on this page:http://wiki.wesnoth.org/TerrainMaskWML and I am having no success at all after trying many different configurations. Here's my latest effort (with most of the map redacted):
I see there is no link to [rule] in the wml reference though there is a place-holder for one. So I have two questions:
Code: Select all
[terrain_mask]
x,y=0,0
mask="border_size=1
usage="map"
_f , _f , _f , _f , _f
_f , Wog , Wo , Wog , _f # original map line is _f , Uh ,Wwr Uh , _f
"
[rule]
old=Uh
new=Wog
terrain=Wog
[/rule]
[rule]
old=Wwr
new=Wo
terrain=Wo
[/rule]
[/terrain_mask]
- 1) can this code be made to work with some tweak?
2) is there another way to change the map border from within a scenario?
- the whole map with x,y=1,1 instead of 0,0
a smaller piece with border=0 with x,y set to cover just this patch
putting the "old" codes in the mask instead of the new ones
with and without rules
moving the location of the final quote mark
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Changing border tiles within a scenario
Yeah, [terrain_mask] is difficult to grasp, badly documented and possibly buggy.
I think [store_locations] stores border tiles as well. (At least the code in the engine has a with_border parameter.) Then you could just use {FOREACH ...} and make the changes you want with a [switch][case] list and [terrain].
I think [store_locations] stores border tiles as well. (At least the code in the engine has a with_border parameter.) Then you could just use {FOREACH ...} and make the changes you want with a [switch][case] list and [terrain].
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Changing border tiles within a scenario
If by “wml reference” you mean the “WML Tags” sidebar, that means that you are on the page that definesJamie wrote:I see there is no link to [rule] in the wml reference though there is a place-holder for one.
[rule]
.Re: Changing border tiles within a scenario
Thanks for the tip. I'll look into that.Anonymissimus wrote:I think [store_locations] stores border tiles as well.
Oh, I see. Yes I found that definition left something to be desired and was looking for something more on the index and syntax pages. I didn't realize it's not linked from the "terrain_mask" page because that's where it's defined! It's helpful to know that it works that way, thanks!8680 wrote:If by “wml reference” you mean the “WML Tags” sidebar, that means that you are on the page that defines[rule]
.