The ID is static for any given game (and is read-only and unique), but if you want to be able to use it in other games you may run, you'll want to use a way to mark the random encounter page. The way I did it for my Page Navigator script is to have a text tag that the user appends to the page name and then use .indexOf to filter the pages for page names with the proper tag and then get the id from those pages. I believe that WhiteWolves did something similar for his MapChange script. For your case you could probably just have it look for a page named Random Encounters or what not; this would of course potentially have conflicts with other scripts that use or do things to page names. EDIT: if you used something like this: on("change:campaign:playerpageid",function(id){
var currMap = getObj('page',id);
if(currMap.get('name').indexOf('Random Encounters')>-1){
do stuff
};
}); You wouldn't have to worry about the conflicts mentioned above, and it would be dynamic to work with any campaign as long as you followed the naming convention that random encounter pages had "Random Encounters" somewhere in the name, allowing you to then have several different random encounter pages (like say City Random Encounters, Wilderness Random Encounters, etc.) in case you found that you needed say different sized maps or something like that.