Reorder Material Slots?

I am making a mod for a game that can change an element’s material. The correct order for the slots is supposed to be:

E1 Material_009
E2 Material_014
E3 Material_001
E4 Material_003
E5 Material_015
E6 Material_007

The model I have creates slots that look like this:

UE4.26, using Blender 4.2, is there any way for me to change the order in which these slots appear?

Yes there is.

In variable input details, you have PRIORITY, it is how inputs are sorted. Put there 30,40,50 etc, so you can add stuff between.

Also it is great to make custom material function, and set all parameters there, then expose function outputs and use it in materials.

And second also: look into “named reroutes” they make all wiring much less spaghetti like.