Modding Help Is it possible to add more clothing for a race? [SOLVED]

Discussion in 'Starbound Modding' started by Ickura, Mar 11, 2017.

  1. Ickura

    Ickura Big Damn Hero

    Is it possible to add another shirt or pants for a specific race?
    I wanted to have an Apex npc to spawn with glitch clothing without using Create-a-friend mod.

    "genders" : [
    {
    "name" : "male",
    "image" : "/interface/title/male.png",
    "characterImage" : "/interface/title/sapemale.png",
    "hairGroup" : "hairmale",
    "hair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" ],
    "shirt" : [ "apexcommanderjacket", "apexnavyjacket", "apexofficerjacket", "apexspecialistjacket", "protectorateshirtchest", "protectoratevestchest" ],
    "pants" : [ "apexcommanderpants", "apexnavypants", "apexofficerpants", "apexspecialistpants" ],

    "facialHairGroup" : "beardmale",
    "facialHair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" ],
    "facialMaskGroup" : "",
    "facialMask" : [ ]
    },
    {
    "name" : "female",
    "image" : "/interface/title/female.png",
    "characterImage" : "/interface/title/sapefemale.png",
    "hairGroup" : "hairfemale",
    "hair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" ],
    "shirt" : [ "apexcommanderjacket", "apexnavyjacket", "apexofficerjacket", "apexspecialistjacket", "protectorateshirtchest", "protectoratevestchest" ],
    "pants" : [ "apexcommanderpants", "apexnavypants", "apexofficerpants", "apexspecialistpants" ],

    "facialHairGroup" : "beardfemale",
    "facialHair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" ],
    "facialMaskGroup" : "",
    "facialMask" : [ ]
    }
    ],


    This is the part of a code from apex.species in my unpacked assets, the shirt and pants are highlighted in red for both genders, I'm not sure if this is for character creation only, or if it also affects what the entire race is wearing as well.

    So I am wondering is it possible to add more shirts and pants to "shirt:" and "pants:", making any newly spawned apex have a chance in wearing the clothing I added to the code?

    Sorry if I am not being specific enough.
     
  2. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    if you look at any mod that adds clothing to vanilla races, u'll see that they just add it to the list
     
  3. Ickura

    Ickura Big Damn Hero

    So I take it as a yes.
    But I don't know how to unpack mods, so can you give me an example on how to just add it to the list?
     
    Last edited: Mar 11, 2017
  4. Cyel

    Cyel Scruffy Nerf-Herder

    The apex.species.patch would look like
    Code:
    [
       {"op": "add", "path": "/genders/0/shirt/-", "value":"apexspecialistjacket"},
       {"op": "add", "path": "/genders/0/pants/-", "value":"apexspecialistpants"},
       {"op": "add", "path": "/genders/1/shirt/-", "value":"apexspecialistjacket"},
       {"op": "add", "path": "/genders/1/pants/-", "value":"apexspecialistpants"}
    ]
    Unpacking mods is done the same way as unpacking assets.
     
  5. Ickura

    Ickura Big Damn Hero

    I tried this
    Code:
    [
        {"op": "add", "path": "/genders/0/shirt/-", "value":"floranfurnivourchest"}
    ]
    
    But it did not add the Floran shirt to the apex during character creation. What am I doing wrong?
    Does it have to be in a specific file, because I only made one called "add patches" and put the code in there alone?
     
  6. Ickura

    Ickura Big Damn Hero

    I found out how to unpack mods, but it did not help me figure out how to add clothes.:facepalm:
    The mod uses a similar structure for its code, but when I tweaked it it still did not work, how do you people do this?:whaaat:
     
    Last edited: Mar 11, 2017
  7. HerrJunky

    HerrJunky Void-Bound Voyager

    These Mod should all contain at least one .patch file whic contains all the patches made to the specific file
    (In your case it would be the apex.species.patch file)
    It has to be a json patch file witch matching structure,
    internet tools are often quite good in finding mistakes in those files.

    Also when you add custom clothing , make sure, that your clothing items are working and all names are spelled correctly.
    For figuring out all these problems the output log is a very place to start !

    HerrJunky
     
  8. Ickura

    Ickura Big Damn Hero

    Code:
    [
       {"op": "add", "path": "/genders/0/shirt/-", "value":"kimonochest"},
       {"op": "add", "path": "/genders/0/pants/-", "value":"kimonolegs"},
       {"op": "add", "path": "/genders/1/shirt/-", "value":"kimonochest"},
       {"op": "add", "path": "/genders/1/pants/-", "value":"kimonolegs"}
    ]
    
    Here is a more recent version of my attempt, I am using notepad++, the file name is apex.species.patch

    I used both Jsonlint, and Json parser, both of which confirmed that this code is valid.

    I assume that an output log is a small pop-up when your game crashes and shows and error, if so I did not receive any error messages.

    The game did not crash or anything, I just wanted to add default clothing to the apex but this did nothing, nothing changed. :fireball:

    So it might not be the code, but either the location of it, or I am just missing more content that goes with this such as a picture or something.

    This is where I placed the patch file at...(I wish I could take a screenshot instead believe me :lod:)

    ThisPC > Documents > Combiner's Toybox > Starbound Modding > mods > test mod > patch > species

    I don't have anything else in the species folder except the patch file, so I do hope this at least clarified the situation.
     
  9. HerrJunky

    HerrJunky Void-Bound Voyager

    Okay it seems to be a valid patch indeed...
    Your Log file isn't a window, it is just a file (thats why i called it file) the file i located in the Folder
    .../starbound/storage
    It should be called log.txt, if you have more than one file called log , take the last modified one,if it matches your current time it should be the actual log.
    Alternatively there ist a file in your Starbound64 folder called stoudt.txt (or something like this) , I haven't figured out yet whether its real log file or just another unused file from older versions...
    When you found it please make a post with the full log in it

    Based on personal experience, not on knowledge i think it should not make any difference where the location of the patch is because the game is going to load it anyway...
     
    Last edited: Mar 11, 2017
  10. Ickura

    Ickura Big Damn Hero

    I believe I found the error in the log you've mentioned, but I am going to post the whole thing with it anyways.
    Full log:
    Code:
    [16:23:45.940] [Info] Root: Preparing Root...
    [16:23:45.941] [Info] Root: Done preparing Root.
    [16:23:45.942] [Info] Client Version 1.2.3b (windows x86_64) Source ID: 69bc1c906122a1c61453c6cff15aa088b613db78 Protocol: 729
    [16:23:45.942] [Info] Root: Scanning for asset sources in directory '..\assets\'
    [16:23:46.521] [Info] Root: Scanning for asset sources in directory '..\mods\'
    [16:23:46.521] [Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
    [16:23:46.523] [Info] Root: Detected asset source named 'base' at '..\assets\packed.pak'
    [16:23:46.523] [Info] Root: Detected asset source named 'testingmod' at '..\mods\test mod'
    [16:23:46.523] [Info] Root: Detected unnamed asset source at '..\assets\user'
    [16:23:46.523] [Info] Loading assets from: '..\assets\packed.pak'
    [16:23:47.195] [Info] Loading assets from: '..\mods\test mod'
    [16:23:47.197] [Info] Loading assets from: '..\assets\user'
    [16:23:48.110] [Info] Assets digest is 7e24a02783d6af57f6b768ebced8c1e93099205e4207538e479518e52c84667b
    [16:23:48.110] [Info] Root: Loaded Assets in 2.16784 seconds
    [16:23:48.115] [Info] Application: Initializing SDL Video
    [16:23:48.122] [Info] Application: Initializing SDL Joystick
    [16:23:48.202] [Info] Application: Initializing SDL Sound
    [16:23:48.292] [Info] Initialized Steam services
    [16:23:48.294] [Info] Application: Creating SDL Window
    [16:23:48.682] [Info] Application: Enabling VSync with late swap tearing
    [16:23:48.719] [Info] Application: Opened default audio device with 44.1khz / 16 bit stereo audio, 2048 sample size buffer
    [16:23:48.725] [Info] OpenGL version: '4.5.14008 Compatibility Profile Context 21.19.137.514' vendor: 'ATI Technologies Inc.' renderer: 'Radeon(TM) RX 460 Graphics ' shader: '4.50'
    [16:23:48.726] [Info] Application: initialization...
    [16:23:48.728] [Info] Root: Loaded Configuration in 0.00104925 seconds
    [16:23:48.734] [Info] Application: renderer initialization...
    [16:23:48.735] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 128
    [16:23:48.736] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 64
    [16:23:48.737] [Info] Root: Loaded ImageMetadataDatabase in 5.90219e-06 seconds
    [16:23:48.763] [Info] Application: main update loop...
    [16:23:48.765] [Info] Loading mods from user generated content with id '729427744' from directory 'C:\Program Files (x86)\Steam\steamapps\workshop\content\211820\729427744'
    [16:23:48.765] [Info] Reloading to include all user generated content
    [16:23:48.765] [Info] Root: Reloading from disk
    [16:23:48.765] [Info] Root: Writing runtime configuration to '..\storage\starbound.config'
    [16:23:48.814] [Info] Root: Loaded Configuration in 0.00110559 seconds
    [16:23:48.814] [Info] Root: Scanning for asset sources in directory '..\assets\'
    [16:23:49.384] [Info] Root: Scanning for asset sources in directory '..\mods\'
    [16:23:49.384] [Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
    [16:23:49.385] [Info] Root: Scanning for asset sources in directory 'C:\Program Files (x86)\Steam\steamapps\workshop\content\211820\729427744'
    [16:23:49.401] [Info] Root: Detected asset source named 'base' at '..\assets\packed.pak'
    [16:23:49.401] [Info] Root: Detected asset source named 'testingmod' at '..\mods\test mod'
    [16:23:49.401] [Info] Root: Detected asset source named 'Instant Crafting' at 'C:\Program Files (x86)\Steam\steamapps\workshop\content\211820\729427744\contents.pak'
    [16:23:49.401] [Info] Root: Detected unnamed asset source at '..\assets\user'
    [16:23:49.401] [Info] Loading assets from: '..\assets\packed.pak'
    [16:23:50.083] [Info] Loading assets from: '..\mods\test mod'
    [16:23:50.086] [Info] Loading assets from: 'C:\Program Files (x86)\Steam\steamapps\workshop\content\211820\729427744\contents.pak'
    [16:23:50.107] [Info] Loading assets from: '..\assets\user'
    [16:23:51.047] [Info] Assets digest is 63cd99cb3e307dc79e758ed9ad0344bc1259354ce59b2145fbaab59275ec403a
    [16:23:51.047] [Info] Root: Loaded Assets in 2.23306 seconds
    [16:23:51.052] [Info] Root: Loaded ImageMetadataDatabase in 4.2925e-06 seconds
    [16:23:51.062] [Info] Root: Loaded NameGenerator in 0.0137966 seconds
    [16:23:51.068] [Error] OpenGL errors this frame:  GL_INVALID_VALUE
    [16:23:51.219] [Info] Root: Loaded PlantDatabase in 0.156922 seconds
    [16:23:51.458] [Info] Root: Loaded ObjectDatabase in 0.40991 seconds
    [16:23:51.706] [Info] Root: Loaded MonsterDatabase in 0.248019 seconds
    [16:23:51.760] [Info] Root: Loaded NpcDatabase in 0.0533024 seconds
    [16:23:51.761] [Info] Root: Loaded StagehandDatabase in 0.00132129 seconds
    [16:23:51.765] [Info] Root: Loaded VehicleDatabase in 0.00341307 seconds
    [16:23:51.769] [Info] Root: Loaded PlayerFactory in 0.00422999 seconds
    [16:23:51.815] [Info] Root: Loaded ProjectileDatabase in 0.596039 seconds
    [16:23:51.817] [Info] Root: Loaded VersioningDatabase in 0.00132987 seconds
    [16:23:51.817] [Info] Root: Loaded EntityFactory in 0.0476427 seconds
    [16:23:51.863] [Info] Root: Loaded ParticleDatabase in 0.0458549 seconds
    [16:23:52.160] [Info] Root: Loaded MaterialDatabase in 0.343018 seconds
    [16:23:52.165] [Info] Root: Loaded TerrainDatabase in 0.00559984 seconds
    [16:23:52.207] [Info] Root: Loaded BiomeDatabase in 0.0419664 seconds
    [16:23:52.208] [Info] Root: Loaded LiquidsDatabase in 0.000931473 seconds
    [16:23:52.216] [Info] Root: Loaded StatusEffectDatabase in 0.00739517 seconds
    [16:23:52.584] [Info] Root: Loaded DamageDatabase in 0.368576 seconds
    [16:23:52.590] [Info] Root: Loaded EffectSourceDatabase in 0.00605913 seconds
    [16:23:52.595] [Info] Root: Loaded FunctionDatabase in 0.0046587 seconds
    [16:23:52.629] [Info] Root: Loaded TreasureDatabase in 0.0333562 seconds
    [16:23:52.968] [Info] Root: Loaded DungeonDefinitions in 0.339133 seconds
    [16:23:52.968] [Info] Root: Loaded TilesetDatabase in 5.98267e-05 seconds
    [16:23:52.971] [Info] Root: Loaded StatisticsDatabase in 0.00314345 seconds
    [16:23:52.971] [Info] Root: Loaded EmoteProcessor in 8.90694e-05 seconds
    [16:23:52.980] [Info] Root: Loaded SpeciesDatabase in 0.00885248 seconds
    [16:23:52.999] [Info] Root: Loaded QuestTemplateDatabase in 0.0190008 seconds
    [16:23:53.001] [Info] Root: Loaded AiDatabase in 0.00191606 seconds
    [16:23:53.002] [Info] Root: Loaded TechDatabase in 0.00131002 seconds
    [16:23:53.012] [Info] Root: Loaded CodexDatabase in 0.00946631 seconds
    [16:23:53.452] [Info] Root: Loaded BehaviorDatabase in 0.439897 seconds
    [16:23:53.455] [Info] Root: Loaded DanceDatabase in 0.00335942 seconds
    [16:23:53.463] [Info] Root: Loaded SpawnTypeDatabase in 0.00768519 seconds
    [16:23:53.466] [Info] Root: Loaded RadioMessageDatabase in 0.00287598 seconds
    [16:23:54.734] [Info] Root: Loaded ItemDatabase in 2.91864 seconds
    [16:23:54.902] [Info] Root: Loaded CollectionDatabase in 1.43567 seconds
    [16:23:55.334] [Info] detected supported OpenGL texture size 16384, using atlasNumCells 256
    [16:24:32.115] [Info] Application: quit requested
    [16:24:32.115] [Info] Application: quitting...
    [16:24:32.115] [Info] Application: shutdown...
    [16:24:32.239] [Info] Root: Shutting down Root
    [16:24:32.530] [Info] Application: Destroying SDL Window
    [16:24:32.639] [Info] Application: stopped gracefully
    
    Possible spotted error in log:
    [16:23:51.068] [Error] OpenGL errors this frame: GL_INVALID_VALUE
     
  11. Cyel

    Cyel Scruffy Nerf-Herder

    Yes, your patch file needs to be in the same "folder" architecture as the file it's patching things in is, in order for the game to use it.
    For example here, in order to patch /species/apex.species from the assets, your patch will have to be, in your mod's folder, in a (otherwise empty) species folder: at /species/apex.species.patch.

    If you were trying to patch the stonebed.object in
    /objects/biome/alpine/stonebed/stonebed.object, your patch file should be, in your mod, in the folders
    /objects/biome/alpine/stonebed/stonebed.object.patch


    An error in the logs about patches would look like "failed to apply patch X"
     
  12. Ickura

    Ickura Big Damn Hero




    :saywhat:


    [​IMG]

    I tested it and it works


    ima go criin the corner now
     
    Cyel likes this.

Share This Page