Author Topic: [DISCUSSION][PLAYER] Official support for custom pickup skills.  (Read 1835 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
So, as I promised, I'm going to look into implementing official support for custom pickup skill objects for V12.7.0, in a way that will not require manual updates every time the skill order changes and/or a new skill is added.

Does anyone have input on how these should work? I'm thinking that - the actual graphic would simply present two states. Using the default pickup skill object as an example, the main graphic would have a "picked up" graphic and a "not picked up" graphic - the grey background vs the colored one.

The skill icon would then be added automatically. Similar to how the skill panel graphics are handled, the actual image would simply come from the lemming sprites. To allow for circle shapes, an eraser mask could be provided that would partially erase the skill graphic. Additionally, the NXMO file would be able to define the positioning of the skill graphic, and possibly the Z index of it in relation to secondary animations, so that there can be overlays on it if needed.

To those of you who use custom pickup skill graphics - does this sound acceptable? Is there any effect (outside of "I want the graphics to look completely different from the lemming sprites") that you feel wouldn't be achievable with this?

Please be reminded that in the meantime, no new custom pickup skill objects will be accepted into the NeoLemmix styles download. Existing ones may be updated, and they will need to be to account for the shimmier.
« Last Edit: August 15, 2019, 11:17:15 PM by namida »
My Lemmings 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)

Offline GigaLem

  • The Dog That Brought Lemmings to Avalice
  • Posts: 1415
    • View Profile
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #1 on: August 15, 2019, 11:13:27 PM »
As someone whose been using these in my sets recently, this is something I support. Custom Pickups adds a bit of flavor to the set, adding to the atmosphere of the level and having it fully supported can and will help

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #2 on: August 16, 2019, 03:05:26 AM »
Any input on the proposal about how it would work, or does that sound all good to you?
My Lemmings 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)

Offline Minim

  • Posts: 1724
    • View Profile
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #3 on: August 16, 2019, 06:45:45 AM »
I remember customising my pickup skills to look and behave like the PS3 ones where they completely disappear upon pickup. It also had a much larger trigger area. Eventually, it was reverted back, and now thanks to the re-positioning of these icons some of my PS3 levels look rather untidy. :(

Because most graphic sets (Particularly the L2 and L3 ones) have terrain pieces comprising an 8x8 grid I believe pickup skills should have a certain resolution of 16x16, be placed in the middle of the canvas and alter the trigger area so that it aligns with the terrain properly. At the moment, as well as it being out of position horizontally, the current ones' trigger areas are either too high or too low when snapping to an 8 grid. In other words, the areas should be either re-positioned 2 pixels right and 1 pixel down, or expanded to cover this area whilst aligning with everything else.

I might've gone a little off-topic here but I think that might be the best proposal.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #4 on: August 24, 2019, 12:42:33 AM »
I've now implemented this player-side (I still need to implement the editor side).

As with the changes to lemming sprites, NOTHING can be done currently. NOTHING can be done until V12.7.0. With that being said - existing custom pickup skill objects will break in V12.7.0, so you will need to update your objects, if possible, when the V12.7.0 release candidate becomes available.

Yes, this does mean two versions in a row that have required changes to these objects. This is the risk you took when you chose to use in your styles an object type that wasn't officially supported, and which I have constantly reminded people is not officially supported. V12.7.0's changes will make them officially supported, so it should hopefully be the last time you need to change them - effort will actually go into minimizing breakages with them in the future, because they'll now be an officially supported feature.

To understand this explanation, you'll need a reasonable idea of how the new animation system works, as this builds on that.

Basically - pickup skills are now defined with the primary animation's name set to "*NULL". This is a special name that tells NL not to load any graphic for that animation. The only other property that needs to be set for the primary animation, is the offset coordinates and/or Z index (if applicable).

NeoLemmix will auto-generate the primary animation based on the lemming sprites (or in the case of the disarmer, a global graphic that cannot be customized). The graphic for each skill's sprite will be 24x24 in size, and as mentioned above, you can use the OFFSET parameters to reposition it. You can have an always-hidden secondary animation called "ERASE", which if present, will act as an eraser mask for these autogenerated sprites. This mask should be 24x48 in size; the upper half represents what will be erased when the skill has been picked up (more often than not, you'll probably want this to be a full erase), while the lower half represents what will be erased when the skill hasn't been picked up (you might use this, for example, to crop the image to the boundaries of your object).

Anything outside of that, you use secondary animations (most likely with the "EXHAUSTED" trigger condition) to achieve.

I think it will be a lot easier to understand this with an actual example, so I've attached a copy of what the new default:pickup looks like for V12.7.0 (graphic files and NXMO file). Of course, part of this relates to its recoloring.

If there is any effect you want to be able to achieve, that's possible currently, that you think might not be possible with this system, other than providing outright custom lemming graphics instead of using the level's lemming sprites (as I've said - I will consider this when someone shows me an actual justified use case for it), please bring it up now. I will be much less willing to adjust the system when it's already been released, than to make changes before any release happens.

EDIT: I've attached images showing the actual spritesheet NeoLemmix generates (when using the default sprites) for the primary animation of a pickup skill. As new skills are introduced, or the order is changed, this will adjust automatically.

The first version shows how the sheet looks without any erasing applied (note that in practice, when no eraser is given, NL will fully erase the 1st, 3rd, 5th etc frames - these represent the graphic after the skill has been picked up; I excluded this from the image here to illustrate better how it works).

The second version shows how the sheet looks when the default style's pickup skill's eraser is applied to it. Note that the 1st, 3rd, 5th etc frames are fully erased, whereas a circle area in the middle remains unerased for the other frames.

Finally, the cropped screenshot shows why this erase effect is important, and what pickup skills would look like without such an effect.
« Last Edit: August 24, 2019, 02:20:26 AM by namida »
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #5 on: September 07, 2019, 08:36:20 PM »
I've made some very slight adjustments to the above. Instead of using "*NULL", you should use "*PICKUP" instead; and instead of "ERASE" for the eraser animation, use "SKILL_MASK". Aside from those slight changes, it's the same as the initial proposal.

These changes were done to facilitate if any other auto-generated animations need to be added in the future.
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #6 on: September 26, 2019, 06:46:20 PM »
Okay so - contrary to what my angry rant on Discord the other day may have implied, this feature is not cancelled or anything.

However, we're getting close to time for a V12.7 release candidate now, so I'd like to more or less finish up with defining how this will be implemented.

One change I've considered - a "simple" mode where you could just provide a pre-pickup background, a post-pickup background, and an erase mask, all in one file. This would not replace the above, it would simply be another option you can use instead. There would be some limitations doing it this way, so you'd need to do the above if you wanted to get really fancy, but if you're just after something simple this might save a lot of time. For example, default:pickup might look something like the attachment*. The third frame is an erase mask, so only the part of the skill graphic that fits in the circle (not the entire skill icon, leaking outside of it) gets drawn.

Cases where you might need the above full system is if you want animated borders, or if you only want to partially hide the skill icon after pickup, etc.

* The actual default-style pickup of course would need to use the above system still, due to the recoloring. But this is ignored here, for the purpose of making an example that's more in line with what custom ones are likely to do.

Does anyone feel this would be useful for them? (ie: Not just "it'd be cool to have", but "I want to add custom pickup skills, and I believe this system would be sufficient for what I intend to do with them"?)
« Last Edit: September 26, 2019, 10:18:57 PM by namida »
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [DISCUSSION][PLAYER] Official support for custom pickup skills.
« Reply #7 on: September 28, 2019, 08:53:42 PM »
After a quick look over how this could possibly implemented, I quickly came to the realisation that it's going to either be very messy, or require significant changes to existing code. So - this "simple" version will not be implemented, at least not for now.

It could still come at a later date, but for now, only the full method (as above) will be available. I'll write up a tutorial on this soon.
My Lemmings 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)