This modcomp lets corporations go obsolete.
Just add an obsolete tech to the corporations headquarter, and when you research the technology, the corporation will be erased from your cities.
- The corporation will also be deleted, when you capture a city with it
- It'll also be removed, when an executive spreads it again in your cities.
Only problem: You can't prevent, that the AI will try to spread the corporation again in your country -> the AI will still use gold for spreading and production for CEOs, also when it will not have any use in a country.
There are 3 parts in the CvEventManager, all labeled with "obsolete corporations".
In the python code nothing has to be changed, it will all work automatically. Only add an obsolete technology to the corporation headquarter.
I've modified Cereal Mills in this modcomp, so that it goes obsolete with genetics, just to give an example.
The code itself is not very performant, but doesn't matter, because onTechAcquired, onCityAcquiredAndKept and onCorporationSpread are not called sooo often.
This modcomp was originally requested by Kathy.
Please ask questions in this thread.
Re-uploaded on October, 11th 2009, 7:08 PM forum time.
- Fixed a bug, which led to the weird effect, that corporations without an obsolete technology directly became obsolete after founding. Thanks to Kathy for finding the bug
.
Just add an obsolete tech to the corporations headquarter, and when you research the technology, the corporation will be erased from your cities.
- The corporation will also be deleted, when you capture a city with it
- It'll also be removed, when an executive spreads it again in your cities.
Only problem: You can't prevent, that the AI will try to spread the corporation again in your country -> the AI will still use gold for spreading and production for CEOs, also when it will not have any use in a country.
There are 3 parts in the CvEventManager, all labeled with "obsolete corporations".
In the python code nothing has to be changed, it will all work automatically. Only add an obsolete technology to the corporation headquarter.
I've modified Cereal Mills in this modcomp, so that it goes obsolete with genetics, just to give an example.
The code itself is not very performant, but doesn't matter, because onTechAcquired, onCityAcquiredAndKept and onCorporationSpread are not called sooo often.
This modcomp was originally requested by Kathy.
Please ask questions in this thread.
Re-uploaded on October, 11th 2009, 7:08 PM forum time.
- Fixed a bug, which led to the weird effect, that corporations without an obsolete technology directly became obsolete after founding. Thanks to Kathy for finding the bug
