====== PAGE INFO ALREADY TRANSFERRED TO THE NEW WIKI - Using Sinfar Spawning System ====== Sinfar's spawning system is documented here: [[:building:spawn:sinfar_system]] and it can be used inside houses with a few differences. ===== Usage Difference ===== - The tag must have the additional prefix "_P_", for example: _P_SPAWN_C_P_25_SERVANT: \\ {{:building:houses:scripts:sinfar_spawning_system_20190313-001318.png}} - The variables must have the additional prefix "P_", for example P_SPAWN_CHANCE: \\ {{:building:houses:scripts:sinfar_spawning_system_20190313-001245.png}} ===== How It Was Enabled ===== Simply by adding those 2 lines: RegisterVariableEvent(oArea, "EVENT_WOKEUP", "p_x_wokeupare"); RegisterVariableEvent(oArea, "EVENT_SUSPEND", "p_x_suspendare"); .. When an house area is created (SetupHomeArea in [[https://nwn.sinfar.net/res_nss_edit.php?name=home_include|home_include]]). You could do the same by setting variables on your areas (:houses:scripts:variable_based_events) and create your own system, but for Sinfar Spawn System, it is done automatically. \\ \\ You can look at those 2 scripts: [[https://nwn.sinfar.net/res_nss_edit.php?name=p_x_wokeupare|p_x_wokeupare]] and [[https://nwn.sinfar.net/res_nss_edit.php?name=p_x_suspendare|p_x_suspendare]]: they basically call the same functions but of course in the context of an house script (p_) so GetLocalString automatically ensure that the variable name is prefixed by P_ and the tag check expect the _P_ prefix because it is also mandatory for a player blueprint.