Skip to content

Add Y-to-sort to an item list

Designer · 10 min · No code (a small Blueprint edit) · Last tested: 2026-10-04

Result: pressing Y on your screen cycles how its item list is ordered, and the action bar shows Sort: Rarity (or whichever mode is current). The cursor stays on the same item when the order changes.

The Items menu (UserInterface/W_XenoCore_ItemMenu) and the equipment swap list (UserInterface/W_XenoCore_ItemSwapList) already have this. Use this recipe for a new screen of your own, or to change which modes those two offer. Open either of them to see a finished example.

Before you start

How it works

UserInterface/Foundation/W_XenoCore_ItemSortControl is a widget you place inside your screen. It draws nothing on its own. While your screen is open it puts the Y prompt on the action bar, and when Y is pressed it re-sorts the list you name.

Mode Order
Default The order the bag holds them in, oldest first. Lists drew this before sorting existed
Most Recent Newest first
Name A to Z
Rarity Rarest first, then A to Z
Value Highest sell value first
Stat The slot's own number, highest first: max Attack for a weapon, Physical Def for armour. Other items sort by value

Ties always keep bag order, so equal items never swap places when you re-sort.

Steps

1. Place the control

  1. Open your screen's Widget Blueprint and switch to the Designer tab.
  2. In the Palette, search for W XenoCore Item Sort Control and drag it into the screen's root panel. Its size and position don't matter.
  3. In the Hierarchy, rename it SortControl.

2. Set it up

Select SortControl. In Details › XenoCore › Sort:

Setting Value
Target List Name The name of your List View in the Hierarchy, for example ItemList (the default). It must match exactly
Modes Which modes Y cycles through, in order. The first is the order the screen opens in. Two or more entries
Sort Action Already set to DT_XenoCore_Actions › MerchantSort (Y), the same button as the shop's sort. Leave it
Prompt Format Optional. Empty gives Sort: {0}, where {0} is the mode's name

3. Make the list open sorted

  1. Switch to the Graph tab.
  2. Find each Set List Items node that takes its items from Get Items For Slot or Get Items For Category. There may be more than one; check every function and event.
  3. Drag SortControl from Variables into the graph and, from it, place a Sort Items node.
  4. Put it on the wire: Get Items For … → Sort Items → Set List Items.
  5. Compile and Save.

Without this step Y still works, but the list opens in bag order each time.

Test it

  1. Press Play and open your screen. The action bar shows Sort: Default (or your first mode).
  2. Press Y (pad) or the keyboard key shown in the prompt. The prompt names the next mode and the list re-orders. The highlighted item stays highlighted.
  3. Press Y through every mode. On Rarity, Legendary items are at the top.
  4. Close the screen and reopen it. It opens in your first mode again.

If it doesn't work

Fails silently: no prompt on the action bar

Sort Action is empty, or Modes has fewer than two entries. Nothing is logged. Check both on SortControl.

Fails silently: the prompt changes but the list doesn't

Target List Name doesn't match your List View's name in the Hierarchy. Copy the name across exactly.

The list reopens in an unsorted order. One Set List Items still reads straight from Get Items For … without going through Sort Items. Find it and route it through.

Going further