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

WML Workshop • Re: name_generator query

$
0
0
Don't worry, since I have made name generators before, this work-around was very quick to finish. I just copy-paste and delete a lot. Although, I will tell you that I do not know anything about LUA (option a). So maybe there is a better solution there.

For option b:
In short: name generator -> race -> units
So you need a custom race to call your custom name generator.

Longer:
First of all, I think it is not possible to create a short name using the original DWARVISH_NAMES. The generator always returns "main" and main returns "long_name". "short_name" is perhaps legacy code.

Anyway, I have put the SHORT_DWARVISH_NAMES inside the file /utils/names.cfg
Then I put this race definition inside of /utils/units.cfg
I believe this is the minimum race info to avoid error messages.

Code:

[units]    {~add-ons/fire/units}    [race]        id=shortnameddwarves        name= _ "race^Short named dwarf"        plural_name= _ "race^Short named dwarves"        {SHORT_DWARVISH_NAMES}    [/race][/units]
Then, in /units/namedummy.cfg, this unit:

Code:

[unit_type]    id=Name Dummy    name= _ "Name Dummy"    race=shortnameddwarves    image="units/name-dummy.png"    hitpoints=1    level=1    description= _ "Placeholder description. This is a dummy unit. If it appears, it is an error."[/unit_type]
name-dummy.png
Then in the macro from before, replaced "Dwarvish Ulfserker" with "Name Dummy".

Here is the result:
rename_results.png

This is not quite what you wanted, anyway, but hopefully it gives you enough information to create your solution :)

-

Statistics: Posted by tsunami_ — Yesterday, 8:19 pm



Viewing all articles
Browse latest Browse all 1984

Trending Articles