Modding Help Changing default ships

Discussion in 'Starbound Modding' started by BlueLeafeon, May 15, 2015.

  1. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    I've been looking around and the only topic generally related to what I want is this one:http://community.playstarbound.com/...-while-having-a-ship-from-another-race.96215/

    It's recommended that the OP make a mod instead of simply renaming ship files. I REALLY don't like the human ship and I would like to replace ALL human ship types with another race's,such as the Glitch's castle ship. However, what tutorials I can find for making mods all seem to be about items. This seems like a relatively easy task to pull--I just don't know how to do it.

    I am willing to learn to do it myself, but if somebody wants to do it themselves, that's fine too.
     
  2. Kayuko

    Kayuko Oxygen Tank

    Best Answer
    Note: If you really don't want to learn anything open this spoiler.
    Otherwise, use swat's method.



    Thats a pretty easy task only requiring you to know simple basics.
    There are two ways to go about this:

    First, altering the universe file, to do that, use a patchfile named universe_server.config.patch, it should look like this:


    [
    {
    "op" : "replace", "path" : "/speciesShips/human", "value" : ["/ships/floran/floranT0.structure", "/ships/floran/floranT1.structure", "/ships/floran/floranT2.structure", "/ships/floran/floranT3.structure", "/ships/floran/floranT4.structure", "/ships/floran/floranT5.structure", "/ships/floran/floranT6.structure", "/ships/floran/floranT7.structure", "/ships/floran/floranT8.structure"]
    }
    ]


    Obviously you choose the race there: "floran/floranT0.structure", just replace this to your liking.
    Put this into a universe_server.config.patch.

    More on the folder structure later, first:

    Option 2.

    You can also replace the ships used, instead of the ships generated.
    To do that, simply copy the species/ships files of the ship you want to use and replace the human ship files.
    As you need much renaming, far more then one file and it's not really a clean solution I highly recomment option n1.

    Now all you need is a .modinfo file and a new folder.

    New folder is pretty easy and here's an example .modinfo


    {
    "name" : "SB+_Mining",
    "version" : "Spirited Giraffe v4",
    "path" : ".",
    "requires" : [],
    "includes" : [],
    "metadata":
    {
    "author" : "Kayuko",
    "version" : "0.4",
    "description" : "Extends the default gameplay",
    "support_url" : ""
    }
    }


    Then just put the universe_server.config.patch in the root directory of your mod (your new folder).
     
  3. The | Suit

    The | Suit Agent S. Forum Moderator

    It is always good to do it your self. That way if any other future issues arise you can easily handle it with confidence
    It is reasonably easy, first start with the Modding Guides Sticky.
    1. Read the Basic Modding Guide
      1. You will need to know how to make a basic mod first
    2. Next Read Patching Guide
      1. in order to change the data you will need to know how to patch it
    3. Finally patch all human ships in the universe_server.config
    4. How to Report Fix Mod errors will help you solve any mistakes along the way
    Once you finish the above - try making your own patch file. An if any issues try to read your starbound.log to correct it.
    If you still can't figure it out post your patch file using the [code] [/code] tags.

    There is also a Video Tutorial series by @Peelz which should cover some of the basics also.
     
    Kayuko likes this.
  4. Kayuko

    Kayuko Oxygen Tank

    Best Answer
    Note: If you really don't want to learn anything open this spoiler.
    Otherwise, use swat's method.



    Thats a pretty easy task only requiring you to know simple basics.
    There are two ways to go about this:

    First, altering the universe file, to do that, use a patchfile named universe_server.config.patch, it should look like this:


    [
    {
    "op" : "replace", "path" : "/speciesShips/human", "value" : ["/ships/floran/floranT0.structure", "/ships/floran/floranT1.structure", "/ships/floran/floranT2.structure", "/ships/floran/floranT3.structure", "/ships/floran/floranT4.structure", "/ships/floran/floranT5.structure", "/ships/floran/floranT6.structure", "/ships/floran/floranT7.structure", "/ships/floran/floranT8.structure"]
    }
    ]


    Obviously you choose the race there: "floran/floranT0.structure", just replace this to your liking.
    Put this into a universe_server.config.patch.

    More on the folder structure later, first:

    Option 2.

    You can also replace the ships used, instead of the ships generated.
    To do that, simply copy the species/ships files of the ship you want to use and replace the human ship files.
    As you need much renaming, far more then one file and it's not really a clean solution I highly recomment option n1.

    Now all you need is a .modinfo file and a new folder.

    New folder is pretty easy and here's an example .modinfo


    {
    "name" : "SB+_Mining",
    "version" : "Spirited Giraffe v4",
    "path" : ".",
    "requires" : [],
    "includes" : [],
    "metadata":
    {
    "author" : "Kayuko",
    "version" : "0.4",
    "description" : "Extends the default gameplay",
    "support_url" : ""
    }
    }


    Then just put the universe_server.config.patch in the root directory of your mod (your new folder).
     
  5. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    I have read the basic guide but I am afraid I'm not completely understanding what it is I should do. I am sadly not a person who can be handed tools and general knowledge and figure out to do things not covered in the guide..:( I can still learn, it just takes a little more tutoring, usually.

    I have done this but the game still loads up human ships both when I continue my current file and when I start a new one. I directly copied your codes and changed all instances of floran to glitch via the find/replace function. I put both the patch and the modinfo file into a folder in my mods directory called humanships. The title screen seems to show absolutely no signs of having detected the patch. (There doesn't seem to be an error or anything.)
     
  6. Kayuko

    Kayuko Oxygen Tank

    Huh. Can you send me a starbound.log regardless?
     
  7. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    Which one? Ther'e's like, six.
     
  8. Kayuko

    Kayuko Oxygen Tank

    When someone asks for a starbound log they're always talking about the one without a number, that's the newest stdout.txt translation.
    Oh and, because kangaroo, please use [code] [/code] tags to post it.
     
  9. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    [[​IMG]


    I don't see one?
     
  10. Kayuko

    Kayuko Oxygen Tank

    I should really start to mention that, lol.
    If you didn't mess with your windows folder options is displayed as "starbound" textfile, due to a missing file extension being shown.
    So its the file that's simply called "starbound"
     
  11. The | Suit

    The | Suit Agent S. Forum Moderator

  12. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    Now that you mention file extensions, looking at the status of my patch file shows that it's a .txt. WELL NO WONDER IT'S NOT WORKING.

    Okay, googled how to turn on file extensions (I just got this computer last week--after having used Windows XP for YEARS.) Removed the .txt from the file, now loading...

    annnnnnnnnd
    [​IMG]

    okay, now log time



    ...those emotes need to go away lol.

    Code:
    Start logging at: 2015-05-15 11:34:31.208
    [11:34:31.208] Info: Star::Root using bootstrap file 'C:\Program Files\Steam\steamapps\common\Starbound\win32\sbboot.config'
    [11:34:31.208] Info: Star::Root using storage directory 'C:\Program Files\Steam\steamapps\common\Starbound\giraffe_storage\'
    [11:34:31.208] Info: Preparing Star::Root...
    [11:34:31.208] Info: Detected mod 'madExp_ChoosePet' at '../giraffe_storage/mods\madExp_ChoosePet\.'
    [11:34:31.208] Info: Detected mod 'HumanShip' at '../giraffe_storage/mods\humanship\.'
    [11:34:31.208] Info: Loading Configuration with config file: 'starbound.config'
    [11:34:31.208] Info: Loading Star::Configuration from 'Just (.\..\giraffe_storage\starbound.config)'
    [11:34:31.208] Info: Writing Star::Configuration to '.\..\giraffe_storage\starbound.config'
    [11:34:31.221] Info: Initializing Star::Root with 4 assets sources
    [11:34:31.221] Info: Done preparing Star::Root.
    [11:34:31.221] Info: Client Version 'Beta v. Spirited Giraffe - Update 5' Revision: b121429b907d2919c3f1d5e25303c5bb571ed61a Protocol: 679
    [11:34:31.221] Info: Initialized SDL
    [11:34:31.230] Info: Initialized SDL Video
    [11:34:31.237] Info: Initialized SDL Joystick
    [11:34:31.238] Info: Initialized SDL Sound
    [11:34:31.257] Info: Opened default audio device with 44khz / 16 bit stereo audio, 2048 sample size buffer
    [11:34:31.257] Info: Loading Assets
    [11:34:31.257] Info: Loading Star::Assets from: '../assets/packed.pak'
    [11:34:31.258] Info: Loading Star::Assets from: '../assets/user'
    [11:34:31.258] Info: Loading Star::Assets from: '../giraffe_storage/mods\madExp_ChoosePet\.'
    [11:34:31.258] Info: Loading Star::Assets from: '../giraffe_storage/mods\humanship\.'
    [11:34:31.579] Info: Done loading Assets
    [11:34:31.581] Info: Fully loading Star::Root...
    [11:34:31.582] Info: Loading NameGenerator
    [11:34:31.583] Info: Initializing SDL Window
    [11:34:31.584] Info: Loading ObjectDatabase
    [11:34:31.591] Info: Loading PlantDatabase
    [11:34:31.614] Info: Loading ProjectileDatabase
    [11:34:31.615] Info: Loading MonsterDatabase
    [11:34:31.616] Info: Loading NpcDatabase
    [11:34:31.624] Info: Done loading NameGenerator
    [11:34:31.624] Info: Loading PlayerFactory
    [11:34:31.632] Info: Loading EntityFactory
    [11:34:31.632] Info: Loading ItemDatabase
    [11:34:31.648] Info: Done loading PlayerFactory
    [11:34:31.648] Info: Loading MaterialDatabase
    [11:34:31.648] Info: Loading ParticleDatabase
    [11:34:31.802] Info: Done loading ParticleDatabase
    [11:34:31.835] Info: Created initial window 1024x749
    [11:34:31.840] Info: Done loading PlantDatabase
    [11:34:31.840] Info: Loading TerrainDatabase
    [11:34:31.851] Info: Renderer initialized
    [11:34:31.858] Info: Renderer destroyed
    [11:34:31.858] Info: Initializing SDL Window
    [11:34:31.861] Info: Done loading TerrainDatabase
    [11:34:31.861] Info: Loading BiomeDatabase
    [11:34:31.919] Info: Re-created window 1024x749
    [11:34:31.925] Info: Done loading NpcDatabase
    [11:34:31.925] Info: Loading LiquidsDatabase
    [11:34:31.947] Info: Renderer initialized
    [11:34:32.063] Info: Done loading BiomeDatabase
    [11:34:32.063] Info: Loading StatusEffectDatabase
    [11:34:32.095] Info: Done loading MaterialDatabase
    [11:34:32.095] Info: Loading DamageDatabase
    [11:34:32.099] Info: Done loading LiquidsDatabase
    [11:34:32.099] Info: Loading EffectSourceDatabase
    [11:34:32.107] Info: Done loading StatusEffectDatabase
    [11:34:32.107] Info: Loading FunctionDatabase
    [11:34:32.130] Info: Done loading FunctionDatabase
    [11:34:32.130] Info: Loading TreasureDatabase
    [11:34:32.156] Info: Done loading EffectSourceDatabase
    [11:34:32.156] Info: Loading DungeonDefinitions
    [11:34:32.302] Info: Done loading TreasureDatabase
    [11:34:32.302] Info: Loading EmoteProcessor
    [11:34:32.302] Info: Done loading EmoteProcessor
    [11:34:32.302] Info: Loading SpeciesDatabase
    [11:34:32.385] Info: Done loading SpeciesDatabase
    [11:34:32.385] Info: Loading ImageMetadataDatabase
    [11:34:32.385] Info: Done loading ImageMetadataDatabase
    [11:34:32.385] Info: Loading VersioningDatabase
    [11:34:32.385] Info: Done loading VersioningDatabase
    [11:34:32.386] Info: Loading QuestTemplateDatabase
    [11:34:32.394] Info: Done loading DamageDatabase
    [11:34:32.394] Info: Loading AiDatabase
    [11:34:32.435] Info: Done loading AiDatabase
    [11:34:32.435] Info: Loading TechDatabase
    [11:34:32.454] Info: Done loading QuestTemplateDatabase
    [11:34:32.454] Info: Loading CodexDatabase
    [11:34:32.462] Info: Done loading TechDatabase
    [11:34:32.465] Info: Done loading ProjectileDatabase
    [11:34:32.755] Info: Done loading CodexDatabase
    [11:34:33.107] Info: Done loading MonsterDatabase
    [11:34:33.327] Info: Done loading ObjectDatabase
    [11:34:33.327] Info: Done loading EntityFactory
    [11:34:40.703] Info: Done loading ItemDatabase
    [11:34:41.985] Info: Done loading DungeonDefinitions
    [11:34:41.987] Info: Done fully loading Star::Root
    [11:34:41.999] Info: Renderer destroyed
    [11:34:43.976] Info: Creating default Star::Configuration
    [11:34:43.976] Info: Creating default Star::Configuration
    [11:34:44.073] Info: Renderer initialized
    [11:35:29.186] Info: Renderer destroyed
    [11:35:29.754] Error: Exception caught loading asset: /universe_server.config, (AssetException) Could not read variant asset /universe_server.config
      StarException::StarException(string, exception)
      AssetException::AssetException(string, exception)
      _Function_handler<shared_ptr<Assets::AssetData> (), Assets::loadJson(String)::{lambda()#1}>::(_Any_data)
      Assets::processAssetData(function<shared_ptr<Assets::AssetData> ()>)
      Assets::loadJson(String)
      Assets::loadAsset(Assets::AssetId)
      Assets::doLoad(Assets::AssetId)
      Assets::getAsset(Assets::AssetId)
      Assets::json(String)
      CommandProcessor::CommandProcessor(UniverseServer*)
      UniverseServer::UniverseServer(String, bool)
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    
    Caused by: (JsonParsingException) Cannot parse json file: /universe_server.config
      StarException::StarException(string, exception)
      Assets::readJson(String)
      _Function_handler<shared_ptr<Assets::AssetData> (), Assets::loadJson(String)::{lambda()#1}>::(_Any_data)
      Assets::processAssetData(function<shared_ptr<Assets::AssetData> ()>)
      Assets::loadJson(String)
      Assets::loadAsset(Assets::AssetId)
      Assets::doLoad(Assets::AssetId)
      Assets::getAsset(Assets::AssetId)
      Assets::json(String)
      CommandProcessor::CommandProcessor(UniverseServer*)
      UniverseServer::UniverseServer(String, bool)
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    
    Caused by: (JsonParsingException) Error parsing json: bad array, should be ',' or ']' at 5:1
      JsonParsingException::JsonParsingException(string)
      Json inputUtf8Json<char*>(char*, char*, bool)
      Assets::readJson(String)
      _Function_handler<shared_ptr<Assets::AssetData> (), Assets::loadJson(String)::{lambda()#1}>::(_Any_data)
      Assets::processAssetData(function<shared_ptr<Assets::AssetData> ()>)
      Assets::loadJson(String)
      Assets::loadAsset(Assets::AssetId)
      Assets::doLoad(Assets::AssetId)
      Assets::getAsset(Assets::AssetId)
      Assets::json(String)
      CommandProcessor::CommandProcessor(UniverseServer*)
      UniverseServer::UniverseServer(String, bool)
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    
    [11:35:29.879] Info: Shutting down Star::Root
    [11:35:30.312] Error: Fatal Exception Caught: (AssetException) Error loading asset /universe_server.config
      AssetException::AssetException(string)
      Assets::getAsset(Assets::AssetId)
      Assets::json(String)
      CommandProcessor::CommandProcessor(UniverseServer*)
      UniverseServer::UniverseServer(String, bool)
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    
     
    Last edited by a moderator: May 15, 2015
  13. Kayuko

    Kayuko Oxygen Tank

    Lol.
    Uhm.
    Uhhhhm.
    You did call the patchfile universe_server.config.patch, right?
    I know you didn't, but you could just pretend you did and it's magically working now.
     
  14. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    but but but but...

    [​IMG]

    I'm pretty sure I did? ._.
     
  15. Kayuko

    Kayuko Oxygen Tank

    What's that ships folder doing there.
    Mind posting the content of the patchfile?
    I checked the patch with an online interpreter and it worked completely fine, lol.
     
  16. The | Suit

    The | Suit Agent S. Forum Moderator

    Use the [code] [/code] tags this time
     
  17. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    because I was stupid and thought it needed to be. Maybe if I removed it...

    Nope, still crashes. Okay, another spoiler time.

    Code:
    [
      {
      "op" : "replace", 
      "path" : "/speciesShips/human", 
      "value" : ["/ships/glitch/glitchT0.structure", "/ships/glitch/glitchT1.structure", "/ships/glitch/glitchT2.structure", "/ships/glitch/glitchT3.structure", "/ships/glitch/glitchT4.structure", "/ships/glitch/glitchT5.structure", "/ships/glitch/glitchT6.structure", "/ships/glitch/glitchT7.structure", "/ships/glitch/glitchT8.structure"]
      }
    [
    
     
  18. Kayuko

    Kayuko Oxygen Tank

    Did I really do that?
    Really now?
    Replace the last [ with a ]
    I really did that, didn't I?
     
  19. BlueLeafeon

    BlueLeafeon Cosmic Narwhal

    It happens.

    And yaaaaaaaaay it works now. Thank you!

    @ moderator: Your post ninja'd me. Sorry. :(
     

Share This Page