How are monopolies counted?

Damirith

Prince
Joined
Mar 11, 2015
Messages
379
So how does the game determine if you have a monopoly on a strategic resource or luxury item?

Isn't it based on the actual quantity of the SR on the tile? So if there are 66 "instances" of coal spread out over 20 tiles, you would need to control enough tiles to have 34+ coal to get a monopoly? This would be why Russia's UA allows them have a better chance to get SR monopolies?

What about for luxury items and the BWN version of the Bazaar? Would the extra copies provided inflate the amount needed to make a monopoly or does the game only look at the "real amount" of the them coming from the tiles? If the former, then couldn't the old Bazaar effect could take away monopolies from the people who actually own the tiles? If the latter, then any extra copies would only be useful for making trades?
 
Bazaar, as far as I know, no longer grants an extra copy in the mod.

A monopoly is if you hold the majority of the luxury resources. So if there's 20 tiles of Truffles, if a nation has 11 improved, they will have a monopoly on it.
 
Bazaar, as far as I know, no longer grants an extra copy in the mod.

A monopoly is if you hold the majority of the luxury resources. So if there's 20 tiles of Truffles, if a nation has 11 improved, they will have a monopoly on it.

Pretty sure Russia get an extra copy.

And say there is a 100 instances of horses, and Russia claims 25 horses from tiles.
Then it will be doubled due to its UA and Russia got the monopoly (50%) of horse.
 
I know the Bazaar doesn't give the extra copies any more, that's why I said the BWN version.

But what if its BWN special WAS put back into the game, would those extra copies now inflate the number needed for a monopoly or are they not counted since they aren't actually on any tile?
 
So what would happen here:
Player A has a monopoly over gold by owning 11 out of the 20 gold tiles on the map.
Player B, who currently owns the other 9 gold tiles, builds a building that grants him 2 extra copies of gold...putting him also at 11.

Would the game give the monopoly bonus to both? Would only Player A get it since he has the owns the most real copies? Would the game take away Player A's monopoly bonus and not give it to either because it doesn't make sense with having both of them with it? How would the CP monopoly function handle this situation?
 
I find it strange that you get Monopoly when you improve over half of the resources available on the map. It should also happen when you improve over half of the improved resources of the map. In that way, you would be encouraged to improve the resources/ grab land and you can lose the monopoly bonus (just like in real life!!!).
 
Would the game give the monopoly bonus to both? Would only Player A get it since he has the owns the most real copies? Would the game take away Player A's monopoly bonus and not give it to either because it doesn't make sense with having both of them with it? How would the CP monopoly function handle this situation?

Both get the bonus - the data for monopolies is not shared (i.e. it is saved and loaded from the player data, not a global cache). Adding that would increase the overhead for that function significantly, which is why I decided that it should function this way.

I find it strange that you get Monopoly when you improve over half of the resources available on the map. It should also happen when you improve over half of the improved resources of the map. In that way, you would be encouraged to improve the resources/ grab land and you can lose the monopoly bonus (just like in real life!!!).

We could do it that way, sure, however monopolies would start as early as your first resource (as most capitals have a unique luxury around them), which would throw off the bonuses a bit. It'd require a rework of the function which, as noted above, would mean saving and storing a lot more information on resources than is stored now.

I like to think of monopolies as mid/late game bonuses anyways, which fits well with the current model.

G
 
I find it strange that you get Monopoly when you improve over half of the resources available on the map. It should also happen when you improve over half of the improved resources of the map. In that way, you would be encouraged to improve the resources/ grab land and you can lose the monopoly bonus (just like in real life!!!).

That's interesting idea :) It would make easier to get monopoly and make monopolies more dynamic.

But there probably should be some cap or there would be too much mess with monopolies from first resources.
 
I remember I got a monopoly in one of my previous games. There was this popup with the yellow generic icon on the right side of the screen. And I right-clicked it without thinking, then I could not find out what the effects were.

1) Are the monopolies I have, listed somewhere within the UI with their effects? I was expecting them in the happiness detail or resource detail after hovering over the icons in the top bar, but did not find any (maybe I did not look well enough).

2) It is not a big deal, but if it is not to much work, I think it would be nice to change the icon of the "got monopoly" popup to something else than the generic yellow thing.

Thanks
 
I remember I got a monopoly in one of my previous games. There was this popup with the yellow generic icon on the right side of the screen. And I right-clicked it without thinking, then I could not find out what the effects were.

1) Are the monopolies I have, listed somewhere within the UI with their effects? I was expecting them in the happiness detail or resource detail after hovering over the icons in the top bar, but did not find any (maybe I did not look well enough).

2) It is not a big deal, but if it is not to much work, I think it would be nice to change the icon of the "got monopoly" popup to something else than the generic yellow thing.

Thanks

Yep - the civilopedia has it, and the economic overview panel -> resources section has detailed information on it. Also, if you have resource icons turned on, it should tell you the bonus if you hover over the icon on the map.
 
The current implementation seems fine to me. Monopolies are a late-game buff available to players who choose to pursue an expansive empire. They preform this function in a simple yet elegant fashion as-is. Adding arbitrary era or tech requirements just sounds like needless complexity for complexity's sake alone.
 
The point of my comment and dylansan's was to work in frutiemax's idea, but not cause monopolies to start right as you improve the first SR or luxury tile and not to force Gazebo into doing a lot of LUA work.

Not saying we need to do it, just offering an idea on how it could be done as simple as possible.
 
Industrial sounds too late though. If anything, medieval should be the latest, IMO. By this time, civs are already quite well established.

Though I don't know about the idea itself... In my mind, most tiles are actually populated by people, just not yours, so you could imagine those copper tiles are actually being mined by people ignored by the game. But I'd be fine with this idea as well, with a threshold as people mentioned (an era or a tech? and global or per civ?)
 
Well, I've looked in the code and I assume that the monopoly is tested using CvPlayer::TestHasMonopoly(ResourceTypes eResource). So adding this bit of code would do the behaviour I described:

Code:
int iTotalNumResource = 0;
for(int iPlayerCivLoop = 0; iPlayerCivLoop < MAX_CIV_PLAYERS; iPlayerCivLoop++)
{
	PlayerTypes ePlayer = (PlayerTypes) iPlayerCivLoop;
	CvPlayer& player = GET_PLAYER(ePlayer);

	iTotalNumResource += player.getNumResourceTotal(eResource,false) + player.getResourceExport(eResource);
}

I'm kind of new to modding in Civ 5. How should I test it?
 
compile - replace the dll in the mods folder - start a game - attach to process - put a breakpoint - profit!
 
I tried it and it's actually pretty cool to get the monopoly early! And it actually encourages to make war to get those bonuses. Are you working with a system of git patches?
 
Back
Top Bottom