Lighthouse Mod

Padje Dog

Warlord
Joined
May 30, 2008
Messages
109
Hi

I edited a file to allow lighthouses to be built in cities not directly next to the coast, the reason was I got annoyed by not being able to build lighthouses where your city has coast tiles but was not next to the coast.

It works, but now I can build lighthouses in inland cities. I am not that silly, but what about the AI? I saw in the file a reference to AI strategy, does anyone know if that means the AI looks at how many water tiles are in the city radius and intelligently decides at what point in time, if ever, it will build its lighthouses?

Or will it just go crazy building them in every city?

Does anyone know the answer?
 
I have tested it for myself very briefly and it works.

I think another issue is inland lakes which traditionally, even if the city is next to, won't allow a lighthouse to be built.

I would be interested if the AI city with no coast at all but inland lakes built a lighthouse. Until I confirmed this I would not abuse this myself by making inland lakes more profitable, even though I would like to.
 
My suspicion is that the AI can tell what benefit it will receive from the lighthouse and build accordingly. Therefore, it won't build lighthouses if there's no water tiles in the city's BFC but it will build them on inland lakes. In my experience the AI is reasonably modder friendly; unless you're doing something really weird (which usually involves far more than XML modding) it will understand what's going on.
 
In GlobalDefines.xml there is an option that lets you control how big a lake has to be before it is considered sea.

Code:
	<Define>
		<DefineName>LAKE_MAX_AREA_SIZE</DefineName>
		<iDefineIntVal>9</iDefineIntVal>
	</Define>

In alot of my games I set this to a really low value so most bodies of water can have lighthouses built on them, even if they are only 2 or 3 water tiles big.
 
I like the inland lakes because they are 4F 2C after the lighthouse, in my previous games if I could build next to the coast and have inland lake tiles in the city radius then I'd think "what a bonus!"

I guess the downside is that no resourses (fish, crab ect.,) spawn in inland lakes......

If you mod the minimum ocean size to be less, do you see the AI building boats that have tiny oceans to sail on?

I might try and set the minimum ocean size at say two and then see if in some of these tiny two square oceans resourses will spawn.
 
Back
Top Bottom