1)The resource icons (like religion icons, corporation icons, happy faces, etc) must be added to the GameFont.tga and GameFont_75.tga files (found under \Assets\res\Fonts), which is very hard to do properly unless you use
this utility program. It allows you to import .tga, .dds, and .png files, and to re-size and align them to fit the grid perfectly. (It also has handy features like easily adding gold starts for holy cities).
Associated those icons to a resource requires editing the resource's art define in Assets\XML\Art\CIV4ArtDefines_Bonus.xml.
Code:
<BonusArtInfo>
<Type>ART_DEF_BONUS_MANA_AIR</Type>
<fScale>1.0</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Terrain/Resources/mana_air/Uranium.nif</NIF>
<KFM>Art/Terrain/Resources/mana_air/Uranium.kfm</KFM>
<Button>Art/Interface/Buttons/WorldBuilder/Air.dds</Button>
<FontButtonIndex>36</FontButtonIndex>
</BonusArtInfo>
<fScale> controls how big the resource will appear on the map.
<fInterfaceScale> controls how big it will appear in the pedia.
<NIF> defines the model art itself.
<KFM> defines the model's animations (many resource are not animated and have nothing set here).
<Button> defines the button that shows up in the pedia.
<FontButtonIndex> tells the game where in GameFont.tga and GameFont_75.tga to look for the icons used in diplomacy, the city screen, the mana bar, etc. I'm not exactly sure how the game determined what index refers to what cell of the grid but if you add a new resource right after an old one you can just add 1 to the index that uses.
Associating a particular resource with its art define involves editing the <ArtDefineTag> of the resource in Assets\XML\Terrain\CIV4BonusInfos.xml
2) I've never tried to do this, but I think it involves editing Assets\XML\Gameinfo\CIV4DiplomacyInfos.xml
Code:
<DiplomacyInfo>
<Type>AI_DIPLOCOMMENT_DECLARE_WAR</Type>
<Responses>
<Response>
<Civilizations/>
<Leaders>
<Leader>
<LeaderType>LEADER_ALEXIS</LeaderType>
<bLeaderType>1</bLeaderType>
</Leader>
</Leaders>
<Attitudes>
</Attitudes>
<DiplomacyPowers>
</DiplomacyPowers>
<DiplomacyText>
<Text>AI_DIPLO_DECLARE_WAR_LEADER_CALABIM</Text>
</DiplomacyText>
</Response>
......
It seems that each response can be set for specific leaders as well as for specific civilizations. If both are used I'm not sure if that would apply only when said leader is of said civilization or for any leader of that civ plus any civ of that leader.
3) I'm not sure. I was thinking that it would be set in Assets\XML\Gameinfo/CIV4VictoryInfo.xml, but I don't see any tag for it there.
Assets\XML\Buildings\CIV4BuildingInfos.xml includes the <VictoryPrereq> tag which make you unable to build the building when that victory type is disabled, but I don't think that is actually required in order to make constructing it result in victory.
I just realized that there are some related tags in Assets\XML\Buildings\CIV4BuildingClassInfos.xml which might control it.
Code:
<BuildingClassInfo>
<Type>BUILDINGCLASS_TOWER_OF_MASTERY</Type>
<Description>TXT_KEY_BUILDING_TOWER_OF_MASTERY</Description>
<iMaxGlobalInstances>1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iExtraPlayerInstances>0</iExtraPlayerInstances>
<bNoLimit>0</bNoLimit>
<bMonument>0</bMonument>
<DefaultBuilding>BUILDING_TOWER_OF_MASTERY</DefaultBuilding>
[B] <VictoryThresholds>
<VictoryThreshold>
<VictoryType>VICTORY_TOWER_OF_MASTERY</VictoryType>
<iThreshold>1</iThreshold>
</VictoryThreshold>
</VictoryThresholds>[/B]
</BuildingClassInfo>
Note that the 4 towers which are prerequisites to he Tower of Mastery also have that victory set, although only the final Altar of the Luonnotar does. This may mean that the Tower of Mastery victory actually requires all 5 buildings, and if you give yourself the Tower of Mastery in worldbuilder before you get the Tower of Alteration than building that lesser tower might trigger your victory. The lesser Altars of the Luonnotar however are always removed when the next version is added, so you would only have one when you win.