1.13.8 recruit menu customizing
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.
1.13.8 recruit menu customizing
As gfgtdf recommended here viewtopic.php?f=21&t=46322&start=15#p616541 I'm trying to use the new unit_preview_pane.
Now some questions arise:
Alignment and race are shown as small icons in the new recruit menu... unit_preview_pane.cfg says:
But in the various .cfg of the units, this is simply e.g.
How can i do now, so that the icons are shown? Do i need to check the alignment by myself manually in a
In short: what do i write into my
Is there some example somewhere, where i could see how to use the unit_preview_pane?
Thanks.
Now some questions arise:
Alignment and race are shown as small icons in the new recruit menu... unit_preview_pane.cfg says:
Code: Select all
[column]
......
[image]
id = "type_alignment"
[/image]
[/column]
[column]
......
[image]
id = "type_race"
[/image]
[/column]
Code: Select all
alignment=chaotic
[switch]
or something, and then set the path to the right icon image? Where are those icons, i couldn't find them in 1.13.8 core/images folders? Or is this substitution done automatically somehow?In short: what do i write into my
wesnoth.set_dialog_value(...)
? Is there some example somewhere, where i could see how to use the unit_preview_pane?
Thanks.
I like beavers.
Re: 1.13.8 recruit menu customizing
You give the unit object or unit type, for example:Zap-Zarap wrote:
In short: what do i write into mywesnoth.set_dialog_value(...)
?
wesnoth.set_dialog_value(wesnoth.unit_types["Lich"], "unit_preview_pane_id")
for unit types or wesnoth.set_dialog_value(wesnoth.get_unit(8,3), "unit_preview_pane_id")
to show the unit that stands at (8,3). (Assuming you have a unit_preview_pane with the id 'unit_preview_pane_id' at toplevel of your dialog)My addon "Pick Your recruits no preperation turn" uses unit_preview_pane if you download it from the 1.13.8 addon server.Zap-Zarap wrote: Is there some example somewhere, where i could see how to use the unit_preview_pane?
Thanks.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: 1.13.8 recruit menu customizing
Great. I'm sure i can get every information i need from that example.gfgtdf wrote:
My addon "Pick Your recruits no preperation turn" uses unit_preview_pane.
Thank you for the valuable hint.
I like beavers.