1. Welcome to the Starbound support forums. Please check the support FAQs before posting: http://playstarbound.com/support

Closed __merge issue for nested arrays/lists

Discussion in 'Starbound Support' started by Annuschka, Dec 25, 2013.

Thread Status:
Not open for further replies.
  1. Annuschka

    Annuschka Big Damn Hero

    I described it here in detail, with examples and suggestions.

    When merging arrays/lists it is only possible to add entries at the end of arrays. This however brakes arrays where a specific number of entries is crucial (like genders in .species-files). The only way to __merge those arrays is to overwrite them, and this however gets really messy with complex nested arrays. Because one has to copypaste all those old entries, wich in turn makes mods incompatible and negates the whole merging feature.

    Personally I think a way to acces data, that is already "overwritten" would make a possible solution (but I'm not a coder and this will probably introduce more problems or isn't even possible):

    Code:
    {
    "__merge":[
      ["overwrite","foo"]
    ],
    "foo" : [
        {
            "__merge":[],  <---------- does nothing now,  putting it one line higher gives a "bad array" log error
            "bar" : [ "newitem1", "newitem2"]
        }
    ]
    }
    
    /// bar is now only newitem1 and newitem2 - should be "bar" : [ "olditem1", "olditem2","newitem1", "newitem2"]
     
    Last edited: Dec 26, 2013
Thread Status:
Not open for further replies.

Share This Page