I want to add a dice roll to my story.
I have the code example but do not know where it goes.
Does it go in the body of the story or is it added into the page link?
Is this a Quest gamebook?
Where you put the dice roll depends what you want to do with it; but generally you'll want it to be on a "script" type page.