Skip to content

Commit

Permalink
🔨 Add textures to install and uninstall commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Arekushi committed Dec 19, 2023
1 parent 0153fae commit ed8d170
Show file tree
Hide file tree
Showing 22 changed files with 330 additions and 158 deletions.
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,17 @@ google-translate:
generate:
python main.py builder generate

update:
python main.py manager update

update-local:
python main.py manager update --local
translation-folder:
python main.py builder make-translation-folder

install:
update:
python main.py manager install

install-local:
update-local:
python main.py manager install --local

uninstall:
python main.py manager uninstall

reimport-texts:
python main.py reimport texts

pack-gui:
auto-py-to-exe
37 changes: 27 additions & 10 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ Here, I'll describe **two ways** to install the translation, using the installer
> NieR Replicant™ ver. 1.22 - PT-BR Translation
[![NieR Replicant™ ver. 1.22 - PT-BR Translation](https://i.imgur.com/SYK4rgx.png)](https://www.youtube.com/watch?v=3BiVi_KfGbA)

> It's worth noting that this installation method will automatically install SpecialK to your game.
1. Download the application executable here: [Release][release]

2. Extract the zipped `.zip` file to a preferred folder.

3. Run the `install.bat` file.
3. Run the `instalar e atualizar.bat` file.

4. The program will execute and prompt for the directory path to NieR Replicant ver.1.22474487139.
> **Example** of path
Expand All @@ -122,6 +123,8 @@ Here, I'll describe **two ways** to install the translation, using the installer
<br>

### Tutorial without the installer

#### Text Files
1. Download the necessary files here: [data][data]

2. Extract the zipped `.zip` file to a preferred folder.
Expand All @@ -139,20 +142,30 @@ Here, I'll describe **two ways** to install the translation, using the installer
6. That's it, now just start the game. 🎉

#### Texture Files
> **This step is not mandatory; only do it if you want the textures to be translated as well.**
1. Download the necessary textures here: [textures][textures]

2. Download SpecialK here: [SpecialK][specialk]

3. Place the `dxgi.dll` file inside the root folder of your NieR: Replicant.

4. Create the directory `SK_Res\inject\textures` within the root folder.

5. Within the created directory, unzip all the `.dds` files you downloaded in step 1. *(the textures folder must contain these `.dds` files)*

6. That's it! Now you can start the game. 🎉

## Useful commands list
1. Install
```cmd
nier-translator.exe manager install
nier-translator.exe manager install --specialk
```

2. Uninstall
```cmd
nier-translator.exe manager uninstall
```

3. Update the translation
```cmd
nier-translator.exe manager update
nier-translator.exe manager uninstall --specialk
```

<br>
Expand All @@ -168,6 +181,7 @@ Here, I'll describe **two ways** to install the translation, using the installer
This project was made possible thanks to these two repositories:
* Tool for asset extraction - [kaine][kaine]
* Tool for text extraction - [NieR-Text-Tool][ntt]
* Tool for texture extraction and injection - [SpecialK][specialk_tool]

<br>

Expand Down Expand Up @@ -324,8 +338,10 @@ I've set up some commands to ease the translation creation process; I'll list an
| :---: | :---: | :---: |

<!-- [Build With] -->
[release]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.0.0/nier-translator.zip
[data]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.0.0/data.zip
[release]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.1.0/nier-translator.zip
[data]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/data.zip
[textures]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/textures.zip
[specialk]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/dxgi.zip
[python]: https://www.python.org/downloads/

<!-- [Some links] -->
Expand All @@ -336,6 +352,7 @@ I've set up some commands to ease the translation creation process; I'll list an
[kaine]: https://github.com/yretenai/kaine
[ntt]: https://github.com/lehieugch68/NieR-Text-Tool
[chrome_drive_url]: https://googlechromelabs.github.io/chrome-for-testing/#stable
[specialk_tool]: https://www.special-k.info/

<!-- [Constributors] -->
[arekushi]: https://github.com/Arekushi
Expand Down
41 changes: 29 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ Aqui irei descrever **duas formas** de instalar a tradução, usando o instalado
> NieR Replicant™ ver. 1.22 - Tradução para PT-BR
[![NieR Replicant™ ver. 1.22 - Tradução para PT-BR](https://i.imgur.com/SYK4rgx.png)](https://www.youtube.com/watch?v=3BiVi_KfGbA)

> É válido apontar que essa forma de instalar irá instalar o SpecialK automaticamente ao seu jogo.
1. Baixe o executável da aplicação aqui: [Release][release]

2. Extraia o arquivo zipado `.zip` para alguma pasta de sua preferência.

3. Execute o arquivo `install.bat`
3. Execute o arquivo `instalar e atualizar.bat`

4. O programa irá executar e solicitar o caminho até o diretório do NieR Replicant ver.1.22474487139
4. O programa irá procurar pela pasta onde está instalado o NieR: Replicant. Caso não encontre irá ser solicitado o caminho.
> **Exemplo** de caminho
```
C:\SteamLibrary\steamapps\common\NieR Replicant ver.1.22474487139
Expand All @@ -123,7 +124,9 @@ Aqui irei descrever **duas formas** de instalar a tradução, usando o instalado
<br>

### Tutorial sem o instalador
1. Baixe os arquivos necessários aqui: [data][data]

#### Arquivos de Texto
1. Baixe os arquivos de texto necessários aqui: [data][data]

2. Extraia o arquivo zipado `.zip` para alguma pasta de sua preferência.

Expand All @@ -140,20 +143,30 @@ Aqui irei descrever **duas formas** de instalar a tradução, usando o instalado
6. Prontinho, agora é só iniciar o jogo. 🎉

#### Arquivos de Texturas
> **Essa etapa não é obrigatório, faça somente se desejar as texturas também traduzidas.**
1. Baixe as texturas necessárias aqui: [textures][textures]

2. Baixe o SpecialK aqui: [SpecialK][specialk]

3. Coloque o arquivo `dxgi.dll` dentro da pasta raíz do seu NieR: Replicant.

4. Crie dentro da pasta raíz o diretório `SK_Res\inject\textures`

5. Dentro do diretório criado descompacte todos os arquivos `.dds` que baixou na etapa 1. *(a pasta textures precisa ter esses arquivos `.dds`)*

6. Prontinho, agora é só iniciar o jogo. 🎉

## Lista de comandos uteis
1. Instalar
```cmd
nier-translator.exe manager install
nier-translator.exe manager install --specialk
```

2. Desinstalar
```cmd
nier-translator.exe manager uninstall
```

3. Atualizar a tradução
```cmd
nier-translator.exe manager update
nier-translator.exe manager uninstall --specialk
```

<br>
Expand All @@ -169,6 +182,7 @@ Aqui irei descrever **duas formas** de instalar a tradução, usando o instalado
Esse projeto só foi possível graças a esses dois repositórios
* Ferramenta para extração dos assets - [kaine][kaine]
* Ferramenta para extração dos textos - [NieR-Text-Tool][ntt]
* Ferramenta para extração e injeção de texturas - [SpecialK][specialk_tool]

<br>

Expand Down Expand Up @@ -325,8 +339,10 @@ Eu deixei alguns comandos prontos para facilitar a criação de uma tradução,
| :---: | :---: | :---: |

<!-- [Build With] -->
[release]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.0.0/nier-translator.zip
[data]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.0.0/data.zip
[release]: https://github.com/Arekushi/nier-replicant-pt-br-translation/releases/download/2.1.0/nier-translator.zip
[data]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/data.zip
[textures]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/textures.zip
[specialk]: https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/dxgi.zip
[python]: https://www.python.org/downloads/

<!-- [Some links] -->
Expand All @@ -337,6 +353,7 @@ Eu deixei alguns comandos prontos para facilitar a criação de uma tradução,
[kaine]: https://github.com/yretenai/kaine
[ntt]: https://github.com/lehieugch68/NieR-Text-Tool
[chrome_drive_url]: https://googlechromelabs.github.io/chrome-for-testing/#stable
[specialk_tool]: https://www.special-k.info/

<!-- [Constributors] -->
[arekushi]: https://github.com/Arekushi
Expand Down
5 changes: 4 additions & 1 deletion config/toml/cli.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ file_failed = 'Não foi possível adicionar na lista para traduzir: <file>'


[CLI.NIERPATH]
not_found = ''':stop_sign: A pasta onde o [i]NieR Replicant[/] está instalado [white on red] não [/] foi definida!
not_found = ''':stop_sign: A pasta onde o [i]NieR Replicant[/] está instalado [white on red] não [/] foi encontrada ou definida!
:mag_right: [b]EXEMPLO[/] de caminho: [#d1d8e6 on #79a4f4] C:\SteamLibrary\steamapps\common\NieR Replicant ver.1.22474487139 [/]
'''
write_path = ':file_folder: Escreva o [b green]caminho[/] para o [i]NieR: Replicant[/], por favor: '
Expand All @@ -48,6 +48,9 @@ status = 'Instalando...'
finish = ':white_check_mark: Instalação feita com [white on green] sucesso! [/]'
failed = ':x: Instalação [white on red] falhou... [/]'
update_version = ':rocket: Identificamos [white on green] atualizações [/] nos textos da tradução, iremos [b]fazer[/] a atualização automaticamente... '
specialk = ':airplane: Será realizada a instalação do [white on green] SpecialK [/] localmente no diretório do NieR: Replicant.'
backup = ':arrow_backward: Será realizado [white on green] o backup [/] dos arquivos que serão modificados.'
backup_file_failed = ':x: [white on red] NÃO [/] foi possível realizar o backup de um dos arquivos!'


[CLI.UNINSTALL]
Expand Down
16 changes: 11 additions & 5 deletions config/toml/github.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[GITHUB]
current_commit_sha = "d0f6cfeba59992b7fb49e70e2894988f9fee0134"
current_release_version = "2.0.0"
current_commit_sha = "0aba0cfcff8c94484c5cf2027629f01c49346eeb"
current_release_version = "2.1.0"
master_url = "https://github.com/Arekushi/nier-replicant-pt-br-translation/archive/master.zip"
last_release_url = "https://api.github.com/repos/Arekushi/nier-replicant-pt-br-translation/releases/latest"
commits_url = "https://api.github.com/repos/Arekushi/nier-replicant-pt-br-translation/commits"
data_files_urls = [
"https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/data/common.arc",
"https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/data/info.arc",
files_to_update_urls = [
[
"https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/data.zip",
"patch",
],
[
"https://raw.githubusercontent.com/Arekushi/nier-replicant-pt-br-translation/master/patch/textures.zip",
"patch",
],
]
41 changes: 35 additions & 6 deletions config/toml/settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,46 @@ paths_to_translate = [


[FOLDERS]
nier_folder_name = 'NieR Replicant ver.1.22474487139'
raw_texts_folder_name = 'raw'
translation_folder_name = 'translation'
backup_arc_folder_name = 'backup'
backup_folder_name = 'backup'
tmp_folder_name = 'tmp'


[FILES]
secrets_file_name = '.secrets.toml'
translation_toml_file = 'translation.toml'
required_checkout = [
'steam_api64.dll',
'NieR Replicant ver.1.22474487139.exe'
]
special_k_zip = 'patch\\dxgi.zip'
text_without_pattern = [
'text_common\nier_text.txd.csv',
'talk_all\talker_name.tnd.csv'
]
backup_arc = [
'common.arc',
'info.arc'
to_backup = [
'data\\common.arc',
'data\\info.arc'
]
textures_to_delete = [
'0C812038.dds',
'8B34C860.dds',
'76E5BE6A.dds',
'887C8923.dds',
'D19BD2AB.dds',
'E166F83B.dds'
]
specialk_files = [
'dxgi.dll',
'dxgi.ini'
]
to_install = [
# 0: File Path
# 1: Destination Path
['patch\\data.zip', 'data'],
['patch\\textures.zip', 'SK_Res\\inject']
]


Expand All @@ -45,13 +68,19 @@ tools_array = [


[DEFAULT_PATHS]
tmp = 'tmp'
tmp_error = 'tmp\\error'
tomls = 'config\\toml'
extracted_assets = 'build_assets\\rom\\pc'
extracted_texts = 'snow\\text'
patch_data = 'patch\\data'
patch_source = 'patch\\source'
patch_textures = 'patch\\textures'
nier_possible_paths = [
'Program Files (x86)\\Steam\\steamapps\\common',
'Program Files\\Steam\\steamapps\\common',
'SteamLibrary\\steamapps\\common',
'Steam\\SteamLibrary\\steamapps\\common',
'Steam\\steamapps\\common'
]


[COLUMNS]
Expand Down
15 changes: 4 additions & 11 deletions config/toml/typer.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ texts_help = 'Uni os textos traduzidos e os originais e os copia para a pasta do


[TYPER.INSTALL]
help = 'Comando que realizará o processo de instalação da tradução.'
delete_data_help = 'Flag para indicar se o usuário deseja ou não apagar a pasta [data] dos arquivos do jogo. É necessário remover a pasta [data] para dar andamento com a tradução, porém podemos apenas mudar o nome da pasta para qualquer outra coisa.'
delete_data_prompt = 'Você deseja deletar a pasta [data] do NieR: Replicant? 📂 Se decidir apagar NÃO há como reverter a tradução, você irá precisar baixar o jogo novamente...'
update_texts_help = 'Indica se você deseja fazer o download das atualizações mais recentes do repositório remoto.'
do_update_help = 'Esse marcador define se será realizado o update do repositório remoto do Github ou não.'
help = 'Comando que realizará o processo de instalação/atualização da tradução.'
use_local_files_help = 'Esse marcador define que serão utilizados os arquivos locais e não os arquivos do repositório remoto do Github.'
specialk_help = 'Esse marcador define que será instalado o Mod SpecialK localmente na pasta do NieR: Replicant, com o objetivo de utilizar as texturas traduzidas.'


[TYPER.UNINSTALL]
help = 'Comando que realizará o processo de desinstalação da tradução.'


[TYPER.UPDATE]
help = 'Comando que realizará a atualização da tradução, baixando os arquivos do repositório remoto.'
do_download_help = 'Esse marcador define que não será baixado os textos do repositório remoto do Github, ele utiliza o textos locais.'
redownload_help = 'Caso não queria, também é possível fazer a atualização com os arquivos locais.'
specialk_help = 'Esse mercador define que o Mod SpecialK será desinstalado junto com a tradução.'


[TYPER.MANAGER]
Expand Down
14 changes: 13 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ typer = {extras = ["all"], version = "^0.7.0"}
pyinstaller = "^5.9.0"
auto-py-to-exe = "^2.33.0"
unlimitedgpt = "^0.1.9.3"
toml = "^0.10.2"


[build-system]
Expand Down
Loading

0 comments on commit ed8d170

Please sign in to comment.