Skip to content

[Accessories Part I] Slots! - #3061

Open
codemob-dev wants to merge 26 commits into
PixelGuys:masterfrom
codemob-dev:accessory-slots
Open

codemob-dev wants to merge 26 commits into
PixelGuys:masterfrom
codemob-dev:accessory-slots

Conversation

@codemob-dev

@codemob-dev codemob-dev commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

The icons and slots are just placeholders for testing until @careeoki makes some better textures. Currently, any item can be placed in the slots for testing purposes but can change that to allow no items if needed.

Screenshot_2026-05-08_20-32-06

@Wbjitscool

Copy link
Copy Markdown

there's check issues it needs some fixes according to github

@Wunka

Wunka commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

Oh no. Now that even such a pr is out I finnally need to go back to the callbacks (no we have two accessorie pr series)

@Argmaster

Copy link
Copy Markdown
Collaborator

Can we have the items in columns instead of rows? Inventory already takes a lot of horizontal space.
Alternatively we could make it 1 row so it can be placed above inventory.
General point is to design an optimal placement for that window.

@Wbjitscool

Copy link
Copy Markdown

it's still having an issue with 1 check failing

@codemob-dev

Copy link
Copy Markdown
Contributor Author

Can we have the items in columns instead of rows? Inventory already takes a lot of horizontal space.

Like this?
Screenshot_2026-05-09_08-39-48

@Wbjitscool

Copy link
Copy Markdown

yeah

@Argmaster

Copy link
Copy Markdown
Collaborator

Definitely suboptimal layout for presentation, but yeah I guess thats what I described.
Ok, an what about horizontal layout?

<ring> <ring> <ring> <ring> <ring> <ring> <empty> <necklace> <necklace>

@codemob-dev

Copy link
Copy Markdown
Contributor Author

Definitely suboptimal layout for presentation, but yeah I guess thats what I described.
Ok, an what about horizontal layout?

I feel like this would scale really badly once we add armor and other slots

@Argmaster

Argmaster commented May 9, 2026 •

Copy link
Copy Markdown
Collaborator

I feel like this would scale really badly once we add armor and other slots

Why? Just add a row above or below. Well, unless you want to have character presentation.
In that case, I would say

player model here helm ring 1 necklace 1
cuirass ring 2 necklace 2
gauntlet ring 3 other 1
player model here cuisses ring 4 other 2
x y z greaves ring 5 other 3

Which is almost what you made...
But I would ask for placeholders then, so we have the general idea there.
Preferably as inactive slots.
Also so we can reality check my stupid ideas

@codemob-dev

Copy link
Copy Markdown
Contributor Author

Why? Just add a row above or below. Well, unless you want to have character presentation.
In that case, I would say

How would you suggest we specify the slot order in the zon?

@Wunka Wunka moved this to Low Priority in PRs to review May 9, 2026
@careeoki

careeoki commented May 9, 2026

Copy link
Copy Markdown
Contributor

This is how I would think to lay it out. @IntegratedQuantum 's input here would be helpful, like specifically how many slots do we want, what kind of labeled slots do we want
image

@Wbjitscool

Copy link
Copy Markdown

This is how I would think to lay it out. @IntegratedQuantum 's input here would be helpful, like specifically how many slots do we want, what kind of labeled slots do we want image

that looks better

@IntegratedQuantum

Copy link
Copy Markdown
Member

This is how I would think to lay it out. @IntegratedQuantum 's input here would be helpful, like specifically how many slots do we want, what kind of labeled slots do we want

I think addons should be able to add custom accessory slots, so we should have a GUI that is expandable. I would suggest maybe putting the main body slots on the left and have a scrollable list on the right (maybe 2 slots wide, following your desing) with all the other slots.

what kind of labeled slots do we want

For now I would suggest to keep the list small (mabye 1 necklace slot for the healing accessories and 2 ring slots) and expand it when we need to.

@codemob-dev

Copy link
Copy Markdown
Contributor Author

I think addons should be able to add custom accessory slots, so we should have a GUI that is expandable. I would suggest maybe putting the main body slots on the left and have a scrollable list on the right (maybe 2 slots wide, following your desing) with all the other slots.

Would the armor slots be hardcoded then? If not, how would we specify their location in the zon?

@IntegratedQuantum

Copy link
Copy Markdown
Member

You'll probably need some sort of priority hint for the order, you can just make the first accessories appear in the four armor slots

@codemob-dev

codemob-dev commented May 11, 2026 •

Copy link
Copy Markdown
Contributor Author

I think addons should be able to add custom accessory slots, so we should have a GUI that is expandable. I would suggest maybe putting the main body slots on the left and have a scrollable list on the right (maybe 2 slots wide, following your desing) with all the other slots.

Not exactly what you asked, but this is what I came up with:
image

The window currently expands infinitely to the left as you add more slots, and you can specify an index to try to order the slots by.

Once I get textures from @careeoki and get armor slots it will look a lot better.

@careeoki

Copy link
Copy Markdown
Contributor

Alright, here you go, as requested

image

Next you should do this:

You'll probably need some sort of priority hint for the order, you can just make the first accessories appear in the four armor slots

@codemob-dev

Copy link
Copy Markdown
Contributor Author

Got it working!

image

@IntegratedQuantum IntegratedQuantum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to consider:

  • you added migrations, but you are not using them
  • what about accessory slots that aren't unlocked by default or for every player/player type?

@@ -0,0 +1,5 @@
.{
.texture = "feet.png",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also give them some tags

if (version != entityComponentVersion) return error.InvalidComponentVersion;
const accessories = &components.add(main.globalAllocator, @enumFromInt(entityId)).accessories;
accessories.* = .init(main.globalAllocator, items.accessory_slots.getTotalSlotCount(), .serverShared, .{.playerAccessories = entityId}, .{});
accessories.super.fromBytes(reader);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, init will already load it using the sync system.

@Argmaster

Argmaster commented May 14, 2026 •

Copy link
Copy Markdown
Collaborator

What if we want a material that adds more accessory slots 🙃

@IntegratedQuantum IntegratedQuantum moved this from Low Priority to In review in PRs to review May 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

6 participants