Difference between revisions of "UsefulWMLFragments"

From The Battle for Wesnoth Wiki
(Useful WML Fragments)
m (Useful WML Fragments)
Line 4: Line 4:
  
 
''The reorganization of this page is still incomplete. Scroll down to see the contents of the old page.''
 
''The reorganization of this page is still incomplete. Scroll down to see the contents of the old page.''
 
[[WmlTemplates]]: Campaign, scenario and unit templates, for the lazy ;)
 
  
 
[[WML Templates]]: Generic campaign, scenario and unit templates.
 
[[WML Templates]]: Generic campaign, scenario and unit templates.

Revision as of 18:25, 30 July 2006

Useful WML Fragments

Most of the things found here are macros (see PreprocessorRef) that may be copied into a scenario file or another file included first by the campaign,and then used in the scenario (or multiplayer map). Remember that a macro cannot be used at a point before it is defined.

The reorganization of this page is still incomplete. Scroll down to see the contents of the old page.

WML Templates: Generic campaign, scenario and unit templates.

WML Utilities: Convenient shortcuts for the most common tasks, such as variable formatting, storing/unstoring and modifying of units, and so on. Also some utility macros for more complex tasks, such as mirroring hex coordinates. Generally useful, scenario-independent little helpers.

WML Scenario Tools: WML for victory conditions and more. Stuff that you use only in specific scenarios.

WML Abilities: Unit abilities and specials implemented in WML. Cannot currently be incorporated in the unit type definitions themselves, but must be individually included in every scenario in which they should work.

WML Buildings: The Basic Building Template, Light House, Wishing Well #1, Wishing Well #2.

A Shop Like Thing: How to add even more RPG elements to your scenarios.

Rain effect: Creating an overlay of rain in a scenario.





ProgrammingMacros: Definitions for some low-level macros to make it easier to write program-like WML.

WML Macros: Convenient shortcuts for the most common tasks, such as variable formatting, storing/unstoring and modifying of units, and so on.

Advanced WML: Ways of accomplishing some unusual things with WML.

DroppableItem: A macro to create items that units can carry, that are left on the ground when those units die.

RandomTraitUnit: A series of macros to create a unit with two random traits.

PseudoRandom: A replacement for {RANDOM} in multiplayer, where {RANDOM} is buggy.

MoveExistingUnit: A general way to move a unit from one place to another, displaying its movement.

BranchOnVillageType: Crude hack for branching on village type.

Victory Conditions: Macros for different kinds of victory conditions, for example victory by controlling x% of villages on the map. Also suitable for multiplayer scenarios.

See Also