No Borders Over Ocean Tiles

Civilicious

Warlord
Joined
Mar 14, 2005
Messages
109
Location
United States of Canada
This change will cause borders to stop after the coast tiles.

Why you may ask? What is the point?

I like this change in a specific circumstance. For example, lets say you are making a mod of the Roman world. It is ancient times and so there is no need for expanded borders to take in ocean resources. Also I personally can't stand the minimap which looks blobby as borders expand out away from the land. Also, in ancient times, naval power was not as important or possible and its not realistic that a country would dominate the waves completely as is represented by civ4 borders.

Furthermore, I like to play on bigger maps which look more realistic. The problem you run into with big maps is right off the bat you need to devote a large amount of resources to running it, then the map typically has to be filled with a large number of cities which causes more performance issues and in addition detracts from enjoyment as it causes a lot more time spent on management.

I use this change in conjunction with Roger Bacons 3 city radius. Now I can give a city a decent amount of culture which causes it to take up more land space without having ugly and unrealistic borders way out over the water. Note the screenshot of Italy, it is a good size map (150X60) yet only 3 cities take up the peninsula and the minimap still looks good.

There are some drawbacks to using this, specifically issues with culture having to be unrealistic at the start to fill the map, but they can be worked around if you have a specific circumstance where you want to make this modification, the line of code to change is in CvCity.cpp and listed below. I apologize for not giving a line number but for some reason notepad dosent let me jump to lines so I don't know where it is. It is in the very same area of Roger Bacon's Border Over Ocean mod however, I think line 9334 or so. Obviously you can't use this with his Border Over Ocean mod.

the pLoopPlot->isAdjacentToLand line is what I inserted, as well you have to set up the brackets properly.

HTML:
getY_INLINE(), iDX, iDY);

						if (pLoopPlot != NULL)
						{
							if (pLoopPlot->isPotentialCityWorkForArea(area()))													{
							if (pLoopPlot->isAdjacentToLand())
								{
										pLoopPlot->changeCulture(getOwnerINLINE(), (((getCultureLevel() - iCultureRange) * 20) + getCommerceRate(COMMERCE_CULTURE) + 1), (bUpdate || !(pLoopPlot->isOwned())));

								}
							}
						}
					}

Thanks to Roger Bacon for giving me some ideas and encouragment via pm and to Kael's SDK installation thread.
 

Attachments

  • Italy.JPG
    Italy.JPG
    113.2 KB · Views: 974
Epicurist said:
HOW do you get the oil, fish and/or whales that are in the ocean?

Being that I am using this specifically for a mod in ancient times there will be no whales or oil on the map, and as for the fish I will only place them in coast tiles.
 
This could be combined with alteration to the Resorce placment validations so that all of the mentioned resorces occure only in Coastal waters. Ofcorse the apearance rates would need to be upped a bit to compensate.

Rather then add another nested if statment I would just use an &&

if (pLoopPlot->isPotentialCityWorkForArea(area()) && pLoopPlot->isAdjacentToLand())

I like the look of it quite a bit, I've always found the huge areas of Ocean being within your "Cultural" borders rather silly, its the Ocean no-one lives their at best their are fisherman sailing around and as you stated their predomintly in coastal waters. One thing I would realy like to see is a Thicker coast stripe varrying from 1-3 tiles out to represent broad deltas and shallow areas of the Ocean like the Gulf Coast and GrandBanks.
 
You can get rid of the PotentialCity line in its entireity, thats what I currently have done. It is to determine how far over the ocean borders will go, allows them to expand over ocean to make fat cross, as such it is redundant with the requirement to stay adjacent to land. Bacon's over ocean mod takes out that Potential line.

I have been tinkering some more and you can make it so the borders dont go over water at all.

The minimap looks tight but I'm not sure about the look of the main map, the straight borders dont look good against the jagged coastline. Also raises some other problems that would need to be worked around, mostly water resource issues.

If I use this I will set up harbor city improvement to provide a fish and then perhaps use one of Lopez's mod to make a building that turns 3 fish into some other fish product resource. Also will make harbor give some food to city since the tiles cannot be worked. Only negative as I see it is that enemy ships off the coast will not have much effect on city, as opposed to their presence displacing a worker off a water tile as normally happens.

And in case you were wondering with both this change and the one in first post, culture will still influence on a land mass across the water and control the land tiles on that land if it expands that far, it just dosen't control the water.
 

Attachments

  • Italy2.JPG
    Italy2.JPG
    114.9 KB · Views: 416
Epicurist said:
HOW do you get the oil, fish and/or whales that are in the ocean?
How about combine this with the "improvements outside of borders" mod by The Lopez? Wouldn't that allow you to go get those ocean resources?
If so, that would add a very cool side-effect...
Navies are much more important now! You'll need to protect those improvements outside your borders in the ocean tiles with some naval power or risk losing them at any moment. Add in pirates and you've got one hell of a fun situation.
 
Improvements only provide the resourse they are built on if they are inside your Cultural borders. This is not changed by Improvements Outside Borders Mod, it simply allows you to build the Improvement outside your borders, and doesn't accually allow you to have the resourse. :)
 
Jeckel said:
Improvements only provide the resourse they are built on if they are inside your Cultural borders. This is not changed by Improvements Outside Borders Mod, it simply allows you to build the Improvement outside your borders, and doesn't accually allow you to have the resourse. :)
I see. I never used the mod myself, I just know it by name.
Well, if the ability to reap the resource could be added, it would be great.
 
Hello,

there is following idea, but I do not know how to implement it.

Do we remember Civ I ? Long time back I know, but in Civ I there were no Cultural Borders .... hard to believe I know.

So it worked there ?

Every city grabbed what it could and when a city grabbed one resource/tile first, it had it. If you and a opponents city overlapped it was all about securing the borders first.
Only when you moved a military unit on a tile of another city then the city had to leave this field and you could overtake it.

Exactly the same we are doing now in this mod with the sea tiles. As there are no cultural borders on sea anymore, every city can grab whichever sea tile it wants as long as it is in its city radius. Who is first is keeping it. Only when a hostile sea units is occupying a tile then the owner is forced to leave it. In this case we can have naval blockades.

What about the resources ?

Automatic. Whenever I take a tile with a resource it automatically gives me the fishing nets.(or the oil or the whaling boats as long as I have the technology discovered) But in this case I have to reduce the boni, they are in anyway tooooo high.

Other option : No sea resources at all. The Harbour will provide a health bonus to compensate the not existing health boni from the not existing resources.
 
I really like this. I have been hoping for something similar for ages. Nicely done!

I just have a question: in what way are there "issues with culture having to be unrealistic at the start to fill the map"? Don't culture and city-borders develop at the same rate as in normal Civ4, but just without sea boders?

Additionally, perhaps access to ocean resources could be controlled by an "invisible" border. There could be some kind of copy of the code that controls the borders, this time only counting for ocean tiles. This border wouldn't show up on the screen or minimap, but would allow access to fish, wales and oil for those tiles.

Would that be possible/realistic?
 
Yes, I was wanting a mod that would at least take the border over coast and sea from the minimap so that it would show only the land borders (seeing that on maps countries do not show sea borders and only land borders in real life.) I'm not sure if having them not show up on the screen is possible but for the map it might be?
 
There is a function in CvPlot.cpp

Code:
ColorTypes CvPlot::plotMinimapColor()
{
	...

		if ((getRevealedOwner(GC.getGameINLINE().getActiveTeam(), true) != NO_PLAYER) && !isRevealedBarbarian())
		{
			return ((ColorTypes)(GC.getPlayerColorInfo(GET_PLAYER(getRevealedOwner(GC.getGameINLINE().getActiveTeam(), true)).getPlayerColor()).getColorTypePrimary()));
		}
	...
}

change to:

Code:
ColorTypes CvPlot::plotMinimapColor()
{
	...

		if ([B]!isWater() &&[/B] (getRevealedOwner(GC.getGameINLINE().getActiveTeam(), true) != NO_PLAYER) && !isRevealedBarbarian())
		{
			return ((ColorTypes)(GC.getPlayerColorInfo(GET_PLAYER(getRevealedOwner(GC.getGameINLINE().getActiveTeam(), true)).getPlayerColor()).getColorTypePrimary()));
		}
	...
}
 
Back
Top Bottom