- Aug 3, 2020
- 152
- 132
To anyone that wants to change the name of the MC and can run some python code through something like jupyter notebook or w/e, below is a super basic method I used to quickly change all instances of the name kirk to the name of my choice. Seems alot of the dialog is stored in the map files as the dialog is just hard coded and not using variables for characters etc.
Python:
import os
import fileinput
import glob
os.chdir('C:\\Users\\Whateveryourusernameis\\ObasansSaga_1.30\\Obasans Saga ver130\\www\\data')
#YOU CAN CHANGE THE *.json portion below to whatever format you want if you want to target specific files instead of all json files in the directory
for file in glob.glob('*.json'):
with open(file, 'r') as mapfile :
filedata = mapfile.read()
# Replace the target string
filedata = filedata.replace('Kirk', 'PUT THE NAME YOU WANT IN HERE')
# Write the file out again
with open(file, 'w') as mapfile:
mapfile.write(filedata)