Jump to content
Age of Civilizations

pastelynn

Gentleman
  • Content Count

    2
  • Joined

  • Last visited

  1. It just a python script. if you don't trust me just copy the code and create a new .py file in your computer. if you think python is a virus, python has millions of user, if it has a virus someone would notice and report but this didn't happen. so I'm sure this didn't have any virus
  2. I just lazy to change name of PROV file so I create this file to save my time. thing that it this is just create province files for who missed the PROV file and who want to save time (like me). How to use: this is an python script so you must have python installed. place my 0123.py file at same folder as mapAoC2_v2.txt or \editor_data\Provinces (I named this way because province files name is 0, 1, 2, 3...). run it and type file name (without .txt) if file name is mapAoC2_v2.txt just type enter. enjoy! Download: Mega: https://mega.nz/#!eVYnRCqJ!n8JHcOzv7WFU_hYcKkxHJMrfb_0PkaMsQjIVbEGLOxw or below this post If you have download problem you can just create python script by using code below: filename=str(input('filename (without .txt): ')) if filename: filename = filename + '.txt' else: filename = 'mapAoC2_v2.txt' f= open(filename,'r') num_lines = sum(1 for line in open(filename)) line = 0 print(0/2) while line < num_lines: fo = open(str(int(line/2)),'w+') lin1 = f.readline() if line == num_lines-2: lin2 = f.readline()+'\n' else: lin2 = f.readline() fo.write(lin1[:-1]+';'+lin2[:-1]) fo.close line = line + 2 print(str(int(line/2)),'done') f.close Isn't you post this before?: Yes it is, but I noticed that my file have a problem (last province, last point, last digit just disappear) so I fixed it. I'm bad at coding but I think this would help some people (like me). also sorry for my grammar, i'm not a native English speaker. 0123.py
×
×
  • Create New...