Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,378
I looked though the AI code to figure out how it handles prohibited civics because I think it would be best to share the code, hence share the bugs. If an AI bug turns up as a UI bug for the player, then it will be easier to notice.
It turns out that the AI completely ignores prohibited settings. It looks to me like it will not mind using two mutually exclusive civics at the same time. Wondering about how to fix both at the same time has resulted in a new C++ class with the "selected/wanted civics", which should then have member functions to verify that the setup is in fact valid. Getting the AI to find "the best" settings will be slow, but can be made to be as fast as the current speed if a cache is implemented. Now it has grown to be so big that I think the best solution would be to strip out prohibited checks from python and leave it at that for now. This new check can then be introduced AFTER next release. The next release should be "good enough", not perfect or we will never release. Since all submods waits for the next release, we really should avoid all non-essential addons for now.
I will add this to the todo list on sf with some remarks on how I think it should be done.
It turns out that the AI completely ignores prohibited settings. It looks to me like it will not mind using two mutually exclusive civics at the same time. Wondering about how to fix both at the same time has resulted in a new C++ class with the "selected/wanted civics", which should then have member functions to verify that the setup is in fact valid. Getting the AI to find "the best" settings will be slow, but can be made to be as fast as the current speed if a cache is implemented. Now it has grown to be so big that I think the best solution would be to strip out prohibited checks from python and leave it at that for now. This new check can then be introduced AFTER next release. The next release should be "good enough", not perfect or we will never release. Since all submods waits for the next release, we really should avoid all non-essential addons for now.
I will add this to the todo list on sf with some remarks on how I think it should be done.
I use Notepad++. If you find anything, which has a working debugger, then do tell. While python debugger is mentioned in the vanilla setup, I never managed to get anything working.Edit: Installing a python ide now.