Use Named Destinations.
Can you give an example or reference to a document?
An example for what, exactly?
An example of creating a bookmark that goes to the nth page of a document, but when the page order changes still goes to the page that was origionally bookmarked
I assume you would have to add a Named Destination to the nth page (let's call it 123), and then bookmark.createChild("123" , "gotoNamedDest('123')" , 0)
But how do I create the NamedDest in the first place?
but hints at this document,
however I do not know how to use the information it gives me within this context
You can not create the Named Destinations with a script. It has to be done manually, or from the application used to generate the PDF.
It might be possible to do it with a plugin. Ask over at the Acrobat SDK forum...