====== Progress System Tutorial ====== **1.** Start with adding script **//sh_trackprogress//** to every encounter that you want to be counted towards progress. Not all encounters should grant progress. I typically only do this for those in the direct route from beginning to the end, so if there are any blind routes the encounters inside them don't grant progress. If they would it would allow player to skip more possibly harder encounters later in the dungeon. {{:en:modulebuilding:encounterproperties.png?400|}} **2.** Count the spawns across all dungeon areas, this number is required for step 3. **3.** Add two variables to all areas that are part of the same dungeon. The variable values must be same for the same dungeon. * PROGRESS_NUM_SPAWNS integer X - where X is number of spawns to clear to get 100% progress that we count in step 2. * PROGRESS_RESREF string NAME - system name I usually use name of the dungeon in CAPS, but it doesn't really matter as long as the value is same across all areas belonging to the dungeon {{:en:modulebuilding:progressvars.png?400|}} **4.** Add a variable PROGRESS_MINIMUM integer X to any door that you want to be checking player's progress, where X is percentual progress acquired thorought the dungeon. This is typically door leading to dungeon boss, but it can be added on multiple doors in dungeon with different values. Recommended value is 80 to give players some room to skip something as it theoretically could happen that some spawn won't spawn at all, or they disconnect and their party clears it while they aren't present, etc. {{:en:modulebuilding:minimumprogress.png?400|}} **5.** An entrance to the dungeon needs to have script **//sh_resetprogress//** in OnAreaTransitionClick event. In case it is an area transition trigger then in the OnEnter event as well. {{:en:modulebuilding:resetprogress.png?400|}} Dungeon doesn't have to have same progress in all areas. I think it is better that way, especially for players considering how the percentages works, but if you want you can have a different progress in each dungeon area. In that case each area needs different resref and its own spawn count plus doors with minimum progress. In such design entrance to each dungeon area needs the script to reset progress.