diff --git a/skytemple/module/monster/controller/main.py b/skytemple/module/monster/controller/main.py index 7da593f9b..11f05eb94 100644 --- a/skytemple/module/monster/controller/main.py +++ b/skytemple/module/monster/controller/main.py @@ -384,8 +384,12 @@ async def export(): idle_anim2, ) + safe_name = main_name + for c in r'<>:"/\|?*': + safe_name = safe_name.replace(c, "_") + fn = os.path.join( - directory, f"{entry.md_index:04}_{main_name}.xml" + directory, f"{entry.md_index:04}_{safe_name}.xml" ) with open_utf8(fn, "w") as file: