You gain war points with every successful battle. They diverse from points, gained by spent resources. A player gains a war point for each 1000 points difference in the lost structure with his opponent. E.g. Player 1 attacks Player 2. Player 1 loses 2000 structure points and Player 2 loses 4000 structure points. Player 1 gains 2 War points.
In the various game universes the players ranking may be ordered by battle points, or by points based on spent resource (on the different universes the raking may be based on resource, battle points, combined from the last two in 3:1 ratio in favour of the battle points and also the coefficient of the attack might be determined by the different types of points and rankings).