What are the terrain macros doing?

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
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

What are the terrain macros doing?

Post by Wussel »

Anybody willing to explain what arguments the macros need and what they do in some details?

You could start with the new bridge macros. The Transition would be nice too. What is _L and _LF? There are new endings on_RANDOM, it looks that it needs allways 4 versions? They need specific names for the graphic files, I asume. Not all I have seen is as clear, that it can be used without explainations.

I did not find a wiki about the terrain macros.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: What are the terrain macros doing?

Post by zookeeper »

Wussel wrote:Anybody willing to explain what arguments the macros need and what they do in some details?
Comprehensively? I doubt it. :whistle:

I don't think I've ever looked at bridge.cfg before based on how strange it looked to me, so can't really say much about that. However, the _L and _LF etc endings refer to what arguments the macro takes; TERRAIN_BASE_COMPLETE_FB takes flag and builder, TERRAIN_BASE_COMPLETE_LB takes layer and builder, and so on.

I'm not entirely sure about the _RANDOM variations, but they might be unnecessary now in most cases. It seems like in most places variations=";2;3;4;5;6;7;8;9;10;11" is used, which makes random variations with those filename suffixes (just look at grass for an example) automatically be used if they exist. So, you can just try that first and see if the variations work automatically.

Personally I've always found the system way too complicated to fully grasp, which is why I've tried to very very slowly build a new simpler and more straightforward set in new-macros.cfg. Unfortunately it's still not terribly far along.
User avatar
Alarantalara
Art Contributor
Posts: 786
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: What are the terrain macros doing?

Post by Alarantalara »

I started a project to cover terrain related WML in general, but never got around to covering all of the macros as there were far too many. Most of the non-new ones are more or less clones of each other though: this post covers all of their parameters. I never got around to covering wall or bridge macros, though.

One other thing. The vast majority of the macros are not actually intended for use, they just call each other in long chains to expose the few that were intended for use. You can safely ignore all the macros in the files that have names starting with "internal", they're used to shorten the other files, so you shouldn't need to call them directly, though they're worth reading if you want to know exactly how the other macros work.
Post Reply