See attached for how these look in game. Turns out the correct names already existed in S62.wad, just needed to point to them instead of
Karn.
How to use:
In the same directory as "Modified Gibbed Tools r6_b10 Binaries"
-256x256 folder that contains the ## (Copy).png files
-512x512 folder that contains the ##.png files
names.txt in the base directory
only the 01-83 wads in the base directory(not the s62.wad file, it will break)
run the Python3 script and move the resulting files to your mtg 2014 directory
names.txt to map deck numbers to correct names:
- Code: Select all
83~D62_PERSECUTOR
82~D62_TOKENS
81~D62_FAERIE
80~D62_SKAAB
79~D62_BANT
78~D62_ESPERH
77~D62_REANIMATE
76~D62_PROTEUS
75~D62_MERFOLK
74~D62_NORIN
73~D62_ORZHOV
72~D62_ZOO
71~D62_JUNDS
70~D62_TWIN
68~D62_JUND
67~D62_TITANS
66~D62_RAKDOS
65~D62_ANT
64~D62_TIDE
63~D62_NYLEA
62~D62_HELIOD
61~D62_MOGIS
60~D62_PURPHOROS
59~D62_THASSA
58~D62_GWA
57~D62_EREBOS
56~D62_DIMIR
55~D62_RAMP
54~D62_ESPER
53~D62_ENCHANT
52~D62_GREED
51~D62_VIGOR
50~D62_BLINK
49~D62_HAAKON
48~D62_SWORD
47~D62_WURMS
46~D62_GIANTS
45~D62_GBW
44~D62_IMMORTAL
43~D62_CURSES
42~D62_MNB
41~D62_AURAS
40~D62_BWR
39~D62_ARISTOCRATS
38~D62_MIRRORMAD
37~D62_SEANCE
36~D62_PYRODRIVER
35~D62_PYROMANCER
34~D62_RATS
33~D62_PIKE
32~D62_SILENCE
31~D62_WUR
30~D62_SHADOWBORN
29~D62_TRADE
28~D62_ALLIES
27~D62_ANGELS
26~D62_BINDER
25~D62_ASYLUM
24~D62_FOG
23~D62_NAYA
22~D62_FORCE
21~D62_EGG
20~D62_DANCE
19~D62_VINTAGE
18~D62_HULK
17~D62_STONEBLADE
16~D62_LIFE
15~D62_BATTLEDRIVER
14~D62_HYDRA
13~D62_PRIME
12~D62_SEISMIC
11~D62_CYCLING
10~D62_DVINE
09~D62_LANDS
08~D62_VAROLZ
07~D62_DREDGE
06~D62_SCAPESHIFT
05~D62_GRIXIS
04~D62_OMNITELL
03~D62_KULDOTHA
02~D62_GRINDING
01~D62_REPLENISH
Python3 script to pull it all together. Will create the new wad with same name plus n at the end.
- Code: Select all
import glob, os, subprocess, shutil
import sys
def main():
names = {}
with open('names.txt', 'r') as f:
for i in f:
t = i.strip().split('~')
if not t[0].isdigit():
t[0] = '83'
names[t[0]] = t[1]
for fn in glob.glob("*62*.wad"):
name = fn.split('.')[0][-2:]
subprocess.call(['Gibbed.Duels.Unpack.exe', '{}'.format(fn)])
shutil.copy2("512x512\\{}.png".format(name), '{}.png'.format(name))
shutil.copy2("256x256\\{} (Copy).png".format(name), '{}s.png'.format(name))
root = '{0}_unpacked\\{0}\\DATA_ALL_PLATFORMS'.format(fn.split('.')[0])
aiRoot = root + '\\AI_PERSONALITIES'
personality = '{}\\D0{}_{}.xml'.format(aiRoot, name, names[name])
planeswalkerGraphic = root + '\\ART_ASSETS\\TEXTURES\\PLANESWALKERS'
if not os.path.exists(aiRoot):
os.mkdir(aiRoot)
with open(personality, 'w') as f:
f.write('<CONFIG>\n\t<PLANESWALKER_NAME_TAG string="{1}" />\n\t<LARGE_AVATAR_IMAGE string="M{0}_{1}" />\n\t<MEDIUM_AVATAR_IMAGE string="M{0}_{1}S" />\n\t<SMALL_AVATAR_IMAGE string="M{0}_{1}S" />\n\t<SMALL_AVATAR_IMAGE_LOCKED string="M{0}_{1}S" />\n\t<LOBBY_IMAGE string="M{0}_{1}" />\n\t<MUSIC string="" />\n</CONFIG>'.format(name, names[name]))
subprocess.call(['Gibbed.Duels.TdxConvert.exe', '--dxt5', '{}.png'.format(name)])
subprocess.call(['Gibbed.Duels.TdxConvert.exe', '--dxt5', '{}s.png'.format(name)])
if not os.path.exists(planeswalkerGraphic):
os.mkdir(planeswalkerGraphic)
shutil.copy2("{}.TDX".format(name), planeswalkerGraphic+'\\M{0}_{1}.tdx'.format(name, names[name]))
shutil.copy2("{}s.TDX".format(name), planeswalkerGraphic+'\\M{0}_{1}S.tdx'.format(name, names[name]))
deckText = open(root+'\\DECKS\\{}'.format(os.listdir(root+'\\DECKS')[0]), 'r').readlines()
t = deckText[0].split('personality="')
t[1] = t[1].split('"', 1)[1]
deckText[0] = 'personality="D0{}_{}.xml"'.join(t).format(name, names[name])
with open(root+'\\DECKS\\{}'.format(os.listdir(root+'\\DECKS')[0]), 'w') as f:
for i in deckText:
f.write(i)
subprocess.call(['Gibbed.Duels.Pack.exe', '{}_unpacked'.format(fn.split('.')[0])])
os.rename('{}_unpacked.wad'.format(fn.split('.')[0]), '{}n.wad'.format(fn.split('.')[0], names[name]))
# cleanup
shutil.rmtree('{0}_unpacked'.format(fn.split('.')[0]))
os.remove('{0}.TDX'.format(name))
os.remove('{0}s.TDX'.format(name))
os.remove('{0}.png'.format(name))
os.remove('{0}s.png'.format(name))
if __name__ == "__main__":
main()