Tool [All versions][Win/Linux] ModPackHelper

Discussion in 'Starbound Modding' started by Dolan, Feb 16, 2015.

  1. SpaceApple

    SpaceApple Scruffy Nerf-Herder

    Yes, I have plenty of room for the assets. Around 500gb.
     
  2. Mackinz

    Mackinz The Waste of Time

    Well, it does not take even an hour for me, so it may be an issue with your asset_unpacker.exe. Are you attempting to unpack Stable, Unstable or Nightly assets?
     
  3. SpaceApple

    SpaceApple Scruffy Nerf-Herder

    I have tried both stable and unstable. Neither of them work.
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

  5. Mackinz

    Mackinz The Waste of Time

    If he/she is on a windows computer, ModPackHelper would work just as fine as any other choice. The issue isn't ModPackHelper - I just used it to unpack Unstable assets last night. No, I think it's a problem with the unpacker.exe.
     
  6. SpaceApple

    SpaceApple Scruffy Nerf-Herder

    I think so too. I'm going to try completely uninstalling the game and reinstalling it. If this doesn't work, I'm just going to give up.

    Thanks for trying to help though.
     
  7. sergalbutt

    sergalbutt Scruffy Nerf-Herder

    This is kind of irrelevant, but I saw the post and I couldn't help myself.

    [​IMG]
     
  8. Mackinz

    Mackinz The Waste of Time

    Listen, I know RAM is a kind of memory. Literally "Random Access Memory" but I was trying to simply explain there was a difference between RAM and however much writeable disk space is left.
     
    sergalbutt likes this.
  9. Awbawlisk

    Awbawlisk Phantasmal Quasar

    I'm having a lot of trouble trying to use this tool to unpack my .modpak files. I don't understand why I'm having issues with it now considering that it worked perfectly months and months back, but apparently everytime I try to pack or unpack a .modpack file it just.... it doesn't do anything. I even checked my log files and shows nothing. Is anyone else having this problem?

    This is the log file, and literally shows NOTHING. So I'm very stumped here, which is frustrating me to no end because some files I'm having issues with are trapped in .modpack format and I have no other way of getting them unpacked ;___;

    Help!
     

    Attached Files:

  10. Mackinz

    Mackinz The Waste of Time

    Where did you install MPH? What folder? Is it /starbound/giraffe_storage/mods/?
     
  11. Awbawlisk

    Awbawlisk Phantasmal Quasar

    Yes, it is.

    Look, are there like, separate versions of the windows 7 modpackhelper? Because after MANY MAAAAANY cpu restarts, I decided to unpack/pack my files using Win64 assets_packer/unpacker.exe the MANUAL way, and it ended up working out for me.

    By this I mean, are there like separate windows versions for 32-bit AND 64-bit?
     
  12. Mackinz

    Mackinz The Waste of Time

    No, there is only one file, and it should work with either version. Mind showing me (by screenshot) where your ModPackHelper bat file is located?
     
  13. Awbawlisk

    Awbawlisk Phantasmal Quasar

    There you go, hope it helps! (I'm sure it won't..)
     

    Attached Files:

  14. Mackinz

    Mackinz The Waste of Time

    Strange... okay, could you upload a screenshot of what the cmd window looks like when you click on the MPH bat file? Also, what system are you running?
     
  15. Awbawlisk

    Awbawlisk Phantasmal Quasar

    Here is a zip containing the screenshots... As well as the pic of my CPU specs

    I chose to pack FrackinUniverse, which was #8. The moment I pressed '8', nothing happened. It didn't even bother to create a .modpak file


    I'm on the brink of major frustration here.. I mean, this worked a ton for me before.
     

    Attached Files:

  16. Mackinz

    Mackinz The Waste of Time

    Okay, last thing... verify that your bat file is exactly the same as mine. Open it in Notepad (or Notepad++, or anything else as long as it opens text files).

    Copy the below and paste it in your file. Save it.
    Code:
    @echo off
    :start
    echo #######################################
    echo #### ModPackHelper v0.9b By Dolan #####
    echo ############# 2015-02-17 ##############
    setlocal EnableDelayedExpansion
    set modpak_ext=modpak
    set modinfo_ext=modinfo
    set asset_file=packed.pak
    set asset_unpack_folder=_unpacked
    Rem Leave this way if you place de batch file in Starbound\giraffe_storage\mods folder
    Rem Or change with a relative or full path
    Rem %~dp0 mean current file location
    set starbound_folder=%~dp0..\..\
    set starbound_assets_folder=%starbound_folder%assets\
    Rem If script is placed in mods folder so it's the current
    set starbound_mods_folder=%~dp0
    Rem set starbound_mods_folder=%starbound_folder%giraffe_storage\mods\
    set log_file=%~dp0ModPackHelper.log
    
    Rem Detect OS
    Rem if "%PROCESSOR_ARCHITECTURE%" == "x86" (
        set asset_tools_folder=%starbound_folder%win32\
        echo ##### Using Win32 asset_packer ########
    Rem ) else (
    Rem     set asset_tools_folder=%starbound_folder%win64\
    Rem     echo ####### Your OS : Windows 64 ##########
    Rem )
    echo.
    
    Rem Transform relative path to absolute
    for /d %%D in ("%starbound_assets_folder%") do set starbound_assets_folder=%%~dpD
    for /d %%D in ("%starbound_mods_folder%")     do set starbound_mods_folder=%%~dpD
    for /d %%D in ("%asset_tools_folder%")         do set asset_tools_folder=%%~dpD
    
    rem init var
    set count=0
    set choice=
    
    rem Define locales
    set msg_choice=Choice : 
    set msg_choices=Choices : 
    set msg_all=All 
    set msg_back_menu=Back to menu
    set msg_invalid_choice=Invalid choice
    set msg_action=Choose action ?
    set msg_action_assets=Unpack the assets (To start modding)
    set msg_action_assets_no_pak=Unable to find the asset pak file
    set msg_action_assets_wait=Please wait... (It could take a while)
    set msg_action_assets_done=Assets successfuly unpacked to "%starbound_assets_folder%%asset_unpack_folder%"
    set msg_action_pack=Pack mods
    set msg_action_pack_no_mods=There is no mods to pack
    set msg_action_pack_selection=Wich mods would you like to pack ?
    set msg_action_pack_done= has been packed
    set msg_action_unpack=Unpack mods
    set msg_action_unpack_no_mods=There is no mods to unpack
    set msg_action_unpack_selection=Wich mods would you like to unpack ?
    set msg_action_unpack_done= has been unpacked
    
    Rem Choose the type of action
    echo !msg_action!
    echo 0] !msg_action_assets!
    echo 1] !msg_action_pack!
    echo 2] !msg_action_unpack!
    echo.
    
    set /p action_choice=%msg_choice%
    
    if %action_choice%==0 (
        if exist "%starbound_assets_folder%%asset_file%" (
            goto :next1
        ) else (
            echo.
            echo !msg_action_assets_no_pak!
            echo.
            goto :start
        )
       
    ) else (
        if %action_choice%==1 (
            for /d %%D in ("%starbound_mods_folder%*") do (
                Rem List only folders containing a *.modinfo file
                if exist "%starbound_mods_folder%%%~nxD\*.%modinfo_ext%" (
                    set /a count=count+1
                    set choice[!count!]=%%~nxD
                )
            )
        ) else (
            if %action_choice%==2 (
                for %%F in ("%starbound_mods_folder%*.%modpak_ext%") do (
                    set /a count=count+1
                    set choice[!count!]=%%~nF
                )
            ) else (
                echo.
                echo !msg_invalid_choice! : !action_choice!
                echo.
                goto :start
            )
        )
    )
    
    Rem if no mod folder or mod file
    if %count%==0 (
        if %action_choice%==1 (
            echo !msg_action_pack_no_mods!
        ) else (
            echo !msg_action_unpack_no_mods!
        )
        echo.
        goto :start
    )
    
    :chooseMods
    set mod_count=0
    set mods_selected=
    echo.
    echo.
    if %action_choice%==1 echo !msg_action_pack_selection!
    if %action_choice%==2 echo !msg_action_unpack_selection!
    
    Rem Choose mods
    echo 0] !msg_all!
    for /l %%D in (1,1,!count!) do (
        echo %%~nxD] !choice[%%~nxD]!
    )
    echo.
    echo M] !msg_back_menu!
    
    echo.
    set /p mod_choice=%msg_choices%
    
    Rem Check if there is 0 in choices
    for %%a in (%mod_choice%) do (
        if %%a==0 (
            Rem if 0 no need to loop on other choices, select all
            for /L %%j in (1,1,!count!) do (
                set /a mod_count+=1
                set mods_selected[!mod_count!]=!choice[%%j]!
            )
            goto :next1
        )
    )
    
    for %%a in (%mod_choice%) do (
        Rem if M go back to menu
        if %%a==M goto :start
        if %%a==m goto :start
       
        Rem TODO : Add non numeric check
        if %%a LSS 0 (
            echo !msg_invalid_choice! : %%a
        ) else (
            if %%a GTR !count! (
                echo !msg_invalid_choice! : %%a
            ) else (           
                Rem Add choice to list
                set /a mod_count+=1
                set mods_selected[!mod_count!]=!choice[%%a]!
            )
        )
    )
    
    Rem if no correct choices reask
    if %mod_count%==0 goto :chooseMods
    
    :next1
    
    echo.
    if %action_choice%==0 (
        echo.>> "%log_file%" 2>&1
        echo.%DATE% %TIME% >> "%log_file%" 2>&1
        echo !msg_action_assets_wait!
        call "%asset_tools_folder%asset_unpacker.exe" "%starbound_assets_folder%%asset_file%" "%starbound_assets_folder%%asset_unpack_folder%" >> "%log_file%" 2>&1
        echo !msg_action_assets_done!
    ) else (
        for /L %%i in (1,1,%mod_count%) do (
            echo.>> "%log_file%" 2>&1
            echo.%DATE% %TIME% >> "%log_file%" 2>&1
    
            if %action_choice%==1 (
                ren "%starbound_mods_folder%!mods_selected[%%i]!\*.%modinfo_ext%" "pak.%modinfo_ext%"
                call "%asset_tools_folder%asset_packer.exe" "!mods_selected[%%i]!" "%starbound_mods_folder%!mods_selected[%%i]!" "%starbound_mods_folder%!mods_selected[%%i]!.%modpak_ext%" >> "%log_file%" 2>&1
                ren "%starbound_mods_folder%!mods_selected[%%i]!\pak.%modinfo_ext%" "!mods_selected[%%i]!.%modinfo_ext%"
                echo !mods_selected[%%i]!!msg_action_pack_done!
            ) else (
                call "%asset_tools_folder%asset_unpacker.exe" "%starbound_mods_folder%!mods_selected[%%i]!.%modpak_ext%" "%starbound_mods_folder%!mods_selected[%%i]!" >> "%log_file%" 2>&1
                ren "%starbound_mods_folder%!mods_selected[%%i]!\*.%modinfo_ext%" "!mods_selected[%%i]!.%modinfo_ext%"
                echo !mods_selected[%%i]!!msg_action_unpack_done!
            )
        )
    )
    echo.
    
    goto :start
    
    :end
    
    If this fails, we'll have to have @Dolan fix it...
     
  17. Awbawlisk

    Awbawlisk Phantasmal Quasar

    I don't care if this is a doubt post atm, I need to get this out here!

    What I'm trying to explain by this screenshot right here is that, everytime I try to use the Modpackhelper_v0.9b.bat file to pack/unpack something, once it goes wrong, I pay the ultimate price of having these two duplicate processes plague my Task Manager. Before you ask, no, I can't just end these processes. I tried EVERY EVERYYYY way I could to kill them off EVERY WAY, I SWEAR! And no matter what I try and do, these processes just never die off. The only solution to THIS issue, is to restart the CPU, and trust, THAT GETS ANNOYING AND FRUSTRATING AFTER MULTIPLE TIMES OF DOING THAT![DOUBLEPOST=1450224045][/DOUBLEPOST]
    I do not know how to OPTIMALLY compare the both of them, but based on what I've been doing to compare and contrast (reading back and forth), I can conclude that they are both the same.

    I remember my computer installing new updates some days ago, hopefully that hasn't fucked with anything. But even then, when I first experienced these super strange issues with the modpackhelper, they fixed themselves eventually after ANOTHER forced Windows Update. Yet, now, all of a sudden its back. I really don't get it.
     

    Attached Files:

    Last edited: Dec 16, 2015
  18. Mackinz

    Mackinz The Waste of Time

    I just had another idea. Rename your win32 folder and replace it with a copy of your win64 folder renamed win32.
     
  19. Awbawlisk

    Awbawlisk Phantasmal Quasar

    That didn't work...

    Sigh, I guess that means I'm doomed to suffer this tragic fate forever. Well... On the bright side, while I CANNOT FOR THE LIFE OF ME use this method to repack my mods back into .modpak files, I can still use the corresponding way to UNPACK my .modpack files perfectly (Which is strange...). So I guess that means I'll have to live a life without .modpaks. Makes me sad, but hey, that's life, lol.
     
  20. Kirbyroth

    Kirbyroth Pangalactic Porcupine

    Works for me. Maybe if you haven't yet redownload might have got bad copy.
     

Share This Page