Problem with 1.3.2 terrain WML

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
DDR
Posts: 556
Joined: March 23rd, 2007, 4:56 pm
Location: Kamloops, Canada
Contact:

Problem with 1.3.2 terrain WML

Post by DDR »

The following code is suppose to change cities, plains, and castles into dirt upon a miss. However, it does not, and I get a message about depreciated (outdated) terrain. The wiki is not updated on this matter, and I do not really understand these new terrain types. The following code doesn't work and gives me the depreciated terrain error message:

Code: Select all

[event]
	name=attacker_misses
	first_time_only=no
	[filter_second]
		[filter_location]
			terrain=Ce          , Ch          , Cv          , Cud         , Chr         , Chw         , Chs         , Ke          , Kh          , Kv          , Kud         , Khr         , Khw         , Khs         , Dd^Dc       , Dd          , Dd^Dr       , Ds        , Gg          , Ggf         , Gs          , Rd          , Rr          , Re^Gvs      , Re^Uf       , Dd^Vda      , Dd^Vdt      , Aa^Vea      , Gg^Ve       , Aa^Vha      , Gg^Vh       , Gs^Vht
		[/filter_location]
	[/filter_second]
	[terrain]
		x=$x2
		y=$y2
		letter=Re
	[/terrain]
[/event]
The following code does work and gives me the same depreciated terrain error message:

Code: Select all

[event]
	name=attacker_misses
	first_time_only=no
	[filter_second]
		[filter_location]
			terrain=R,g,n,C,K,Z,Y,t,B,U,P,L,a,A,b,V,e,D,p
		[/filter_location]
	[/filter_second]
	[terrain]
		x=$x2
		y=$y2
		letter=r
	[/terrain]
[/event]
Do I have the new terrain format wrong? I copied both formats from the map data itself...
sjl
Posts: 48
Joined: June 1st, 2006, 4:47 pm
Location: Weldyn

Post by sjl »

I'm no WML expert (far from it!) but I think what you're wanting is:
*

Code: Select all

letter=Re
should be replaced by

Code: Select all

string=Re
*Possibly,

Code: Select all

terrain=Ce...
should be replaced by

Code: Select all

string=Ce...
However, I'm very uncertain on the second point, so try the first one first on its own, and see if it works without the second. Hopefully, someone more knowledgeable will come along and check this.
SkeletonCrew
Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

sjl wrote:I'm no WML expert (far from it!) but I think what you're wanting is:
*

Code: Select all

letter=Re
should be replaced by

Code: Select all

string=Re
*Possibly,

Code: Select all

terrain=Ce...
should be replaced by

Code: Select all

string=Ce...
However, I'm very uncertain on the second point, so try the first one first on its own, and see if it works without the second. Hopefully, someone more knowledgeable will come along and check this.
I only changed the letters itself not the keys, so that shouldn't help.

You need to add the next line in your [filter_location]
terrain_format=1

This change should both make the deprecated message disappear and make things work. This is on the wiki, what did you miss on the wiki?

This line is no longer needed in 1.3.3 but it's used to determine the difference between the old and new format.
User avatar
DDR
Posts: 556
Joined: March 23rd, 2007, 4:56 pm
Location: Kamloops, Canada
Contact:

Post by DDR »

:oops: Yes, i missed it. Now, though, I have read it!
Post Reply