Age of Empires II (2013)

Age of Empires II (2013)

Advance to the Steam Age
Explore new maps, multiplayer scenarios, and user created campaigns. Or reinvent your game experience with new sounds, visuals, AI, units, and more! Ready to share your creations with the world? Upload right from the map editor, or collaborate with friends to create a masterpiece collection.
 This topic has been pinned, so it's probably important
morness May 16, 2015 @ 2:13pm
New Workshop System!
On 2015.05.25 the beta branch is now public!

On 2015.05.15, we launched a private beta branch with access to a newly implemented workshop. This post will serve two purposes which will give people a heads up on what to expect, but also to give instructions on how it is going to develop over time. This is going to be a time of transition, so I'll do my best to explain the situation and the goals:

Existing Implementation & Problems
The original workshop implementation was launched with the original release of the HD Edition just over two years ago. Back then Steam Workshop implementation was quite different than the features available now. But over the years we've implemented Steam Workshop for Age of Mythology and Rise of Nations, and in the process the back-end has changed signficantly and our understanding of how things worked has also increased.

The way the current workshop works is when an author makes a mod, they modify a bunch of files, build a list of files inside the game, and then submit them to Steam. The game zips all the files into a single file and uploads it to Steam. And it always publishes it as a new workshop item.

When people subscribe to them, and run the game, the game will explicitly download the file into the mods directory and extract the content over top of the root files. Because it was interfering with original game files by replacing them, Steam couldn't possibly know how to deal with these files when a user unsubscribed to them due to the custom nature of how subscriptions were handled in the game. This is why people had to verify their cache in order to properly clean up.

Also it was impossible to publish updates to an existing mod, so every time an author made changes to a mod, they would have to publish it as a new item, and lose all comments, ratings, and usage stats.

There was also no possible way to manage mods in a dynamic way. No way to prioritize them, enable or disable them, stuff like that.

Another major problem is that the game has a lot of large archive files that contain large numbers of smaller data files. These are DRS files, so the problem is if someone wants to modify a DRS file, only one mod at a time can work on this.

So the goal is to solve all of these problems.

SteamRemote
SteamRemote is a Steam server which is responsible for cloud storage of files. Cloud storage has a total maximum size of 1000 files and 1 billion bytes, whichever hits first. This includes save files, replays, etc., and published mods.

I believe that is why the decision was made to make mods into zip files -- so each mod would be considered 1 file. Otherwise, it would be very easy to hit that 1000 file total limit. Modders quickly found themselves hitting this limit anyways and being unable to publish mods. Also mods had a total limit of 100MB per mod, so each mod was also limited in size.

These were fairly serious constraints and both Age of Empires and Age of Mythology are subjected to these constraints. I believe when Valve implemented Steam Workshop, they never really intended for it to really have to co-exist with steam cloud data, and they probably never expected how popular workshop content could be.

SteamUGC
SteamUGC (User Generated Content) was introduced on June 10, 2014, less than one year ago. This was Valve's major restructuring on how workshop content could work, and this is what we embraced the moment it came out to implement inside Rise of Nations, which shipped only two days later. It is here we learned just how superior this new implementation was, and worked on it for a couple months before we finished it and released it as a post-launch patch.

File sizes and limits are completely gone, so authors can publish everything they want. There was also the ability to publish a "directory" where it would publish everything inside that directory, and manage the compression, and "delta transactions" of updates automatically. So say you make a 600MB mod, and upload it. Steam will automatically compress it and upload only the compressed amount (lets say 200MB). Then later, when you update your mod and change a single file -- Steam is smart enough to know the differences and only upload the difference which may only be 5MB. Finally, the game is able to talk to Steam and request real-time progress information on uploads and downloads.

Valve also made a number of other improvements under the hood that made development a much easier than in SteamRemote. Unfortunately the differences were signfiicant enough that a total reimplementation was necessary to solve the problems inside Age of Empires.


Age of Empires New Mod Manager Beta
If you've seen the implementation of Myth or Rise, you'll get a sense for the evolution over time. Both of those games have a built-in mod manager that allows you to view, prioritize, and enable/disable any mod, as well as the ability to publish and update mods automatically. The beta contains a similar implementation, but we would consider it a step forward.

Startup Validation
When you first start up the game, we initialize the Mod Manager. What it does is registers any local mods (applicable only to authors), then enumerates anything that you've published or subscribed to. And it will display everything in real time before the main menu. For most users this will happen so fast, you won't even get a chance to read it. But if you subscribe to a lot of mods and mods need updating, it'll take longer. You can choose to dismiss it automatically or wait for you to close it.

How mods live
Mods are no longer zip files. Most mods don't even live inside the game. Steam automatically manages subscriptions outside of the game and stores them in deeply buried Steam directories. The game no longer actively downloads any files. We let Steam do everything it can such as subscriptions, unsubscribe, and auto-updates. The only mods that actually live in the game's mods\ directory are mods that authors make for testing and publishing purposes. Once published, the mod will still live in the mods directory for future editing and updates.

How mod files are loaded in game
When a file is loaded in the game, such as a tree or a terrain texture, it will look for the top-most priority mod that is enabled, working it's way down the mods until it either finds a match, or uses the original asset. For this game, we've made virtually every file moddable.

New data structure
In order to support maximum ability to mod, we have completely eliminated DRS files which used to be containers for several other files. In fact, we've reorganized the data structures to better support modding and ease of translation. It's pretty detailed, but the information of remapping is located here: https://docs.google.com/spreadsheets/d/1hlCcJzNQY14rruNzAFnEPncrKy6yfIPdAbp5mZYP2zM/edit#gid=0


How to approach using the Mod Manager Beta
For now it is a private-invite-only beta, but we will open it up to the public shortly before making a global switch.

The problem we face right now is a transition from what we're calling "legacy" mods which is basically everything in the workshop right now. There are 12,000 mods in Age of Empires right now. What we really want to do is move all the legacy mods to the new system, but when we make this switch, then everyone running the current live branch won't be able to load them because the old game doesn't understand how to use the new data structures or how to use the mods because everything has fundamentally changed for the better.

So this first version of the beta won't allow transfers from legacy to new. But you can take a legacy mod, and upgrade it. In the process it'll convert it to the new format, and publish it as a new mod. This is so people can test that old mods work under the new system. Once we prove out the system, we'll flip a switch and there will be a window of time where legacy mods will move to the new system and no longer be available to the old system.

Uh, so what does that mean?
Well, best to use an example. Say you have a subscription to one of Ozhara's terrain texture mods, and you use it all the time. Right now if Ozhara upgrades it to the new system, it'll exist in both locations and work in both locations. But all the comments, ratings, and usage stats won't transfer over to the new system, and we want to preserve that.

So say in a week, we flip the switch and he formally moves the mod to the new system, if you are still subscribed to it, it'll actually still work because it's already been applied to your game data files. But if you don't have it subscribed and installed, you won't be able to use it until we make the patch live to the world.

What will happen is when the upgrade happens, the mod will cease to exist in the legacy system, and transfer to the new system, preserving comments/ratings/stats. When the patch comes out, your subscription will still work and you won't even really know anything has changed.

Notes for Authors with access to Beta
What you want to do is subscribe to some of your mods outside of the game and switch to the beta branch. Then when the game starts, it'll register the subscriptions and you'll have access to them. When you enter the Mod Manager, you'll see the mods in a list. All the mods should show up as legacy mods and be forcibly disabled and in red.

But, an upgrade button will be available for mods that you published. If you didn't publish it, you can't upgrade someone else's mod. If you hit the upgrade button, it will attempt to transfer it to new system. If it succeeds, it'll automatically publish it (as a new item, and forcing it to be visible to friends only) -- because we are just testing these mods.

There are only two types of data that will not transfer. That's DRS files and text files. If your legacy mod contains DRS files, you''ll need to break it up and manually create your mod with only the files that you actually modded, because DRS files are no more and everything exists as loose individual files.

Text files is a more complicated issue. We have rewritten the text system and merged all the files into a single text file (unified DLC and game). We've also changed it so you can now switch languages on the fly from the options screen. But because the game is 15 years old, the text encoding was rather ancient and doesn't really work on modern systems. So everything is now UTF-8, so you can see all languages now. Also the intention for text files is to "add" or "modify" some text -- only things applicable to your mod. So text is additive in nature, so you only need to specify what you care about rather than replacing the whole thing.

If you want to modify the text file in your mod, you'll need to copy the following file into the same directory in your mod:
Age2HD/resources/en/strings/key-value/key-value-modded-strings-utf8.txt
into:
Age2HD/mods/MYMODNAME/resources/en/strings/key-value/key-value-modded-strings-utf8.txt

Then it's business as usual, just add or replace strings from the original text file. English is treated like a global fallback language (like the former language-base.txt), and if you want to translate your mod in other languages, just do the same thing in any or all languages (replacing en with fr or de, etc.)

When an upgrade is attempted, it takes your legacy mod, extracts the zip folder into your mods\ directory and remaps the files based on this link: https://docs.google.com/spreadsheets/d/1hlCcJzNQY14rruNzAFnEPncrKy6yfIPdAbp5mZYP2zM/edit#gid=0

If it fails due to containing text or DRS files, it'll still remap everything else, but failed files will be left alone in their original place in a subdirectory called _extractedfiles\. Then a windows explorer opens up to that directory automatically and you can manually fix up the remaining issues. When this is the case, you'll need to publish the mod manually.

If it succeeds, publishing will happen automatically.

I know it's a lot, but I'm happy to answer questions. If you want access to the beta, post here and try to friend me in Steam.

Known Issues
I'll be listing known issues in future posts and I continue to patch this beta :)










Last edited by morness; Jun 16, 2015 @ 2:11pm
< >
Showing 1-15 of 198 comments
gagman 6 May 16, 2015 @ 2:34pm 
if this post here disturb you because you want continue / just swap it:
im a workshop uploader that like to mod .dat files, but since it makes multiplayer no more compatible until everyone in the lobby use the same modded dat file, i want to ask if its with the new Workshop possible to disable the mod (or the modded file) ingame and play again multiplayer games with others.
i didnt try the mod manager in AoM, but its that what i understand in the text.

one of your Teammeber i guess (MS Ryz0n) contacted me in one of my mods and asked if i would like to test the beta, i agreed, i would like to look how it works in the context of the kind of mods i publish :)

thanks for the continued improvements f AoE 2 HD !
Last edited by gagman; May 16, 2015 @ 2:36pm
morness May 16, 2015 @ 3:21pm 
Originally posted by gag2000:
if this post here disturb you because you want continue / just swap it:
im a workshop uploader that like to mod .dat files, but since it makes multiplayer no more compatible until everyone in the lobby use the same modded dat file, i want to ask if its with the new Workshop possible to disable the mod (or the modded file) ingame and play again multiplayer games with others.
i didnt try the mod manager in AoM, but its that what i understand in the text.

one of your Teammeber i guess (MS Ryz0n) contacted me in one of my mods and asked if i would like to test the beta, i agreed, i would like to look how it works in the context of the kind of mods i publish :)

thanks for the continued improvements f AoE 2 HD !
Yes, if you mod the dat file, you can disable the mod so you don't have to physically unsubscribe/resubscribe.

Also we do have plans to support total conversion mods in MP. So if you host a game and select your mod, then other people will be asked to download it and activate it in order to play. We did this in Rise of Nations, but I don't know how soon it'll be available. But I'm sure that's what you would like to see? :)

The new workshop has support for temporarily downloading mods without actually subscribing to it exactly for this reason.

gagman 6 May 16, 2015 @ 3:27pm 
Originally posted by morness:
Also we do have plans to support total conversion mods in MP. So if you host a game and select your mod, then other people will be asked to download it and activate it in order to play. We did this in Rise of Nations, but I don't know how soon it'll be available. But I'm sure that's what you would like to see? :)

that would be awesome :)
Last edited by gagman; May 16, 2015 @ 3:27pm
gagman 6 May 16, 2015 @ 3:52pm 
If i understand the document correct on the google page, the DRS files are later extracted into:
resources\_common\drs\gamedata_x1\
than there are just included the files that are normally in the DRS archive ?
similar how it works until now with the \Steam\steamapps\common\Age2HD\Data\Slp way ?
Ozhara 216 May 16, 2015 @ 4:51pm 
That's an important point. I saw both, slp files named with their name in _common\slp, and also slp files named with their ids in _common\drs\gamedata_x1 and others.

The first one seems to be the same as the current slp folder, the other folders just the extracted drs files.

Are we supposed to mod only those in 'slp' and add new modded slp files to that folder like we are now, or are the drs folders also thought to be possibly modded?
Last edited by Ozhara; May 16, 2015 @ 4:53pm
Zetnus 59 May 16, 2015 @ 5:13pm 
Originally posted by morness:
How mods live
Mods are no longer zip files. Most mods don't even live inside the game. Steam automatically manages subscriptions outside of the game and stores them in deeply buried Steam directories.
So if understand this correctly, the modded files no longer end up anywhere in the game directory, if I subscribe to someone else's mod? So where exactly are they stored (ie. which deeply buried Steam directories)?

Edit - I think I found it: \Steam\steamapps\workshop\content\221380\

Edit2 - So mods can be locally implemented by putting them in the respective directory in resources\_common ?
Last edited by Zetnus; May 16, 2015 @ 5:35pm
morness May 16, 2015 @ 6:11pm 
Originally posted by Ozhara:
That's an important point. I saw both, slp files named with their name in _common\slp, and also slp files named with their ids in _common\drs\gamedata_x1 and others.

The first one seems to be the same as the current slp folder, the other folders just the extracted drs files.

Are we supposed to mod only those in 'slp' and add new modded slp files to that folder like we are now, or are the drs folders also thought to be possibly modded?
Technically, both ways are valid, but I think a better style would be to replace the actual slp file from the original DRS if possible.

The loose slp folder was definitely written as a total override system and still works, and the auto-upgrade system can't tell the difference.
morness May 16, 2015 @ 6:13pm 
Originally posted by Zetnus:
Originally posted by morness:
How mods live
Mods are no longer zip files. Most mods don't even live inside the game. Steam automatically manages subscriptions outside of the game and stores them in deeply buried Steam directories.
So if understand this correctly, the modded files no longer end up anywhere in the game directory, if I subscribe to someone else's mod? So where exactly are they stored (ie. which deeply buried Steam directories)?

Edit - I think I found it: \Steam\steamapps\workshop\content\221380\

Edit2 - So mods can be locally implemented by putting them in the respective directory in resources\_common ?
No, if you want a local mod, create a mods\MYMODNAME\ then place all your modded assets as if it were the game folder -- that's your local mod. If you look at some of the example mods I've posted, you'll see how they are structured.

You should never replace original assets anymore, they should never be touched!

Also, lesser known fact is all the mods in the workshop already show up in Steam\steamapps\workshop\content\221380. They always have. The next folder is the workshopID of the mod. And the single .bin file is actually just a .zip file, so if you rename it you can extract the contents of legacy mods.

Best bet is to subscribe to your own mods, then use the auto-upgrade feature within the modmanager. That'll do the conversion for you.
Last edited by morness; May 16, 2015 @ 6:15pm
gagman 6 May 17, 2015 @ 12:43am 
When i publish a Workshop entry included with a modded empires2_x1_p1.dat & empires2_x2_p1.dat - are people than able to disable them separate ingame ?

Example, i've subscribed to the mod, that include both modded files, but now i want play a multiplayer game, than i want just disable the modded empires2_x1_p1.dat file but the empires2_x2_p1.dat stay modded.

that would make it easier to upload and update similar mods for the base and dlc game.
Ozhara 216 May 17, 2015 @ 1:35am 
The mod manager doesn't enable you to handle content from a single mod seperately.

So for this task you need to create two seperate mods.

I'll also update my mod manager for this, so you can create a local/custom mod from mod components using it. (It will mostly work like now, but instead of copying files to your game folder, it will create a new mod in the mods folder.)

This is even more important now I suppose for you can't just remove parts from a mod manually by deleting a file from the games file structure anymore.

You can still create your own mod setup manually - but it's not as 'easy' as for now and needs more knowledge of the file structures,
Tapsa 4 May 19, 2015 @ 10:25am 
Originally posted by morness:
Also we do have plans to support total conversion mods in MP. So if you host a game and select your mod, then other people will be asked to download it and activate it in order to play.
Fantastic! I have wished this so long.

I got an error when pressing upgrade mod. When I open directory it has bin file in it.
What should the mod directory contain? Actual dat file?

I also can't load old mods unless they are my own.
Last edited by Tapsa; May 19, 2015 @ 10:52am
Ozhara 216 May 19, 2015 @ 10:59am 
Old mods aren't fully supported in the beta for now.

The bin file is a zip archive, it should contain all files you added to your mod.
morness May 19, 2015 @ 3:44pm 
I have just updated the beta with a new version with the following improvements:
  1. The game now supports unlimited amounts of mods. Ozhara ran into an issue where it would only register the first 50 subscriptions and first 50 published mods.
  2. Global (including live build) -- you can now subscribe/unsubscribe to mods at the preview level, rather than having to click into the mod. It's global because it was a server side change.
  3. Discovered a problem where mods would disappear. The game was inappropriately thinking certain mods were no good, so it would unsubscribe to them. This unfortunately included mods that were in the middle of being installed. I encountered this when I was trying to fix the first problem and subscribed to over 100 mods, and watched the number diminish every time I ran the game.
  4. Everything that happens in the validation phase is now logged into mod-manager.txt, which can be found in your Logs\<TIMESTAMP>\mod-manager.txt. This will be useful if you run into issues and want to communicate to me what's going wrong.
  5. Sound data is now included with this build.
  6. Internal version has been incremented to 3.9.
  7. The game will automatically subscribe to everything you have published. This is required in order for the upgrade process to work.

There is a known issue -- if you subscribe to a lot of mods, which is also a result of the last point, the validation phase isn't properly catching the fact that it is waiting for downloads. So it may prematurely complete, but any mods that haven't downloaded yet, won't be available. The best workaround is to wait for Steam to finish downloading the mods, and run the game again. I'll keep working on this issue.
Zetnus 59 May 19, 2015 @ 6:49pm 
@morness - This might be of use to you tomorrow:
02:14:55 ModManager found 6 directories (potential mods). Processing directories: 02:14:55 0 : Random Maps 02:14:55 1 : RMtest 02:14:55 2 : Scenarios 02:14:55 3 : zetnus's deafeat soundtrack replacer v1,1~ 02:14:55 4 : Zetnus's Defeat Soundtrack Replacer v1,1 02:14:55 5 : [OLD VERSION] Deepwood Forest 02:14:55 -------- 02:14:55 Building 'Random Maps' Package: 02:14:55 Directory Random Maps failed to contain any valid mod files. 02:14:55 -------- 02:14:55 Building 'RMtest' Package: 02:14:55 Directory RMtest failed to contain any valid mod files. 02:14:55 -------- 02:14:55 Building 'Scenarios' Package: - Tags Found: Scenarios 02:14:56 -------- 02:14:56 Building 'zetnus's deafeat soundtrack replacer v1,1~' Package: 02:14:56 Directory zetnus's deafeat soundtrack replacer v1,1~ failed to contain any valid mod files. 02:14:56 -------- 02:14:56 Building 'Zetnus's Defeat Soundtrack Replacer v1,1' Package: - Tags Found: Sounds 02:14:56 -------- 02:14:56 Building '[OLD VERSION] Deepwood Forest' Package: - Tags Found: Other

0,1,5 all contain .rms files.
3,4 contain exactly the same sound files.
only 2,4,5 currently show up in the mod manager.
3,4,5 are published mods. The rest are local only.
Last edited by Zetnus; May 19, 2015 @ 6:50pm
morness May 19, 2015 @ 11:28pm 
Can you list out the directories/files for Random Maps, RMTest, and zetnus's deafeat sountrack replacer v1,1~?
< >
Showing 1-15 of 198 comments
Per page: 1530 50