Jump to content
Age of History 3
Smeysya

Python script for uniting PROV files to TXT

Recommended Posts

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

изображение_2024-07-09_052952279.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Posted (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 by Smeysya

Share this post


Link to post
Share on other sites

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.


👀

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Our picks

    • Age of History 3 - October 23rd, 2024 - Official release date
      Age of History 3 - Official release date

       

      Steam: October 23rd, 2024

      Android: When it's ready

      iOS: When it's ready

      Epic: When it's ready

       
    • Campaign: Small Scenarios
      In this topic, share your ideas for Campaign scenarios.

      These scenarios focus on a small part of the map, with the rest designated as wasteland.

       

      For example, a scenario of the Reconquista in 1054, where gameplay takes place only on the Iberian Peninsula.

      What are your ideas for small historical scenarios?

       


       
    • Events - Common events for every civilization in the game
      Hi,
      in this topic, I am interested in your ideas for events that can happen for every Civilization in the game.
      I'm also interested in Missions for every Civilization.

      Here is some example, have more than 10k army, have more than 5000 gold, build 10 buildings, recruit an Advisor, increase tax efficiency 20 times, be largest  producer of some resource in the world, unlock 5 Civilization legacies etc.
      • 196 replies
    • First preview of the Alpha version of Age of History 3
      First preview of the Alpha version of Age of History 3, YouTube.
      Release date: When it's ready 😛 Subscribe for more!



       





       
    • Land units - Ideas AoH3
      AoH3 will have different types of land units.

      In this topic we will write ideas for new land units. 

       

      So the AoH 3 will have new battle system.


      Representation of the battlefield in the game.


      Land units will be grouped into 3 types. Each unit will have a different recruitment cost, attack, defense, movement speed and upkeep.

      Groups determine the placement of units on the battlefield.


       

      Each unit can be unlocked by researching technology and then upgraded.

       

      Here is the current list of units with upgrades:

      First line:

      Warrior -> Light Footmen -> Heavy Infantry -> Infantry -> Line Infantry -> Modern Infantry

      Hoplites -> Spearmen -> Pikeman -> Elite Pikeman -> Musketeer -> Riflemen -> Mechanized Infantry -> Modern Mechanized Infantry

      First line side:

      Horseman -> Elite Horseman -> Cavalry -> Tank -> Modern Tank

      Second line:

      Archer -> Bowmen -> Crossbowman -> Elite Crossbowman

      Canon -> Field Cannon -> Artillery -> Modern Artillery

      Early Airplane -> Airplane -> Modern Airplane

       

      This is a very early version, so maybe something should be changed?

      Or maybe an idea for a new type of unit with upgrades? I'm waiting for your suggestions.

       
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Age of History Games