Sometimes a module author may intend the work for a specific loadable PC, rather than a general character that is generated by the player. This allows the module writer to fine tune the story to fit an individual. The code below can be used to test whether the appropriate character was loaded. Note: It is also a good idea to mention in the module notes the name of the character that needs to be loaded.
The code is the concatenation of three files: (1) endgame_if_wrong_pc, (2) gui_exit_to_menu, and (3) a code snippet that is placed in the "On Client Enter Script" of the module.
The "endgame_if_wrong_pc" code compares the character selected by the player to a creature blueprint. If the parameters of the two do not match, a dialog message appears and the game returns to the starting menu.
The endgame_if_wrong_pc routine creates a copy of the template creature then performs a series of comparisons with the is_pc_match() routine. If a parameter doesn't match, a DisplayMessageBox, is displayed. When the player selects the "Exit" button,
the "gui_exit_to_menu" call-back routine
is called to perform the exit.
The endgame_if_wrong_pc() routine should be called from the "On Client Enter Script" of the module's starting area. The "endgame_if_wrong_pc" script is included, and a call such as is used in the final code snippet should be made, with the parameters adopted to match your module.
A prototype template could be generated, for example, using the InCharacter plug-in.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone