Well, here goes:
The players (and teams) in your mod are ordered in a specific order. Since your mod has spawning Civs there will also additional players (and teams?) popping up in mid-game. Each player is indexed (enumerated) with a integer identifier - the player's PlayerType value. So the first one is player 0, the second one player 1 and so on.
Now, these values are only numbers - not actual players. Each player is instead something called a CvPlayer object in the SDK. In Python terms these are known as CyPlayer objects - instances of the CyPlayer class. The PlayerType/ID/index/whatever is merely a reference to such an object.
So, you basically can do nothing useful with a integer value. Adding and subtracting to it wont affect any player in the game, at least. In order to do something with a player you need to get its CyPlayer instance - and invoke some method on it.
Lets propose that you wanna check whether or not the first player is alive. So we already know that the first player is identified by the integer value 0. Next we need to get the CyPlayer object corresponding to that value, and the way to do it (without CivPlayer) is to use the CyGlobalContext.getPlayer() method. Since a CyGlobalContext object is usually assigned to the constant gc, the code could look something like this:
And we invoke the CyPlayer.isAlive() method on it:
This method invocation will return a True/False value (a boolean) depending on if the first player is alive or not. This in turn can be used in conditional statements or as an argument in some function.
The same applies to teams, in principle. But fetching both TeamType values and CyTeam objects from PlayerTypes/IDs is actually pretty messy. And this was the motif for creating CivPlayer in the first place.
The various different ways to fetch the same CyPlayer instance with CivPlayer would be (proposing that the first players is Rome):
So you get some options - what you end up using is basically a matter of taste/convenience.
The downside of all this goodness is that you need to understand what a CivPlayer instance is.
And thus I still need to document the module! 
The players (and teams) in your mod are ordered in a specific order. Since your mod has spawning Civs there will also additional players (and teams?) popping up in mid-game. Each player is indexed (enumerated) with a integer identifier - the player's PlayerType value. So the first one is player 0, the second one player 1 and so on.
Now, these values are only numbers - not actual players. Each player is instead something called a CvPlayer object in the SDK. In Python terms these are known as CyPlayer objects - instances of the CyPlayer class. The PlayerType/ID/index/whatever is merely a reference to such an object.
So, you basically can do nothing useful with a integer value. Adding and subtracting to it wont affect any player in the game, at least. In order to do something with a player you need to get its CyPlayer instance - and invoke some method on it.
Lets propose that you wanna check whether or not the first player is alive. So we already know that the first player is identified by the integer value 0. Next we need to get the CyPlayer object corresponding to that value, and the way to do it (without CivPlayer) is to use the CyGlobalContext.getPlayer() method. Since a CyGlobalContext object is usually assigned to the constant gc, the code could look something like this:
Code:
gc.getPlayer(0)
Code:
gc.getPlayer(0).isAlive()
The same applies to teams, in principle. But fetching both TeamType values and CyTeam objects from PlayerTypes/IDs is actually pretty messy. And this was the motif for creating CivPlayer in the first place.
The various different ways to fetch the same CyPlayer instance with CivPlayer would be (proposing that the first players is Rome):
Code:
Civ("Rome").get(CyPlayer)
pointer("Rome", CyPlayer)
instance(0).get(CyPlayer)
CivPlayer.CyPlayer("Rome")
CivPlayer(0).get(CyPlayer)
The downside of all this goodness is that you need to understand what a CivPlayer instance is.

