[BNW] Can I restrict cities on small islands

yepzer

Chieftain
Joined
Jan 12, 2006
Messages
36
Location
Denmark
I'm pretty tired of the AI spawning cities on 1 and 2 tile islands, I'm considering how to put a mod together to restrict this. Having done some mods already I'm familier with corners of the API and XML - but I struggle putting the pieces together.

1. Detecting if the unit is on a 1-2 tile island. Is there a way to do this already? The Wiki is a bit thin on explaining Areas and other terrain functions.
Alternatively I would expand the map database initially, and after map creation iterate all plots and count neighbor water tiles. Perhaps ring two too.

2. At runtime suppress that settlers and other units can found cities. I find no clear path in the wiki for this though. Perhaps I need to suppress some vanilla code either by replacing vanilla lua files or expand the DLL?

What have I missed? Are there any hints you can give? thank you
 
If you're using my DLL (or a version of it), there is a
GameEvents.PlayerCanFoundCity.Add(function(iPlayer, iPlotX, iPlotY) return true end)
event
 
Back
Top Bottom