Skip to content

convert: fix converting recent AoE2: DE builds - #1824

Merged
TheJJ merged 6 commits into
SFTtech:masterfrom
denizkoekden:fix-de2-conversion
Oct 14, 2026
Merged

TheJJ merged 6 commits into
SFTtech:masterfrom
denizkoekden:fix-de2-conversion

Conversation

@denizkoekden

@denizkoekden denizkoekden commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Converting AoE2: DE (build 25464371, the macOS version from Steam) failed in three places:

  • the dat file uses the effect types 31 and 36, which were missing in the lookup dict
  • since 72b7ee4, get_real_type() raises for members with an object type, which breaks generating the pregen objects for every game
  • since 52dca96, Texture.image_metadata is a list, but merge_frames and the metadata exporters use it as a dict

After that, the engine couldn't load the converted modpack because of two new techs:

  • tech 1379 changes ballistics with a relative effect, which produced a += patch on target_mode
  • tech 1474 changes the max projectiles of melee units too, which produced ShootProjectile patches on their melee attack

With these changes the conversion runs through, the game loads de2_base, and make checkmerge and make test pass.

Side note: when an export worker raises, the converter doesn't exit but keeps printing the progress line forever.

Since 72b7ee4, get_real_type raises for members that have an object
type. _type_conversion and _get_primitive_value_str expect those to pass
through, so converting any game failed while generating the pregen
objects.
52dca96 made image_metadata a list to match its annotation, but
merge_frames and the metadata exporters use it as a dict with the
"size" and "subtex_metadata" keys. Fix the annotation instead.
Build 25464371 uses the effect types 31 and 36, which made reading the
dat file fail. Like the other unknown types, they are not converted.
target_mode is an object member, so nyan only allows assigning it. The
new tech 1379 in recent AoE2: DE builds changes ballistics with a
relative effect, which produced a "+=" patch that fails to load.
Tech 1474 in recent AoE2: DE builds changes the max projectiles of melee
units as well, which produced ShootProjectile patches on their
ApplyDiscreteEffect attack. The other projectile upgrades already check
for projectile shooters.
@TheJJ

TheJJ commented Oct 14, 2026

Copy link
Copy Markdown
Member

awesome, thanks for the fixes!

@TheJJ
TheJJ merged commit 0bd3bc7 into SFTtech:master Oct 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants