Lemmings Forums

NeoLemmix => Community Edition => Editor Bugs & Suggestions => Topic started by: Strato Incendus on November 26, 2020, 12:08:10 AM

Title: [✓][SUG][ED] GUI Style Manager (for styles.ini list sorting)
Post by: Strato Incendus on November 26, 2020, 12:08:10 AM
It's nice that we have so many different graphic sets, but by now it's really getting hard to keep the overview. Not over the standard orig, ONML, and L2 tilesets, which are right at the start (where they should stay, since they are probably the most-frequently-used ones). But when it comes to custom tilesets, the order in the dropdown menu in the editor seems fairly arbitrary.

Yeah, sure, I can understand why namida's Lemmings Plus tilesets are first in the list after the official tilesets - he created and maintains this entire thing, after all, and we all are very thankful for it ;) .

However, even after namida's tilesets, the order doesn't really seem to be alphabetical or anything else: Gronkling comes before Flopsy, then it jumps back to Arty, then Raymanni, then IchoTolot, then the Freedom-Planet tilesets... I often spend a long time just scrolling through this list, even though I know exactly which tileset I want to pick, but I just can't find it quickly.

In addition, each line start's with the name of the tileset, not with that of the author; so sometimes, if the tileset name is long enough that you can't properly see the author, it would be hard to tell the order even if it were alphabetical.

I think it would be in everyone's best interest, for the sake of convenience, if we bring some order into this randomness. ;)

My suggestion would be:
1) Everything from the orig tilesets down to the L3 tilesets remains as it is right now.

2) After that section, the custom tilesets currently start with namida's Lemmings Plus tilesets. I wouldn't necessarily mind them staying there, with the alphabetical order starting after namida. However, especially for those LP tilesets that GigaLem has revamped, most people are probably using those more frequently now. So it doesn't really make sense for the original LP tilesets to take precedent in this regard.
3) Maybe the format shouldn't be "Tileset name (Author)", but "Author: Tileset name"? Since we're reading from left to right, it would be much easier to tell this way where you are in the alphabetical order. But this is just optional.

Whether the naming scheme starts with the author or the tileset name itself:
Just begin the custom-tileset list with authors starting on A, and then continue that all the way down to zanzindorf.
In case of Colorful Arty, we / he need(s) to decide whether he should go by his full name (i.e. letter C), or just by "Arty", as it's written in the editor right now (i.e. letter A). Given the limited width of the dropdown menu, shortening it to "Arty" is probably more practical.

An alphabetical order is not a value judgment, after all - it's neutral and purely pragmatical. ;)
This should apply to all tilesets which have been "officially approved", i.e. are part of the official styles download.

After the letter z, we could have all the special tilesets at the bottom, followed by whatever the individual level designer maybe added by him- or herself, but what isn't part of the official download (yet). In my case, all my custom sprite recolourings go there.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: WillLem on November 26, 2020, 05:11:42 AM
+10,000,001 for this :thumbsup:
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on November 26, 2020, 07:26:34 AM
Make a styles.ini file that fits this and, assuming no strong objections (or possibly even in spite of them, if there's enough support), I'll put it in the next update.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: mantha16 on November 26, 2020, 09:18:24 PM
also if theres any way you can make the text bigger in the dropdowns that would be awesome or at least space them a bit more
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Strato Incendus on November 27, 2020, 12:10:07 AM
QuoteMake a styles.ini file that fits this and, assuming no strong objections (or possibly even in spite of them, if there's enough support), I'll put it in the next update.

Alright, just cutting and pasting the tilesets in that file is easy enough... but as far as I understand it, I also need to change the numbers for "order" for each tileset.

Is there any more efficient way to do this? I just want to ask before I change every single number by hand. :P

Especially because such an alphabetical list would have to be updated whenever new tilesets come out. Simply adding new lines between existing ones would be straightforward, but if the order index is required in addition to that, such a manual changing of the order numbers would have to be done every time a new tileset comes out.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Proxima on November 27, 2020, 12:14:22 AM
Quote from: Strato Incendus on November 27, 2020, 12:10:07 AMEspecially because such an alphabetical list would have to be updated whenever new tilesets come out. Simply adding new lines between existing ones would be straightforward, but if the order index is required in addition to that, such a manual changing of the order numbers would have to be done every time a new tileset comes out.

Leave gaps. For instance, if the indexes for proxima_tile, proxima_persia and proxima_minesweeper are 160, 161 and 162, then have strato_autumn (or whatever comes next) at 180 in case I make more styles later.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on November 27, 2020, 12:55:21 AM
My understanding (haven't actually checked) is that decimals can be used, too.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: WillLem on November 27, 2020, 02:52:32 PM
Quote from: namida on November 27, 2020, 12:55:21 AM
My understanding (haven't actually checked) is that decimals can be used, too.

Tested and confirmed, using decimals works.

Is there a way for the Editor to simply display the items in the order that they appear in the styles.ini file, without the need for Order=X text? No worries if not, decimals is a decent enough workaround.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Dullstar on November 27, 2020, 11:03:38 PM
I agree with WillLem's suggestion that the items should simply be displayed in the order they appear in styles.ini. Decimals as a workaround is better than nothing, I suppose, but still non-ideal. Displaying them in the order listed in styles.ini is intuitive.

That said, I think a GUI to handle styles.ini would also be convenient, so the user could drag and drop styles around (perhaps with a few default sorting options to choose from) and quickly pin favorite styles to the top.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Strato Incendus on November 28, 2020, 12:19:54 PM
Being able to re-arrange them yourself as a user would of course be the bee's knees, but if it were just possible to make them appear in the same order as in the text file, without having to mess with the indices every time new graphic sets are added, that would already enough for me. After all, that technically still gives the user the power to re-arrange the tilesets him- or herself. It's just slightly less convenient than being able to do it via the editor.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on November 28, 2020, 06:43:58 PM
Agree on both of these suggestions, though not promising that the GUI will actually happen.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on September 30, 2021, 06:41:18 PM
EDIT by WillLem: Merged from original topic [DISC][ED] Styles.ini overhaul/replacement



At present, the user-friendly style names, as well as the order, used by the editor come from the "styles.ini" file.

This is better than hardcoding it or not supporting user-friendly names at all, but it means that any changes have to be handled by NL devs, and generally won't be pushed out to users until the next NeoLemmix update.

I'd like to talk about replacing this.

My first thought is to allow styles to include their own metainfo file. This file could look something like the following:

Code (style.nxmi) Select
NAME Abstract
AUTHOR namida
ORDER 50

The editor would load this file, rather than a centralized styles.ini file.

Some key points:
- Styles by the same author would ALWAYS be grouped together. Authors would by default be in alphabetical order, with some means - probably just a manually-editable text file at least at first - to allow the user to override this.
- By extension, the default configuration would have such an override to push the official styles to the top of the list. This would just be a matter of "default setting" and the user could override this if they want.
- The "Order" parameter only applies to the style's order, relative to other styles from the same author. So you don't need to worry about what ORDER values other authors have used.
- In any case where "Order" is not present, or two styles have equal values for order, it would fall back to alphabetical sorting.
- While fallback behavior would exist, it would become a requirement that all new styles being submitted to the NL style manager have this metainfo file. For existing styles, it could be auto-generated based on the current settings in styles.ini.


Thoughts?
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: mantha16 on September 30, 2021, 09:30:48 PM
I don't really understand most of this but if it means that styles can be listed alphabetically then I'll all for that but can you please also make the drop down menu bigger :D
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Proxima on September 30, 2021, 09:43:54 PM
No, this proposal would prevent customising the styles.ini to make all the styles alphabetical. It would enforce grouping them by author first, with the authors being in alphabetical order.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: mantha16 on September 30, 2021, 10:57:13 PM
well thats still kinda alphabetical more helpful if I know which author has created a style but tbh in the editor the biggest issue I have is with the size of the style selection really hard to see so it takes me forever to find a style eps my own lol so it will help in that sense if all mine would be together
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on October 01, 2021, 02:05:38 AM
Quote from: Proxima on September 30, 2021, 09:43:54 PM
No, this proposal would prevent customising the styles.ini to make all the styles alphabetical. It would enforce grouping them by author first, with the authors being in alphabetical order.

If this is a huge concern, it should be very easy to add an option to not group by author (though I would insist that group-by-author remain the default setting, much like how it is in the default styles.ini). Downside of course being that the per-author ordering would no longer be viable, so it'd have to just be a strict "all styles in alphabetical order" setting.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Dullstar on October 01, 2021, 04:39:11 AM
Another thing that would be lost would be the ability to alter the order to pin your favorite styles to the top. I'd suggest allowing styles.ini to be used to modify the order, but also add the new thing and use it when styles.ini is not present/doesn't cover all styles, in which case styles.ini's styles should be listed first, followed by all other styles in the proposed ordering. Essentially, this allows the user to use styles.ini to pin favorites and change a style's display name. The benefit of re-using styles.ini for this instead of a new file is that it allows people to copy over their current custom ordering settings. If needed, update the styles.ini specification to be a bit more user-friendly: if the Name parameter in styles.ini is currently syntactically required, drop this requirement (take it from the newly proposed file if not present). If Order is syntactically required, I'd suggest allowing leaving the value out to automatically assign the number (generally, default to going in the order they appear in the file, allowing the Order parameter to override this).

TL;DR Use the new thing when styles.ini isn't present/is incomplete; for user order customization, I suggest making styles.ini more user friendly to edit (assuming it's not already done) in a way that's backwards compatible with existing styles.ini files; styles referenced by styles.ini are placed before styles that are only referenced the new way.

Perhaps this doesn't need to be a new file, though. Might it be possible to stuff this into theme, or something?
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Apjjm on October 01, 2021, 11:46:22 AM
Regarding the pinned styles - You could potentially add PinnedStyle1 ... PinnedStyleN settings to NLEditorSettings.ini which can optionally be set. These will always appear at the top in numerical order (and by default could be the orig_ styles?) then all styles would otherwise be grouped by author unless they were 'pinned'?
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Proxima on October 01, 2021, 12:10:45 PM
Thinking about this some more, I've come to the conclusion that replacing the system really is essential. We are heading for the final version of NL, when there will be no more updates to the engine, but content will continue to be created. Suppose someone makes a new style -- they can add it to their own copy of styles.ini, but it won't be on anyone else's copy, unless we decide that downloading a new style should include the updated styles.ini. And that's not a good enough solution, because then anyone who's customised their styles.ini -- for instance placing a favourite style at the top -- would have to redo the customisation with every new style installed.

Locating the ordering data in the styles themselves is a decent solution except that, as mentioned, it removes some customisability, which several people are currently using. Apjjm's suggestion is a good compromise (and would also allow alphabetical ordering, by pinning all styles, although then you'd have to manually update settings every time a new style was released -- that said, these are not very frequent, and only one person so far prefers alphabetical order).

Another idea I had, which is pretty much equivalent, would be to allow the "ORDER xx" line to have a positive or negative integer, and negative integers would be the equivalent of pinned styles -- they would be sorted first regardless of style author. I guess that has the advantage of not needing a new document, but the disadvantage that if you want to change your pinned styles, the information about them is all over the place. So Apjjm's suggestion is probably better, and I just mention this idea for completeness.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on October 01, 2021, 06:06:25 PM
QuoteAnother idea I had, which is pretty much equivalent, would be to allow the "ORDER xx" line to have a positive or negative integer, and negative integers would be the equivalent of pinned styles -- they would be sorted first regardless of style author. I guess that has the advantage of not needing a new document, but the disadvantage that if you want to change your pinned styles, the information about them is all over the place.

Giving negatives special treatment would be confusing - though I agree they should be allowed (but simply on the basis that "-1 is before 0 in the order; -2 is before -1; etc; no special handling"). For reference: They are already allowed in styles.ini (as are decimals).

The ability to pin styles is a great idea.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: GigaLem on October 02, 2021, 12:04:45 AM
Here's a suggestion I want to throw my hat into the ring. I want there to be an in-editor Style Sorter, allow us to move and name styles and then NLEditor does the rest, let us choose what order their in, have presets for style order (like Alphabetically, Author Alphabetically, Generalized type, or a saved custom preset) Something that will allow users to have the freedom of how they want to sort their styles with a bit more accessibility (IE not have to change the numbers of a bunch of other styles in the Style.ini just to get the order you want, because that's rather slow not nearly as accessible IMHO)
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: WillLem on October 03, 2021, 12:02:25 AM
+1 for styles to have a style.nxmi file :thumbsup:

Quote from: Dullstar on October 01, 2021, 04:39:11 AM
I'd suggest allowing styles.ini to be used to modify the order, but also add the new thing and use it when styles.ini is not present/doesn't cover all styles, in which case styles.ini's styles should be listed first, followed by all other styles in the proposed ordering

+1 for this; i.e. allow styles.ini to override all but those styles which don't actually appear in it.

Quote from: Apjjm on October 01, 2021, 11:46:22 AM
You could potentially add PinnedStyle1 ... PinnedStyleN settings to NLEditorSettings.ini

Quote from: GigaLem on October 02, 2021, 12:04:45 AM
I want there to be an in-editor Style Sorter, allow us to move and name styles and then NLEditor does the rest

This is a great idea. Maybe there could be an Options>Styles dialog which allows you to move styles up and down in a list, pin them, and rename them as you wish (although, it might be a good idea for the colums to read "Order / Author / Name" and the Author field to be the only one which isn't editable). Changes made in this dialog would automatically update styles.ini.

Styles without their own style.nxmi file could automatically appear at the top of this list (but only in the dialog, i.e. they are not pinned and still appear at the bottom in the style selection dropdown) until sorted by the user, or if there is a style.nxmi file in the style's folder, then it populates within the list accordingly.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on October 04, 2021, 06:11:13 PM
I've hinted at this - and I'm going to set it down as an absolute decision now.

In the first version to include this feature at least, there will NOT be any kind of menu in the editor to customize your style sorting / etc. It will be supported but only by editing an INI file or similar yourself. I am neither promising nor ruling out an in-editor menu for this being added in a later update.

With that in mind, for now we should talk about what we want this feature to be able to achieve, not what a menu for editing our settings for it should look like.

In terms of the "how", I think the key things that have come up are:
- People may want to be able to override the author order (the most obvious reason being to put their own styles at the top of their list)
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?

In terms of how to make this work out, I'm now thinking:
- As initially suggested, each style has a file that states its name, author, and optionally the position in the order the author wants it to have relative to their other styles.
- "Styles.ini" will continue to exist but as a user settings file instead of part of NL. It will also only specify style order, not names. Styles not listed in it, or listed with a sorting of 0 in it, will retain the automatic sorting.
- Additionally, styles.ini would allow overriding the ordering of authors in much the same way as it does for individual styles.
- The default styles.ini would have only a single entry - one that moves the official styles to the top of the list.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: Proxima on October 04, 2021, 06:39:47 PM
That all sounds very good :thumbsup:
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on October 05, 2021, 12:54:23 AM
One further thing that's come up while doing some prep work for this:

There is also a need for a "SORT_AUTHOR" field, basically, to group a style with one author while displaying another as the name.

There are two use cases for this:
- Firstly, in the case of joint authors. For example, one style is listed as "Flopsy + GigaLem" for the author, but is currently (and likely should remain) sorted together with Flopsy's styles, rather than by itself.
- Secondly, some people prefer to attribute videogame rip styles to the game rather than themselves (or jointly), but the convention is generally still to sort it together with one's own styles.

Using that example from the first point, it could have "AUTHOR Flopsy + GigaLem" as well as "SORT_AUTHOR Flopsy", which would result in "Flopsy + GigaLem" being displayed in-editor as the author, but only "Flopsy" used when determining where to group it while sorting.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on November 18, 2021, 09:52:26 PM
And one more thing when re-reading the topic, that I overlooked in my previous summary: That some users have indicated a preference for an option to disable the by-author grouping.

The only way I can realistically see this working is that, if by-author grouping is turned off, any style that the user has not explicitly reordered otherwise (by using the traditional styles.ini, or new equivalent thereof) would be sorted purely in alphabetical order.




So, to recap the summary taking these additional points into account:

In terms of the "how", I think the key things that have come up are:
- People may want to be able to override the author order (the most obvious reason being to put their own styles at the top of their list).
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?
- People may want to turn off the by-author grouping altogther.
- Some styles may be attributed to multiple authors and/or to a videogame they're ripped from, but are conventionally still grouped with a single author.

In terms of how to make this work out, I'm now thinking:
- As initially suggested, each style has a file that states its name, author, and optionally the position in the order the author wants it to have relative to their other styles.
- A "Sort Author" field will also exist. If used, then the value of that field is used as the author when sorting (while the regular Author field is still used when displaying the author name to users).
- "Styles.ini" (or a direct equivalent thereof) will continue to exist but as a user settings file instead of part of NL. It will also only specify style order, not names. Styles not listed in it, or listed with a sorting of 0 in it, will retain the automatic sorting.
- Additionally, styles.ini would allow overriding the ordering of authors in much the same way as it does for individual styles.
- The default styles.ini would have only a single entry - one that moves the official styles to the top of the list.



Are there any further thoughts here? Progress on implementing this is, so far, limited to me writing a tool to auto-generate the metainfo for existing styles, so now is the best time to put forward any ideas - while not much is implemented yet and thus the direction of this can still be changed easily if need be.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: WillLem on November 18, 2021, 10:29:18 PM
Quote from: namida
- People may want to be able to pin specific styles to the top of the list - and possibly to the bottom, too?

Yes to both; it means that even more styles can be given an "easy to access" location :thumbsup:

Quote from: namida
Are there any further thoughts here?

My main thought is that this feature would ideally exist as part of the Editor's GUI, perhaps as a "Sort Styles" dialog accessible via "Tools" or "Options." This could bring up a list of all the styles which can then be rearranged, pinned, etc. according to the user's preferences (the "By-Author Grouping" could be a checkbox).

If it could only exist as something similar to the existing styles.ini, then this should of course be protected from overwriting during a NeoLemmix update.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: namida on November 18, 2021, 11:33:46 PM
QuoteMy main thought is that this feature would ideally exist as part of the Editor's GUI, perhaps as a "Sort Styles" dialog accessible via "Tools" or "Options." This could bring up a list of all the styles which can then be rearranged, pinned, etc. according to the user's preferences (the "By-Author Grouping" could be a checkbox).

A GUI to edit this is a "maybe later" feature. Let's operate under the assumption that the initial release of this feature will require editing a text file to make custom configurations to your style order.

QuoteIf it could only exist as something similar to the existing styles.ini, then this should of course be protected from overwriting during a NeoLemmix update.

It would be purely an editor feature, and no longer tied to NL updates in any way. Styles would contain their own info about their name, while your personal configuration would be a settings INI file that (at least until a GUI for editing the settings exists) never gets altered or overwritten, only read from. The only exception would be the editor creating a default config file if none already exists - this config file in turn would have one preset setting, namely, pinning the official styles at the start of the order.
Title: Re: [+][SUG][ED] GUI-based style list manager
Post by: WillLem on November 25, 2025, 12:41:37 AM
Reading back over this topic, it's my opinion that the best solution is to keep the existing styles.ini file, and have a GUI-based Style Manager with which the user can easily re-order, rename, add to, and ultimately save the style list as they wish.

I've made some progress with this already. Here's what we have so far:

(https://i.ibb.co/Z6t06wyN/image.png)

It's fairly basic at the moment, but can absolutely be used to quickly and easily edit the styles.ini list. It's also coupled with the new Refresh Styles (https://www.lemmingsforums.net/index.php?msg=107010) feature, so the dropdown lists are updated on-the-fly without having to close and re-open the Editor.

A "Group by Author" button could probably be introduced, as well as a "Sort Alphabetically" button. There may be a way to implement style pinning as well, so that the position of any pinned styles is preserved when performing an auto-sort. Note that, as has been agreed throughout this topic, the OG styles will continue to appear at the top of the default list (of course, user-pinned styles would supersede these).

In terms of keeping the list up to date without it overriding preferences, a master copy of styles.ini could be hosted on the Editor's GitHub repo page. An "Update Styles" button could then read from the master copy and auto-insert any missing styles into the user's copy, by author first, then alphabetically. We can show a list of which styles have been added using this process. NOTE: This would only add the style to the list, it wouldn't actually download the style itself.

Thoughts? Is there anything else we're missing here?
Title: Re: [+][SUG][ED] GUI Style Manager (for styles.ini list sorting)
Post by: WillLem on November 29, 2025, 02:39:15 AM
Progressed further with this today. We can now pin styles (to both ends of the list) as desired, we have an auto-pin for the SLX OG styles, a button to sort all unpinned styles alphabetically, and a search bar to help quickly locate an author or style:

(https://i.ibb.co/4gWgV55f/image.png)

This is working quite well as-is, I've used it to build the master copy styles.ini file and I'm confident it's ready for release. We can always tweak as necessary once it's in use.

Implemented across commits a9c6fb4 - 67b8933.