Open Flamefire opened 6 years ago
Even tho this isnt necessary, it would be a neat addition. Space does look very limited sadly, maybe if you shorten each tile a bit, especialy the playername one, you could squeeze in the picture like shown here? https://i.imgur.com/rlhBsgH.png
If not at least make the roman player play as Octavianus and not Brutus ^^
we could even integrate the player avatars from the website (lobby only)
Possible. But that means getting data from the website. I don't think that would be wise as it greatly complicates things. Then rather read a custom avatar from an image in the players folder.
Well, also ingame avatars are quite nice for pacts and stuff. You can see them ingame in any statistics window and maybe when using diplomacy. I don't think one should use them for the lobby as there is no benefit in my opinion.
also see #125 - still closing the old ticket as it is in german.
we can get the user avatar only for lobby players. if one is cached locally then, use it for the rest of the games too? if none is available, use one of the default S2 ones (perhaps random?)
@Flow86 @Flamefire Not really sure what you mean by "cached locally" but we could add it next to the name option in the options screen. We could also add a for example CUSTOM_PLAYER.png which everyone could edit for themselves, sending it to other players could be done by naming it with it's hash or something like that (maybe thats the cache you mean).
Yes: show it on settings:
Then we need to implement it to compress & transfer it to all players on a multiplayer game. Also cache them perhaps so we don't need to retransfer them every time (i.e hash username+mod-date, etc)
updating the board avatar from inside the game should not be supported.
How about a SetAvatar() ? Would it be that complicated ? I could really get use of that for specific characters in story-driven missions ...
@theBasstian guess you are talking about this one: #1181
I'm willing to give this one a try - is there consensus on how this thing should work? I've hacked together ability to select portrait index 0-2 from those corresponding to currently selected nation, but now I've discovered this issue and I see an idea that selecting avatar could be unconstrained by nation and/or to add ability for getting avatars from the website (perhaps from gravatar service?).
I'd advise starting small - either scrapping online avatars completely, or expose a field in BasePlayerInfo which accepts e-mail/url for avatar, with ability to write specially-formatted string which allows using builtin ones (e.g. local:vikings-2
for viking no. 2). This would provide room for growth for nation-specific avatar, as well as allow implementing SetPortrait lua fn so that it accepts 2 parameters - nation type and image index.
Also, I think that using online avatars only for lobby would be confusing, because in-game statistics window would use completely different ones. Consistency is better because one can memorize portrait-nickname relations in lobby, and then properly identify players on stats screen.
For now I'm not sure if players do really care about their avatars, do they? At least not in multiplayer.
For me this is more like a singleplayer setting (and thus the LUA function is required).
But adding this might be as simple as allowing the player to set his preferred avatar for each nation in the settings menu? Since I agree we don't need any fancy stuff that requires lots of efforts to implement but have little impact :)
I'm fiddling around with lobby layout, it's a tight fit but I've managed to put it in (please don't mind the yellow text above mismatching the columns):
The portrait works like button and I guess clicking it will cycle through portraits. The problem is that each row has height of 30px, whereas the original image is 34x47px. There are 3 options here:
17 * 8 = 115
px of vertical space, considering 8-player limit. We can move chat a little bit downward and gain something like 60px, but we'd still need to reduce its size, which is kinda deal-breaking, I think.So I think that the option 2. is most viable. Or perhaps you can come up with other ideas?
I'm still on the fence whether to make the portraits nation-specific or not. Limiting per-nation makes sense visually, because you having a Nubian chief run Roman colony is a bit odd, but then if there are 8 ppl who play romans, it'd be good to have 8 different portraits.
In my opinion it's a bit tedious to always set the portrait when starting the game - so I quite liked the idea of having a way to predefine it in the config.
Other than that, I don't think we need a preview of avatar in the hostscreen - it provides no information at all. Only the player himself should see his own portrait so he can change it (if you still want to implement it here instead of an option). For AIs/Dummies the portrait should be simply randomized. No need to set them at all. This way, you'd only need to change the local players row in the host screen, enlarging it (but beware of player swaps etc.).
Another option would be adding a button/dropdown to select the graphic for yourself and still not showing the portrait here.
So in conclusion, I'd not show a portrait here (simply because we don't have the space), give players either the ability to preconfigure their portraits (I personally prefer that way). If you dislike preconfiguring the portrait in the options, I'd rather go for a dropdown or something alike and still not show the portrait here.
Also keep in mind, that we currently kinda support 8 players (not 6) and did plan to allow 16 players :)
I think there's a bit of value to gain if we still have them selectable in lobby. Of course we can add it to settings so that it's automatically preselected each game, but assuming netplay, some ppl can join with same avatars. This seems like a no big deal, but I think being able to change avatars to unique ones just before game starts has its own merits. My understanding is that Statistics window discerns players mainly by avatars and a small colored rectangle beneath them - I think having them unique there is better than just unique colors.
Also:
Only the player himself should see his own portrait so he can change it
The problem with this is that you can't see if other ppl have same avatar as you, so you can't deduplicate or intentionally reorder (same nation-themed portraits for same teams and other funky stuff) it at this point.
I'm not great UX designer though, so lemme know what is your final word on it and I'll just do it that way. ;)
Getting there...
Options will allow selecting default portrait and I'll try to squeeze in portrait selection in lobby for deduplication purposes. If small buttons with portrait fragments will look bad, I'll scrap them completely.
I've added preliminary support for bitmap trimming inside image-based button. Does it look acceptable?
screenshot lgtm
The original had avatars for each nation. We still display them at the statistics screen but use the same for every player of the same nation. We could make the choice completely free by adding it to the match-making screen and not tie it to a nation at all.
Do we want that? How could the UI look like? (space is rather limited for an image)
Ccing @Spikeone (maybe you have an idea)