Skip to content

Commit

Permalink
v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
heroesiiifan committed Apr 12, 2021
1 parent 300fd5f commit 6ef8207
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
benoetigt.txt
_out/
_tmp/
*.log
22 changes: 22 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,22 @@
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Build",
"type": "python",
"request": "launch",
"program": "scripts/build.py",
"console": "integratedTerminal"
},
{
"name": "Python: Aktuelle Datei",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Program Files\\Python37\\python.exe"
}
1 change: 1 addition & 0 deletions CREDITS.md
Expand Up @@ -7,4 +7,5 @@
* HD+ Teilw. Übersetzung - http://heroes3.udomehlem.de/
* Xarfax
* blub
* nokia9210
* Etliche anonyme Fans
20 changes: 9 additions & 11 deletions README.md
Expand Up @@ -23,7 +23,7 @@ Inoffizielle deutsche Übersetzung von Heroes III Complete Edition für VCMI / H
* 7-ZIP zum entpacken

## Bauen
* Benötigt Complete 4.0 / Heroes III RoE in Deutsch / HotA 1.6.1 / Chronicles in Deutsch -> Dateien müssen kopiert werden, siehe "homm3_files/benoetigt.txt"
* Benötigt Complete 4.0 / Heroes III RoE in Deutsch / HotA 1.6.1 / Heroes III SoD in Deutsch / Chronicles in Deutsch -> Dateien müssen kopiert werden, siehe "homm3_files/benoetigt.txt"
* Chronicles Mod für VCMI - https://wiki.vcmi.eu/Mod_list (umgewandelt in ZIP)
* Die build.py mit Python 3 starten (requirements.txt müssen via pip installiert werden).
* Buildvorgang läuft aktuell nur unter Windows (case not sensitive & EXEn).
Expand All @@ -37,9 +37,9 @@ Inoffizielle deutsche Übersetzung von Heroes III Complete Edition für VCMI / H
* [SOD_SP](https://github.com/RoseKavalier/H3Plugins/releases)

## Was Fehlt?
* Audio/Video von AB, SoD und HotA in Deutsch
* Originale SoD-Kampagnen/-Szenarien in Deutsch (SoD in Deutsch: selten)
* Bessere(?) Übersetzungen für DeepL-konvertierte
* Audio/Video von AB und HotA in Deutsch
* Originale AB-Kampagnen/-Szenarien in Deutsch (wurde offiziell nie übersetzt)
* Bessere(?) Übersetzungen für DeepL-konvertierte Maps (AB)
* Todo: siehe Backlog

## Vorgehensweise: HoMM3 HD frisch installieren
Expand All @@ -48,7 +48,7 @@ Inoffizielle deutsche Übersetzung von Heroes III Complete Edition für VCMI / H
* Data-CD in den Ordner "CD data"
* #de.ini kopieren in lang
* Dateien aus Zip in "Packs/German"
* Ggf. [SOD_SP](https://github.com/RoseKavalier/H3Plugins/releases) installieren (in ini von eng auf deu ändern)
* Ggf. [SOD_SP](https://github.com/RoseKavalier/H3Plugins/releases) installieren (in INI-Datei von "eng" auf "deu" ändern)
* Heroes Chronicles-Kampagnen in den Maps-Ordner kopieren
* Sprache im Menü auf Deutsch umstellen & Mod hinzufügen
* genießen
Expand All @@ -61,12 +61,9 @@ Inoffizielle deutsche Übersetzung von Heroes III Complete Edition für VCMI / H
## Backlog / Todo
Achtung: Übersetzungen in Textdateien in Kodierung CP1252 (in Notepad++: ANSI), NICHT UTF-8!!!
### Allgemein
* Deutsches Keyboard-Layout
* Rohstoffe im rechten Quadrat (mit Texten) kleingeschrieben -> Lässt sich scheinbar nicht über Textdateien ändern... (tolower()?)
### VCMI
* -
### HD
* -
* Deutsches Keyboard-Layout (hartcodiert; nur über Patch/Plugin anpassbar)
* Rohstoffe im rechten Quadrat (mit Texten) kleingeschrieben -> Lässt sich nicht über Textdateien ändern... tolower()!)

### HotA
* SpTraits.txt ggf. noch von DeepL optimieren
* .DAT übersetzen (hota/txt) - nur Map-Editor übrig...
Expand All @@ -75,6 +72,7 @@ Achtung: Übersetzungen in Textdateien in Kodierung CP1252 (in Notepad++: ANSI),
### 1.7
* kleine Übersetzung-Fixes
* Encoding-Fixes
* original Maps, Kampagnen, ein paar Sprites und Audio aus offiziellem, deutschem SoD

### 1.6
* Ctrl in Strg umbenannt
Expand Down
2 changes: 1 addition & 1 deletion additional_files/vcmi/mod.json
@@ -1,7 +1,7 @@
{
"name" : "HoMM3 for VCMI in german",
"description" : "Patch changes any Heroes3 complete localisation into german.\nBased on german files found on https://www.mightandmagicworld.de/filebase/heroes_3_patches-c12/index.html files from 10.04.2018\n initial mod by magikyr\nextended by anonymous",
"version" : "1.1",
"version" : "1.7",
"author" : "mightandmagicworld ported by magikyr extended by heroesiiifan",
"contact" : "",
"modType" : "Language",
Expand Down
8 changes: 6 additions & 2 deletions scripts/build_hd.py
Expand Up @@ -38,9 +38,11 @@ def correct_line_ending(file_in, file_out):

if os.environ["DEEPL_TRANSLATION"] == "1":
for filename in os.listdir("additional_files/translation/deepl/maps/out"):
if not filename.startswith("[") and filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("Packs/German", filename))
if not filename.startswith("[") and filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps") and filename not in os.listdir("homm3_files/SoD_de/Installation/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("Packs/German", filename))
for filename in os.listdir("homm3_files/RoE_de/Maindisk/Maps"):
zipObj.write(os.path.join("homm3_files/RoE_de/Maindisk/Maps", filename), arcname=os.path.join("Packs/German", filename))
for filename in os.listdir("homm3_files/SoD_de/Installation/Maps"):
if filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(os.path.join("homm3_files/SoD_de/Installation/Maps", filename), arcname=os.path.join("Packs/German", filename))
for filename in os.listdir("additional_files/translation/campaign/extra"):
zipObj.write(os.path.join("additional_files/translation/campaign/extra", filename), arcname=os.path.join("_Custom_Campaign", filename))
for filename in os.listdir("additional_files/translation/campaign/chronicles"):
Expand All @@ -67,8 +69,10 @@ def correct_line_ending(file_in, file_out):
zipObj.write(os.path.join("_tmp", "file.tmp"), arcname=os.path.join("Packs/German", filename))

for filename in os.listdir("additional_files/translation/campaign"):
if "extra" not in filename and "chronicles" not in filename:
if "extra" not in filename and "chronicles" not in filename and filename not in os.listdir("_tmp/camp"):
zipObj.write(os.path.join("additional_files/translation/campaign", filename), arcname=os.path.join("Packs/German", filename))
for filename in os.listdir("_tmp/camp"):
zipObj.write(os.path.join("_tmp/camp", filename), arcname=os.path.join("Packs/German", filename))

if os.environ["APPEND_SOUND"] == "1":
for filename in os.listdir("_tmp/snd"):
Expand Down
6 changes: 5 additions & 1 deletion scripts/build_hota.py
Expand Up @@ -104,9 +104,13 @@ def correct_line_ending(file_in, file_out):
zipObj.write(os.path.join("_tmp/HotA_patched/" + "HotA.dat"), arcname=os.path.join("", "HotA.dat"))
if os.environ["DEEPL_TRANSLATION"] == "1":
for filename in os.listdir("additional_files/translation/deepl/maps/out"):
if filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("Maps", filename))
if filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps") and filename not in os.listdir("homm3_files/SoD_de/Installation/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("Maps", filename))
for dirpath,dirs,files in os.walk("homm3_files/RoE_de/Maindisk/Maps"):
for f in files:
fn = os.path.join(dirpath, f)
zipObj.write(fn, arcname=os.path.join("Maps", f))
for dirpath,dirs,files in os.walk("homm3_files/SoD_de/Installation/Maps"):
for f in files:
fn = os.path.join(dirpath, f)
if f not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(fn, arcname=os.path.join("Maps", f))
zipObj.close()
8 changes: 6 additions & 2 deletions scripts/build_vcmi.py
Expand Up @@ -16,9 +16,11 @@

if os.environ["DEEPL_TRANSLATION"]:
for filename in os.listdir("additional_files/translation/deepl/maps/out"):
if not filename.startswith("[") and filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("content/maps", filename))
if not filename.startswith("[") and filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps") and filename not in os.listdir("homm3_files/SoD_de/Installation/Maps"): zipObj.write(os.path.join("additional_files/translation/deepl/maps/out", filename), arcname=os.path.join("content/maps", filename))
for filename in os.listdir("homm3_files/RoE_de/Maindisk/Maps"):
zipObj.write(os.path.join("homm3_files/RoE_de/Maindisk/Maps", filename), arcname=os.path.join("content/maps", filename))
for filename in os.listdir("homm3_files/SoD_de/Installation/Maps"):
if filename not in os.listdir("homm3_files/RoE_de/Maindisk/Maps"): zipObj.write(os.path.join("homm3_files/SoD_de/Installation/Maps", filename), arcname=os.path.join("content/maps", filename))
for filename in os.listdir("additional_files/translation/campaign/extra"):
zipObj.write(os.path.join("additional_files/translation/campaign/extra", filename), arcname=os.path.join("content/maps", filename))
for filename in os.listdir("additional_files/translation/campaign/chronicles"):
Expand All @@ -41,8 +43,10 @@
zipObj.write(os.path.join("additional_files/translation/txt", filename), arcname=os.path.join("content/data", filename))

for filename in os.listdir("additional_files/translation/campaign"):
if filename != "extra":
if filename != "extra" and filename not in os.listdir("_tmp/camp"):
zipObj.write(os.path.join("additional_files/translation/campaign", filename), arcname=os.path.join("content/data", filename))
for filename in os.listdir("_tmp/camp"):
zipObj.write(os.path.join("_tmp/camp", filename), arcname=os.path.join("content/data", filename))

if os.environ["APPEND_SOUND"] == "1":
for filename in os.listdir("_tmp/snd"):
Expand Down
14 changes: 13 additions & 1 deletion scripts/extract_files.py
Expand Up @@ -22,17 +22,29 @@
def_ = list(filter(lambda x: x.lower() in ["cbbegib.def", "cbcancb.def", "cbrestb.def", "hisccam.def", "hiscres.def", "hiscsta.def", "hiscext.def", "mubjoin.def", "scbutt3.def", "scnrback.def", "scnrlod.def", "scnrsav.def", "soload.def", "somain.def", "soquit.def", "soretrn.def", "sorstrt.def", "sosave.def", "scnrbeg.def", "cmpscan.def", "codefaul.def", "icm011.def", "icm012.def", "trrecb.def"], output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/RoE_de/Maindisk/Data/h3sprite.lod", "_tmp/def"] + def_, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

if not os.path.exists("_tmp/def"): os.makedirs("_tmp/def")
output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/Chronicles_de/_common/lsprite.lod", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
def_ = list(filter(lambda x: x.lower() in ["camcusl.def", "sysob12.def", "sysob13.def", "scnrexi.def", "gspexit.def", "gspbgin.def", "camprst.def", "campld.def", "campcn.def", "avrcgen0.def", "avrcgen1.def", "avrcgen2.def", "avrcgen3.def", "avrcgen4.def", "avrcgen5.def", "avrcgen6.def", "avrcgen7.def", "avrcgn00.def", "avrcgn01.def", "avrcgn02.def", "avrcgn03.def", "avrcgn04.def", "avrcgn05.def", "avrcgn06.def", "avrcgn07.def", "avrcgn08.def", "avwmon1.def", "avwmon2.def", "avwmon3.def", "avwmon4.def", "avwmon5.def", "avwmon6.def", "avwmon7.def", "avwmrnd0.def", "avzevnt0.def", "avzgrail.def"], output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/Chronicles_de/_common/lsprite.lod", "_tmp/def"] + def_, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/SoD_de/Installation/H3sprite.lod", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
def_ = list(filter(lambda x: x.lower() in ["scalbut.def", "ranisld.def", "rannone.def", "rannorm.def", "ranshow.def", "ranstrg.def", "ranweak.def"], output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/SoD_de/Installation/H3sprite.lod", "_tmp/def"] + def_, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

if not os.path.exists("_tmp/camp"): os.makedirs("_tmp/camp")
output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/SoD_de/Installation/H3bitmap.lod", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
def_ = list(filter(lambda x: x.lower() in ["crag.h3c", "final.h3c", "gelu.h3c", "gem.h3c", "sandro.h3c", "secret.h3c", "yog.h3c"], output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/SoD_de/Installation/H3bitmap.lod", "_tmp/camp"] + def_, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

if os.environ["APPEND_SOUND"] == "1":
if not os.path.exists("_tmp/snd"): os.makedirs("_tmp/snd")
output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/RoE_de/Datadisk/heroes3.snd", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
snd = list(filter(lambda x: True, output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/RoE_de/Datadisk/heroes3.snd", "_tmp/snd"] + snd, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/SoD_de/Disk/HEROES3.SND", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
snd = list(filter(lambda x: x.startswith("H3x"), output))
output = subprocess.Popen(["tools/mmarch.exe", "extract", "homm3_files/SoD_de/Disk/HEROES3.SND", "_tmp/snd"] + snd, stdout=subprocess.PIPE).communicate()[0].decode('cp1252')

if os.environ["APPEND_VIDEO"] == "1":
if not os.path.exists("_tmp/vid"): os.makedirs("_tmp/vid")
output = subprocess.Popen(["tools/mmarch.exe", "list", "homm3_files/RoE_de/Datadisk/heroes3.vid", """|"""], stdout=subprocess.PIPE).communicate()[0].decode('cp1252').split("|")
Expand Down

0 comments on commit 6ef8207

Please sign in to comment.