Factions sorting

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.
enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Factions sorting

Post by enclave » May 13th, 2018, 4:29 pm

While it's still compatible with 1.12 it's quite terrible.
I had this code:
Spoiler:
While it still works on 1.14, it places the factions choice in a completely random disorganized order..
I don't want it to be alphabetic, I want it exactly same as I put it in WML... otherwise it's a total mess..
The easiest faction for my era is "humans" but it's not default any more.. Now people will get the hardest and it will be a total nightmare to explain them how to play. New players need to start with basic human faction... not random.

I will stupidly have to make my faction names A_Humans B_Random C_Orcs D_Elves E_Undead_Apocalypse F_Human_apocalypse , is that what you want it to work? :(

User avatar
Ravana
Moderator
Posts: 1831
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Ravana » May 13th, 2018, 4:41 pm

I agree this is problem, but I dont see it changed back. It sorts by name as well which makes it harder to fix.

enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by enclave » May 13th, 2018, 5:19 pm

Ravana wrote:
May 13th, 2018, 4:41 pm
I agree this is problem, but I dont see it changed back. It sorts by name as well which makes it harder to fix.
It looks like it puts random first...
I will experiment with that.. I hope it doesn't sort randoms by name... then I can make each faction random with only 1 faction for randomization...
Will post the results some day... if it worked or not..

I tried to port New Settlers into 1.14 (lol.. this will be a total nightmare... just everything is broken, everything :D)

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Celtic_Minstrel » May 20th, 2018, 3:15 pm

enclave wrote:
May 13th, 2018, 4:29 pm
I will stupidly have to make my faction names A_Humans B_Random C_Orcs D_Elves E_Undead_Apocalypse F_Human_apocalypse , is that what you want it to work? :(
So it sounds like what you really want is "set the default selection to something other than the first", rather than "show factions unsorted", right? So perhaps for 1.15 a default= key could be added to [multiplayer_side] for this purpose.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
Ravana
Moderator
Posts: 1831
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Ravana » May 20th, 2018, 3:44 pm

I would want to show factions unsorted as well, specifically random faction groups.

enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by enclave » May 20th, 2018, 4:26 pm

Celtic_Minstrel wrote:
May 20th, 2018, 3:15 pm
So it sounds like what you really want is "set the default selection to something other than the first", rather than "show factions unsorted", right? So perhaps for 1.15 a default= key could be added to [multiplayer_side] for this purpose.
That would be better than no fix.. but no, I want factions to be in my "custom" order.. all of them... :D

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Celtic_Minstrel » May 20th, 2018, 6:15 pm

Well, adding a way to customize the order would be a separate thing, I think, but it's also possible.
Ravana wrote:
May 20th, 2018, 3:44 pm
I would want to show factions unsorted as well, specifically random faction groups.
If it's just for random factions, don't they always appear first already?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
Ravana
Moderator
Posts: 1831
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Ravana » May 20th, 2018, 6:20 pm

They appear before nonrandom factions, but within them they are still forced to sorted form.

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Celtic_Minstrel » May 20th, 2018, 6:50 pm

So maybe adding a sorting key similar to what campaigns have would suffice?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

gfgtdf
Developer
Posts: 1058
Joined: February 10th, 2013, 2:25 pm

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by gfgtdf » May 20th, 2018, 7:15 pm

Celtic_Minstrel wrote:
May 20th, 2018, 3:15 pm
enclave wrote:
May 13th, 2018, 4:29 pm
I will stupidly have to make my faction names A_Humans B_Random C_Orcs D_Elves E_Undead_Apocalypse F_Human_apocalypse , is that what you want it to work? :(
So it sounds like what you really want is "set the default selection to something other than the first", rather than "show factions unsorted", right? So perhaps for 1.15 a default= key could be added to [multiplayer_side] for this purpose.
considering that this
1) somewhat fixes a regression from 1.14
2) does not really 'break' on older versions if you use that key.

i think this as acceptable for 1.14 aswell. (same for a possible the sort/order key)
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.

enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by enclave » May 20th, 2018, 7:17 pm

Celtic_Minstrel wrote:
May 20th, 2018, 6:50 pm
So maybe adding a sorting key similar to what campaigns have would suffice?
As for me it would be great if there was additional tag for each [multiplayer_side]
for example
sorting_priority=8
The default would be 0... if unspecified.. and then a creator could sort them by priorities if needed... or they would be sorted by priority automaticallyand only AFTER that by random and by alphabet...

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Celtic_Minstrel » May 20th, 2018, 8:54 pm

Uhh, no. It adds new API, so I don't think it's acceptable for 1.14. Since it is somewhat a regression, it would be acceptable to simply stop sorting them for 1.14. That doesn't change the API at all.

And yeah enclave that's literally what I just said, though I'd probably want to use the same key name as in [campaign].
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by enclave » May 20th, 2018, 10:09 pm

Celtic_Minstrel wrote:
May 20th, 2018, 8:54 pm
it would be acceptable to simply stop sorting them for 1.14. That doesn't change the API at all.
Sounds great to me... not sure who would care about sorting A-Z at all.. authors of add-ons that don't know how to keep things organized? maybe..

Sorting would sound like a great idea for 1.15 in case if an author has any way of control over it... which in 1.14 there are no means of control over sorting.. even sorting add-ons in add-on list would make more sense if it was strictly A-Z, but we have 1 million ways of sorting them..

But well... honestly while it's being a real problem and pain in the a..., I still don't care too much about it.. if majority likes A-Z?... why not... thing is they most probably wont even notice the change.. there is a much bigger chance that amount of people who play the sorting-dependent add-ons will suffer much more than amount of people who just like sorting A-Z aesthetically.. if you just remove sorting for 1.14 it would be a win win... in my opinion...

User avatar
Celtic_Minstrel
Developer
Posts: 1199
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by Celtic_Minstrel » May 20th, 2018, 11:49 pm

Well, personally I think faction lists really should be sorted in some way, but I don't really have an issue with adding a sorting key (which would be best used for grouping certain factions) and a default key. But neither of those can be done in 1.14.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

enclave
Posts: 835
Joined: December 15th, 2007, 8:52 am

Re: Compatibility-breaking changes between 1.12 and 1.13/1.14

Post by enclave » May 21st, 2018, 12:27 pm

Celtic_Minstrel wrote:
May 20th, 2018, 11:49 pm
Well, personally I think faction lists really should be sorted in some way, but I don't really have an issue with adding a sorting key (which would be best used for grouping certain factions) and a default key. But neither of those can be done in 1.14.
You are right, they should be sorted, in some controllable way..
What would you feel like if you coming home from work/school and your mother/wife sorted your room for you? Your computer moved to the heater, keyboard inside the cupboard, and they found the results really nice, clean and tidy. I'm sure you would also be happy? It's sorting after all.. That's what A-Z does (And I sort factions myself in my add-ons.. I don't put them in random order.. I assume everyone does so, so they are sorted, the way author finds logical, not just aesthetically beautiful but totally illogical A-Z)

Post Reply