1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hi Guest! To get rid of ads on the page, please consider donating through user upgrades or other methods.
    Dismiss Notice

How to Updating One Click Tool database

Discussion in 'How-to' started by Wiper008, Dec 28, 2017.

  1. Crrrrrrz

    Crrrrrrz Cricket Member



    that is my file. so different to your file. Are you using the MASTER edition of the github? because its not recommended to do that
    Im using this tool LINK HERE
    you need to uncompress that with the 7zip, not with a Winrar, or trows an error.
    note that doesn't have a password.

    Also, If oyu re already using THAT version of the tool. check the previous comments. some ppl had your same issue.
    weow likes this.
  2. weow

    weow Cricket Member

    Im using the same version of the tool as yours, and its path doesnt have any spaces or weird letters as Liz said, but i uncompressed it with winrar instead of 7zip, didnt know bout that, i guess that might be it, will try again with 7zip next time and see what happens, thanks
  3. Sander093

    Sander093 Cricket Member

    Screenshot 2018-09-17 11.06.01.png
    Anyone know a workaround?

    During upk_parser
  4. Reik

    Reik Cricket Member

    SR , But Could you please make a video guide :bnsconfused:
  5. xxMaru

    xxMaru Cricket Member

    I tried and got this when i run dat.file

    C:\Program Files (x86)\nodejs\node.exe: bad option: --stack
    any idea why?
  6. Sekai

    Sekai Cricket Member

    Would it be possible to get a response to those errors ? I've been searching and trying all sorts of things to fix the Error Code EPERM to no avail.

    EDIT: I bypassed the upk_preparer problem (as mentioned in my post) by copying all the .upk files in my game path:

    C:\Program Files (x86)\NCSOFT\BnS\contents\Local\NCWEST\ENGLISH\CookedPC (path depends on where you installed BnS ofc)


    C:\Program Files (x86)\NCSOFT\BnS\contents\bns\CookedPC
    Last edited: Sep 25, 2018
  7. Lucifimeow

    Lucifimeow Cricket Member

    Tks for the post. So I must run from build_preparer if I want to update again?
  8. SakhJack

    SakhJack Cricket Member

  9. zadry

    zadry Cricket Member

    If I I'm only interested in update outfits, can I interrupt the shooter a when it be taking screenshots of the weapons or hairs?
  10. Mezero

    Mezero Cricket Member

    Hello... what should i do with this problem in the end of upk_parser !?!??
  11. ghddyd

    ghddyd Cricket Member

    I have searched and read about self updating the one click tool.

    However, whenever I try to operate "run.bat" it says something related to grunt is wrong.

    I have tried to use npm and grunt command only to seeing the message about grunt is not installed locally.

    How can I self update the one click tool without grunt errors?

    Anyone can help to solve this thorny problem?
  12. NYTHOX

    NYTHOX Cricket Member

    anyone got the database updated after warden's fury?
  13. Nerosalie

    Nerosalie Cricket Member

    @echo off
    :: README
    :: Please follow https://www.bnsbuddy.com/threads/updating-one-click-tool-database.164/ to update your config file
    :: Credit to the author of this tool and Wiper008 for the guide
    :: For this to work, you first need to install nodejs, u can download from here https://nodejs.org/en/download/
    :: Recommend install node to other driver then C: because adminstrator problems
    :: Then run install.bat in your toolfolder/resources/nodejs/
    :: Set environment variables
    set SETTING=%cd%\config\setting.json
    set GIT_PATCH=https://github.com/Mellowz/bnsdattools/releases/download/0.7.6/bnsdat_0.7.6_windows-portable_i686.zip
    set GIT_PATCH_DES=%cd%\resources\dedat\bnsdat_0.7.6_windows-portable_i686.zip
    set MAIN_DIR=%cd%
    set XML_TRANS_BAT=%cd%\resources\dedat\bnsdat\bin
    set DATABASE=%cd%\database
    set des=%cd%\VS_GUI\BladeSoulTool\tmp
    :: ----------------------------------------------------------------------------------------------------
    :: Build preparer and icon dumper, no need extra step
    call grunt build_preparer --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    call grunt icon_dumper --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    xcopy %DATABASE%\icon\png %DATABASE%\icon\png-cps\ /Y /I
    rmdir /s /q %MAIN_DIR%\logs
    :: ----------------------------------------------------------------------------------------------------
    :: Download bnsdat from git
    :: If you already have it or dont have window Powershell > 2.0 (Window 7), REM this section
    set PSScript=%temp%\~tmpDlFile.ps1
    if exist "%PSScript%" del /Q /F "%PSScript%"
    echo [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls">>"%PSScript%"
    echo Invoke-WebRequest "%GIT_PATCH%" -OutFile "%GIT_PATCH_DES%">>"%PSScript%"
    start /w powershell -ExecutionPolicy Bypass -Command "& '%PSScript%'"
    REM pause
    start /w powershell -nologo -noprofile -command "& { $shell = New-Object -COM Shell.Application; $target = $shell.NameSpace('%cd%\resources\dedat'); $zip = $shell.NameSpace('%GIT_PATCH_DES%'); $target.CopyHere($zip.Items(), 16); }"
    REM pause
    del "%GIT_PATCH_DES%"
    ::Copy xml.dat file from data and translate
    :: Make it possible to read immediate value of variable using !variable! syntax.
    setlocal enabledelayedexpansion
    set game=
    for /f "skip=2 delims=," %%x in (%SETTING%) do if not defined game set "game=%%x"
    set data=
    for /f "skip=3 delims=," %%i in (%SETTING%) do if not defined data set "data=%%i""
    :: Remove quotes
    set data=%data:"=%
    :: Remove braces
    REM set "data=%data:~2,-2%"
    :: Change colon+space by equal-sign
    set "data=%data:: ==%"
    :: Separate parts at comma into individual assignments
    set "%data:, =" & set "%"
    :: Remove quotes
    set game=%game:"=%
    :: Remove braces
    REM set "game=%game:~2,-2%"
    :: Change colon+space by equal-sign
    set "game=%game:: ==%"
    :: Separate parts at comma into individual assignments
    set "%game:, =" & set "%"
    set xml_path=%game%\\%data%
    xcopy "%xml_path%\..\..\data\xml.dat" "%XML_TRANS_BAT%" /Y /I
    xcopy "%xml_path%\..\..\data\xml.dat" "%xml_path%" /Y /I
    cd %XML_TRANS_BAT%
    :: Overwrite translate.bat
    del "translate.bat"
    @echo off
    @echo @echo off
    @echo bnsdat.exe -x xml.dat
    ) > translate.bat
    call translate.bat
    xcopy "xml.dat.files\*" "%MAIN_DIR%\resources\dedat\output" /Y /S
    rmdir /s /q xml.dat.files
    cd %MAIN_DIR%
    call grunt upk_preparer --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    call grunt upk_scanner --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    call grunt upk_parser --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    call grunt shooter --stack --verbose
    if %errorlevel% neq 0 exit /b %errorlevel%
    call grunt png_optimizer --stack --verbose & pause > nul
    if %errorlevel% neq 0 exit /b %errorlevel%
    :: REM this if using png_optimizer
    REM xcopy /s %DATABASE%\attach\pics %des%\attach /Y
    REM xcopy /s %DATABASE%\costume\pics %des%\costume /Y
    REM xcopy /s %DATABASE%\weapon\pics %des%\weapon /Y
    REM xcopy /s %DATABASE%\icon\png %des%\icon /Y
    :: REM this if not using png_optimizer
    xcopy /s %DATABASE%\attach\pics-cps %des%\attach /Y
    xcopy /s %DATABASE%\costume\pics-cps %des%\costume /Y
    xcopy /s %DATABASE%\weapon\pics-cps %des%\weapon /Y
    xcopy /s %DATABASE%\icon\png-cps %des%\icon /Y
    rmdir /s /q %MAIN_DIR%\logs
    Hey guys just write a small .bat script to do all the update, you still need to update your config file. Read README above. Copy this code and save it in your tool folder in .bat and run it.
    Last edited: Dec 5, 2018 at 10:55 AM
  14. cupid

    cupid Hongmoon Staff Member Moderator Member

    When using assign, you really should use this syntax:
    set "var=value with spaces ... probably"
    You don't need the "call" there.

    Or just run the code directly, like how you've done with the lines after.

    You should write "%SETTINGS%", in case there are spaces.
    You also have set "data=%%i"" <-- 2 quotes

    This is basically this: bnsdat.exe -x xml.dat >nul

    Try writting it like this:
    for %%t in (upk_preparer upk_scanner upk_parser shooter png_optimizer) do (
        grunt %%t --stack --verbose
        if ERRORLEVEL 1 (
            exit /b %errorlevel%
    Give this a try:
    echo Do you use png_optimizer?
    choice /c:ny /n /m "[Y]es | [N]o"
        set "suffix=-cps"
    for %%f in (attach costume weapon icon) do (
        xcopy /s "%DATABASE%\%%f\png%suffix%" "%des%\%%f" /Y
    You can check my mod installer (https://github.com/ismael-miguel/bnsbuddy_mod_installer/blob/master/mod_installer.bat).
    You can take some tips and pointers there, with comments to sources.

    And yes, the quotes are all messed up in here :/
  15. Nerosalie

    Nerosalie Cricket Member

    Hi Cupid, thank you for for all the feedback and tips,i greatly appreciate it. It is my first time writing script like this, used to work in IT so i assumed that everybody can understand the stuff, my bad :bnslaugh:.

    About this
    call grunt build_preparer --stack --verbose
    If not use "call" here, the script will just execute this line and then exit.

    And this
    if exist "%PSScript%" del /Q /F "%PSScript%" echo [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls">>"%PSScript%" echo Invoke-WebRequest "%GIT_PATCH%" -OutFile "%GIT_PATCH_DES%">>"%PSScript%"
    Need to put it to .ps script because the security protocol on github is higher then window ( my computer (?) 1.0 vs 1.2 if i remember correctly ) so if call it directly, it gonna pull out some errror :bnsangery:.
  16. cupid

    cupid Hongmoon Staff Member Moderator Member

    Makes sense, makes sense... Still sucks that you have to write the temporary script.
    You can just do this:
    set PSScript=%temp%\~tmpDlFile.ps1
    echo [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls">"%PSScript%"
    echo Invoke-WebRequest "%GIT_PATCH%" -OutFile "%GIT_PATCH_DES%">>"%PSScript%"
    Which will re-write the file, if it exists.

    That's actually a good point.
    Completely forgot that that can happen sometimes.

    I'm curious to see a new version of your script.[/CODE]