lipk's WML poems

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
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

lipk's WML poems

Post by lipk »

"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
flood-utils.cfg
(4.72 KiB) Downloaded 254 times
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:
Shroud on rooms
v1.0 on 27.09.11
room-shroud-utils.cfg
(2.79 KiB) Downloaded 240 times
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:
Toss units
v1.1 on 17.10.11
toss-utils.cfg
(3.23 KiB) Downloaded 224 times
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:
Have fun!
Last edited by lipk on October 31st, 2011, 1:49 pm, edited 5 times in total.
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: lipk's WML poems

Post by lipk »

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.
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: lipk's WML poems

Post by lipk »

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 :(
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: lipk's WML poems

Post by lipk »

After a long time, here's a new one. It's rather a Lua poem, but who cares? :wink:

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:
Have fun!
Attachments
rotate-area-utils.cfg
(2.53 KiB) Downloaded 234 times
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: lipk's WML poems

Post by lipk »

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.
Post Reply