Modding Help anyway to merge .treasurepool's?

Discussion in 'Starbound Modding' started by Dilrax, Mar 1, 2015.

  1. Dilrax

    Dilrax Ketchup Robot

    is there a way to have a custom treasure pool for a custom monster and have it merge with existing vanilla treasurepool's with out overwriting the original treasurepool file, because im stumped.

    basically on its own, it looks like this...
    Code:
    {
        "rentekdroneTreasure" : [
        [1, {
          "fill" : [ {"item" : [ "rtenergycoregamma", 4]}, {"item" : "rtenergycore"}]
        }]
      ]
    }
    
    and when anything apart from the Drone its self, dies, the game freezes, if i add the vanilla monster treasure pools to the file, it all works fine or so, except for apparently crashing during the "Erchius mining facility quest", or so iv been told, ether way im just looking into a work around, which brings me back to my original question.

    monster treasurepool's, any way to merge files?
     
  2. GROVER CURES HOUSES

    GROVER CURES HOUSES Void-Bound Voyager

  3. Dilrax

    Dilrax Ketchup Robot

  4. The | Suit

    The | Suit Agent S. Forum Moderator

    Actually it explains almost everything.
    The only issue is being able to apply what you learned.

    Don't expect a tutorial on every little aspect.
    Follow the diagrams and apply it to your scenario.

    Draw out the path maps the same way its given in the images.
     
  5. Dilrax

    Dilrax Ketchup Robot

    it was hard enough for me to understand it when trying to update my to upbeat giraffe, because im not as experience as most others are, heck i still had to ask on the forums for a bit of help then just to have an idea of what to do...
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

  7. Dilrax

    Dilrax Ketchup Robot

    a simple search for you perhaps, having a better idea of what to actually search for most likely due to experience, not that i mean to sound like im having a go at you or anything, but i did run a search but it didn't yield any results and/or answers i was looking for thus i asked, i'll admit, this isnt something i have alot of experience in or have explored much and im also not exactly a tech-wiz all things PC wise, i mean heck my modding partner is learning off me and even then between the two of us we still understand bugger all, hahaha, more so with the change from EK to UG but even so, i get that your trying to help, but sorry, its not really helping much in any way... i thought i should just say...
     
  8. The | Suit

    The | Suit Agent S. Forum Moderator

    Though this won't be helpful in the longrun just giving you the answer.
    You really should spend time learning to patch.

    But anyway - I am giving up on that aspect.

    If you want to add only this to monster.treasurepools file
    Code:
    {
        "rentekdroneTreasure" : [
        [1, {
          "fill" : [ {"item" : [ "rtenergycoregamma", 4]}, {"item" : "rtenergycore"}]
        }]
      ]
    }
    Than what you need to do is

    Code:
    [ {
    "op" : "add",
    "path" : "/rentekdroneTreasure",
    "value" : [
        [1, {
          "fill" : [ {"item" : [ "rtenergycoregamma", 4]}, {"item" : "rtenergycore"}]
        }]
      ]
    } ]
    Keep in mind this patch is very specific to this scenario and the format cannot be used to add items to an existing array.
     
  9. RenTek: Reni

    RenTek: Reni Phantasmal Quasar

    sorry about dilrax, hes been wracking his brain about it day in and day out, from what iv seen, trying to figure something out only to go backwards in progress, i think the closest he got to it was this
    Code:
    [
      {"op":"add","path":"/defaultMonsterTreasure/", "value": [
      "rentekdroneTreasure" : [
        [1, {
          "fill" : [ {"item" : [ "rtenergycoregamma", 4]}, {"item" : "rtenergycore"}]
        }]
      ]
    ]
    }
    ]
    
    which kinda is a mess but even then i think he was just guessing, we never used JSONlint before until Starbound and even then it was like being thrown into the sea feet first with no idea what we signed up for, so you might be able to imagine our reaction to the update which changed everything and left us rewriting the entire mode with new code that we didn't even understand so its a little hard for us to understand how to do the file patching and so forth when we only just have a slight idea of JSONlint in its most basic form... we are trying but its not easy for us so please try not to hold a grudge against him for anything... and ignoring what he said, thank you for at least trying to help point him in the right direction ^^
     
  10. The | Suit

    The | Suit Agent S. Forum Moderator

    No problem.
    I rather people learn the core concepts than giving them the answer. Otherwise they will end up just asking why it doesn't work in other situations.
    JSON lint is not ideal for checking patches.
    What you will want to use either is
    http://json-schema-validator.herokuapp.com/jsonpatch.jsp

    or @Kawa 's [ Patcher ]
    http://helmet.kafuka.org/sbmods/json/
     
  11. RenTek: Reni

    RenTek: Reni Phantasmal Quasar

    we have been trying to learn and do things on our own but its same deal with the LUA scripting to us which is "we are in way over our heads", we generally only ask when we are out of idea's, "theorys" and clues when something isnt working but at least we try ^^ and i will make a note of those two links, knowing dil as i do, it might help give us a clue to two when fixing or writing files in the future
     
    The | Suit likes this.
  12. Febilian

    Febilian Cosmic Narwhal

    I second the use of the patch checkers. I haven't uploaded any official mods of my own at this point in time, but I've made patches/personal updates for other mods, and the patch checker is a lifesaver when you don't know why something isn't working, or even if you just want to check your work.

    Keep in mind, though, that it(at least the one in the first link!) doesn't work if there are comments in either of the files you're using to check(the original file and also the patch file are both needed). In many cases, you'll have to remove the comments from the text for the original files(because some original files from the game unfortunately do use comments) before the patch checker even functions.

    I haven't used Kawa's patcher(didn't know it existed until now, actually) so I can't provide feedback on that.

    Just my two cents.
     
  13. The | Suit

    The | Suit Agent S. Forum Moderator

    I personally use this site to strip comments
    http://tools.krza.de/jscs/JSCodeStripper.html
     
  14. Febilian

    Febilian Cosmic Narwhal

    The | Suit likes this.
  15. The | Suit

    The | Suit Agent S. Forum Moderator

    Anytime you have a doubt feel free to ask.
     

Share This Page