Since goal of this template is solved by just order by field. And due to row templates and armor templates to be to heavy on the page loads. Because of subqueries in each row to get materials, material icons etc.. What I am planning to do with it:
- Template:Equipment material add index field to db and add ability to store indexes mats from item\weapon\armor templates.
- Refill equipment materials db with indexes
- Template:Material - save images\icons of mats on store, with help of Template:Material icon to db. To shift icons filling load to material pages, from table pages.
- Refill Materials db table with all icons.
- Create query for Weapon\Armor tables that will join db tables Weapon + Equipment materials + Materials (for icons), to send full row data into updated row template that will only have display functions without any subqueries.
- Put code of this new more complex query for weapons here with some parameters, to reuse on other pages
- Remove sub-queries from Weapon\Armor\Item Row templates.