[SUGGESTION][EDITOR] Auto theme

Started by Dullstar, February 11, 2021, 07:15:26 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Dullstar

Ever since the introducing of style mixing back in whenever-that-was, the theme (which affects things like colors, lemming types, etc.) has to be tracked separately from pieces. For this reason, when building a level, it can be easy to forget to change this, leading to orig_dirt's color schemes basically becoming the default since "oops, I forgot to change it to match the primary style!"

I'd suggest creating an "auto" setting for theme, and making it the default for new levels. When auto is selected, the theme will be taken from the style from which the most terrain pieces and objects are taken. This might not always get it right - for example, if you have a primary style with a few really big pieces decorated by many smaller pieces from a different style - but you'd still be able to explicitly specify.

A possible edge case would be if there are any ties. If this happens, use something like alphabetical order to determine the result. If the result is determined during player runtime, I wouldn't suggest using something like styles.ini - the final result should have an objectively correct answer that's not dependent on the player's settings. However, the editor could bake it into the level (in which case the player would not need to know about it) - though this has the disadvantage of losing auto when the level is saved for the first time. This could be countered by having the editor save the result of auto in the level, but also store the fact that the theme was set to auto; the editor would then load auto, while the player would load the result.

WillLem

Allowing default themes Editor-side could also help with this, for example if a level creator has a preferred theme they like to use in most of their levels.

Dullstar

While a user-selectable default could be nice, it's also not really the same unless you've got a custom lemmings theme for your levels (e.g. WillLem's Lemminas). I definitely have some specific styles I use a lot, but there are multiple of them that I use, and usually I want the theme to match the main style, as while I sometimes style mix, I usually do it lightly rather than extensively. The matching colors for stuff like builder stairs are rather nice, I think.

Although it also controls lemming sprites, which isn't always what you want, since if you want specific lemming sprites and also theme colors you have to make a lemming/theme coloring pair for each, which is a bit silly. Though you could include those with a pack download or something, if your pack has custom lemming sprites with it. Of course, then you'd probably also want an auto lemming selection, which would default to taking lemmings from the current theme (which could also be set to auto...)

Proxima

Quote from: WillLem on February 11, 2021, 08:06:31 PM
Allowing default themes Editor-side

Pretty sure that's as simple as going into the styles.ini in your styles folder and where your preferred default style has "Order=XXX", changing the number to -1.

WillLem

Quote from: Proxima on February 11, 2021, 10:31:54 PM
Quote from: WillLem on February 11, 2021, 08:06:31 PM
Allowing default themes Editor-side

Pretty sure that's as simple as going into the styles.ini in your styles folder and where your preferred default style has "Order=XXX", changing the number to -1.

:thumbsup: :thumbsup: :thumbsup:

namida

QuoteA possible edge case would be if there are any ties. If this happens, use something like alphabetical order to determine the result. If the result is determined during player runtime, I wouldn't suggest using something like styles.ini - the final result should have an objectively correct answer that's not dependent on the player's settings.

Alphabetical order works fine, this should be very much an edge case anyway. A default may need to be created to cover cases where no suitable style exists (eg: the edge case of an empty level, or where all used pieces come from styles that don't have a theme.nxtm file).
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)