• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Interface modding question

Goblin_aka_Dark

New member
I started working on the interface and I have a question: how and where should I change the size of the icons?

A fuel window, for example:
I managed to reduce the size of the ItemIconAtlasGreyscale wood icons, but if you put a item wood in the cell, the size remains the original. In order for it to look nice, the size of the item wood in the cell needs to be reduced so that it fits in the frame.

Similarly, i will need to change the size of the icons in the queue, output, inventory and everywhere else, but first I would like to understand exactly how to do this.



8BsXeonvmN33dVdtjU7b.png



I also want to change the color of the numbers in the amount of fuel and the color of the tool icons.

 
Last edited by a moderator:
Taking into account the fact that no one knows for so long, I came up with a solution: I will increase the slots themselves so that the frames look “not point-blank to the border.” This will make the interface larger, but the option makes sense. All that remains is to select the scale and redraw the frames for each specific window. 😅

 
they are found in the XUI xml files heres an example i did with my mod idk how to get it exact but it took me changing the numbers around to get what i wanted.

 


<set xpath="/windows/window[@name='windowForgeInput']/@materials_accepted">iron,brass,lead,glass,stone,clay,copper,zinc,tin,bronze,tungsten,mithril,adamantium,orichalcum,necronium,aluminum</set>
    <setattribute xpath="/windows/window[@name='windowForgeInput']/panel[@style='header.panel']" name="pos">0,-185</setattribute>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content']/@pos">0,-231</set>
    <set xpath="/windows/window[@name='windowForgeInput']/sprite[@name='backgroundMain']/@height">228</set>
    <set xpath="/windows/window[@name='windowForgeInput']/sprite[@name='backgroundMain']/@pos">0,-231</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/@height">223</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/@pos">78,-233</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content']/grid[@depth='7']/@rows">3</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/grid/@cols">2</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/@width">294</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/grid/@rows">8</set>
    <set xpath="/windows/window[@name='windowForgeInput']/rect[@name='content2']/grid/@cell_height">28</set>
 

    <set xpath="/windows/window[@name='windowOutput']/rect[@name='content']/grid/@rows">4</set>
 

    <set xpath="/windows/window[contains(@name,'windowToolsCampfire')]/rect/grid/@rows">3</set>
    <append xpath="/windows/window[contains(@name,'windowToolsCampfire')]/rect/grid/@required_tools">,toolAirFryer,toolPressureCooker,toolPropaneTank,toolElectricIgniter,toolFoodProcessor</append>
   
    <set xpath="/windows/window[contains(@name,'windowToolsForge')]/rect/grid/@rows">3</set>
    <append xpath="/windows/window[contains(@name,'windowToolsForge')]/rect/grid/@required_tools">,toolTungstenLinedBellows,toolAuto-Hammer,toolOrichalcumAnvilCoating,toolTungstenAnvil,toolHighDensityToolkit,toolForgeHighCarbonTooling</append>
   
    <setattribute xpath="/windows/window[@name='windowFuel']/panel[@style='header.panel'][last()]" name="pos">0,-150</setattribute>
    <set xpath="/windows/window[@name='windowFuel']/rect[@name='content']/@pos">0,-196</set>
   
    <set xpath="/windows/window[@name='windowFuel']/@height">120</set>
    <set xpath="/windows/window[@name='windowFuel']/panel[@name='buttonContent']/@pos">0,-271</set>
   
    <setattribute xpath="/windows/window[@name='windowOutput']/panel[@style='header.panel']" name="pos">0,-250</setattribute>
    <set xpath="/windows/window[@name='windowOutput']/rect/@pos">0,-296</set>


Screenshot_3.png

this is just an example of the forge window i actually had to look at other mods to figure out how to change the interface but im not very good at it yet

 
Last edited by a moderator:
Thank you, but there are no problems with the windows. I just went through everything already. The problem is in the contents of these windows and cells, namely the size of the item that is placed there and the quantity numbers - they are very large for my interface.


ix7fSvBbmAHZJUucwpqU.png


Something like this

 
Last edited by a moderator:
Back
Top