primem0ver
Emperor
This is primarily a SDK mod that adds the capability to build "vision" improvements that extend vision range for an empire. It comes complete with AI so that the AI will build vision improvements. Sample mod files are included to show you how it is done. Please Note, this mod component is meant as a mod enhancement similar to my Graded Invisibility Mod.
What are Vision Improvements?
Vision improvements are a new special type of improvement that either push back the fog of war when they are built for a given radius, allow certain invisible types to be seen for a certain radius or both. They can be built outside the working range of the city (but not outside of cultural borders) and work regardless of whether they are being “manned” or not. This mod includes all necessary AI so that the computer knows when and where to build AI improvements as well as recommend good vision builds to a human player. I would like to thank Blake for pointing me in the right direction on where to get started on this part of the mod!
How do they work?
All one has to do is build the improvement and the vision is improved for the tiles that are affected by the radius specified in new XML tags. The alteration relies on 4 new tags added to the CvImprovementInfos.xml schema and file. These tags are optional so you do not need to add these tags to all info types. Details on the new tags and how they should be used are included in the documentation.
IMPORTANT: Merging the SDK files
I wanted people to be able to merge this mod with or without my previously released “graded invisibility mod.” I recommend you check this mod out if you haven’t already because it goes very nicely with this one and allows for several new expanded options when using new (or even old) invisible types in your mod. VERY IMPORTANT: If you are using my Graded Invisibility mod you will need to uncomment sections in the SDK code for this mod with the prefix //GRADED: (remove the entire comment up to the colon). ALL of these commented “graded” lines are located in only one method in CvPlot.cpp (CvPlot::setImprovementVisibility(…. You do not need to make any other by-hand changes when merging the two mod components.
Credits
The graphics in the sample mod were generously provided by hrochland (sonar buoy and radar tower).
Lisence/When using or Modding this mod
1. Please give credit where credit is due.
2. Let me know if you want to use it (just for curiosity sake... i like to know if anyone else finds things like this useful).
3. Let me know of bugs, ideas, or significant enhancements you have made.
Note: I have left commented code lines that can be uncommented if you wish to debug the code upon changing or see what is going on during game execution. It also shows an example of how to “create” your own debug log files.
Future Plans
I would like to add code/a tag that will allow enemies, other players to “steal” the vision range/capabilities of the vision improvement if they have a unit on the same space as the improvement. This would allow an enemy to use your “guard tower” (an upcoming improvement in the Genetic Era Mod) if they had military on the same space on which it is built. I may also add python access to the new properties of CvImprovementInfo if people want me to.
ADDED:
The Files
I wanted to keep source files and the sample mod seperate but alas... I had to shuffle files to fit them under the 300k limit (the source/documentation files totaled 318k in zip format)
Vision Improvements
What are Vision Improvements?
Vision improvements are a new special type of improvement that either push back the fog of war when they are built for a given radius, allow certain invisible types to be seen for a certain radius or both. They can be built outside the working range of the city (but not outside of cultural borders) and work regardless of whether they are being “manned” or not. This mod includes all necessary AI so that the computer knows when and where to build AI improvements as well as recommend good vision builds to a human player. I would like to thank Blake for pointing me in the right direction on where to get started on this part of the mod!
How do they work?
All one has to do is build the improvement and the vision is improved for the tiles that are affected by the radius specified in new XML tags. The alteration relies on 4 new tags added to the CvImprovementInfos.xml schema and file. These tags are optional so you do not need to add these tags to all info types. Details on the new tags and how they should be used are included in the documentation.
IMPORTANT: Merging the SDK files
I wanted people to be able to merge this mod with or without my previously released “graded invisibility mod.” I recommend you check this mod out if you haven’t already because it goes very nicely with this one and allows for several new expanded options when using new (or even old) invisible types in your mod. VERY IMPORTANT: If you are using my Graded Invisibility mod you will need to uncomment sections in the SDK code for this mod with the prefix //GRADED: (remove the entire comment up to the colon). ALL of these commented “graded” lines are located in only one method in CvPlot.cpp (CvPlot::setImprovementVisibility(…. You do not need to make any other by-hand changes when merging the two mod components.
Credits
The graphics in the sample mod were generously provided by hrochland (sonar buoy and radar tower).
Lisence/When using or Modding this mod
1. Please give credit where credit is due.
2. Let me know if you want to use it (just for curiosity sake... i like to know if anyone else finds things like this useful).
3. Let me know of bugs, ideas, or significant enhancements you have made.
Note: I have left commented code lines that can be uncommented if you wish to debug the code upon changing or see what is going on during game execution. It also shows an example of how to “create” your own debug log files.
Future Plans
I would like to add code/a tag that will allow enemies, other players to “steal” the vision range/capabilities of the vision improvement if they have a unit on the same space as the improvement. This would allow an enemy to use your “guard tower” (an upcoming improvement in the Genetic Era Mod) if they had military on the same space on which it is built. I may also add python access to the new properties of CvImprovementInfo if people want me to.
ADDED:
The Files
I wanted to keep source files and the sample mod seperate but alas... I had to shuffle files to fit them under the 300k limit (the source/documentation files totaled 318k in zip format)