Disabling Terrain

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
LordAwsomeness
Posts: 198
Joined: August 12th, 2013, 2:20 pm
Location: U.S.A.

Disabling Terrain

Post by LordAwsomeness »

Hey so I was just wondering if theres a better way of disabling certain set_menu_items on specific terrain than actually going in and typing in every single code. For example, I know that you can disable the menu item from showing up on terrain that follows Ww^* or *^Bw|r, but I was just wondering if theres a way to do it such as *W just to knock out any water or *X to disable all cave walls.

below is an example of what I had been doing before and before I started I just wanted to know if I could disable entire groups by doing *X or *W

Code: Select all

			[not]
				[have_location]
					terrain=Mm^Xm,Xu,Qxu,Ql,Gs^Vh,Ur^Vud,Ur^Efm,Ur,Qxu,Qlf,Ql,Urb^Pw\,Xom,Wog,Wwg^Bw/r,Rb^pr\,Qxu^Bcx\,Gd,Urb^Pw/,Rb^Pr/
					x,y=$x1,$y1
				[/have_location]
			[/not]
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
User avatar
UnwiseOwl
Posts: 489
Joined: April 9th, 2010, 4:58 am

Re: Disabling Terrain

Post by UnwiseOwl »

Yes, you can.

If you want to match any terrain, for example, use *^*.

You can find details on the wiki here: https://wiki.wesnoth.org/StandardLocati ... g_Terrains
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.
Post Reply