[Outdated] The Proper Way to Install Mods

Discussion in 'Starbound Modding' started by SethKipz, Dec 8, 2013.

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

    onerb2 Pangalactic Porcupine

    man, i'm not a coder of any sort (i want to be when i finish school), when i get those error messages i don't understand a thing of what it means. (about the slash i corrected that right after the post.)
    but thanks for the help, i'll see if it works :D

    edit: Worked !! thx man, appreciate the help!
     
  2. Doc Honcho

    Doc Honcho Big Damn Hero

    I set up my in a similar fashion to how programs line nginx and others organize their site configurations.

    Code:
    Starbound
        mods
            available
                mod1
                    [stuff]
                mod2
                    [stuff]
            installed
                mod3
                    [stuff]
    
    With boostrap.config set up like

    Code:
    {
      "assetSources" : [
        "../assets",
        "../mods/installed"
      ],
      "storageDirectory" : ".."
    }
    
    Mods can be installed by copying them into installed, removed by moving into available. On linux I'd use symlinks, keeping everything in available and putting links to those in installed, but it isn't worth the trouble to do so on windows.
     
  3. SethKipz

    SethKipz Aquatic Astronaut

    Have you actually tested this to see if it works?

    I believe that this will cause the same issue that nightmare was having earlier.
     
  4. necKros

    necKros Space Hobo

    NP, but, just so you can learn to read errors:
    Code:
    JsonParsingException: Error parsing json: bad array, should be ',' or ']' at 10:2
    Bad array means you messed up that list of items: The list openned and closed by brackets [ ], and items are separated by commas. that's why it tells you the parser (the part of the program that reads these text files and turns them into data for the game) told you it was expecting either an array closing ' ] ' or a comma ',', but found something else instead (a quotation mark).
     
    onerb2 likes this.
  5. Iridecense

    Iridecense Big Damn Hero

    Hey, thanks for the guide!
    I was just wondering how to install a mod onto a server.

    Thanks!
     
  6. Black--snow

    Black--snow Cosmic Narwhal

    If the server host has the mod installed it will work, I tested this with my mod on my friends server. :)

    Weapons don't do damage if there's no mod on the server, not sure if picks work though.
     
  7. Vagrant0

    Vagrant0 Void-Bound Voyager

    Playing around with this using just "..\mods" in the bootstrap.

    Looks like all the folders added to assetSources behaves like the base assets folder. This means that if you want mods to be easily added/removed, they need to have a folder for each mod that just contains all the related asset sub-folders. The alternative is just having a single mods folder which has just loose game files without being connected to a mod, but which makes it hard to differentiate between what mod added what.

    But, both setups can potentially be used with reasonable success.

    In regards to mods which overwrite existing values, such as default recipes, species info, or similar, you need to either have them in the same folder layout as they would be within the assets folder. eg:
    \mods\recipes\starter\stonefurnace
    This would still keep the modified files separate from the default ones (for the sake of removing them easily) but requires a little understanding of where a mod might install some things.

    In regards to mods which add new content however, a loose folder works perfectly fine as long as the parent folder contains all files needed to make that content work. For example:
    \mods\awesomearmor
    still works despite not being specifically listed in the bootstrap file. Within the awesomearmor folder, you can have all the files related to that new item, even allowing recipe files to exist in the same place as the base item. NOTE however that you also need to include any relevent .frame files so that the item displays properly in game. This means that appropriate .recipe files can work from any folder, just as any .chest or .sword can; the game itself uses the file extension as a means of figuring out what that file relates to, with directory structure only being there for the sake of organization.


    What this means is that we can establish a working standard to build mods with, without needing to repeatedly make changes to the bootstrap file.

    The base \mods folder can be used as a catch-all for any default overrides, and works perfectly in that role since it forces a system where only one override can exist for any single file. This is important because (during testing), it appeared that having 2 files in different subfolder locations with the same ID data caused a corruption of character data (more testing needed to confirm).

    With this in place, the additional loose folders located in \mods can then be used as a means of making sure that new content mods are isolated from eachother and can more easily be removed. Since the game associates based on extension, you do not need a complicated folder structure here.

    I'm not sure how more complicated things, like extra techs, effects, or races work quite yet, but everything so far appears to work along this sort of model. Meaning that you really don't need anything more than a single edit to the bootstrap file to add a "..\mods" entry to declare a new asset folder.

    Only really important thing here is establishing a standard so that mod authors can follow, and informing those authors as to what they need to include to make those files work.
     
  8. Black--snow

    Black--snow Cosmic Narwhal

    Techs and Races would appear to work the same to all the other files; my friend and I have been playing around with them a bit. ^_^
     
  9. FiskHusky

    FiskHusky Big Damn Hero

    He

    Well what about species.. I have a mod for a species and following what you did.. except for the species, I've seen the game load up but before it gets to a menu.. the error message stating "Access violation detected at 0x4bc4d9 (Read of address 0xc6)" appears. I don't know exactly what this mean but Im guessing I can't change anything for mine.. and Im using Windows 7
     
  10. NightmareX91

    NightmareX91 Phantasmal Quasar

    Check starbound.log for the real error.
     
  11. FiskHusky

    FiskHusky Big Damn Hero

    Do share the insight on how I go about doing that.. Checked the entire folder and can't find anything labeled Starbound.log
     
  12. Slabity

    Slabity Void-Bound Voyager

    Question about mods.

    If I install one on my server, does everyone who joins the game need it installed as well? Will they automatically download it from the server?
     
  13. Halberde

    Halberde Star Wrangler

    Someone has posted a mod install based on this guide here: http://community.playstarbound.com/index.php?threads/starbound-mod-installer.45139/

    EDIT:

    I have two questions:

    1) Mods are often distributed with readme's and changelogs. What do you reckon is the best way to organise them?

    2) If it were possible to have a file containing a list of edits to files such as the player.conf, so that a mod maker could format it so that a mod manager could use it to populate the player.conf automatically, any ideas for how to best organise that? Just list the sorting headings (ie, "defaultBlueprints", which then contains sections ("tier1", "tier2", etc.)) and then inside just have any new sections to add?
     
    Last edited: Dec 10, 2013
  14. Afflicted One

    Afflicted One Phantasmal Quasar

    I love using this method, I prefer to keep my assets folder clean and not edit files like player.config since it will probably be rewritten with each update.

    Not to mention it's much easier to stay organized.
     
  15. Halberde

    Halberde Star Wrangler

    I believe (not that I've checked) that everyone who joins needs to have it installed as well, and that everyone will need to download it manually. Can anyone else offer an more knowledgeable opinion?
     
  16. Heiixx

    Heiixx Space Hobo

    I have a similar question to Halberde. I am currently hosting a private server for a few friends, and have been actively modding my game. Will they need the files on their computer or are assets based off of the server? Also, I'm a little curious about the mod loading. The bootstrap instructions are easy, but when the mod creators are mentioned and the file structure I was a little confused. I currently have a folder setup with only modded files that mirrors the assets folder without replacing it (A backup save location), if I zip that and send it out will it be compatible with the mod folder/bootstrap installation guide? Thank you in advance for any clarification given.
     
  17. Sc0rpi0n_k1ng

    Sc0rpi0n_k1ng Big Damn Hero

    Works Perfectly. Hopefully (unless an easier way is officially implemented) this will work for a good while. I love adding mods and considered making some, and with this method I am not worried about accidentally messing up a file and having to re-acquire everything.
     
  18. Halberde

    Halberde Star Wrangler

    If I've understood you properly, I think you should be fine.

    The specific file structure of a .zip would depend on what a modloader ends up doing, but if have set your files up like follows, you should be fine:
    Code:
    /Mod1 v1.0.zip
        /Mod1 v1.0
            /Mod1
                /items
                /objects
                /recipes
    I'm curious about peoples thoughts about this specific structure. With this, you could put readme's and changelogs (and any other necessary files) in the "/Mod1 v1.0" folder, and then you could refer the bootstrap.conf to the /Mod1 v1.0/Mod1/ folder, as in your bootstrap.config would look like:

    Code:
    {
      "assetSources" : [
        "../assets",
        "../mods/Mod1 v1.0/Mod1"
      ],
      "storageDirectory" : ".."
    }
     
    Heiixx likes this.
  19. Xane

    Xane Aquatic Astronaut

    Eh.. instead of using folders for meta information like version and author I'd rather have each mod package to include their own metafile ("metadata.mod" or something) that is distributed inside the root of the mod-archive.
    Something along the lines of (just using JSON as an example structure to be coherent with the game):
    Code:
    {
        "author": "Xane"
        "version": "1.0"
        "modname": "Generic Mod"
        "description": "Some generic mod. Also, feathers!"
    }
    
    The Modmanager then uses this to display the information and name the (sub-)folders accordingly upon applying the mod.
    I would be willing to work/contribute on a modmanager if anyone's up for it. As long as it's written in C# I'm all game.
     
  20. Xuhybrid

    Xuhybrid Scruffy Nerf-Herder

    My concern is that people aren't always going to use a mod loader. Some might not want to edit the bootstrap for every update. So i came up with a structure for my mods which works when installing manually, but also provides solid mod loading support for when we have player.config file merges.
    Code:
    /[modname].zip
      /mod.json
      /assets
        /player.config
        /mods
          /[modname]
            /items
            /recipes
    It's also worth suggesting that you could add a player.config file (which is only used by mod loaders) with just the defaultBlueprints array in it. The mod loader can then easily merge the arrays using their desired programming language.
    Code:
    {
      "defaultBlueprints" : {
        "tier1" : [
          { "item" : "stonebeamaxe" },
          { "item" : "copperbeamaxe" },
          { "item" : "silverbeamaxe" },
          { "item" : "goldbeamaxe" },
          { "item" : "platinumbeamaxe" },
          { "item" : "diamondbeamaxe" },
          { "item" : "techbypass" }
        ],
        "customtier" : [
          { "item" : "customrecipe" }
        ]
      }
    }
    Edit: Not that they cannot already merge the arrays if you used a full player.config, but its just food for thought.
     
    Last edited: Dec 10, 2013
Thread Status:
Not open for further replies.

Share This Page