custom UI controls?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.

Re: custom UI controls?

Postby Celtic_Minstrel » September 4th, 2017, 3:41 pm

lea wrote:there is one peculiar detail with my custom UI theme (and likely any other add-on that includes custom UI theme) is that users cannot switch to it from main menu right after running Wesnoth - they have to go to multiplayer first so that add-on gets loaded (or open a savegame that uses add-on with custom theme). only after that my custom UI theme shows up in the list alongside Wesnoth's mainline UI themes.

You probably have some setup like this in your _main.cfg:

Code: Select all
#ifdef MULTIPLAYER

# ... code and stuff ...

# This line \/ would be the culprit, try moving it up before the ifdef.
{themes/my_theme.cfg}

# ... more code and stuff ...
#endif


I expect that would help.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.
User avatar
Celtic_Minstrel
Developer
 
Posts: 770
Joined: August 3rd, 2012, 11:26 pm

Re: custom UI controls?

Postby enclave » September 4th, 2017, 4:12 pm

lea wrote:
enclave wrote:Could anyone tell me, if I make a multiplayer add-on with custom theme, would it require download to play it in 1.12? Thanks!
could you please clarify? my add-on ("Altered era/ruleset") contains custom theme but for this case your question does not make sense since you either have the theme or do not have the add-on.
do you want to know whether custom theme from add-on can be a dependency for another add-on?

Hi lea, not about dependency for another add-on.. Ill have to explain with example...
Example 1:
3 Players gathered around to play some add-on on 1.12 server.
Player 1 installed add-on, lets call it "ageless". Player 2 and Player 3 did NOT download anything.
Player 1 is hosting a new multiplayer game in lobby with "ageless" era and tells player 2 and player 3 to join.
Unfortunately ageless era has custom unit_types and custom images, which requires every player to download add-on to join "ageless" games.
So for player 2 and player 3 any game with "ageless era" will be grayed out and they will not be able to observe or join "ageless" game until they go and download "ageless" era add-on. Even if somehow they would join this gray color game, they would get OOS errors saying different things like "unknown unit type". So player 2 went and installed "ageless" add-on and now he can join Player 1 game, which is green color in lobby. Player 3 installed "ageless" and now he can play too, so they all 3 happily playing "ageless" game now.

Example2:
Player 1 installed add-on, lets call it "new settlers". Player 2 and Player 3 did NOT install anything, they have NO add-ons installed in their clean install of wesnoth 1.12.
Player 1 hosted a game with "new settlers" era and Player 2 and Player 3 joined this game without any problems, because add-on does NOT contain any custom unit types and all custom images are made via ~CROP ~BLIT and other drawing tools. Anyone can observe their game where they are happily playing it with only one of them having "new settlers" add-on.

Question: Does custom theme require players to download add-on to be able to join or observe somebody's game with this "theme containing" era?

At the moment I know only 2 folders that won't require add-on to join, its SCENARIOS and MAPS.. THEME is one of them or not?
If custom theme requires add-on to join the game where it is used then obviously I'm not creating a custom theme for my add-on until Wesnoth 1.14 is out.
9 players out of 10 will not download anything and just join any other game that doesn't require add-on to play.
enclave
 
Posts: 533
Joined: December 15th, 2007, 8:52 am

Re: custom UI controls?

Postby lea » September 6th, 2017, 6:45 am

Celtic_Minstrel wrote:You probably have some setup like this in your _main.cfg:
... ... ...
yes, it works, thanks! now I wonder why I did not come up with this solution myself )

enclave wrote:... ... ...
Question: Does custom theme require players to download add-on to be able to join or observe somebody's game with this "theme containing" era?
... ... ...
thanks really detailed explanation ) I understand you question now but cannot answer it without actually testing it... and since it is not relevant to my own add-on you'd better not count on me testing it anytime soon ;)
if I would be in your situation then I would test it by snatching a custom UI theme from my "Altered era/ruleset" (or any other add-on that is known to contain a custom UI theme), add it to your add-on and try if people can still join a game that uses your add-on without downloading it (and also whether they get custom UI theme when they do)
author of: Altered Era/Ruleset (on BfW 1.12 and BfW 1.10 add-ons servers)
lea
 
Posts: 125
Joined: October 1st, 2016, 7:25 pm

Re: custom UI controls?

Postby enclave » September 10th, 2017, 3:47 pm

or I could download your era and try to play it with somebody who doesn't have it ;)
Is "Altered era/ruleset" this actually a name of your era? :) Thanks!
PS. if I try it later I will post here the result.
PPS. ah i guess there might not only be a theme, but also custom units in your era, in this case indeed I would need to steal it separately :D
enclave
 
Posts: 533
Joined: December 15th, 2007, 8:52 am

Re: custom UI controls?

Postby lea » September 11th, 2017, 6:15 am

enclave wrote:or I could download your era and try to play it with somebody who doesn't have it ;)
Is "Altered era/ruleset" this actually a name of your era? :) Thanks!
yes, this is exactly how it is named on Wesnoth's add-ons server (for Wesnoth 1.10.x and 1.12.x, I do not post my addon for development branches of Wesnoth like current 1.13.x)
1.12.x addon server also contains "Altered [+new sprites]" (or something like that) - this is somewhat older version of my era modified by The_Gnat to add unique graphics for each unit type, I do not remember whether it includes my custom UI theme or not

enclave wrote:PPS. ah i guess there might not only be a theme, but also custom units in your era, in this case indeed I would need to steal it separately :D
yes, there are plenty of customized units in my addon, it's an era after all ;) my custom theme is in Altered/main-ui-theme.cfg file where "Altered" is root folder of my addon. it uses only mainline images so this file should be the only thing you need to take from my addon's folder
author of: Altered Era/Ruleset (on BfW 1.12 and BfW 1.10 add-ons servers)
lea
 
Posts: 125
Joined: October 1st, 2016, 7:25 pm

Previous

Return to WML Workshop

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 4 guests