lipk's WML poems
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.
lipk's WML poems
"And so I'll do some fancy hacks
To create things which Wesnoth lacks,
Hope my efforts are not in vain,
They help you improve your campaign."
Working on my own project(s), I sometimes produce code which could be usable for others as well. Instead of hiding it in the attic or creating a separate thread for each one, I'm going to post them here.
So here we go:
Flood
v2.2 on 29.08.11
Description: a set of macros to make a certain terrain type spread over the map, and convert other terrains using a given 'terrain table'.
Shroud on rooms
v1.0 on 27.09.11
Description: allows to define specific areas on the map surrounded by a certain terrain (these are the so-called rooms), and place/remove shroud on/from there at once.
Toss units
v1.1 on 17.10.11
Description: this pretty idiot macro lets you push a unit with another by one hex and if there's somebody else in the tossed one's path, he will push him too.
Have fun!
To create things which Wesnoth lacks,
Hope my efforts are not in vain,
They help you improve your campaign."
Working on my own project(s), I sometimes produce code which could be usable for others as well. Instead of hiding it in the attic or creating a separate thread for each one, I'm going to post them here.
So here we go:
Flood
v2.2 on 29.08.11
Description: a set of macros to make a certain terrain type spread over the map, and convert other terrains using a given 'terrain table'.
Spoiler:
v1.0 on 27.09.11
Description: allows to define specific areas on the map surrounded by a certain terrain (these are the so-called rooms), and place/remove shroud on/from there at once.
Spoiler:
v1.1 on 17.10.11
Description: this pretty idiot macro lets you push a unit with another by one hex and if there's somebody else in the tossed one's path, he will push him too.
Spoiler:
Last edited by lipk on October 31st, 2011, 1:49 pm, edited 5 times in total.
Re: lipk's WML poems
Here's a new macro 'Toss units'. I've changed my mind about the separate-thread-for-complex-code policy, I'm not going to create a thread for whatever big WML monsters.
From now on, you can download code as attachment too.
From now on, you can download code as attachment too.
Re: lipk's WML poems
Fixed up a stupid little mistype in Toss units.
Since I'm serious about updating these macros sometimes, I decided to give a version number to each one, so you can easily check if you have the latest version.
All download counters set to zero
Since I'm serious about updating these macros sometimes, I decided to give a version number to each one, so you can easily check if you have the latest version.
All download counters set to zero

Re: lipk's WML poems
After a long time, here's a new one. It's rather a Lua poem, but who cares?
rotate_area tag
v1.1 on 05.02.12
Description: a new WML tag which allows you to rotate hexagonal areas on the map around their centres.
Have fun!

rotate_area tag
v1.1 on 05.02.12
Description: a new WML tag which allows you to rotate hexagonal areas on the map around their centres.
Spoiler:
- Attachments
-
rotate-area-utils.cfg
- (2.53 KiB) Downloaded 234 times
Re: lipk's WML poems
rotate_area updated to version 1.1, fixing a bug which might have moved units to the wrong place under certain circumstances. Also updated the description: the move_unit key is in fact move_units.