Jump to content

Map making support and conversion tool: post-Atlas


 Share

Recommended Posts

Trying Atlas I found a few things I wasn't able to manage properly (or wasn't careful or patient enough) such as properly connected wall segments and turrets. I finally started to write (with heavy support by Anthropic Claude) a little map analyzer/checker/converter tool, written in python, able to 

  • check the maps created with Atlas and offer options to correct issues
  • analyze existing maps , also from older game versions, giving statistics, finding and offering to fix glitches (resource placed underneath a building or wall, trapped units, gaps in wall segments etc.)
  • add a (poor) map preview if not existing or convert the Atlas screenshot into a preview file.
  • converting and fixing older scenario and skirmish maps using the conversion scripts by @Stan` (e.g. renaming persian objects/units to achaemenids)

I was only able to test on windows, it should theoretically work on Linux or MacOS as well (Python 3.14, pyQT6, numpy and pillow needed, see documentation). No real guarantee to always work (definitely NOT on random maps), but I was able to successfully convert a few great maps from past I found in the forum and play them.

 

Note: I only started experimenting with maps  so I haven't seen all pitfalls by far.
Should you have observed further typical mapping issues, I'd be interested to know and try integrating these into the analyzing and fixing section of the tool if possible.

image.jpeg.e5d74556f272001acb3c5b61f5df7bba.jpegimage.jpeg.1a4b04229473767d16facf09c262faca.jpegSetup-panel_light_scheme.jpg.fe6a6329f9a055986ec14b9959330e30.jpgimage.jpeg.45f3f2ef8ef45a24919a9776d2f5065f.jpegimage.jpeg.ae78e791cf167802e456e07134467c46.jpeg

image.jpeg.e404aab251727fb9d1e55f5b6ed75a00.jpegimage.jpeg.d81685f99ef9b4ce66c7401c364b82e5.jpegimage.jpeg.608868d313df6dc27483db7898cf6dea.jpeg

image.jpeg.bcacf2fef0f192d92fd6c0e91df16e2b.jpegimage.jpeg.1b8dfbbcf0ea44b8d8e0039299c5000d.jpeg

 

 

 

 

 

 

 

post-atlas-1.1.0.zip README.md

Edited by Grautvornix
Updated tool version to 1.1.0 plus one new screenshots
  • Like 1
Link to comment
Share on other sites

Did a total review and refactoring of the user interface and functionality. Hope it is better now.

I am placing the python code and new screenshots in the original post on top of this conversation. @Asher I'd love to have  your comemnts - please have a look!

Edited by Grautvornix
Link to comment
Share on other sites

3 hours ago, Grautvornix said:

Did a total review and refactoring of the user interface and functionality. Hope it is better now.

I am placing the python code and new screenshots in the original post on top of this conversation. @Asher I'd love to have  your comemnts - please have a look!

I loaded some maps, and it worked. Can you make it so you can load mods for it, like if you are making a map for a mod that adds new structures. Because it was saying a certain civ name was undefined, but it was, just in a mod. Maybe you already added the setting, but I didn't see it

Link to comment
Share on other sites

Also if you could add tool tips. When on dark theme, it is had to tell which buttons you can click and not click (see photos). Could you have some other colors, pwease. Also, do you use github or gitlab or any of those type things? It might be easier for other people to update or something

image.png.3110f1a1f4afad9bdeb5cd736eca5a28.pngimage.png.116376873ca5beb80676def7da501381.png

Link to comment
Share on other sites

8 hours ago, Asher said:

Can you make it so you can load mods for it, like if you are making a map for a mod that adds new structures. Because it was saying a certain civ name was undefined, but it was, just in a mod. Maybe you already added the setting, but I didn't see it

Thanks! Very good - I'll take that on board.

 

8 hours ago, Asher said:

Also if you could add tool tips. When on dark theme, it is had to tell which buttons you can click and not click (see photos). Could you have some other colors, pwease. 

Oops! Good point as well. Needs to be changed. 

8 hours ago, Asher said:

Also, do you use github or gitlab or any of those type things? It might be easier for other people to update or something

You are right, was just lazy and tried to keep it initially simple for me on a local repository. Will change that.

  • Thanks 1
Link to comment
Share on other sites

@Asher  Here is a bit of feedback on dependencies on entities in other mods:

post-Atlas already reads dependencies and shows them on the Analyse tab. What it does not do is connect them to the entities a map places — which is your actual request

  • A maps mod.json provides Dependencies as a real key: "dependencies": ["0ad>=0.28.0", "millenniumad>=1.0"]. Operators are <=, >=, =, <, >.
  • A dependency with no operator is not checked at all. CheckForIncompatibleMods only compares when it finds an operator in the string, so "dependencies": ["millenniumad"] is documentation, nothing more. Write millenniumad>=0 if you want it enforced.
    CAVEAT: It requires the other mod to be enabled, not merely installed — the version table is built only from the mods in that launch list. 
  • It names the mod's name key, not its folder. The base game is 0ad, though its folder is public.

Proposed solution: 

Today a template that isn't in public or the map's own mod produces entity-template-missing, a FAIL, while another mod might have it. Four steps:

  1. When templates are missing, search the other mods in the selected install — its own binaries/data/mods and the user's Documents\My Games\0ad\mods, both of which Session already knows — for simulation/templates/<name>.xml, and for actors under art/actors/. Only when something is missing, so nothing slows down.
  2. Report what was found by name: "structures/mil/tower is in mod millenniumad (Millennium A.D. 1.2)" — the finding turns from "broken map" into "enable this mod". Where nothing is found: say plainly that these are probably from a mod not installed here, and name the count.
  3. Check the map's own mod.json against that: entities from mod X with X not in dependencies → WARN, with an automatic fix that adds X>=<installed version>. write_mod_json already preserves keys it doesn't own, and the converter already writes the file.
  4. Conversion and Test in Game: carry the dependency into the converted mod's mod.json, say in the report which mods must also be enabled, and add them to the -mod= list when launching.

The other issues,

  • inactive buttons not being visible on dark schem,
  • missing light scheme, 
  • missing tooltips

Are also addressed. As usual I'll put the release into the top message of this thread. Let me know if something is missing or failing!

Link to comment
Share on other sites

@Grautvornix, so I was getting some warnings and errors from a certain things on the map which weren't in the base game, then I loaded the game and the mods folder, but the warnings were still there. They didn't go away until I restarted the program. If you could make a button so you can refresh the errors. Also, if you could be able to edit certain things, like description, what civs the players are, if the players are bots or humans, ect. I think that would be helpful, so you don't have to have both this and scenario editor open at the same time, to make some of the smaller changes. Hopefully you don't think that I think this is horrible, it is just my feedback, to make it better; I think this tool will be a pretty usefully helpful :thumbsup:

Edited by Asher
  • Like 1
Link to comment
Share on other sites

Also, it says in the Analyze section under Resources that food is not counted. I guess, why? Is there a certain reason why you didn't count it? Also, the tab Analyze is spelled wrong. It is currently spelled "Anaylse" (replace the "s" with a "z") 

  • Like 1
Link to comment
Share on other sites

Another thing, I changed the current map, but on the convert page, the Test in Game button stayed the same, instead of changing back to Convert. Also, a stop button would be nice in the convert section

Edited by Asher
  • Like 1
Link to comment
Share on other sites

I would add (see below) to _CIV_DISPLAY_NAMES in civ_data.py, because if you are using 0ad 28, they are pers, but if you are using 29, they are achae

    "pers": "Persians",

 

Link to comment
Share on other sites

@AsherThanks for your comprehensive review!

Let me try and resolve things ...

4 hours ago, Asher said:

I was getting some warnings and errors from a certain things on the map which weren't in the base game, then I loaded the game and the mods folder, but the warnings were still there. They didn't go away until I restarted the program.

Was the mod that provided the missing resource for the map activated in your game (and saved) ? (if not, the tool does not see it.) 

4 hours ago, Asher said:

Also, if you could be able to edit certain things, like description, what civs the players are, if the players are bots or humans, ect. I think that would be helpful, so you don't have to have both this and scenario editor open at the same time, to make some of the smaller changes.

This is a great idea - normally I would have thought that this is defined by the map creator in Atlas already, or on an existing map the map author has a specific scenario in mind (hence the name scenario map). Will integrate that - with that warning, though. In any case the original map is never modified by the tool unless you explicitly request that using the "edit map in place" button. Please clarify!

4 hours ago, Asher said:

it says in the Analyze section under Resources that food is not counted. I guess, why?

That was a decision is because food resources are also part of what you will be building (fields, corrals). If you consider it useful we can certainly add natural food resources like fish, berries/fruit trees/edible animals etc. This could show a maps initial nutrition potential. Will change.

 

4 hours ago, Asher said:

the tab Analyze is spelled wrong. It is currently spelled "Anaylse" (replace the "s" with a "z"

Ok, got me - I used UK English and you are requesting US English. Will change.

4 hours ago, Asher said:

I changed the current map, but on the convert page, the Test in Game button stayed the same, instead of changing back to Convert. Also, a stop button would be nice in the convert section

Had the same observation when I had installed the map already in the target folder in game. This is a logic bug. Will change.

 

4 hours ago, Asher said:

Also, a stop button would be nice in the convert section

But wouldn't that potentially stop the process in the middle of something, i.e. in a non deterministic situation? This should then remove the product of conversion. Or do you want to stop the process when processing batches of maps after one map has finished befaore the next one is started?

3 hours ago, Asher said:

I would add (see below) to _CIV_DISPLAY_NAMES in civ_data.py, because if you are using 0ad 28, they are pers, but if you are using 29, they are achae

    "pers": "Persians",

That's another bug to fix. The conversion from persian to achaemenid somehow was wrongly assumed to have happened pre-R0.28. Will change.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Grautvornix said:

Was the mod that provided the missing resource for the map activated in your game (and saved) ? (if not, the tool does not see it.) 

I think I activated it in-game after the program was already running, but I had to restart the program for it to recognize it. Maybe if you could add a refresh button?

1 hour ago, Grautvornix said:

This is a great idea - normally I would have thought that this is defined by the map creator in Atlas already, or on an existing map the map author has a specific scenario in mind (hence the name scenario map). Will integrate that - with that warning, though. In any case the original map is never modified by the tool unless you explicitly request that using the "edit map in place" button. Please clarify!

You should be able to edit these things in the Atlas editor, but I was thinking it would be nice to change some of this stuff in your program. Maybe it is not that important though

1 hour ago, Grautvornix said:

That was a decision is because food resources are also part of what you will be building (fields, corrals). If you consider it useful we can certainly add natural food resources like fish, berries/fruit trees/edible animals etc. This could show a maps initial nutrition potential. Will change.

I think it could show the naturally occurring food (excluding fields and corrals that spawn with the map), and you could just put a note that says "excludes fields and corrals". But, do whatever you think is better, I don't think it is that big of a deal

1 hour ago, Grautvornix said:

Ok, got me - I used UK English and you are requesting US English. Will change.

Oh, sorry. I didn't realize that. Then I guess it isn't a spelling mistake. I probably doesn't matter that much, it is close enough

1 hour ago, Grautvornix said:

But wouldn't that potentially stop the process in the middle of something, i.e. in a non deterministic situation? This should then remove the product of conversion. Or do you want to stop the process when processing batches of maps after one map has finished befaore the next one is started?

I mean, like if you clicked start, but then realized you forgot to do something, then you could just click stop instead of having to let it finish running

 

Link to comment
Share on other sites

1 hour ago, Grautvornix said:

Ok, got me - I used UK English and you are requesting US English. Will change

5 minutes ago, Asher said:

Oh, sorry. I didn't realize that. Then I guess it isn't a spelling mistake. I probably doesn't matter that much, it is close enough

Wouldn't it be better to use what the game uses? "Civilisation" appears in the UI, UK English then. Although I don't know how consistent this is.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...