In 1982, Steve Jackson and Ian Livingstone wrote the first Fighting Fantasy gamebook, The Warlock of Firetop Mountain. To cheat-proof the book, Jackson devised a puzzle based around the various keys you need to find in order to unlock the Warlock's chest and steal all his stuff: Scattered throughout the mountain are six keys, each of which has a number engraved on it. You need to choose three of the keys, add their numbers together, and turn to that number section. Only by finding the correct combination of keys can you win the book.
This sets the template for other authors seeking to ensure their book can only be completed by those playing fairly, but over time their methods get more and more meta. The numbers associated with the items become more subtle than just having them written on for no readily apparent in-universe reason. Or the player can spell out a secret message telling them when to take a nonstandard option, with the number being found via a brainteaser. Jackson himself pioneered reference modifiers, where at certain sections you must add or subtract a given number from that of the section you are currently on in order to take an action not offered by the text; if you don't have the item or knowledge that permits you to use the modifier, you won't even have a clue the option is there!
But there's one other tactic, which basically eliminated the need for items to have numbers associated with them at all.









