Overriding and merging config files in mods. (DEPRECATED)

Discussion in 'Starbound Modding' started by bartwe, Dec 16, 2013.

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

    Shadewarp Pangalactic Porcupine

    Having trouble with these new commands...

    First my race mod won't load due to this error:

    [​IMG]


    My quest.config looks like this:
    Code:
    {
      "__merge" = [],
      "initialquests" : {
        "grey" : [ "greytutorial.gearup" ]
      }
    }
    


    From what I can see, there shouldn't be any errors there..

    One other problem, is the default.treasurepools:

    Code:
    {
      "__merge" = []
          "greyStarterTreasure" : [
        [0, {
            "fill" : [
              "beamaxe",
              "flashlight",
              [ "torch", 10],
              [ "psifruitseed", 3],
              [ "wheatseed", 3],
              [ "apexstarter", 1]
            ],
            "levelVariance" : [0, 0],
            "allowDuplication" : false
          } ]
      ],
    }
      


    If I add this folder the game won't even start...

    Can someone help ? Want to get my race fixed :(
     
    Last edited: Dec 23, 2013
  2. kitsunespirit

    kitsunespirit Cosmic Narwhal

    Looks like you are trying to merge it into something that doesnt exist. The Grey Treasure pool file is its own file. You only use the merge script in there if its adding extra info into an already existing list of items. Like if you were trying to stuff more things into the tier 1 list in the player config.

    Quest configs would be their own file as well.

    i might be wrong, but I believe thats how its supposed to be used. Since a merger needs a source and a destination.

    --

    To me, this way seems more complicated, just editing the files and sticking them into the mod folder seems to be a lot easier. It's messier sure, and you have to adjust them when you get new mods, but it just feels less of a pain in the but than trying to get this mess working.
     
    Last edited: Dec 23, 2013
  3. Shadewarp

    Shadewarp Pangalactic Porcupine

    I think you are wrong - the startertreasure, for all races, comes from that file, default.treasurepools
    - which means that I should add my races starting treasure to the file...

    Same goes for the quest, it should be added to the file..

    Tried removing my quest directory as well, now it just gives me client error...
     
  4. kitsunespirit

    kitsunespirit Cosmic Narwhal

    This is what my treasurepool file for my custom race looks like:

    Code:
    {
      "****StarterTreasure" : [
        [0, {
            "fill" : [
              "beamaxe",
              "flashlight",
              "huntingknife",
              [ "torch", 10 ],
              [ "riceseed", 3],
              [ "wheatseed", 3]
            ],
            "levelVariance" : [0, 0],
            "allowDuplication" : false
          } ]
      ]
    }
    It's just that code line stuck into a racename.treasurepool file, placed in the Treasure folder.
     
    Karull likes this.
  5. Chandrak

    Chandrak Phantasmal Quasar

    Huh? Thats wierd, because all the race mods have several directories deep. Like modname/interface/windowfig/filename. Theres several that are 3 deep.

    What you need to do is change your /modinfo filepath to include neurisko/modname, rather than [.] The . specifies the actually, current directory that the modinfo file is in.
     
  6. Karull

    Karull Big Damn Hero

    Second time I've seen this problem haha, you're treasurepool won't work because you have a comma after the last square bracket in the code. It's much easier to just make a brand new treasurepool file for you custom race than to merge one in to the default though...

    as for the quests, mine looks like this:
    Code:
    {
      "__merge" : [],
      "initialquests" : {
        "saiyan" : [ "saiyantutorial.gearup" ]
      }
    }
    Also another thing I noticed, you're using equal signs after "__merge" when it should be a colon, like so:
    "__merge" : [],

    You did this in both files, which would make them also not work.
     
    KoreRekon and kitsunespirit like this.
  7. kitsunespirit

    kitsunespirit Cosmic Narwhal

    So I'm picking through Kawa's Felin mod to figure out how to do the new system... and she (he?) has a player config... I am guessing it doesn't matter if there's multiple player.configs now, since Lissar's Kimonos would merge into the player config along with anything else that uses the same file (assuming they have updated for Angry)?
     
  8. Karull

    Karull Big Damn Hero

    You don't need a player.config at all for race mods anymore.
     
    G4M5T3R likes this.
  9. kitsunespirit

    kitsunespirit Cosmic Narwhal

    How does it know to add the species then? o_O
     
  10. Karull

    Karull Big Damn Hero

    I'm guessing it's all thanks to this new line you replace the ID number line with in the species file:
    "playerSpecies" : true,
     
  11. kitsunespirit

    kitsunespirit Cosmic Narwhal

    Ok next question, for things that get added to the tier in the player config, does that still need to be there, or is that put in something else now?
     
  12. G4M5T3R

    G4M5T3R Cosmic Narwhal

    My race mod hasn't included a player config
    I didn't need a player config in my race mod in Offended Koala either so it's gotta be something else.
     
  13. Woden

    Woden Twenty-three is number one

    Does this work with any of the JSON files, or is it only for config files?
     
  14. Patchumz

    Patchumz Pangalactic Porcupine

    All files. It's just that configs were the primary thing stopping compatibility.
     
  15. Westeller

    Westeller Space Penguin Leader

    I don't think it works with .lua's
    Edits to existing .luas are as incompatible as ever.
     
  16. Patchumz

    Patchumz Pangalactic Porcupine

    Sorry, I meant all JSON files. (The configs are also JSON, which is why I said it that way)
     
    Last edited: Dec 24, 2013
  17. Kawa

    Kawa Tiy's Beard

    There seems to be a limitation to __merge.

    Here's a condensed version of the village guard warnings:
    Code:
    "warnings" : [
        { //hound.dialog.warnings[0]
            "sword" : {
                "default" : [
                    "A drawn weapon is a sign of intent."
                ],
                "glitch" : {
                    "floran" : [
                        "Nervous. You'll have no trouble here. No need for the weapon."
                    ],
                }
            },
            "gun" : {
                "default" : [
                    "Holster that gun. Now."
                ],
                "glitch" : {
                    "avian" : [
                        "Unsure. For what purpose would an Avian need a gun here? Put it away, please."
                    ],
                }
            }
        },
        { //hound.dialog.warnings[1]
            "sword" : {
                "default" : [
                    "This is your second warning - don't make me tell you to put that weapon away again."
                ],
                "glitch" : {
                    "apex" : [
                        "Annoyance. If you don't put the weapon away immediately, we'll call the Miniknog!"
                    ],
                }
            },
            "gun" : {
                "default" : [
                    "You're scaring everyone. Put it away, I said."
                ],
                "glitch" : {
                    "default" : [
                        "Anger. Holster your weapon I said."
                    ],
                }
            }
        },
        { //hound.dialog.warnings[2]
            "sword" : {
                "default" : [
                    "Don't make me kill you!"
                ],
                "floran" : {
                    "default" : [
                        "Floran preparing to ssstab. Had warning."
                    ]
                }
            },
            "gun" : {
                "default" : [
                    "You are on thin ice now!"
                ],
                "glitch" : {
                    "default" : [
                        "Explosive. Final warning, holster it now or die!"
                    ]
                }
            }
        }
    ],
    If I now try to __merge in more lines for a custom species, hound.dialog.warnings[] becomes six elements long:
    Code:
    "warnings" : [
        // SNIP
        { //hound.dialog.warnings[2]
            "sword" : {
                "default" : [
                    "Don't make me kill you!"
                ],
                "floran" : {
                    "default" : [
                        "Floran preparing to ssstab. Had warning."
                    ]
                }
            },
            "gun" : {
                "default" : [
                    "You are on thin ice now!"
                ],
                "glitch" : {
                    "default" : [
                        "Explosive. Final warning, holster it now or die!"
                    ]
                }
            }
        },
        { //hound.dialog.warnings[3] uh oh!
            "sword" : {
                "felin" : {
                    "default" : [
                        "Put that away before you take out an eye.",
                        "Sheathe it.",
                        "Put the weapon away and carry on."
                    ]
                }
            },
            "gun" : {
                "felin": {
                    "default" : [
                        "Traveller, put your gun away.",
                        "It's all fun and games, traveller.",
                        "Holster the peashooter."
                    ],
                    "felin" : [
                        "Hunter, put your gun away.",
                        "It's all fun and games, hunter.",
                        "Holster the peashooter."
                    ]
                }
            }
        },
        { //hound.dialog.warnings[4]
            "sword" : {
                "felin" : {
                    "default" : [
                        "Second warning, pal - put the weapon down.",
                        "I said sheathe it!",
                        "Don't test me, friend."
                    ]
                }
            },
            "gun" : {
                "felin" : {
                    "default" : [
                        "Drop. The. Gun.",
                        "No more games. Put the gun away.",
                        "Holster it!"
                    ]
                }
            }
        },
        { //hound.dialog.warnings[5]
            "sword" : {
                "felin" : {
                    "default" : [
                        "You are sorely tempting me, friend.",
                        "Your weapon. Put it the **** away.",
                        "Final warning - drop the weapon."
                    ]
                }
            },
            "gun" : {
                "felin" : {
                    "default" : [
                        "If you don't holster your gun, I'll have to get rough.",
                        "I'm coming for you if you don't comply!",
                        "Don't make me come and take the gun and your LIFE!"
                    ]
                }
            }
        }
    ],
    Obviously, warnings 3 to 5 are never used. What I mean to do is add the felin lines to the existing first three warnings, like this:
    Code:
    { //hound.dialog.warnings[0]
        "sword" : {
            "default" : [
                "A drawn weapon is a sign of intent."
            ],
            "glitch" : {
                "floran" : [
                    "Nervous. You'll have no trouble here. No need for the weapon."
                ],
            },
            "felin" : {
                "default" : [
                    "Put that away before you take out an eye.",
                    "Sheathe it.",
                    "Put the weapon away and carry on."
                ]
            }
        },
        "gun" : {
            "default" : [
                "Holster that gun. Now."
            ],
            "glitch" : {
                "avian" : [
                    "Unsure. For what purpose would an Avian need a gun here? Put it away, please."
                ],
            },
            "felin": {
                "default" : [
                    "Traveller, put your gun away.",
                    "It's all fun and games, traveller.",
                    "Holster the peashooter."
                ],
                "felin" : [
                    "Hunter, put your gun away.",
                    "It's all fun and games, hunter.",
                    "Holster the peashooter."
                ]
            }
        }
    },
    This does not seem to be possible to do. It might have something to do with the structure of warnings, being a { inside a [.
     
    Annuschka likes this.
  18. Annuschka

    Annuschka Big Damn Hero

    Yes, you are right, data that is nested in an [-array-list is problematic to __merge. I outlined exactly this in a more simplified way here. This is even more critical in the .species files for genders and also a problem for the treasurepools.
    Sadly, it seems there is nothing we can do. This has to be adressed by the Devs. So use every opportunity to bring it to their attention :)
     
    fabsen likes this.
  19. danks_

    danks_ Existential Complex

    Quick question! If you want to merge a new item into the defaultBlueprints of player.config on tier 3, do I have to do this:

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [],
        "tier1" : [],
        "tier2" : [],
        "tier3" : [
                { "item" : "new_item1" }
        ]
      }
    }
    
    or can I simply

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [],
        "tier3" : [
                { "item" : "new_item1" }
        ]
      }
    }
    
     
  20. Nate McCloud

    Nate McCloud Existential Complex

    The latter will work just fine.
     
Thread Status:
Not open for further replies.

Share This Page