[DISC][EDITOR] Styles.ini overhaul / replacement

Started by namida, September 30, 2021, 06:41:18 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

namida

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?
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

mantha16

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

Proxima

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.

mantha16

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

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Dullstar

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?

Apjjm

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'?
My Level Packs: Quartet

Proxima

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.

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

GigaLem

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)

WillLem

+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.

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)


namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)