Alrighty, so I figured it out.
Turns out my initial assumptions were correct, I just didn't start a new game at the appropriate moment to see it working. For all those who use conditionals in the scripts/game_menus on entering certain scenes of certain cities to place specific troops could also use this extremely easy scene_source method.
I don't intend this to be a detailed tutorial, just a quick summation of the process as I currently understand it. Feel free to call out my misinterpretations.
Step 1: Add your hero NPC to the troop list, as per usual, but add the location information like the native tournament masters. For example: "scn_town_1_castle|entry(#)", where # is an entry point already existing in, or one you added to, the target scene.
Step 2: Scenes are often used for multiple purposes. For example, you can enter an arena in the default fashion, as if you want to start one of the endurance fights, or you can enter the same arena scene to participate in various types of tournament fights. So you need to locate all the templates in module_mission_templates which "initialize" the scene's entry points for all the situations where you want your NPC to show up. So for my castle example, I locate "visit_town_castle" and see a fairly straight-forward list of entry point initializations that look like this:
插入代码块:
...
(2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
...
(21,mtef_visitor_source,af_castle_lord,0,1,[])
...
The number after the opening brace is the entry point number, and I've shown one example of each entry point type, mtef_scene_source and mtef_visitor_source. The constants, variables, and tuples after those first two fields set various things that change the equipment or behavior of the spawned npc, I won't get into those any further.
For our purposes, spawning a single hero npc to stand around in a specific castle, all you need to do is ensure that a) your entry point is in this list, and b) that the entry point is defined as mtef_scene_source. This tells the game that the entry point is predefined for an npc. As an example, entry point 0 for most, if not all, templates is defined as mtef_scene_source because that is where the player enters. No visitors will take that spot.
Side Note: If it's not obvious by the mission_template name (some of them are not), you can find the appropriate template by following the game_menus or scripts that lead your character to entering that scene. For example, in game_menus you'll find that the "Go to castle" menu item calls "enter court" in module_scripts, that script contains this line:
插入代码块:
(set_jump_mission,"mt_visit_town_castle"),
And that is your mission template for visiting a town's castle which contains the entry point initializations.
Crucial Step 3: Start a new game. It seems the positions of scene-defined NPCs are saved to existing game saves. Even though I can change almost everything about a troop without reloading, their position won't change if you're using this scene_source method.