an avatar could be generated dynamically on demand, with a simple set of instructions that pinged a core system to retrieve it's actual set of functions or effects.
that simple instruction could be copied over from another template, so at request time you'd order "copy this template, and assign it this name", and when interacting with the event, the instruction copied over would be the one to take "this name" and send it to the core system, like "this is me... assign *me* to whatever further effects should be played"
so, any dialogue like "Hi, how you doing?" would have "this name" and "this face" automatically assigned, through the core system.
you decide how big or small both that simple set of instructions is, or the AI is.
the point is, it *can* be done because that's exactly what the game already does when loading a new map: it reads the map file, finds the markers where events were defined in the editor, and assigns them a logical object RPG:Event that is handled by the game.
you'd be poking that routine and wrangling it on demand.
"setting a picture to the event" requires the event already in place, having been loaded with the map.
but the instruction "set picture" itself is part of the interpreter, which you're already taking control of when spawning that event, so you can work that into the whole system as part of the spawn routine, so when calling "spawn THIS", that "this" brings along the NPC's identity: map avatar, name to be used in dialogues, and face.
the AI assigned to that event could be something like "ping the system for current XY", and "move to XY"
"move to XY" in itself is already coded, and it's the fundamental part of movement routes along with "turn to".
so, get rid of the move route menu in the editor, and just code everything to it's logical equivalent: "at this time, on this location".
as "time" approaches "this current time", "this location" starts to differ from "this current location".... so, "move to XY" *sends* the event to that location.
if "move to" ends up landing out of boundaries when considering the screen, then you teleport.
and that is all math.