Modding Help Descriptions

Discussion in 'Starbound Modding' started by BasicallyNuclear, Jul 11, 2015.

  1. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    Any way I can change one with a program
     
  2. WeswePengu

    WeswePengu Title Not Found

    Hi! Any sort of text editor like these:

    For windows: Notepad++ (do a google search for "Notepad++", recommended for windows)
    For Mac: TextWrangler (on mac app store or downloadable online somewhere, recommended for mac.), Xcode (also on mac app store), Text Editor (Installed by default on mac)

    Eclipse might be something to look at. I haven't tried it myself but it sounds cool.
     
  3. Kayuko

    Kayuko Oxygen Tank

    Ehh, just a friendly tip, Eclipse is kinda a Java-IDE. With compilers and shit.
    I wouldn't use that for simple modding.
    But yeah, open the respective file of your assets and, well, mod it accordingly.
    There are plenty o' guides on this stuff in the forums.
     
  4. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    Will it let me edit the description if its in my inventory?
     
  5. lillgrinn

    lillgrinn Phantasmal Quasar

    Program to change the description (1) or changing a description from the script (1)?
    1) Notepad ++, SublimeText, AkelPad and other...
    2) IMHO, you'll need a object with script. When you will be interacted with the object, he is will be changing description from interested item/object.

    P.S.:Sorry for language. It's not my native language.
     
    Last edited: Jul 11, 2015
    kyleetehkitty likes this.
  6. Kayuko

    Kayuko Oxygen Tank

    To edit an items description if it's in your inventory you'd need to unpack it using the bin-to-json converter in the win32 directory.
    Run this commandline:

    dump_versioned_json.exe <playerfile>.player <output>.json

    Then you can search for the file and edit the description.
    When you're done, just repack it.

    make_versioned_json.exe <jsonFile>.json <Uuid>*.player

    Uuid is the Id your playerfile had when it was in bin format, the large number (likely with a few letters in it).
    Make sure to save that the numbers match.

    Also, don't mess too much with these files, there's one thing easier then editing it right, and that's corrupting it.
     
    kyleetehkitty and SleepySquidd like this.
  7. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    what do I put in the <output> and do I make that a .bat[DOUBLEPOST=1436632206][/DOUBLEPOST]
    Maybe wait for help
     
    Last edited: Jul 11, 2015
  8. kyleetehkitty

    kyleetehkitty Title Not Found

    You don't need to run it as a bat, just run it (assuming Windows) from a command prompt opened in the same directory as the dump_versioned_json.exe is at. Which is easily done by opening you starbound/win32 folder holding down the shift key, right clicking somewhere inside the file explorer and selecting "Open Command Window Here" then just put in the command like Kayuko specified.

    As far as what to put in the output, it can be anything as long as it is a json file. Call it mashpotatos.json or whatever :D

    If you really need a script to do this for you, I refuse to touch batch so someone else would have to make that. But here is a Powershell script that would work :catface:

    Code:
    #=============================================================================
    # How to use:
    #    1. Open Notepad.exe
    #    2. Paste Script into Notepad
    #    3. Save file as whatever name you want but as a .ps1 file
    #        -- Make sure to select "All files" in the notepad "save as type" box
    #    4. Save the script in your Starbound/Win32 folder
    #    5. Right-click script "Run with Powershell" and win.
    #
    #=============================================================================
    
    #OI! Change this if your player folder is somewhere other than giraffe_storage
    $global:assetFolder = "giraffe_storage"
    
    
    
    #This stuff bellow should be left alone unless you know what you are doing...
    #=============================================================================
    Write-Host ""
    Write-Host ""
    Write-Host "Hi! This helps to make and dump Starbound Versioned Json!" -ForegroundColor Yellow
    Write-Host "[1] - Dump Versioned JSON"
    Write-Host "[2] - Make Versioned JSON"
    
    $global:options = Read-Host -Prompt "Input your selection"
    
    #create playerFolder path based off of script location
    $global:starboundRoot = $PSScriptRoot -split "win32" | select -First 1
    $global:starboundPlayerDir = $starboundRoot + $assetFolder + "\player\"
    
    #Function for the Dump Versioned JSON
    function DumpJSON {
     
        #Check for some file extensions
        #or throw some on
     
        if($dumpPlayer.Contains(".player")) {
            $dumpSrc = $dumpPlayer
        }
        else {
            $dumpSrc = $dumpPlayer + ".player"
        }
     
        if($dumpOutput.Contains(".json")) {
            $outputFile = $dumpOutput
        }
        else {
            $outputFile = $dumpOutput + ".json"
        }
    
        #Build path to player file
        $playerSrc = $starboundPlayerDir + $dumpSrc
     
        #Force script to execute from its root (incase something derpy happens)
        cd $PSScriptRoot
        .\dump_versioned_json.exe $playerSrc $outputFile
    }
    
    #Function for the Make Versioned JSON
    function MakeJSON {
    
        #Check for some file extensions
        #or throw some on
     
        if($makePlayer.Contains(".json")) {
            $makeSrc = $makePlayer
        }
        else {
            $makeSrc = $makePlayer + ".json"
        }
     
        if($makeOutput.Contains(".player")) {
            $outputFile = $makeOutput
        }
        else {
            $outputFile = $makeOutput + ".player"
        }
    
        #Build path to player file
        $output = $starboundPlayerDir + $outputFile
     
        #Force script to execute from its root (incase something derpy happens)
        cd $PSScriptRoot
        .\make_versioned_json.exe $makeSrc $output
    }
    
    if ($options -eq 1){
    
        $global:dumpPlayer = Read-Host -Prompt "Player ID To Dump"
    
        $global:dumpOutput = Read-Host -Prompt "Output File Name"
    
        DumpJSON
    }
    elseif ($options -eq 2){
    
        $global:makePlayer = Read-Host -Prompt "JSON File To Convert"
    
        $global:makeOutput = Read-Host -Prompt "Output Player ID"
     
        MakeJSON
    }
    
    pause
    
    
    if you get a Execution Policy error (which you will if this is first time using Powershell) paste the following:

    In Administrator CMD
    Code:
    powershell.exe -Command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
    or Administrator Powershell
    Code:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
    That will allow Powershell script execution for the current user, but only for valid remote signed scripts and scripts you make.


    EDIT: Added pause to end of script so it can catch any potential errors
     
    Last edited: Jul 12, 2015
    Kayuko and lillgrinn like this.

Share This Page