Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1993

WML Workshop • name_generator query

$
0
0
First, apologies if I've posted in the wrong place; I'm assuming what I'd like to do is possible in WML. :)

Is it possible to create a WML wrapper around name_generator so that the output can be captured in a WML variable?

I'd like to rename a unit when it advances via an [event] within the [unit_type].
Ideally I'd like to:
  1. Save the old name (in say $unitname_old).
  2. Generate a new name ($unitname_new*).
  3. Rename the unit to:
    "$unitname_new" + " " + "$unitname_old" + "_" + "Rider".
* New name format would be a short (short_name={prefix}{suffix}}) Dwarvish name.

I'd rather not spawn a new unit purely for purposes of acquiring its name because this event fires when the unit advances and could possibly fire in one of several scenarios with different maps etc., so things get fiddly.

Alternatively can use lua if that's easier, but would prefer a WML solution.

All advice and suggestions gratefully received!

Cheers!
-- Spannerbag

Statistics: Posted by Spannerbag — Yesterday, 5:15 pm



Viewing all articles
Browse latest Browse all 1993

Trending Articles