Difference between revisions of "UsefulWMLFragments"
m (putting it to the top of the list n ithe category) |
m (→Item Tools) |
||
Line 36: | Line 36: | ||
*[[DroppableItem]]: Macros to drop items. Currently only macros for dropping items on unit death including a permenant item that can be picked up, and dropped, multiple times by different units. | *[[DroppableItem]]: Macros to drop items. Currently only macros for dropping items on unit death including a permenant item that can be picked up, and dropped, multiple times by different units. | ||
*[[General Item WML]] | *[[General Item WML]] | ||
− | |||
=== Multiplayer Tools === | === Multiplayer Tools === |
Revision as of 09:48, 26 February 2008
Attention: This page has been marked for review for version 1.4. The information contained here appears to be outdated or obsolete.
If you can, please take the time to review and edit it to bring it up to date (if needed) for the lastest version of Wesnoth. For more information and discussion, check the appropriate thread in the fora.
Once this is done, remove this notice
Contents
Useful WML Fragments
NOTES ABOUT ADDING PAGES: try not to add new pages here. Find a category in which your code fits and add it to that page.
Most of the things found here are macros (see PreprocessorRef) that must 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.
For a step by step instruction, look here: HowTo: IncludeMacros and then here: HowTo: UseMacros
High level macros often require the lower level macros found in ProgrammingMacros, Utilities, and Scenario Tools.
Logic Structure Macros
- ProgrammingMacros: Definitions for some low-level macros to make it easier to write program-like WML.
- WML Utilities: Macros to assist other macros. Test Value of Variable. If Have Unit. Store Unit Attribute. Filter by Terrain. Iterate. Overlay with Filter. Determine Opposite Coordinates.
Campaign Tools
- WML Scenario Tools: Macros directly useful in a scenario. Modify unit. Give villages to a side. Return Unit to Recall List. Trap Unit. Change Keep Terrain. Hero die message. Item effect.
- WML Dialog Tools: Macros useful for unit dialog/storyboarding. Character Speaker, Blank story section, Delays and Fades.
- Victory Conditions: Number of Villages, Amount of Gold. Suitable for multiplayer scenarios.
Map Tools
- A Shop Like Thing: How to add even more RPG elements to your scenarios.
- Rain effect: Creating an overlay of rain in a scenario. (old)
- Map Modification WML Tools for editing the terrain in creative ways
Unit Tools
- MoveExistingUnit: Move a unit from one place to another, displaying its movement. Move Unit 1. Move Unit 2. Move Unit 3.
- WML Abilities: Knockback. Charm. Bloodlust. Abilities cannot currently be incorporated in the unit type definitions themselves, but must be included in the scenario file.
- WML Buildings: Generic Buildings, Light House/Dark Tower, Wishing Well #1, Wishing Well #2.
- RandomTraitUnit: Create a unit with two random traits. (very simple.) (updated)
Item Tools
- DroppableItem: Macros to drop items. Currently only macros for dropping items on unit death including a permenant item that can be picked up, and dropped, multiple times by different units.
- General Item WML
Multiplayer Tools
- PseudoRandom: A replacement for {RANDOM} in multiplayer, where {RANDOM} is buggy.
- General Multiplayer WML
Advanced WML
- Advanced WML: Branch on Village Type. Recruit from a Ship. Point Rotation Scheme.
Templates
- WML Templates: Generic campaign, scenario and unit templates. (updated)