Redefining 'same landmass' would mean that the concept of 'landmass' no longer corresponded to the (internal game structure) concept of 'area'. In principal you could probably redefine area as you want it to be, but you'd have to do a lot of re-coding inside the DLL.
Astonishing how you can immediatly see what code you need to interact with, young
Jedi Neo. Fascinating!
Off the top of my head, the following issues strike me:
- You'd have to do the (hopefully relatively simple) mechanical work to re-code CvArea.cpp to implement the new definition
What does "simple" mean to someone who gets a headache when looking at code.
I am more the type of dreamy impressionist. Cubism is fine for art exhibitions once in a while but on my canvas everything is blurred like the landscape with
Turners train. Its all colour and motion but, you know, the tracks and the machine do exist in reality as well!
- By the new defintion an area can include both land and water tiles - I think it expects them to be a single domain, so that may have subtle knock-on effects
Well what does AI do at the moment to reach the peninsula behind a mountain range. Its impassable landtiles in between like it would with coast if definitions were changed. I think it either waits for mountaineering or does board a ship to get around, right?
- The AI uses is-same-area in a fairly widespread way to optimize searches, so that it doesn't spend a lot of time trying to find non-existent paths between plots that are clearly unpathable. Changing the definition could lead to significant performance impact as the AI tries to find a route for its log rams to invade your island city and so on (attempting to generate an unpathable route is the most expensive pathing operation it's possible to try as it will cause it to search all possible reachable plots before it realizes it is an impossible task)
Ah I see, thats a point. But could this pathing process be optimized in regard to virality of a decission. Like if the urge to do something about a situation gets too high it will react, no matter what? That's what we humans do most of the time, at least me. This way, we wouldn't have immense pathing all the time but only when its urgent. There could be something like a property value for that? If it gets too high processing that problem would begin? Could be also game option "Advanced AI Calculations (longer turns)" So you could activate it or leave it.
- There is a fair amount of AI code that evaluates things in terms of same-area threats and same-area civs. Given the reason you want to make the changes is that you want close local invasions and so on to take place these might (happen to) work out about right, but chances are they would need some tweaking.
Yeah tweaking sounds good. In relation to the that I attached an interesting savegame. I started as England on GEM, managed to cpture a city in Holland and two cities in France from barbs. Germans have 2 stacks with attached highly valuable commanders roaming around in France and Spain.
The commanders are very advanced (+50% strength, Flanking I, Blitz I) but now as the culture of my cities spread out, one hunter/spearman/general stack is stuck in Bretagne and the other somewhere in Spain. I was quite happy as I saw that but I thought about what AI would do here and somewhat it's relating to the pathing problem you described.
As I won't give them a free pass anytime soon, a german city at the baltic sea would have to build boats, drive through barbaric controlled seas near denmark, surround Scotland, pass ireland and finally be able to pick off the commander in Bretagne.
Well, I realized this wouldn't happen ever with AI at the stage right now... ;-)
So what could be done is to tweak if commanders are attached to hunting troops they should be unattached and only work with larger stacks around the time they get +50% strength, I think.
Also, they should have a deep urge to get home, maybe even declare war to break through enemy lines if there are new cities or advanced culture blocking their way. In this game, I am quite sure that no matter how good the commanders are, if only 2 units protect them I would be able to take them out very soon.