2.0.1 Build 22425 PTR Patch Notes

I am Retera. I created Retera Model Studio for modding Reforged art files. It has 20000 downloads. I learned a lot about the technology for fun, and I am serious about my suggestion below.

When a Custom Campaign author releases his work, he wants to style it in an exact way “just so.” Some people were working on this for 4+ years already. I know you appear not to have time to do much with World Editor software, so let’s ignore it for a moment.

In the game, each map file is an archive. This archive has several files inside of it. One of the files is war3map.w3i, a binary information file. When the game program reads from this file as a binary stream, various flags are set for the play session with that map. For example, part of the way through the stream, there is a code branch in the parser for Reforged that would look something roughly like this:


		if (this.version > 30) {
			this.supportedModes = stream.readUInt32();
			this.gameDataVersion = stream.readUInt32();
		}

At the moment, the supported modes probably only include:

#define CLASSIC_SD (1 << 0)  // 00001 (binary)
#define REFORGED_HD (1 << 1)  // 00010 (binary)
#define BOTH_CLASSIC_SD_AND_REFORGED_HD (CLASSIC_SD | REFORGED_HD)  // 00011 (binary)

It’s also possible that the program simply expressed these as SD = 1, HD = 2, and SD_and_HD = 3 in your code.

#define CLASSIC_SD 1
#define REFORGED_HD 2
#define BOTH 3

or it might be formatted as

constexpr uint32_t CLASSIC_SD = 1;
constexpr uint32_t REFORGED_HD = 2;
constexpr uint32_t BOTH = 3;

Obviously I cannot know which C++ style your developers chose from here on the outside.

But I was wondering if you could add some more control bitflags to the map, so that the map can override the Old Terrain and Classic HD controls, so that a map developer can cause his map to be “just so” if its a big single player story mission with an exact art style rather than a simple versus mode scenario where the player can toggle all kinds of things. If you change the game so that it can parse more “supported modes” from the integer constant that I described above, even if you do not patch World Editor likewise, as long as you TELL US that you add them, the really passionate folks could probably use the new modes and just make the map with their own tools in their own way, if necessary. And this way, the map author won’t spend a very long time drawing something specific, only to have the player accidentally choose a different combination of w3mod addons than what the map was intended for.

For example, you could update the game’s parser with the following:

#define CLASSIC_SD (1 << 0)  // 00000001 (binary)
#define REFORGED_HD (1 << 1)  // 00000010 (binary)
#define CLASSIC_HD_ENVIRONMENT_OFF (1 << 2)  // 00000100 (binary)
#define CLASSIC_HD_UNITS_OFF (1 << 3)  // 00001000 (binary)
#define CLASSIC_HD_HEROES_OFF (1 << 4)  // 00010000 (binary)
#define CLASSIC_HD_BUILDINGS_OFF (1 << 5)  // 00100000 (binary)
#define CLASSIC_HD_ICONS_OFF (1 << 6)  // 01000000 (binary)
#define CLASSIC_HD_VFX_OFF (1 << 7)  // 10000000 (binary)
#define REFORGED_HD_OLD_TERRAIN (1 << 8)  // 100000000 (binary)

If we choose to treat these as bitflags instead of an enum with SD=1, HD=2, and both=3, then we can do something like the above and provide the map author a flag which – if specified – let’s the map declare whether it wishes to support the new features. That way, in the same manner as a custom map can declare to the game engine that it supports Classic SD, or declare to the game engine that it supports Reforged HD, it could also declare its support for the new settings.

In order to promote the new settings, the 2020 team when they added this feature made it that “if the map was older than the game version who added this feature, then both Reforged and Classic modes are allowed.” In a similar way, you could make a rule that if the map is older than 2.0.1+, then all the new modes are allowed. But, if the map is new enough to have these flags, then the map can declare whether it supports each mode on or off. Unlike the 2020 game release, you already released the game without this feature. So unlike the old modes, I have provided my example above with “OFF” switches as the new flags, instead of “ON” switches. By flipping this, the only maps who would ever opt-out of the new modes would be the maps who KNOW about this setting.

By making the behavior of the game only change if a map KNOWS about this setting, you can leave everything the same for any maps who don’t KNOW about this change. By doing that, you can also skip updating World Editor, ignore that, only update the game itself, and just warn us in the Patch Notes, “Hey guys, if you are working long and hard on a very specific Reforged custom game and want to lock these settings, here are the binary flag codes.”

By adding these settings as bitflags to a supportedModes integer which already exists in the war3map.w3i parser, you can add a way for maps to control this setting while keeping the file size of the maps identical to what they were previously, and not larger.

I think there are some extremely dedicated Reforged custom campaign developers who would thank you if you add a feature like this. And you can do it without touching the code for World Editor, just by updating the game itself to be more featureful.

12 Likes