mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 19:58:26 +02:00
forgot to put back N$SWAP causing cup to not be at the correct slot
This commit is contained in:
parent
795d07d63d
commit
6cfecf1561
2 changed files with 38 additions and 9 deletions
15
.gitignore
vendored
15
.gitignore
vendored
|
@ -56,3 +56,18 @@
|
||||||
/.idea/vcs.xml
|
/.idea/vcs.xml
|
||||||
/file/CTFILE.txt
|
/file/CTFILE.txt
|
||||||
/file/tracks.bmg.txt
|
/file/tracks.bmg.txt
|
||||||
|
/test/Common_I.txt
|
||||||
|
/test/Common.bmg
|
||||||
|
/test/Common.txt
|
||||||
|
/test/file/Common_E.txt
|
||||||
|
/test/Common_E.txt
|
||||||
|
/test/Common_F.txt
|
||||||
|
/test/Common_G.txt
|
||||||
|
/test/Common_RE.txt
|
||||||
|
/test/Common_RF.txt
|
||||||
|
/test/Common_RG.txt
|
||||||
|
/test/Common_RI.txt
|
||||||
|
/test/Common_RS.txt
|
||||||
|
/test/Common_S.txt
|
||||||
|
/test/file/CTFILE.txt
|
||||||
|
/file/RCTFILE.txt
|
||||||
|
|
|
@ -4,6 +4,18 @@ import os
|
||||||
|
|
||||||
from .definition import *
|
from .definition import *
|
||||||
|
|
||||||
|
bmgID_track_move = {
|
||||||
|
"T11": 0x7008, "T12": 0x7001, "T13": 0x7002, "T14": 0x7004,
|
||||||
|
"T21": 0x7000, "T22": 0x7005, "T23": 0x7006, "T24": 0x7007,
|
||||||
|
"T31": 0x7009, "T32": 0x700f, "T33": 0x700b, "T34": 0x7003,
|
||||||
|
"T41": 0x700e, "T42": 0x700a, "T43": 0x700c, "T44": 0x700d,
|
||||||
|
|
||||||
|
"T51": 0x7010, "T52": 0x7014, "T53": 0x7019, "T54": 0x701a,
|
||||||
|
"T61": 0x701b, "T62": 0x701f, "T63": 0x7017, "T64": 0x7012,
|
||||||
|
"T71": 0x7015, "T72": 0x701e, "T73": 0x701d, "T74": 0x7011,
|
||||||
|
"T81": 0x7018, "T82": 0x7016, "T83": 0x7013, "T84": 0x701c,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def patch_bmg(self, gamefile): # gamefile est le fichier .szs trouvé dans le /files/Scene/UI/ du jeu
|
def patch_bmg(self, gamefile): # gamefile est le fichier .szs trouvé dans le /files/Scene/UI/ du jeu
|
||||||
bmglang = gamefile[-len("E.txt"):-len(".txt")] # Langue du fichier
|
bmglang = gamefile[-len("E.txt"):-len(".txt")] # Langue du fichier
|
||||||
|
@ -25,21 +37,23 @@ def patch_bmg(self, gamefile): # gamefile est le fichier .szs trouvé dans le /
|
||||||
f" 7040\t= {self.translate('Aléatoire: Custom Tracks', lang=bmglang)}\n"
|
f" 7040\t= {self.translate('Aléatoire: Custom Tracks', lang=bmglang)}\n"
|
||||||
f" 7041\t= {self.translate('Aléatoire: Pistes Nouvelles', lang=bmglang)}\n")
|
f" 7041\t= {self.translate('Aléatoire: Pistes Nouvelles', lang=bmglang)}\n")
|
||||||
|
|
||||||
|
|
||||||
for bmgtrack in bmgtracks.split("\n"):
|
for bmgtrack in bmgtracks.split("\n"):
|
||||||
if "=" in bmgtrack:
|
if "=" in bmgtrack:
|
||||||
|
|
||||||
|
prefix = ""
|
||||||
if "T" in bmgtrack[:bmgtrack.find("=")]:
|
if "T" in bmgtrack[:bmgtrack.find("=")]:
|
||||||
sTid, offset = bmgtrack.find("T") + 1, 0x7000
|
sTid = bmgtrack.find("T")
|
||||||
else:
|
Tid = bmgtrack[sTid:sTid + 3]
|
||||||
sTid, offset = bmgtrack.find("U") + 1, 0x7020
|
if Tid[1] in "1234": prefix = "Wii " # Si la course est original à la wii
|
||||||
|
Tid = hex(bmgID_track_move[Tid])[2:]
|
||||||
|
|
||||||
|
else: # Arena
|
||||||
|
sTid = bmgtrack.find("U") + 1
|
||||||
|
Tid = bmgtrack[sTid:sTid + 2]
|
||||||
|
Tid = hex((int(Tid[0]) - 1) * 5 + (int(Tid[1]) - 1) + 0x7020)[2:]
|
||||||
|
|
||||||
eTid = sTid + 2
|
|
||||||
Tid = bmgtrack[sTid:eTid]
|
|
||||||
Tid = hex((int(Tid[0]) - 1) * 4 + (int(Tid[1]) - 1) + offset)[2:]
|
|
||||||
Tname = bmgtrack[bmgtrack.find("= ") + 2:]
|
Tname = bmgtrack[bmgtrack.find("= ") + 2:]
|
||||||
|
f.write(f" {Tid}\t= {prefix}{Tname}\n")
|
||||||
f.write(f" {Tid}\t= {Tname}\n")
|
|
||||||
|
|
||||||
bmgtext = subprocess.check_output(["tools/szs/wctct", "bmg", "--le-code", "--long", "./file/CTFILE.txt",
|
bmgtext = subprocess.check_output(["tools/szs/wctct", "bmg", "--le-code", "--long", "./file/CTFILE.txt",
|
||||||
"--patch-bmg", "OVERWRITE=" + gamefile + ".d/message/Common.bmg",
|
"--patch-bmg", "OVERWRITE=" + gamefile + ".d/message/Common.bmg",
|
||||||
|
|
Loading…
Reference in a new issue