Help with Att/def bonuses/penalties, apostolic and UN

Jayman1000

Prince
Joined
May 6, 2006
Messages
322
I'm fiddling a little around with modding and wants to do some stuff I don't know where to begin doing, so hoping for a little help here for some of my questions :-)

1. I want to mod specific units to always have a penalty to combat on defense and always have a bonus on attack.

I'm thinking on using this for example for cavalry and cannons, like +10% to attack and -10% to defense, to simulate their strenght in offense and weakness in defense.

I'm looking to know what value in the CIV4UnitInfos.xml should I edit?

2. How to give bonus combat to units depending on terrain they are attacking from and to? I am thinking of for example giving archers or cavalry combat bonus for when attacking from hills to flat terrain etc. plains/grassland/tundra. Additionally how to make that attack bonus NOT apply when attacking to a plot with for example a forest?

Also I would like to do the same with withdrawal rate, so that a bonus withdrawal rate will apply/not apply depending on what terrain is attacked from and to.

I'm not sure if this will it be very difficult or too complicated to do?

3. For my scenario/mod I don't want to include diplomatic victory, but I still very much like the Apostolic and UN votes and decisions and their effects. Is it possible to make Apostolic Palace and UN Nations buildable even though diplomatic victory is not enabled for the scenario?

4. I want to have the music from Renaissance and Industrial play in both renassaince, industrial and modern age. Also I dont want the music from Modern age to play at all. I want to do this in a smart way. I know I could just copy the music files to my mod, but that would make it excessively large. There must be a more clever way of doing this inside xml files? :-)
 
3) Set Victory Requirements to None just like other buildings
 
2) there are unused tags in the promotionInfos, which can do that.
-> create a new promotion, and give them to the units as starting promotion.

For the usage of t he tags:
PHP:
			<TerrainDefenses>
				<TerrainDefense>
					<TerrainType>TERRAIN_GRASS</TerrainType>
					<iTerrainDefense>20</iTerrainDefense>
				</TerrainDefense>
				<TerrainDefense>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<iTerrainDefense>20</iTerrainDefense>
				</TerrainDefense>				
			</TerrainDefenses>

3) or remove the option to vote for diplomatic victory for both wonders and let the victory stay active.

4) XML\GameInfo\EraInfos.xml
There it's decided which music is played in which area. Just adding the song entries from the one era to the others (and so on) should do it.
 
1) The ugly way will be use the terrain/combat class modifier tags and give it bonus to all terrains/combat class on attacks and the opposite for defense or vice versa
 
Hey all, sry for my late reply, and thank you for all your information, very useful! :-)
 
Back
Top Bottom