• Hi Guest! To get rid of ads on the page, please consider donating through user upgrades or other methods.

Updating One Click Tool database

Crrrrrrz

Cricket
Member
@weow



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

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
 

xxMaru

Cricket
Member
First you will need latest One Click Tool, I recommend using this one from creators baidu (re-uploaded to google drive)
jTjWb3Gzeqh^&9sf

Okay now since you are probably familiar with using Oneclick Tool already I'll skip right to updating database.

First you will want to check if your settings.json (config\settings.json) file is configured properly.

This is example of properly configured file for KR client:
Code:
  "path": {
    "game": "D:\\Program Files (x86)\\NCKR\\BNS_KR",
    "data": "contents\\local\\NCSoft\\korean\\data",
    "tencent": "contents\\bns\\CookedPC",
    "bns": "contents\\bns\\CookedPC"
This is example of properly configured file for CN client:
Code:
  "path": {
    "game": "D:\\bnscn\\cn",
    "data": "contents\\Local\\TENCENT\\CHINESES\\data",
    "tencent": "contents\\Local\\TENCENT\\CHINESES\\CookedPC",
    "bns": "contents\\bns\\CookedPC"

Now that config file is in check move back to root directory of tool and look if there is batch file named run.bat
If no just create one with those contents:


Code:
@echo off
cd /d PATH_TO_TOOL
grunt ACTION --stack --verbose & pause > nul
PATH_TO_TOOL will be your path to tool ofc
ACTION is thing you will replace with these in order when each is completed:
Code:
build_preparer
icon_dumper
upk_preparer
upk_scanner
upk_parser
shooter
png_optimizer
So first you will replace ACTION with build_preparer, save file, run as admin, wait for it to finish, replace with icon_dumper, etc till u reach end

easy right?

1. run build_preparer, it will get rid of old files
2. run icon_dumper

!!!IMPORTANT IF YOU WANT ICONS TO WORK!!!
Okay so after you icon_dumper is done navigate into \database\icon\png\ and copy all files into \database\icon\png-cps\


3. Before you run upk_preparer there is one extra step you have to do


Download bnsdat from
https://github.com/Mellowz/bnsdattools/releases
(first file)

now extract bnsdat into
Code:
\resources\dedat
After you extracted tool fetch xml.dat file from your game client and copy it in dedat folder

Edit translate.bat file so it looks like this:
Code:
@echo off
bnsdat.exe -x xml.dat
It will take a while for tool to decrypt xml.dat, after it's done all files will be decrypted into folder "xml.dat.file", just move all contents from this folder into \resouces\dedat\output

4. run upk_preparer

When it's done with upk_preparer you will probably see "dedat returned error 0" or something, don't worry it's fine at this point it should be decrypting xml.dat but since they changed the way xml is decrypted or something the included dedat doesn't work because it just keeps returning error "ENCRYPTION ERROR?"

5. Run upk_scanner this step might take A WHILE ~1h

6. Run upk_parser takes bout ~20min

7. Run shooter

Now at this point you don't want to be doing anything so it properly takes screenshots this one can take few hours too so better run it when you go to bed :')

8. png_optimizer (OPTIMAL)

9. Getting pictures to work

Open 2 windows, one in \database\ folder and the other inside \VS_GUI\BladeSoulTool\tmp

So if you didn't run png_optimizer you will be copying/moving files from "pics"
if you ran png_optimizer you will be copying/moving files from "pics-cps"

So
Code:
\database\attach\pics  goes into\VS_GUI\BladeSoulTool\tmp\attach
\database\costume\pics  goes into\VS_GUI\BladeSoulTool\tmp\costume
\database\weapon\pics  goes into\VS_GUI\BladeSoulTool\tmp\weapon
\database\icon\png\ goes into \VS_GUI\BladeSoulTool\tmp\icon

After this you should be all set with latest database generated for client you used, so here's the result:



Also sorry for any typos, errors or whatsoever

Edit 1: Removed baidu link and replaced it with google drive
Edit 2: Fixed so Icons (at least most of them) appear in tool with help of Soupy


I tried and got this when i run dat.file

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

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)

to

C:\Program Files (x86)\NCSOFT\BnS\contents\bns\CookedPC
 
Last edited:

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?
 

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?
 

Nerosalie

Cricket
Member
Code:
@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
:PowerShell
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:

cupid

True Hongmoon
Staff member
Moderator
Member
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
When using assign, you really should use this syntax:
Code:
set "var=value with spaces ... probably"
call grunt build_preparer --stack --verbose
You don't need the "call" there.

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%"
Or just run the code directly, like how you've done with the lines after.

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""
You should write "%SETTINGS%", in case there are spaces.
You also have set "data=%%i"" <-- 2 quotes

:: Overwrite translate.bat del "translate.bat" ( @echo off @echo @echo off @echo bnsdat.exe -x xml.dat ) > translate.bat call translate.bat
This is basically this: bnsdat.exe -x xml.dat >nul

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%
Try writting it like this:
Code:
for %%t in (upk_preparer upk_scanner upk_parser shooter png_optimizer) do (
    grunt %%t --stack --verbose
    if ERRORLEVEL 1 (
        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
Give this a try:
Code:
echo Do you use png_optimizer?
choice /c:ny /n /m "[Y]es | [N]o"
IF ERRORLEVEL 1 (
    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 :/
 

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
Code:
call grunt build_preparer --stack --verbose
If not use "call" here, the script will just execute this line and then exit.

And this
Code:
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:.
 

cupid

True Hongmoon
Staff member
Moderator
Member
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
Makes sense, makes sense... Still sucks that you have to write the temporary script.
if exist "%PSScript%" del /Q /F "%PSScript%"
You can just do this:
Code:
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.

If not use "call" here, the script will just execute this line and then exit.
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]
 

azurejpg

Cricket
Member
if possible, could someone please upload an updated version of this tool with the latest database for people who weren't able to update the tool themselves on the NA servers? like, all of the stuff for the updated database after warden's fury? thanks in advance, and happy holidays to whoever takes the time to read this!
 
Top Bottom