You have to edit the overworld file of the current map. I have posted a Lua script to be used with DeSmuME which tells you what overworld/text/script entry is being used on the current map.
What you want to do is open the overworld file in a hex editor, and figure out where all the NPCs are. Since there's no editor yet, you have to just duplicate a pre-existing NPC (or just add the proper length of hex) and then place the NPC based on the X/Y/Z coordinates; assign it a script and a sprite and you're good to go.
For actually battling the trainer, it requires a script. On my YouTube channel
shows a custom encounter+battle with Colress. What's neat is that the game's Zone Data decides what background pads to use for the battle. In that video I post the script; the way Drayano and I have added extra NPCs to battle is essentially copying pre-existing scripts and slightly altering their instructions to call a different trainer file.
85 00 2D 03 00 00 00 00
This script instruction tells the game to prompt a battle (0x0085) with trainer # 0x032D, which is Trainer 813 in Kazo's BWTE 2. I was lazy and just edited Colress' previous battle; if one were to copy other files (to make a Trainer 814 exist), then you can also reference that too. That's what Drayano had done for BBVW2. From that pasted script in the description of the video, your script should different as I remove overworld NPCs during the battle.