[+][SUG][ED] Refresh Styles / Missing Pieces Handling

Started by namida, June 05, 2018, 05:46:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

Currently, there appears to be no way (other than restarting the editor) to make it reload the tileset, for example, if you've added or modified a piece. Would be nice to have this feature.
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)

Nepster

Changing a tileset is such a rare occasion, that one can simply restart the editor every time this happens. There are only two cases when a style changes:
1) When downloading a new style from the homepage or NeoLemmix update. In that case people should expect to have to restart applications before the changes apply, as this is more or less standard behavior.
2) When creating a new style. But then I guess that testing in the editor will only be done in the final stages of the creation, and it's fine having to restart the editor then.

On the other hand I really want to discourage simple players to mess around with styles.
Furthermore it would run into complications when implementing it, because it would mean invalidating some of the images stored in the internal image library, while all the other parts are built around the assumption: "If an image exists in the image library, then it will always exist there". So I would run into trouble, especially if you delete some piece and then reload the style.

Summary: I will not implement this feature.


WillLem

#2
From Discord:

GigaLem — 1/31/25, 6:48 AM
I don't expect a CE editor such as SLX to get the ability to have a live updater, but when it comes to offsetting the skill placement on the assigner, well yeah
...
Basically updating an piece in the set, and refreshing the editor to account for the update without closing it

Will — 2/2/25, 11:45 AM
Yeah that's something I'd like to look at adding. I suppose "refresh styles" could be simple enough to do without having to close and reopen the Editor. It would just have to call the styles-loading routine
Clear what's there, of course, then reload
...
I suppose the question would be: what if a piece were added to a level, then removed from the style, then the style were refreshed. What should happen to the now-missing piece in the level arranger?
Surely, the piece should disappear and the "missing pieces" banner should be displayed
...
So, the level should also be re-validated after refreshing the styles.

namida — 2/2/25, 7:40 PM
game side: yes
editor side: ask the user
(to reduce hassle, only show a popup at all if something will be affected by the revalidation)
i would actually go a step further and at least consider: should the placeholder graphic for pieces that were deleted this way, be different from the one for pieces that already didn't exist when the level was loaded?
in the editor i mean
it's not really worth distinguishing in the player

Will — 2/2/25, 8:58 PM
I couldn't get the Editor to show placeholder graphics instead. If anyone can figure out how to do it I'll gladly accept a PR
That's not me being lazy btw, I genuinely tried for a while to get that to work and just couldn't do it
The Editor's handling of missing pieces is way more graceful now though: status bar is shown, list of pieces is generated, original level is preserved when saving
It could be better though

WillLem

#3
Progress on this so far:

It's possible to refresh the style itself, no problem.

Getting the level arranger to also update is not so easy. If a piece is added to a level and then removed from the style, it continues to appear in the level arranger. I've tried several methods to update it (the piece shouldn't actually be removed, it should ideally appear as a missing piece and then be handled accordingly), but all produce bugs.

I'll keep working on it.