WML files automated modifications
Moderator: Forum Moderators
WML files automated modifications
Hello, community!
While was working on my mod for Wesnoth, realized that it will be great if I can perform simple modifications on many WML (units descriptions) files. Can't find anything similar within standard Wesnoth bundle, so created utility named wml_action for this. It can add/replace attributes/macros to tags, add/remove/selective_merge tags.
Written in ruby. To install:
While was working on my mod for Wesnoth, realized that it will be great if I can perform simple modifications on many WML (units descriptions) files. Can't find anything similar within standard Wesnoth bundle, so created utility named wml_action for this. It can add/replace attributes/macros to tags, add/remove/selective_merge tags.
Example:
Code: Select all
gem install wml_action
Re: WML files automated modifications
Updated with attribute expressions feature.
For example if one want to add 1 to number of attacks of all chaotic units in the game, and prepend their name with Chaotic. One can simply apply this file:
to all units in the game. And enjoys one's new chaotic Wesnoth.
For example if one want to add 1 to number of attacks of all chaotic units in the game, and prepend their name with Chaotic. One can simply apply this file:
Code: Select all
[unit_type]
/ alignment=chaotic
name=`"Chaotic ".name`
[attack]
number=`number+1`
[/attack]
[/unit_type]