Supposing you have taken upon yourself to write in an era where there were very few names1, and so they were repeated a lot.
Where it was taken for granted, for instance, that you would be named for your godparents, and the most powerful people in the village were often godparents, to tie the lesser families to theirs.
So, for actual use, you gave them different forms of the name.
Or sometimes entirely different names. "Dusty" was a very common nickname for a miller, whether Dustin, Dunstan, John, Tom, or William. This offers a lot of options to the writer. Red for the red-head, Slim for the thin man (or the fat one, irony still being an option), Dun for the boy who always insisted that he "dun" whatever he was accused of failure to do, or worse. There may be patterns within a culture, but there
The variants got a lot more interesting.
Especially when there were variations on variations on variations. Hence "Polly" as a form of "Mary" (via "Molly") or "Nancy" as a form of Anne, or "Hodge" as a form of Roger, or "Hal" as a form "Henry."
Or give the name in a diminutive form: "Marian."
I note that the "-an" and "-ane" and "-ana" suffixes have nothing to do with the name "Anne." "Marian" is just little Mary, "Georgiana" is just little Georgia.
There's also "-kins" which generally appears only in last names nowadays but was a diminutive in its day. "Hodgkins" is little Roger. "Watkins" is little Walter. "-in" might also be used, so that "Robin" is little Robert.
Long names might just be shortened in themselves: Elizabeth to Liz or Beth or Liza, Eleanora to Nora, Margaret to Mag, or Greta. And then the shortened names could be fed into the variations on variations, which is how Margaret ended up with Peggy.
(Familiarity counted some, such that names would acquire suitable shortenings. An expert on names talked of the Puritan adoption of Biblical names and how they would not shorten Zebediah or Jedidiah. He was, though aware that the United States stuck to Puritan naming patterns for longer, unaware of Zeb and Jed.)
One thing that was not common in this era was the use of foreign names, or diminutives. Even a foreigner who, for some reason, settled in the land would translate his name: Marguerite to Margaret, Ian to John, Hendrick to Henry.
Likewise, it requires a degree of travel, communication, and cultural interchange before foreign diminutives are adopted, before Mary can become not only Marian but also Marietta; Margaret not only Margery but Marguerite. (Masculine diminutives being less adopted.)
This gets into the truly fun when one diminutive is so regarded as a name that it gets another. "Robinette" means little little Robin.
This article harps on the patterns of one region. This is a necessary focus.
Every region has its own pattern of diminutives. Russians are particularly known to go wild on the topic, but there are many that can profitably ripped off, even at the price of suggesting the world is derived from the culture. (Or advantage. Suggesting a real world culture also can be useful.)
Of course, one "fun" of Nicknames is that a person might have "earned" a nickname that he absolutely hates.
But then the hated nickname might be a clue to his character.