Announcement

Collapse
No announcement yet.

Need help some help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help some help

    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
    Last edited by Freakyman; 02-20-2020, 02:27 PM. Reason: Apologising for my stupid thread title

    #2
    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.
    Last edited by ExtremeLurker; 02-20-2020, 12:16 PM.

    Comment


      #3
      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.

      Comment


        #4
        Oh, my bad. I noticed one error in your xui.xml file. I edited it here: https://pastebin.com/HY3HD4sj

        There should be a /ruleset after /xui in the xpath, as it requires you to traverse the node tree completely.

        Comment


          #5
          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.
          but thank you so much dude, wouldnt of figured it out without you.
          Last edited by Freakyman; 02-20-2020, 01:40 PM. Reason: update

          Comment


            #6
            Originally posted by Freakyman View Post
            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.

            Comment


              #7
              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 silly me.

              Comment


                #8
                Originally posted by Freakyman View Post
                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 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.
                Last edited by ExtremeLurker; 02-20-2020, 02:18 PM.

                Comment


                  #9
                  Originally posted by ExtremeLurker View Post
                  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

                  Comment


                    #10
                    Originally posted by Freakyman View Post
                    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
                    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.

                    Comment

                    Working...
                    X