Jump to content

Need help some help


Freakyman

Recommended Posts

SOLVED, if you are also having the same issue as below, hopefully the below will be able to help.

Big Thanks to ExtremeLurker.

 

Hi, slowly getting used to the new modding system since my last mod was in alpha 16, and im trying to get some of my old mod into a new mod, but i am struggling to get my changes to take affect.

 

im trying to add a Tools slot to both chemistry station and workbench, i have included the correct code in both

Config/XUi/

windows.xml - https://pastebin.com/4050GKCq

xui.xml - https://pastebin.com/EUcyPbp3

 

i am wondering am i missing another key file to change or have i not done it correctly.

or maybe its not currently possible with the new toys.

 

Sorry i noticed i badly worded my thread title quite embarrassed :D

Link to comment
Share on other sites

Love the thread title.

 

Nice work on the mod so far. From what I can see, you created the XML perfectly. Did you create a ModInfo.xml file in your mod's folder? If not, this may be why you're not seeing your changes take effect, as the game will not load the mod if it is not present. Here's an example ModInfo.xml file for you: https://pastebin.com/rXSvNKuC

 

Only suggestion I have for the mod XML itself is that it seems like you have 3 tool types for the chem station, but your <grid name="inventory"> element has its cols attribute set to 2. Might want to change that to 3 so all the tools will display.

Link to comment
Share on other sites

i have corrected the cols attribute in my chem station, i do have the ModInfo.xml file set correctly, as i have gotten other changes to work and load without issue, just the tools dont appear on the workstations like it does with a forge. as with the same mod i got recipes to load without issue for example, i want to use a wrench with the workbench to make an Engine and i got the recipe for the engine to load without issue.

Link to comment
Share on other sites

oh okay thank you for that, will do it now. so ruleset is used when skipping multiple lines to insert changes? or am i misunderstanding?

 

It works awesomly. now gonna try and make it appear at the top of the ui - http://prntscr.com/r55zmj

 

I have a feeling the fireinput is taking priority so may have to put up with it. :D

but thank you so much dude, wouldnt of figured it out without you.

Link to comment
Share on other sites

oh okay thank you for that, will do it now. so ruleset is used when skipping multiple lines to insert changes? or am i misunderstanding?

 

No, that's not it. In the xpath, you need to mirror the structure of the XML file you're modifying. If you look at the original xui.xml file, the root element is <xui>, then inside of that is a <ruleset> element, then inside of that is a list of <window_group> elements, and inside of those are <window> elements. So, for example:

 

/xui/ruleset/window_group[@name=workstation_workbench]/window[@name=windowNonPagingHeader]

 

The above xpath says to look for an <xui> element and then look for a <ruleset> element inside of it and then inside of that look for a <window_group> element with a name attribute equal to workstation_workbench and then inside of that look for a <window> element with a name attribute equal to windowNonPagingHeader. In your original xpath values, you omit the ruleset part, and so it doesn't match the original structure, because it would then be looking for <window_group> elements that are children of the <xui> element, but they are children of the <ruleset> element.

Link to comment
Share on other sites

OMG i stupidly ignored that i saw it and ignored it, ill remember that in future.

that explains so much, thank you for pointing that out for me.

 

For some reason i ignored it like it was just flavour text :D silly me.

 

Haha no problem! Glad I was able to help you fix it.

 

It works awesomly. now gonna try and make it appear at the top of the ui - http://prntscr.com/r55zmj

 

I have a feeling the fireinput is taking priority so may have to put up with it.

but thank you so much dude, wouldnt of figured it out without you.

It's easy to make it appear at the top, you'll just need to insert your window after windowCraftingQueue instead of windowNonPagingHeader.

Link to comment
Share on other sites

Haha no problem! Glad I was able to help you fix it.

 

 

It's easy to make it appear at the top, you'll just need to insert your window after windowCraftingQueue instead of windowNonPagingHeader.

 

okay thank you for all the help you have provided greatly appreciate it, if i do release my mod you will be credited as a big thanks for helping me solve such a stupidly irritating thing that i so easily could of solved by not being an idiot :D

Link to comment
Share on other sites

okay thank you for all the help you have provided greatly appreciate it, if i do release my mod you will be credited as a big thanks for helping me solve such a stupidly irritating thing that i so easily could of solved by not being an idiot :D

 

Hahaha! Thanks, I appreciate that. Best of luck completing your mod. If you run into another issue that you feel you can't solve, I'd be happy to help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...