Content Editor - issues with cloning core units

It looks this this guide results in buggy behaviour if used on Villagers (and possibly other unit types):

If you follow it for villagers (I adjusted their time to train, and resource cost - nothing else), the villagers are invisible, but selectable / controllable, and have the idle FX above them when idle.

There is nothing useful in the warnings.log or any other logfiles. The mod validates correctly. Villagers for all civilisations are affected.

This was first reported on an AoE IV modding Discord by another user. I reproduced it mainly so I could report it here if need be.


There are also issues in working with the cloned units if you want to undo your changes:

  1. If you go back to the mod and delete the core unit, it successfully nullifies the parent_pbg field, but the changes that were inherited remain. In my case, the changes to cost_ext. Not ideal.
  2. If you rebuild and re-test, the villagers now exist but aren’t selectable, have no idle FX, and effectively don’t exist. They take up pop cap and that’s it.
  3. Back in the Content Editor, you have to delete the unit that was altered by the original core unit clone, rebuild , and then clone the civ’s unit again.

If you try to re-clone after deleting a unit without rebuilding the mod, the Content Editor gives you a generic error and fails to clone. You have to rebuild first.

I’d normally put these in a separate thread, but they all seem related to cloning and working with core unit data.

1 Like