Smeysya 7 Posted July 9, 2024 If you have province files (not processed by the game, but with just coordinates), then this script will help you if you need to edit the map. You can run script by yourself just copy it and download python Quote mapaoc=open("mapAoC2_v2.txt","a") totalnum=input("Write province amount:") startnum=0 while startnum!=totalnum: provnum=(str(startnum)+".") sorter=open(provnum,"r+") for i in sorter: mapaoc.write(i.replace(";","\n")+"\n") startnum+=1 Quote Share this post Link to post Share on other sites More sharing options...
ViktorH1488 24 Posted July 9, 2024 I don't understand how it works, explain it better. Quote Share this post Link to post Share on other sites More sharing options...
Smeysya 7 Posted July 9, 2024 1 hour ago, ViktorH1488 said: I don't understand how it works, explain it better. Its just takes provinces and make mapAoC2 file for MapEditor where you can add or edit this provinces, its helpful if you lost original txt file and have only these PROV files. To use script: 1. Installing Python. 2. Creating .py file and copy paste quoted script. 3. Run it in same folder with PROV files and it will create usable TXT. Quote Share this post Link to post Share on other sites More sharing options...
ViktorH1488 24 Posted July 9, 2024 11 hours ago, Smeysya said: Ele apenas pega as províncias e cria um arquivo mapAoC2 para o MapEditor, onde você pode adicionar ou editar essas províncias. É útil se você perdeu o arquivo txt original e tem apenas esses arquivos PROV. Para usar o script: 1. Instalando o Python. 2. Criando o arquivo .py e copiando e colando o script citado. 3. Executando-o na mesma pasta com os arquivos PROV, ele criará um TXT utilizável. I did it and it didn't work Quote Share this post Link to post Share on other sites More sharing options...
Smeysya 7 Posted July 9, 2024 (edited) 2 hours ago, ViktorH1488 said: I did it and it didn't work bruuuh, i tested it on my 0-554 provinces and it worked well. Unlucky I also tested script with starting names of provinces bigger than 0 (the name of the province file began with 101 and 201) and yes, then an empty file is created, but I was making a script for my tasks, so I did not try to make it more universal. Edited July 9, 2024 by Smeysya Quote Share this post Link to post Share on other sites More sharing options...
Łukasz Jakowski 13,396 Posted July 9, 2024 Quote ## To export provinces from AoH2 to file Open the AoH2 game. Go to Editor -> Map Editor- > Map -> Edit Connections And Provinces -> and click 'Q'. File will be created in map folder. Smeysya, Apple, wbladew5 and 2 others 5 Quote Share this post Link to post Share on other sites More sharing options...
Guest Posted July 9, 2024 3 hours ago, Łukasz Jakowski said: ## To export provinces from AoH2 to file Open the AoH2 game. Go to Editor -> Map Editor- > Map -> Edit Connections And Provinces -> and click 'Q'. File will be created in map folder. no way i didnt knew that. now i can surely modify community-made maps with pleasure. 👀 Quote Share this post Link to post Share on other sites More sharing options...
ViktorH1488 24 Posted July 10, 2024 19 hours ago, Łukasz Jakowski said: THANKS! 15 hours ago, bun_dha4 said: no way i didnt knew that. now i can surely modify community-made maps with pleasure. 👀 Real bro. Quote Share this post Link to post Share on other sites More sharing options...
Hendrix02 0 Posted July 15, 2024 Hey, This script converts provinces into a mapAoC2 file compatible with MapEditor, which is useful if you've lost the original txt file and only have the PROV files. To use the script: 1. Install Python. 2. Create a .py file and paste the provided script. 3. Run the script in the same folder as your PROV files to generate a usable TXT file for editing or adding provinces in MapEditor. Quote Share this post Link to post Share on other sites More sharing options...