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. Karull

    Karull Big Damn Hero

    You just need a very simple player code now. For example, for my dragonball mod all my player.config file has is:
    Code:
    {
      "__merge" : [],
      "species" : [ "saiyan" ]
    }
    
    Which means I'm merging the "saiyan" part to the species line.

    edit: I just realized I don't even need the player.config file for the species anymore :O
    this update is even better than i thought!

    http://pastebin.com/SMb6Ybbn
     
  2. omegadrace

    omegadrace Cosmic Narwhal

    Don't mean to sound ungrateful, but I've already seen that link and nothing in it solves the problem.
     
  3. Karull

    Karull Big Damn Hero

    Uh, that explains everything you need to know...I read that and was able to set it up just by following what it says. You must be doing something else wrong if it doesn't work for you.

    edit: and I'm not using his character creation window mod either.
     
  4. omegadrace

    omegadrace Cosmic Narwhal

    Would you believe it, I had forgotten the 'panelayout' and 'species' tags in the charcreation.config.
    Now I've just got to figure out what the error 'basic_string::_S_create' that I get after selecting my race means.
     
  5. RockyTV

    RockyTV Big Damn Hero

    How do I use it to merge oredistributions file?
     
  6. RockyTV

    RockyTV Big Damn Hero

    EDIT: fixed, realised it is __merge not _merge
     
  7. Kawa

    Kawa Tiy's Beard

    I'm having trouble merging in custom dialogue.
    Code:
    {
        "__merge" : [],
        "converse" : {
            "dialog" : {
                "apex" : {
                    "felin" : [
                        "You are as hairy as the best of us."
                    ]
                },
                "felin" : {
                    "default" : [
                        "Hi~!"
                    ],
                    "felin" : [
                        "Hello~!",
                        "What's new, pussycat?"
                    ]
                }
            }
        },
        //snip
    Playing Felin, I placed some Apex Spawners. The spawned Apex villagers say their default "You don't LOOK like Miniknog..." line instead.
     
  8. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    I'm also having trouble merging into a item file. I'm trying to make a tweak that just simply brightens the lanternstick.back:

    Code:
    {
      "__merge" : [],
      "statusEffects" : [
      {
      "amount" : 2
      }
      ]
    }
    
    But this causes the Lantern on a Stick to be a PGI and also crashes when trying to load my Floran (since she has one equipped).

    Edit: AHA, I fixed it. I needed to include the entire contents of the statusEffects stanza.
     
    Last edited: Dec 23, 2013
  9. TheAleG

    TheAleG Void-Bound Voyager

    tanks developers :D
    now we just need a player.config
     
  10. VIcariousViking

    VIcariousViking Void-Bound Voyager

    I wish I understood code better. D:
     
  11. Annuschka

    Annuschka Big Damn Hero

    I don't really have the answer to your duplication problem. Just more issues:

    I have problems with the genders section, too. I think, the main problem is, that __merged items get added to lists, so instead of merging new hairs, shirts etc into gender[0] and gender[1] something like this adds genders[2] and genders[3] (My guess...) and the game doesn't load and throws errors into the log:

    Here is a more simplified description

    Code:
    {
    "__merge" : [ ],
      "genders" : [
        {
          "hair" : [ "male-foo", "bar", "blah", "laber" ],
        },
      {
          "hair":["morefemalehair"],
      }
      ]
    }
    (I already tried to put more __merges right before "hair" and other places. thats not the problem, I guess.)
    The errors in the log are something like "no value shirt", wich supports my 4 genders theory. The new genders have only the hair set.

    And when I try to __merge-overwrite the whole genders section I can not add new stuff, but have to copypasta everything and - of course - this would make hair mods incompatible again.

    does not work:
    Code:
    {
    "__merge" : [
        ["overwrite","genders"]
        ],
      "genders" : [
        {
            "__merge":[], <------------------- does nothing
          "hair" : [ "1", "1", "1", "1"],
        }....
    ]
    }
    works, but is not the solution:
    Code:
    {
    "__merge" : [
        ["overwrite","genders"]
        ],
      "genders" : [
        {
          "name" : "male",
          "image" : "/interface/title/male.png",
          "characterImage" : "/interface/title/sapemale.png",
          "hairGroup" : "hairmale",
          "hair" : [ "1", "1", "1", "1" ], <--------------- REPLACES all hairstyles. I want to ADD just a few.
          "shirt" : [ "apexcommanderjacket"],
          "pants" : [ "apexcommanderpants" ],
          "facialHairGroup" : "beardmale",
          "facialHair" : ["1", "2", "3", "4", "5"],
          "facialMaskGroup" : "",
          "facialMask" : [ ]
        },....
    I already tried to spam more __merges at different positions into this code. It seems like, as soon as you use overwrite you can not include original data in some stacked bracket subcategory.

    So has anyone any idea on how I simply add a few hairstyles?! You can also send me messegas...
     
    Last edited: Dec 23, 2013
  12. Chandrak

    Chandrak Phantasmal Quasar

    Same. LastAI and I are working on the villager dialogue for the spawners as well.
     
    Kawa likes this.
  13. Chandrak

    Chandrak Phantasmal Quasar

    Kawa likes this.
  14. Chandrak

    Chandrak Phantasmal Quasar

    @Kawa what you missed was the same thing LastAi and I missed - the converse label is actually nested under scriptconfig, which you were missing.
     
    Kawa likes this.
  15. Kawa

    Kawa Tiy's Beard

    Goddammit thank you!
     
  16. michealv

    michealv Industrial Terraformer

    Ummm I tried this and it deletes every single non-mod recipe in the game, instead of 'adding' like bw's comments say.

    Below is how I got it to work, without deleting all starter recipes

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [
             
        ],
        "tier1" : [
        { "item" : "megaenhancedbandage" },
        { "item" : "superenhancedbandage" }
    
        ]
      }
    }
    
     
  17. Supergeek

    Supergeek Scruffy Nerf-Herder

    So, it's loading my mods as long as I don't put them two directories deep.

    I would rather have, for example, "/mods/neurisko/modname/<files>" but it won't find them. I have to put them in "/mods/modname/<files>".

    Also, it's not finding any of my graphics now.
     
  18. G4M5T3R

    G4M5T3R Cosmic Narwhal

  19. Supergeek

    Supergeek Scruffy Nerf-Herder


    So I finally got a simple mod working. The problem is with subdirectories, as I suspected.

    Your mod files have to be in a subdirectory below the .modinfo file, which has to be in a directory below /mods/.
    Neither the main directory (where .modinfo resides) nor the subdirectory have to match the name of the mod.

    Edit:
    The player.config has to also be in this directory. It only adds recipes to the player the first time they log in. The recipes will remain if you move or delete the file.


    EDIT: Okay, got everything to work. Someone took the time to explain to me how it works. Your mod path becomes a virtual part of the /assets/ path.
     
    Last edited: Dec 24, 2013
  20. G4M5T3R

    G4M5T3R Cosmic Narwhal

    Ok so I got the other files in this mod working but the biomes. This is how I got combat music to merge.
    Code:
    {
    "__merge" : [],
    
      "combatTrack" : {
        "day" : {
          "tracks" : [ "/music/FlyingHeaven.ogg", "/music/RollingGunChanger.ogg", "/music/SaftyinNumbers.ogg" ]
        },
        "night" : {
          "tracks" : [ "/music/FlyingHeaven.ogg", "/music/RollingGunChanger.ogg", "/music/SaftyinNumbers.ogg" ]
        }
      }
    }
    
    
    So why doesn't this work with the biomes?
    Code:
    {
      "__merge" : [],
    
        "musicTrack" : {
          "day" : {
            "tracks" : [ "/music/MoldingDestinies.ogg", "/music/CryfromtheForest.ogg" ]
          },
          "night" : {
            "tracks" : [ "/music/MoldingDestinies.ogg", "/music/PachebelsGanon.ogg" ]
          }
        },
    
        "undergroundMusicTrack" : {
          "day" : {
            "tracks" : [ "/music/TimeVoyager.ogg", "/music/Pipes.ogg", "/music/MonstrousTurtles.ogg", "/music/InYourPrime.ogg", "/music/Electrion.ogg" ]
          },
          "night" : {
            "tracks" : [ "/music/TimeVoyager.ogg", "/music/Pipes.ogg", "/music/MonstrousTurtles.ogg", "/music/InYourPrime.ogg", "/music/Electrion.ogg" ]
          }
        }
    }
    
     
    Last edited: Dec 23, 2013
Thread Status:
Not open for further replies.

Share This Page