Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: namida on August 15, 2019, 09:21:42 PM

Title: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 15, 2019, 09:21:42 PM
EDIT: The decision has been made - custom lemming sprites will continue to be supported, but a recoloring system will also be implemented that can be used where only a recolor is desired. This will mean that sprites that are just recolors need no updates for new features - the same recoloring just gets applied to the new sprites automatically.

The whole debacle with shimmier sprites shows that custom lemming sprites are going to be a problem whenever anything new is introduced. We've had some styles where the shimmier graphic is present but the associated metadata is missing; and custom styles are giving error messages due to lack of shimmier sprites. At least in this latter case, V12.6.0 no longer crashes - it instead shows an error (only once per session, after this it's silent) and falls back to default sprites.

I'm thinking the easiest way to avoid this - remove the support for custom lemming sprites altogether. Instead, allow custom style creators to specify recoloring data only. Almost all existing custom sprites are just recolors of the default ones. The Xmas sprites aren't quite, but they're similar enough that a recolor would achieve the needed effect. Alternatively, the Xmas sprites - as official content rather than custom - could be kept, and styles can select one or the other and recolor from there.

A third option is of course a hybrid approach - leave support for custom sprites in, but also implement the recoloring option. Styles that only need to recolor can then use this (which I believe is all styles aside from Xmas, some of GigaLem's styles, and some of Plom's styles - even Arty's silhouette style could be done with a recolor-only setup), and won't need any further work for future updates; while those who wish to use custom sprites can still do so - at their own responsibility for keeping their sprites updated. With that being said, if we're going to go this route, I would need to see that people actually using this feature are in fact willing to maintain their sprites - so how quickly we get the shimmier graphics for the relevant styles may affect how willing I am to consider this option.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Minim on August 16, 2019, 06:28:16 AM
I'm in support of the removal of custom lemming sprites, but if I were you I would send a PM to all the graphic set creators who use custom sprites. As for Christmas I might put them in a separate folder first until the shimmier thing works. If we do feel the need to add Xmas sprites, the setting could be configured in the styles.ini file.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: GigaLem on August 16, 2019, 08:18:02 AM
I'm against this, fully. I wouldn't EVER want to remove the theming the completes the Millas pack. I can't go through a cull this big, period. I've went through removing gimmicks, removing slowfreezes and radiation, but this I can't afford. You wouldn't believe the amount of roadblocks I had to go through to get to where I am, and I'm sick of getting more in the way. Unless we go forward with the third option (I haven't even got the chance to have shimmiers made, and now those are an instant must since I have no choice) DO NOT MOVE FORWARD WITH THIS CULL.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 16, 2019, 08:59:37 AM
Guess what, my culling-alarm sensors are going off again... :evil:

This is another case of "I'm not personally affected by this", since all my sprites are mere recolours. BUT I immediately thought of GigaLem's edits when I read this, and as such, I cannot support an outright removal of custom-sprite support.

GigaLem put a lot of effort into actually changing the shape of the sprites. You don't want to punish content creators who put in more work than others. Otherwise, you're going to demotivate specifically those people who could provide the most interesting new things to the game.

([virtue-signal]See, kids? That's called empathy. Caring about other people being affected even when your own stuff isn't. Probably could have prevented some other culls as well...[/virtue-signal] :P)

Wasn't this one of the main appeals of New Formats that you originally advertised to me during the transition period? ;) That adding custom sprites is a lot easier now than in Old Formats?

At the same time, having to change the image files for all sprites whenever one wants to do a mere recolouring is a nuisance, and makes adding new sprites more work than it actually needs to be if it's merely about recolouring.

Therefore, I think the obvious solution is the hybrid approach you suggested:

Quote
A third option is of course a hybrid approach - leave support for custom sprites in, but also implement the recoloring option.

This would allow a "quick way" for everyone who wants to do mere recolours, and might actually encourage people to give more styles custom-coloured sprites (which is a term I'm going to use from now on to explicitly distinguish them from custom-shaped sprites).

Custom-shaped sprites should still be allowed, and would obviously require separate image files for each sprite. Especially given Nessy's plans to introduce the L2 sprites for all the respective styles across the board, this feature actually needs to remain. Remember that all L2 sprites have custom exiting animations (e.g. the Medieval lemmings raise their sword, the Outdoor lemmings sneak into the tent from the sides, etc.).

Quote
I haven't even got the chance to have shimmiers made, and now those are an instant must since I have no choice

I've already seen namida's "fallback" feature in action, i.e. the security routine that detects missing sprites and just automatically switches back to default sprites. If that routine works consistently, I don't really see the problem - neither with missing sprites being a danger to the stability of the game, nor with GigaLem being under any time pressure to create Millas Shimmiers?

Removing support for custom-shaped sprites would definitely be an overreach with this feature already implemented. Without this security measure, I would have had some understanding and would have seen it as a tradeoff between stability and creative options. But with that routine in place, there's really no justification to remove support for custom-shaped sprites.

If a lemming-sprite creator is "lazy" and doesn't update their sprites with the newest skills (like e.g. the Jumper being next on the list), then they will simply automatically be "punished" by no-one actually getting to admire their work as long as the sprite set isn't complete: The game will simply automatically resort back to default sprites, and no player will ever get to see what this specific content creator's custom sprites look like - until they are complete and thus automatically added again.

(And to be clear, I'm not calling GigaLem specifically "lazy" for not having made Shimmier sprites yet. I simply acknowledge that some people may have more good reasons to not update their sprites than others... ;) )

So it's like a general "temporary ban" of incomplete sprite sets. Not bothering the player with stability issues, but also not outright banning the content creator from ever making custom-shaped sprites again.

So yeah, easy choice - total support for option 3. :thumbsup: :agree: That would be an improvement of the current state in every way.

Absolute and complete rejection of options 1 and 2! :disagree:
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 16, 2019, 07:46:05 PM
With that being said, if we're going to go this route, I would need to see that people actually using this feature are in fact willing to maintain their sprites - so how quickly we get the shimmier graphics for the relevant styles may affect how willing I am to consider this option.

This kind of automatically bias against custom sprites because if we are still considering possibilities of adding new skills in future, there will inevitably come a time when the person who made some custom sprites might no longer be around or active by the time some new skill came along, possibly in the indefinite far future.

I also feel like even if a style is missing custom sprites for some new skill/behavior that the original designer had no way to anticipate, the style might still remain useful/preferred to some people, who may choose to simply avoid the skills that have missing graphics when designing levels using the style.  Custom sprites will fundamentally be problematic when it comes to new skills (or just any new behaviors that require new lemmings animations), but I'm not convinced that they become completely useless just because of this weakness.

Are there any more work left to fix the current issues with custom sprites, so that game can at least always reliably fall back to default sprites for anything missing?

Recoloring support is definitely a more future-proof way to customize sprites, and given its relative ease compared to having to make your own set of sprites, it will definitely be a good option to support.  But it is of course a trade-off since it provides much more limited customization.  It's of note that even the official games opted to create new sprites for Xmas lemmings rather than just doing a mere re-color.

Ultimately all culls will punish the people who spent time and effort in creating and using the assets that are affected.  At the same time, technically this might arguably be one of the less problematic culls, in the sense that any affected existing levels can simply change back to using the default sprites.  Unlike culls of skills/behaviors that generally require nontrivial redesigning the level around the culled behaviors.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 16, 2019, 07:53:02 PM
Quote
I also feel like even if a style is missing custom sprites for some new skill/behavior that the original designer had no way to anticipate, the style might still remain useful/preferred to some people, who may choose to simply avoid the skills that have missing graphics when designing levels using the style.  Custom sprites will fundamentally be problematic when it comes to new skills (or just any new behaviors that require new lemmings animations), but I'm not convinced that they become completely useless just because of this weakness.

Are there any more work left to fix the current issues with custom sprites, so that game can at least always reliably fall back to default sprites for anything missing?

Currently, NeoLemmix does not fall back on a per-file basis, it's all or nothing. So for example - if one were to play one of GigaLem's levels that use his custom sprites right now, they would get the default lemmings because of the missing Shimmier graphics, even though the levels themself don't use Shimmiers.

A per-file fallback is perhaps an option I could look into implementing. It's not completely straightforward, as the metainfo also will need to be loaded from a different file in this case - basically, there's one (sometimes two; the second is optional, and they should be taken as a pair - ie: if the custom style lacks the optional one, don't combine the custom style's 1st file with the default's 2nd) PNG files per animation, and a "scheme.nxmi" file with metainfo for the entire spriteset.

The other issue that arises here is the recoloring for selected lemming / etc - this is based on replacing colors, and the current code only supports loading one style's data at a time. Loading both could give weird visual results, while applying different sets based on the individual sprite would be extremely messy.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: GigaLem on August 16, 2019, 08:19:55 PM
I am currently looking into having the custom sprites be made before any more progress on Millas is made
The only compromise I've thought of is to put custom lemmings sprites in a different spot and have any custom lemmings be selectable from a menu on the editor
as in "if you want to use Xmas lemmings in a non-xmas level, go to the drop down menu and select xmas"
Like have use for custom lemmings be universal instead of just "Per set" add a bit of freedom to which set you use.

And this something I highly recommend in the future, for creators that want keep their custom lemmings up to date, PLEASE DM or PM THE NEW SHEETS AND SCHEMES TO THEM! This will let them know to get new sprites done ASAP. Some people do more maintenance than you would think.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Dullstar on August 17, 2019, 02:55:24 AM
I support the hybrid option! My suggestion would be to do this in a way that future-proofs functional-even-if-incomplete outdated styles (even if this might require another period where every set needs to be updated once now to keep working):

Suppose a set uses custom lemming sprites which do not have shimmier graphics. My desired behavior would be that the game would use the custom sprites when they're available, and fall back on the defaults if they are not, on a per-animation basis. So assuming the shimmier sprite is the only missing graphic, the style would function as normal in a level which contains no shimmiers. This fallback behavior should respect the proposed recoloring as well, which would add an advantage for the L2 sets given L2's exiting animations: for any set that is based off the defaults but contains a few custom animations, the set would only need to provide data for the animations it wishes to overwrite.

If desired, the editor could be made to give a warning if an animation potentially required in the level is missing: again, assuming only the shimmier is missing, the warning only displays if the level contains shimmiers. This warning would likely require some metadata to distinguish between out-of-date sets and the default-with-some-custom-animations scenario I described, however.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 17, 2019, 03:49:35 AM
The problem there is that currently, NeoLemmix isn't coded to handle mix-and-matching lemming sprites from different sets. The actual spritesets wouldn't be too hard to make mixable, but the recoloring would need some significant rewriting to be able to handle it properly. Displaying the warning only on levels that (for example) contain shimmiers would be even trickier.

Honestly - I think it's best we rule out any per-sprite fallback, on complexity grounds. I agree that the points being raised in favor of keeping custom sprites as an option are valid - so I will leave support for them in, while also implementing the recoloring capability. I'll have to think about the best way to go about this. Custom sprites will remain on an "all or nothing" basis - if even one graphic is missing, NeoLemmix will fall back to default sprites. (The alternative without getting too difficult to implement, is that those sprites just result in a blank lemming, or a fallback to a different animation.)
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 17, 2019, 07:47:57 AM
Honestly - I think it's best we rule out any per-sprite fallback, on complexity grounds.

That's fair.  Hardly worth the effort for the few styles out there that might benefit from it, if it also means higher potential risk of game-breaking bugs that may end up affecting everyone.

Plus, the experience would be weird anyway when player actually sees a lemming jarringly goes from a custom sprite to a default sprite in case of an action like skill assignment.  I think most player would rather stick with all default sprites if this could happen in a level.

Custom sprites will remain on an "all or nothing" basis - if even one graphic is missing, NeoLemmix will fall back to default sprites. (The alternative without getting too difficult to implement, is that those sprites just result in a blank lemming, or a fallback to a different animation.)

There might be some merit to the "blank lemming" idea (or at least some kind of placeholder sprite, one that looks obviously wrong).  Specifically if we like to let people see custom sprites on levels that could never end up showing a missing sprite.  Basically, falling back to all defaults is likely the best option for levels where the missing sprites need to be displayed, while sticking with the custom sprites is likely the best option for levels where the missing sprites will never be displayed.

It almost feels like there may be merit to have a user option (ideally easily hot-key toggle-able) to pick one or other way for missing sprites handling.  Ideally maybe in most cases, you can reliably tell ahead of time whether missing sprites will be displayed based on available skills and objects in the level, and could then pick the right option for the player.  But admittedly that adds complexity again for what may be relatively corner cases.

Falling back to a different animation doesn't seem much better than to a blank/placeholder lemming, in fact might be worse if it can cause player confusion (even if only momentarily) due to looking too similar to some other skill or action than what is actually happening.  I think a player would be better off seeing the obviously wrong blank/placeholder lemming, and then can respond by changing setting for that level to use default sprites.

Then again, seems like for the missing sprite to happen at all, the level designer would have consciously chosen to use a combination of style and skill that is known to have that issue.  Why the heck would they want that for the player?  You'd think they'd make sure to limit their level to only support things that can actually be properly displayed by the custom sprites of the style, or else use a different style (or otherwise just setup the level to use the default sprites instead).  If we have faith in that, we can potentially just do blank/placeholder lemming as the only fallback option.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 17, 2019, 09:05:35 AM
Great, thanks for going with the hybrid approach, namida! :thumbsup:

Regarding the "all-or-nothing" fallback on default sprites in case of missing sprites: I'm fine with this, because it's a mild form of "punishment" for people who forgot to update their sprites, serving as a gentle reminder to do it because they won't even get to see their own sprites while testing their levels. At the same time, it is automatically fixed once the sprites are updated.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 17, 2019, 08:42:39 PM
Quote
Regarding the "all-or-nothing" fallback on default sprites in case of missing sprites: I'm fine with this, because it's a mild form of "punishment" for people who forgot to update their sprites, serving as a gentle reminder to do it because they won't even get to see their own sprites while testing their levels. At the same time, it is automatically fixed once the sprites are updated.

Yeah, this is another part of it. I agree now, that removing the support altogether is going too far - but I don't see much reason to go out of my way to implement far more complex fallback behaviour, just to account for people who don't update their sprites. Now on the other hand, Dullstar's point about it being useful for cases where a spriteset just wants to replace one or two specific animations, is a use case I'd be more interested in doing this for - but it's still a lot of work given the current implementation. It might be something for me to take into account if I ever feel the lemming animation system needs a complete rewrite anyway (and complete rewrites of parts of the code do happen from time to time).

Quote
This fallback behavior should respect the proposed recoloring as well, which would add an advantage for the L2 sets given L2's exiting animations: for any set that is based off the defaults but contains a few custom animations, the set would only need to provide data for the animations it wishes to overwrite.

Regarding L2's exiting animations - are these unique for every style, or is there a single exiting animation that's different from the L1 one? If it's the latter, then this could even be done by having an "l2_general" style containing the lemmings, and using the recoloring features from there.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Pooty on August 17, 2019, 09:55:32 PM
Regarding L2's exiting animations - are these unique for every style, or is there a single exiting animation that's different from the L1 one? If it's the latter, then this could even be done by having an "l2_general" style containing the lemmings, and using the recoloring features from there.

Each tribe (and therefore each style) has unique exit animations from each other, although the Classic Tribe exit animation is pretty much the same as the one in L1.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 17, 2019, 10:11:37 PM
Yeah, I gave some examples above, but here's an overview of the exit animations of Lemmings 2, trying to describe them to the best of my ability:

Beach: you see the lemming from behind as he walks up a couple of steps of the front stair of the sand castle before vanishing into the interior
Egyptian: you see the lemming from behind, he walks slightly up and then downward into the pyramid
Outdoor: the lemmings sneak into the tent from the side
Medieval: the lemming raises his sword to "greet", then turns around and goes into the castle
Classic: very similar to Original Lemmings, maybe slightly more like simulating a curved trajectory, as the Pillar exit, which is used for all Classic levels, features a staircase - so they probably wanted to make it look more like the lemmings were walking up that staircase
Circus: the lemming takes a bow in front of the tent before turning around, you see him from behind, getting smaller as he vanishes into the tent
Highland: the lemmings walk into the telephone cell from the side (because the door of the exit always looks closed)
Polar: you see the lemming from behind, he swings his arms as he's walking down into the igloo, almost looking as if he were running (or maybe ice-skating?) - perhaps because he's cold? :D
Space: the lemmings do multiple backflips, rotating because of anti-gravity as they float off into space
Cavelem: the lemmings take a bow in front of the cave - very similar to Circus, it seems to me, but not exactly identical
Shadow: the lemmings approach the gap in the middle of the box and sneak in from the side, doing a slight jumping motion
Sports: the lemmings walk straight ahead towards the flag pole while you see them from behind, becoming smaller and smaller the farther away they're supposedly getting from the player
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: grams88 on August 17, 2019, 10:30:59 PM
The Highland one I think the lemmings are drunk and fall into the phone box, I think this was associated with Scotland in that we like to get drunk so they say.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 18, 2019, 03:46:33 AM
I've implemented support for automatically generating recolored sprites. This can be used out of the box with both the standard and Xmas sprites. It will also be possible to make custom spritesets recolorable as well, with a little bit of extra work.

Existing custom sprites will need a slight change - the "_mask.png" files will need to be replaced with use of the recoloring system. This change will not be required right away - I'll keep some backwards-compatibility code in there for a while, but consider it a deprecated feature and do not use it for any new content created after V12.7.0's release (continue to use it as need be during V12.6.X's life). It will be very easy to change over. Except for this, custom sprites will continue to work exactly as they do now.

I have already made modifications in the NL repository to use recoloring instead of custom spritesheets for both of Arty's styles and the three L2 styles that have custom sprites. Does anyone have screenshots of the other tribes' lemmings handy (all except Highland, Beach, Shadow and Classic)? I may as well set up their recoloring data as well.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Crane on August 18, 2019, 03:52:52 AM
Personally I think it's a bit of a shame to fully remove custom sprites.  I remember I once tried to have Lemmings wear space suits for Cheapo Copycat (using things like a jetpack to replace the Floater and bringing their arm up to activate a Predator-style self-destruct system for the Bomber), and as mentioned before, some of the Lemmings 2 styles have custom exit animations.

I suppose if anything I would say that if a particular custom animation doesn't exist, then to use the default one.  If anything, the sudden switch to a default style of Lemming should be jarring enough that the creator should consider filling in the blanks.

There is also the Christmas-style lemmings that are, in effect, custom sprites due to their bobble hat and most of their green hair being hidden by it.

P.S. I don't have a screenshot of it, but the Space lemmings of Lemmings 2 had a custom exit animation where they tumble head over heels and disappear into the background... you know, the classic display of weightlessness.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 18, 2019, 04:51:32 AM
Each tribe (and therefore each style) has unique exit animations from each other, although the Classic Tribe exit animation is pretty much the same as the one in L1.

Aren't they also all different in length (ie. how long it takes before lemming finishes animating and actually gets counted as exited)?  Does NeoLemmix support customizing that as well?  This could actually have game physics implications.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 18, 2019, 04:53:39 AM
Does anyone have screenshots of the other tribes' lemmings handy (all except Highland, Beach, Shadow and Classic)?

Well, the trusty old Lemmings Encyclopedia is still around after all this years:  https://tle.vaarties.nl/lemmings2/solutions/

(Look on the left to select the tribe to view screenshots for.)
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 18, 2019, 05:08:41 AM
I suppose if anything I would say that if a particular custom animation doesn't exist, then to use the default one.  If anything, the sudden switch to a default style of Lemming should be jarring enough that the creator should consider filling in the blanks.

We talked about the various options at length in the earlier posts.  Due to code complexity it would only be an "all or nothing" kind of fallback, it would be too complex to, say, use the sprites for the skills that has them and then use the default sprites for other skills that don't.

Currently, it will automatically fall back to all default sprites, which admittedly is the best option for the player (there's no risk of seeing anything strange).  Namida did bring up an alternate idea which I expanded upon (though doesn't sound like people are leaning towards this), that instead of falling back to all default sprites, the game could just still use the custom sprites but use a blank/placeholder (that is visually obviously wrong) whenever it needs to use one that is missing.  This would allow custom sprites to remain fully usable on the levels that won't do anything resulting in having to use missing sprites, particularly any existing old levels that were created using the custom sprites (older than whatever new skill or feature started introducing new sprites, that now automatically become "missing" for existing styles).  Depending on the kind of mix-and-match allowed, new levels that needs the missing sprites would either be created to only use the style for its terrain/object graphics and use default sprites for the lemmings, or the style would not be usable if such a setup is not possible in NeoLemmix (unless they are okay with players seeing the "missing sprite" placeholders during play).
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 18, 2019, 05:29:28 AM
Personally I think it's a bit of a shame to fully remove custom sprites.  I remember I once tried to have Lemmings wear space suits for Cheapo Copycat (using things like a jetpack to replace the Floater and bringing their arm up to activate a Predator-style self-destruct system for the Bomber), and as mentioned before, some of the Lemmings 2 styles have custom exit animations.

I suppose if anything I would say that if a particular custom animation doesn't exist, then to use the default one.  If anything, the sudden switch to a default style of Lemming should be jarring enough that the creator should consider filling in the blanks.

There is also the Christmas-style lemmings that are, in effect, custom sprites due to their bobble hat and most of their green hair being hidden by it.

P.S. I don't have a screenshot of it, but the Space lemmings of Lemmings 2 had a custom exit animation where they tumble head over heels and disappear into the background... you know, the classic display of weightlessness.

It's already been decided that NeoLemmix will keep support for custom sprites, but also implement the recoloring so it can be used where a simple palette swap type effect is sufficient - which is the majority of cases.

Each tribe (and therefore each style) has unique exit animations from each other, although the Classic Tribe exit animation is pretty much the same as the one in L1.

Aren't they also all different in length (ie. how long it takes before lemming finishes animating and actually gets counted as exited)?  Does NeoLemmix support customizing that as well?  This could actually have game physics implications.

NeoLemmix definitely supports arbitrary frame counts for lemming animations that don't have any effect on physics, but I'm not 100% sure off-hand if that extends to those that do affect physics as well. I definitely remember that I intended to modify NL so that such animations can have different lengths (without any change to physics), but I'm not sure if that ever happened.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 18, 2019, 06:17:24 AM
Does anyone have screenshots of the other tribes' lemmings handy (all except Highland, Beach, Shadow and Classic)?

Well, the trusty old Lemmings Encyclopedia is still around after all this years:  https://tle.vaarties.nl/lemmings2/solutions/

(Look on the left to select the tribe to view screenshots for.)

That's useful! Implemented nearly* correct coloring for all L2 styles.

* I made a deliberate decision to deviate slightly for the athlete colors in the Shadow tribe, as the usual athlete coloring is not easily distinguished from non-athlete colors.)

I suppose if anything I would say that if a particular custom animation doesn't exist, then to use the default one.  If anything, the sudden switch to a default style of Lemming should be jarring enough that the creator should consider filling in the blanks.

We talked about the various options at length in the earlier posts.  Due to code complexity it would only be an "all or nothing" kind of fallback, it would be too complex to, say, use the sprites for the skills that has them and then use the default sprites for other skills that don't.

Currently, it will automatically fall back to all default sprites, which admittedly is the best option for the player (there's no risk of seeing anything strange).  Namida did bring up an alternate idea which I expanded upon (though doesn't sound like people are leaning towards this), that instead of falling back to all default sprites, the game could just still use the custom sprites but use a blank/placeholder (that is visually obviously wrong) whenever it needs to use one that is missing.  This would allow custom sprites to remain fully usable on the levels that won't do anything resulting in having to use missing sprites, particularly any existing old levels that were created using the custom sprites (older than whatever new skill or feature started introducing new sprites, that now automatically become "missing" for existing styles).  Depending on the kind of mix-and-match allowed, new levels that needs the missing sprites would either be created to only use the style for its terrain/object graphics and use default sprites for the lemmings, or the style would not be usable if such a setup is not possible in NeoLemmix (unless they are okay with players seeing the "missing sprite" placeholders during play).

Basically - one style is selected as the "theme" for a level. This determines lemming colors, as well as a few other visual aspects, like builder brick colors. Which set of lemming sprites to use is also determined by the theme - it could point to the same style, to "default", or to a third style. (As of the next update, and if the lemming sprites it points to support it, it can then also specify recoloring info for the lemming sprites. I've added this support for "default" and "xmas"; it will be up to custom sprite creators to add it, if they wish, to their custom sets.)

The theme has no bearing on which terrains or objects may or may not be used. Conventionally, you would primarily (or even solely) use terrain / objects from the style selected as the level's theme, but this is not required, and in some cases cannot be done - for example, the Xmas style has no terrain pieces, only a theme, lemming sprites and objects; you'd have to use terrain from another style (generally, the Snow style would be used here). For a long time now it has been possible to mix terrain pieces / objects from different styles in a single level; this could be done even before new-formats.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 18, 2019, 08:59:52 AM
My custom Egyptian lemmings are also just recolours - a screenshot can be found in the custom sprites thread ;) .

The question is how to handle these if all L2 styles have their original sprites now. Should I simply turn this sprite type into strato_egyptian, in analogy to nessy_machine? Meaning a style that only contains sprites and nothing else?
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 18, 2019, 09:19:18 AM
Quote
The question is how to handle these if all L2 styles have their original sprites now. Should I simply turn this sprite type into strato_egyptian, in analogy to nessy_machine? Meaning a style that only contains sprites and nothing else?

If it's just a recolor, why does it need to exist as a separate style at all?

If you're meaning what to do until a version with this feature is released; just leave things as-is for now.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 18, 2019, 10:58:14 AM
Ah, I thought we're supposed to put the recolouring scheme file for each style into the matching style folder? ;) Because if every L2 style has its own recoloured sprites, I figured that was how it was going to work.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 18, 2019, 07:41:45 PM
Maybe we're thinking along different lines here. Let me explain in full how the new system works, then if your question isn't answered by this, please try rewording it as I'm not sure what else you might be asking?

Firstly - as mentioned above, if you have existing custom sprites, they will continue to work almost as-is. The only thing that you will need to change - and this will not need to be changed right away, I will leave backwards compatibility code in place for a few versions - is that if you make use of the "xxxxxx_mask.png" files (often used for destruction particles in particular), you'll need to replace this with acheiving the same effect via the recoloring feature. Likewise, new ones can be created in the same way, minus the change to how masking is done.

Lemming sprites can have (and in the case of "default" and "xmas", do have; for custom spritesets, it's up to creators if they want to add support) extra metadata in the scheme.nxmi file that allows them to be recolored. This data specifies a list of source colors, and their associated names. For example, a lemming's hair in the default sprites, without any recoloring, is (RGB hex) 00B000. So there'd be a line in styles/default/lemmings/scheme.nxmi: LEMMING_HAIR x00B000. (Note that the name "LEMMING_HAIR" is arbitrary here, I could have just as easily written "FLAPPY_BIRD x00B000" and it would work, as long as theme files trying to recolor it used the same name; but of course, meaningful and relevant names are a good idea.) These lines go inside a "$COLOR_SWAPS" section. (The name "$RECOLORING" was already in use for the conditional recolors, eg. athlete, zombie, etc colors.)


If a style's theme.nxtm points to "default" for lemming sprites, and doesn't specify any recoloring animation, it will still get the default sprites, as-is. But, style creators will likely already be familiar with specifying a few other colors in the "theme.nxtm" file, such as MASK, MINIMAP, etc. You simply specify lemming recoloring colors in exactly the same way.

For example - whereas currently l2_highland points to its own custom lemming sprites, in the next update it can have the following theme.nxmi file, which points to "default" for the actual sprites, but contains recoloring information:

L2_Highland's theme.nxmi (click to show/hide)

Remember, once again - the actual color names are arbitrary. If you're setting up recoloring with custom sprites, you can use any names you want; all that matters is that the same name is used in the source style's "scheme.nxmi" and the target style's "theme.nxtm". I could have instead used the name "BIG_DUCK" instead of "LEMMING_HAIR", and as long as that name was used on both sides (default's scheme.nxmi "$COLOR_SWAPS" section, and l2_highland's theme.nxtm "$COLORS" section), it would work.

In terms of replacing the "xxxxxx_mask.png" files - you'd copy/paste them onto the main graphic, in a unique color (perhaps death magenta, FF00FF). You'd then define a $COLOR_SWAPS entry for this color, using the name "MASK" - yes, you can use "standard" color names as part of this too, although MASK is probably the only one you should do so with (but maybe there's a creative idea I haven't thought of for doing this - at any rate, it would have been extra work to forbid it, so the option's there if anyone finds it to be useful).

So -
If you want a custom set that's just a recolor of default (or xmas) - for example, the L2 sets as they currently are in NL, or Arty's "underwater" or "silhouette" styles - you nuke your "lemmings" folder with the custom sprites, and use the above system instead. You don't need to change anything when a new skill (like the Jumper) gets introduced, because it's just based on recoloring the default ones - and it can easily recolor any new ones that get introduced too.
If you want a custom set that's actually custom - for example, GigaLem's Millas sets - you do things exactly the same way they're done now. The only difference would be that you get rid of the "_mask.png" files, and use recoloring to "MASK" in their place, as described above. Again, support for _mask.png files will be kept (but considered deprecated; so don't use it for any new content after V12.7.0's release) for a few versions to give people time to switch over - it doesn't cause much mess to the code to keep this in place, so it's no problem to do so for a little while.
If you want a base custom set with unique shapes, that's then recolored for several of your styles - my suggestion here would be to create a base style that just has lemming sprites, for example (if we were creating sprites that replaced the lemmings with ducks) you might call this "author_ducks_sprites". This would likely be a style consisting only of lemming sprites; it might not even have a theme file. You'd set up the $COLOR_SWAPS section as above for this style's sprites. Then in your other sets - "author_shadowducks", "author_egyptducks", etc, you'd point to "author_ducks_sprites" for lemming sprites, and specify recoloring in pretty much the same way you would when recoloring from default.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 19, 2019, 08:11:10 AM
Thanks a lot for the detailed explanation, namida! My question was simply about where to put that file - in this case, the L2_Highland.nxmi. That would still go into the l2_highland styles folder, wouldn't it?

Meaning l2_egyptian would contain an nxmi file for the official recolouring of the default sprites for Egyptian - meaning slightly darker green hair and slightly more teal clothes. So the special issue here is that my custom Egyptian sprites were introduced as an alternative to an official style that apparently is using slightly custom colours already.

I could of course replace that l2_egyptian.nxmi with my recolouring scheme, but what if I want to have both available for quick selection? Then I'd need to create a separate style folder containing just, for example, a strato_egyptian.nxmi file, so that it can be selected in the editor without replacing the l2_egyptian.nxmi entirely. ;)
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 19, 2019, 07:11:37 PM
Quote
My question was simply about where to put that file - in this case, the L2_Highland.nxmi. That would still go into the l2_highland styles folder, wouldn't it?

Are you talking about the source colors, ie: the ones that identify "these are the colors to change from"? That goes in the scheme.nxmi file of the lemming sprites that are being recolored, in a new $COLOR_SWAPS section.

Are you talking about the target colors, ie: the ones that are changed to? That goes in the theme.nxtm file of the respective style, in the existing $COLORS section (just with new color names).

So, using the Highland example:

styles/default/lemmings/scheme.nxmi contains the $COLOR_SWAPS section from the above post
styles/l2_highland/theme.nxtm contains the $COLORS section from the above post - it already contains a $COLORS section in current versions (for eg. minimap, background, etc colors), but the new one has even more colors listed in it
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 19, 2019, 08:32:27 PM
I'd also like to clarify, because it seems there's still some doubt around it:

1. The only differences in custom lemming sprites in V12.6.X, compared to V12.4.X, is:
- "Jumper" (the state when a walker steps up 3 to 6 pixels) has been renamed "Ascender"
- There are two new animations, "Reacher" and "Shimmier", both of which are part of the Shimmier skill

2. If your custom sprites work in V12.6.X, they will work, without any changes, in V12.7.X. The recoloring is a new feature - you do not have to use it, and sprites that don't use it will still work as-is.

3. The "xxxx_mask.png" files are being deprecated, not culled, in V12.7.X. This means that, once V12.7.X is released, they should not be used for new content, and the recoloring system should be used instead. It also means that eventually existing custom sprites need to be adjusted, as the feature will eventually be culled - but not until at least a couple of versions later. As in, V12.8.X or V12.9.X or V12.10.X; it won't be culled in eg. V12.7.1 or V12.7.2 etc. But existing spritesets that use them will work, without modification, in V12.7.0. I will create a tutorial explaining exactly what needs to be done to future-proof them, and how to do it, once V12.7.X is in the release candidate phase. There's no point in me explaining this any sooner, because the recoloring system does not exist in V12.6.X.

4. And if it's still not clear from the above - if you're doing an entirely custom spriteset, go ahead and do it exactly as you normally would. If you're doing a spriteset that's just a recolor, it's up to you to decide if you'd rather do it the classic way now and change to using the recoloring system later, or if you'd rather just wait for V12.7.0 and use the recoloring system. But you can do things the current way, it will work in V12.6.X, it will work in V12.7.X.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: Strato Incendus on August 20, 2019, 09:28:44 AM
@namida: Thanks for the explanation! ;) I guess the rest will be easiest to understand once I see it in action.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: ccexplore on August 20, 2019, 06:17:44 PM
If you're doing a spriteset that's just a recolor, it's up to you to decide if you'd rather do it the classic way now and change to using the recoloring system later, or if you'd rather just wait for V12.7.0 and use the recoloring system.

Might be good to remind people roughly what the schedule would be like waiting for V12.7.0.  If the spriteset is indeed just a mere recolor, it is absolutely to your advantage to use the recoloring system, as it means you automatically get it applied to any new sprites that might came about in the future due to any new skill additions etc.
Title: Re: [SUG][PLAYER] Remove support for fully custom lemming sprites, allow recolors.
Post by: namida on August 20, 2019, 07:04:46 PM
Currently, there's no formal structure of how NL releases are timed. I don't know if Nepster had a system; but for me, it's always been "I have a release ready? Release it."

I have proposed (and will probably adopt) such a schedule, as per my recent topic on the main board, but I'm seeing if anyone has any feedback on that first before committing to anything.