Problem with 1.3.2 terrain 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.
Problem with 1.3.2 terrain WML
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:
The following code does work and gives me the same depreciated terrain error message:
Do I have the new terrain format wrong? I copied both formats from the map data itself...
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]
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]
I'm no WML expert (far from it!) but I think what you're wanting is:
* should be replaced by
*Possibly, should be replaced by
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.
*
Code: Select all
letter=Re
Code: Select all
string=Re
Code: Select all
terrain=Ce...
Code: Select all
string=Ce...
-
- Inactive Developer
- Posts: 787
- Joined: March 31st, 2006, 6:55 am
I only changed the letters itself not the keys, so that shouldn't help.sjl wrote:I'm no WML expert (far from it!) but I think what you're wanting is:
*should be replaced byCode: Select all
letter=Re
*Possibly,Code: Select all
string=Re
should be replaced byCode: Select all
terrain=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.Code: Select all
string=Ce...
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.