Author Topic: [SUG][EDITOR] Add skill helpers to Hatches, Pre-placed Lems and Exits  (Read 566 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Whilst working on the Rivals feature, it's become clear that we need a way to visually represent pre-assignment of skills and other properties to (at least) Hatches, Pre-placed Lemmings, and (if Rivals are implemented) Exits.

I wonder if this has ever been suggested or discussed before, because it seems like a no-brainer. However, the Editor can sometimes be quite difficult to work with, particularly when it comes to adding something completely new. I can see why it may have been intentionally avoided in favour of simply using the checkboxes in the Piece selection tab to see what's what.

Anyway, Pickup skills have a placeholder image inserted, and this image can be updated on the fly. I've examined this in some detail so far, but can't quite figure out how it's done. As far as I can tell, all the object data is updated when (and only when) a new style is loaded into the Editor. The checkboxes don't seem to have any bearing on the placeholder image in-code, even though they clearly do in-use. I'm probably missing something very simple, but it's not for lack of trying.

If anyone knows C# and wants to help me have a look at this, I'd be very grateful (and, likely, so would many Editor users in the future!). Failing that, this can be something I revisit every now and again and hopefully, eventually, find a solution for.

Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
This will do in the meantime. In a lightbulb moment I realised that the Editor already has a way of writing text above objects, i.e. the object's index when there is (> 1)!

So, harnessed this to write the skill flags. We can make it optional if people think it would be too distracting:

« Last Edit: May 03, 2024, 02:03:17 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Better, perhaps?


Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Getting somewhere! The little square is a test placeholder, obviously drawn in completely the wrong place, but each anchors to its object when moved around!


Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Better position, plus the square stays the same size when you zoom in. At first I thought I'd need to fix that, but actually it makes sense to keep it the same size so it's still readable at any zoom factor:

Zoomed out:



Zoomed in:



Next step, better images and proper positioning!

Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Managed to get this far with it today, pinching myself as this time yesterday I wasn't even sure this was possible:



The icons are also slightly resized so that they appear the same size relative to the object when zooming in; this seems better. The next step is to add individual icons for each skill, and center the icons rather than draw them left-to-right. That's after snooker, sleep and cleaning my car.

Offline WillLem

  • Moderator
  • Posts: 3513
  • Unity isn't sameness, it's togetherness
    • View Profile
Improved icon graphics, plus they're now centred over the object:



Very happy with this, and now I can concentrate on the Player-side implementation of the Rivals feature.

Implemented in Commit 7d9b1e5
« Last Edit: May 20, 2024, 11:39:39 AM by WillLem »