Moding with steam AOE4? Is it possible?

I’m trying to make a generated map, but even running an example map is problematic with steam version of aoe4. Editor cannot run the map as aoe4 with -dev argument just doesn’t start - complains it should be running from steam.
The map appear in the aoe4 if I run it normally, but now I cannot save new version as aoe4 binary locks the file and editor cannot save it, so I have to quit aoe4 to make any changes.
When I open up aoe4 it doesn’t show the map anymore.
Is it just broken and steam version of the editor actually doesn’t work?

The AoE4 Steam version will not run with a direct shortcut to the program.exe.
To run AoE4 on Steam with parameters open your Steam library, rightclick on AoE4 → properties and enter the parameters in start options.

But to start the editor you can create a shortcut, usually like “X:\SteamLibrary\steamapps\common\Age of Empires IV\EssenceEditor.exe”.

Be sure to read the modding tutorials how to get a custom map working.

Thanks, I started with aoe4 with -dev command line argument. I don’t have problems starting editor.

What I have a problem with - I have to quick AOE4 completely before I can save new version of my generated map as it holds the file open and prevents any changes to it. So I have to start aoe4, start the map, close aoe4, edit, save changes, repeat. I would rather like to keep aoe4 open and don’t go through hoops every time I try to test a little change.
Also, I cannot see my lua print() statements in the dev logs when my custom map generator is running.

Yes, it is nasty that you have to close the game before making changes on mod/map code.
But this is the principle of all operating systems: files in usage by another program are locked and cannot be overwritten.
Let’s hope the devs will implement a more comfortable way, like closing the files after reading and a dev command to re-read the files.

Since the LUA scripts work in different instances, your map’s ‘print()’ output should be in another file apart from dev output. Examine the several AoE4 log files in your user folder, espec. in folder “LogFiles”.

Thanks for the tips. Will do.

As for ‘all operating systems’ - mandatory locking is the feature of all Microsoft Windows operating systems. In Unix and Linux you can delete/move the file and put another one in place. Even in Windows AoE4 can simply close the file when done reading it.

You can, but file locking is generally a necessary mechanism (obviously). The difference between moving a handful of files and the hundreds that will end up getting moved or read from in something like a modern video game is huge.

Don’t get me wrong, in the context of Age IV mapping specifically it’s tedious and I know it’s frustrating, but the OS has little to do with it at the scale of complexity video games operate.

It’s theoretically possible to design a UNIX-specific fork of everything but that’s likely a very hard sell for budget. Games are made cross-platform, or they’re made platform-first and ported. They don’t tend to be made independently on both platforms just to possibly overcome a conflict in asset integrity at runtime and games modding.

There are commands to bulk test mapgen that might speed up your workflow. Can’t dig them up on mobile though. A great tool here is something Drumsin made, an unofficial tool for debugging generated map code.

1 Like