From the first Pirates of the Caribbean moviethe Code has played a key part in the behavior and morals of characters. The Code is set out as a rulebook for pirates to follow, dictating how they should act and how they should conduct their business. Of course, like any society, some pirates take said code more seriously than others.

RELATED: Pirates Of The Caribbean: The Worst Thing Each Main Character Has Done

The Code itself always lurked in the background, but many viewers are still unaware of a lot of its background and what it actually dictated. Many because so many people ignored it.

Any Treasure Found Must Be Shared Equally

jolly-roger-flag-pirates-of-the-caribbean

The Code is actually pretty fair on pirates in the sense that it's pretty adamant treasure found should be shared among the crew. This is to prevent a captain from using a crew to find treasure and then keeping it all for himself. No matter how low someone is on the crew, they're still supposed to receive an equal share of any treasure recovered by the ship.

Someone Who Refuses To Serve A Pirate Must Be Killed

Jack Sparrow looks at a shrunken head given to him by his father

Many people look down on the pirates, particularly if they're officials who consider themselves above the men who plunder the seas. But the Code dictates that if someone refuses to serve a pirate, they should be killed.

It would seem that the Code has no time or sympathy for people who consider themselves above pirates. It's enough to make you wonder if everyone asked to serve a pirate is aware this rule exists.

A Surrendered Enemy Can't Be Killed

Pirates of the Caribbean Black Pearl

The Code isn't totally heartless when it comes to the enemies of pirates, though — it also dictates that if someone surrenders themselves to a pirate, they should not be killed.

This definitely is one rule that not all pirates follow. Davy Jones, for example, took many prisoners during Dead Man's Chest and insisted there were no survivors when asked by his crew for instructions. The poor men had their throats slit and were tossed over the side of the boat.

RELATED: Pirates Of The Caribbean: D&D Moral Alignments Of The Main Characters

Does the Code still apply to the undead? Apparently not.

Whoever Spots Treasure Can Choose The Best Pistol

Jack smirking and Will Turner cringing in Pirates of the Caribbean

An odd (but perhaps fair) rule is that whoever spots treasure can choose the best pistol for the ensuing fight. So whichever crew member is lucky enough to be the one to spot the gold has the best advantage when it comes to survival if that gold is protected, regardless of their rank on the ship.

Fall Behind? Left Behind

MOVIE HOT TOYS - Jack Sparrow

This rule is actually one spoken about a lot in the early movies, but one that the audience tends to forget by the later ones.

Although the Code is kind towards pirates in many ways, it also dictates that if they fall behind, they're left behind. Jack Sparrow falls victim to this rule on multiple occasions, since he always seems to be lagging at the back of excursions. The Code has no time for pirates who can't keep up, even if it's not their own fault.

The PoTC Game Mentions The Code... But It Shouldn't

POTC Game

The Pirates of the Caribbean game is set in 1630 and references the Code multiple times.

The issue with this is that the Code wasn't actually created until decades later.

Whether the game creators were taking some creative license or simply didn't that the Code didn't exist in 1630 remains to be seen, but it's likely that they just forgot about the established lore in the movies when creating the game.

Befriend Others Wisely Is Rule One

Pirates Of The Caribbean Island Cropped

Rule one of the Code is to befriend others wisely.

It's a bit of a vague rule, and leaves much to the imagination of each pirate who interprets it. Does it mean befriend those who will be loyal to you, or those who will provide advantages and success?

RELATED: Pirates Of The Caribbean: 5 Best Villains (& The 5 Worst)

It depends on the person reading it.

It's Based On The Real Ship's Articles

The ship in Pirates

The Code is based on real ship's articles from that time — but it's pretty loosely inspired. For the most part, the Code is entirely made up and there to serve the canon of the movies, but it does have some real-life inspiration from long ago. The creators did do a bit of real-world research, which is interesting to think about.

Importance Varies From Pirate To Pirate

Johnny Depp as Jack Sparrow and Geoffery Rush as Hector Barbossa in Pirates of the Caribbean

It's obvious that the importance of the Code is on a pirate-by-pirate basis, but it does raise some interesting questions most fans don't consider. If the Code is law, what is the punishment for breaking it? Is it down to the captain to consider how important it is, or is it down to the Brethren?

It Includes Regulations On Peg Leg Size & Eyepatch Color

Jack And Barbossa Fighting (It Belonged To Barbossa 4 Times)

Although the Code mostly speaks on enormous issues such as mutiny, murder, and treasure — the three most important pirate issues, of course — it does include some trivial stipulations. The Code has regulations on things as unimportant as pegleg size and eyepatch color, though the movies don't waste much time explaining these. For good reason.

NEXT: Pirates Of The Caribbean: 10 Fan Art Pictures That Captain Jack Sparrow Would Steal