August 19 - The day when all your mods died.

Discussion in 'Dev Blog' started by OmnipotentEntity, Aug 20, 2014.

  1. Kawa

    Kawa Tiy's Beard

    Hand-apply the __merge, then run it through a diff generator?

    ntm I literally had months to update my mod, including figuring out the paths for things like NPCs and such, without a diff generator, and there's still at least one month to go.
     
  2. OmnipotentEntity

    OmnipotentEntity Code Monkey Forum Administrator

    I couldn't get it to segfault on my machine. I'll try under windows later tonight. Windows likes segfaulting a lot more than Linux (which is a good thing)

    I did fix the bug where it wasn't outputting a PGI, but as far as I can tell it's always done that when it comes to treasure pools.
     
  3. Kawa

    Kawa Tiy's Beard

    I did it!

    I put CE's treasurepool data in my scratchpad and made an avian character. Rebooting the ship AI caused no shiplocker to spawn, and Access violation detected at 0x95003b (Write of address 0x8) in the log. Then, it crashed when I quit.
     
    curiouslyExistential likes this.
  4. Type1Ninja

    Type1Ninja Hard-To-Destroy Reptile

    Mod-splosion.jpg
     
  5. Scival

    Scival Oxygen Tank

    inb4 a pegasus comments thats not actually sarcasm but scarily accurate
    Oh wait
    das me :DD
     
    RyuujinZERO and Kawa like this.
  6. Kawa

    Kawa Tiy's Beard

    Working on my own generator, trying to teach it what a - is.

    Scrapped that, used the one linked earlier instead, with a more immediately-helpful, copypastable output format. Will upload tomorrow.
     
    Last edited: Aug 23, 2014
  7. GorunNova

    GorunNova Pangalactic Porcupine

    After tinkering with this new mod format... well, if you don't replace full objects, and said objects have arrays or nested arrays, json patching saves a LOT of space and redefinitions. Plus, the fact that you can reach into such nested arrays of arrays and add single elements means that fully mutually-compatible biome expansion mods are now possible (as far as I can tell) among other things.
     
    curiouslyExistential likes this.
  8. ja450n

    ja450n Phantasmal Quasar

    has anyone figure out how to add tiered items? i'm playing around with doing the following:

    Code:
    [
      {
        "op": "add",
        "path": "/defaultBlueprints/-",
        "value": {
          "tier2": [
            { "item": "testitem" }
          ]
        }
      }
    ]
    

    but this results in an error
    Code:
    Error: Exception raised during Root finishInitialization: (VariantException) Improper conversion to VariantMap from null
      StarException::StarException(String)
      Variant::mapPtr()
      Variant::toMap()
      PlayerFactory::load()
      Root::reload()
      _Function_handler<void (), _Bind<ClientApplication::preSplashInitialization()::{lambda()#1} ()> >::(_Any_data)
      ThreadImpl::runThread(void*)
      BaseThreadInitThunk
      RtlInitializeExceptionChain
      RtlInitializeExceptionChain
    
     
  9. Kawa

    Kawa Tiy's Beard

    Code:
    [
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "testItem" } },
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "anotherItem" } }
    }
    Once again: use the tools.
     
  10. ja450n

    ja450n Phantasmal Quasar


    i was specifically trying to add to "tier2", the JSON itself is valid, but Starbound doesn't seem to like it.

    current mods add stuff to other tiers like:
    Code:
    {
       "__merge":[ ],
       "defaultBlueprints":{
       "tier2":[
          {
             "item":"testitem"
            }
         ]
      }
    }
    
    so i was trying to work out how to do it in the new format.

    --edit, i also tried the following, but met with the same "Improper conversion to VariantMap from null" error
    Code:
      { "op": "add", "path": "/defaultBlueprints/tier2/-", "value" : { "item" : "testitem"} }
    
    i figured you'd have to add the "tier2" object because including "tier2" in the path results in a "Could not apply operation to base. No such key in Variant::get("tier2")" error
     
    Last edited: Aug 23, 2014
  11. Kawa

    Kawa Tiy's Beard

    When I put
    Code:
    [
        {
            "op" : "add",
            "path" : "/defaultBlueprints/tier2/-",
            "value" : { "item" : "testItem" }
        }
    ]
    in my online patch tester and apply it, I get this: Path not found in document

    Obviously, this is becaause there is no such place. So why not add tier2 first?
    Code:
    [
        {
            "op" : "add",
            "path" : "/defaultBlueprints/tier2",
            "value" : []
        },
        {
            "op" : "add",
            "path" : "/defaultBlueprints/tier2/-",
            "value" : { "item" : "testItem" }
        }
    ]
    This works. But since we're so keen on the old paradigms, why not combine these into one add?
    Code:
    [
        {
            "op" : "add",
            "path" : "/defaultBlueprints/tier2",
            "value" :
            [
                { "item" : "testItem" }
            ]
        }
    ]
    Hit Apply, confirm the output... and we're there.

    Update: In fact, if you were to use the online diff generator that I just added, you'd get the exact same output.
     
  12. ja450n

    ja450n Phantasmal Quasar

    Thanks, i see what i was doing wrong now. I had tried to add the "tier2" object manually, but i did it wrong
    Code:
    { "op": "add", "path": "/defaultBlueprints/-", "value" : "tier2" }
    
    Also, thanks for making the online tools available, i'm seeing another odd error, but i'll see if i can use your tools to figure it out before posting.
     
  13. Kawa

    Kawa Tiy's Beard

    Waiting with bated breath here.
     
  14. ja450n

    ja450n Phantasmal Quasar

    Kawa to the rescue!!!

    i was getting a weird "Caused by: (VariantPatchException) Could not apply patch to base. Invalid operation: add" error, but after tweaking the JSON a little using your example, and validating w/ your tools, this error has gone away.
     
    Kawa likes this.
  15. GrekkaTarq

    GrekkaTarq Aquatic Astronaut

    For me a little bit confusing but I am not a programmer just want to make some new things to the game.
     
  16. Kawa

    Kawa Tiy's Beard

    Lucky you. If it's only new things and not editing old things, the patch parts are minimal :)
     
  17. GrekkaTarq

    GrekkaTarq Aquatic Astronaut

    Mainly I want to make some new race for this game and later do something other but still not did anything just created some folder for the future projects but I think I need to do some experiment with the new system because for me that part is almost chinese.
     
  18. Kawa

    Kawa Tiy's Beard

    For that, there are a few patch points. Might I interest you in my species mod template, which includes patch support since last commit?
     
    GrekkaTarq likes this.
  19. Broconut

    Broconut Cosmic Narwhal

    I'm having a bit a trouble renaming an item. There's a tile called apexshipdetails.material and the item's name is "Metal object" with a lowercase 'o'. I tried changing it to "Metal Object" so it would have a capital 'O', but nothing happens. The game doesn't crash or throw any errors at me, it just simply doesn't change the name of the tile. This is how I set up the apexshipdetails.material.patch file.

    Code:
    [
      { "op" : "replace", "path" : "/shortdescription", "value" : "Metal Object" }
    ]
    If anyone can point out the problem, I would greatly appreciate it.
     
  20. curiouslyExistential

    curiouslyExistential Phantasmal Quasar

    @Broconut

    Code:
    [
      {"op":"replace","path":"/shortdescription","value":"Metal Object"}
    ]
    Your code should be working.. Are you naming it apexshipdetails.material.patch AND making sure that you have it in the correct directory in your mod?
     
    Broconut likes this.

Share This Page