lua help
Moderator: Forum Moderators
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: lua help
Moved to the correct forum.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: lua help
Theoretically you can use the wesnoth.theme_items function to set the value of items like this. But the problem is that the theme itself places the abilities only in one line, so you may need to define your own theme with WML (and I'm not even sure if it'll be enough).
Since I never created a custom theme, I can't be of much help in this situation.
Anyway, here there are some useful links:
- an explanation about themes by Darth Fool: http://forums.wesnoth.org/viewtopic.php?p=213708#213708
- our wiki page on ThemeWML: http://wiki.wesnoth.org/ThemeWML
Since I never created a custom theme, I can't be of much help in this situation.
Anyway, here there are some useful links:
- an explanation about themes by Darth Fool: http://forums.wesnoth.org/viewtopic.php?p=213708#213708
- our wiki page on ThemeWML: http://wiki.wesnoth.org/ThemeWML
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: lua help
after going through the predefined themes and examining the wiki it I can easily change the size of the area abilities are displayed in, however the abilities still list horizontally. For the next stage I checked the lua wiki however it only really shows you how to create new unit statuses, so I'm still a bit lost.
Still, thank you for that link, it was helpful for the first part.
Another question: can I use the [change] tag somehow in the era tag to modify the theme at the start of the match, or is it limited to [theme] then [partialresolution], meaning I have to actually create my own theme to modify the size of a panel?
Still, thank you for that link, it was helpful for the first part.
Another question: can I use the [change] tag somehow in the era tag to modify the theme at the start of the match, or is it limited to [theme] then [partialresolution], meaning I have to actually create my own theme to modify the size of a panel?
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: lua help
Then I suggest you to take a look at the Quest of Wesnoth add-on: it combines Lua and ThemeWML, so it may be useful for you.Azeal wrote:after going through the predefined themes and examining the wiki it I can easily change the size of the area abilities are displayed in, however the abilities still list horizontally. For the next stage I checked the lua wiki however it only really shows you how to create new unit statuses, so I'm still a bit lost.
What you can do is changing the theme in the scenario, by adding inside the [scenario] or [multiplayer] tags the theme= key (see http://wiki.wesnoth.org/ScenarioWML ).Azeal wrote:Another question: can I use the [change] tag somehow in the era tag to modify the theme at the start of the match, or is it limited to [theme] then [partialresolution], meaning I have to actually create my own theme to modify the size of a panel?
If you have more questions about ThemeWML that are not Lua-related, I'd highly suggest you to start a theme topic in the WML Workshop. This way, someone with better theme experience and knowledge than me may be able to help.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: lua help
Just looking through this thread, this catched my attention. So, a quick note from that add-on's creator on where you should look. These are the files which might be interesting for you:Elvish_Hunter wrote:Then I suggest you to take a look at the Quest of Wesnoth add-on: it combines Lua and ThemeWML, so it may be useful for you.
/lua/theme.lua
/themes/qow.cfg
The latter is basically a modification of the default theme. You can compare them to find out what I changed. It shouldn't be too much.
If you have questions about these, feel free to ask either here, in the WML workshop or via PM. I'll pay attention to your threads.
UMC Story Images — Story images for your campaign!
Re: lua help
thank you both, this looks extremely helpful for defining new display information. However I'm still a bit stumped about how to list vertically rather than horizontally