Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Nov 01, 2005, 06:23 PM   #1
tndp
Chieftain
 
Join Date: Nov 2005
Posts: 16
Adding new bonuses - anyone know what these cryptic XML tags do?

This post has been stripped of all tabs - can I post in plaintext on this system?

Firstly, the schema that I'm having trouble with:
Schema itself is in CIV4TerrainSchema.xml
But I'll excerpt from CIV4BonusInfos.xml
Spoiler:
Code:
		<BonusInfo>
			<Type>BONUS_ALUMINUM</Type>
			<Description>TXT_KEY_BONUS_ALUMINUM</Description>
			<Civilopedia>TXT_KEY_BONUS_ALUMINUM_PEDIA</Civilopedia>
			<BonusClassType>BONUSCLASS_MODERN</BonusClassType>
			<ArtDefineTag>ART_DEF_BONUS_ALUMINUM</ArtDefineTag>
			<TechReveal>TECH_INDUSTRIALISM</TechReveal>
			<TechCityTrade>TECH_MINING</TechCityTrade>
			<TechObsolete>NONE</TechObsolete>
# Self-explanatory, I believe.
			<YieldChanges>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>0</iYieldChange>
			</YieldChanges>
# Seems to be food, production, trade. Bonuses from mine are specified elsewhere, but that's not a problem.
			<iAITradeModifier>10</iAITradeModifier>
# I assume higher is more desirable to the AI.
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
# Again, self explanatory.
			<iPlacementOrder>2</iPlacementOrder>
# Okay - this is the order in which they're placed, maybe? Values in "placementorder" appear more than once, though. Hit Movies etc. are placement -1.
			<iConstAppearance>100</iConstAppearance>
# Maybe this is the frequency? It is always either 100, 50 or 0. Tripling every value in the file has no noticeable effect. Changing to 0 probably deletes the resource (see Hit Movies, for example) but that doesn't prove much.
			<iMinAreaSize>3</iMinAreaSize>
# .. What? Maybe this has something to do with the minimum sparseness? I've noticed that two resources of *different* types are never adjacent. Always 3, except for sea resources, which are 10. Dramas etc. are -1.
			<iMinLatitude>0</iMinLatitude>
			<iMaxLatitude>90</iMaxLatitude>
# Self explanatory - latitude ranged allowed.
			<Rands>
				<iRandApp1>10</iRandApp1>
				<iRandApp2>10</iRandApp2>
# On the other hand, this also looks suspiciously like a random number for frequency. This might be clumping frequency, though. Both 10 for all production resources, both 25 for all others.
				<iRandApp3>0</iRandApp3>
				<iRandApp4>0</iRandApp4>
# Always 0. For making clumps with three or four members in them?
			</Rands>
			<iPlayer>100</iPlayer>
# 100, 67 or 0. I don't see a pattern.
			<iTilesPer>0</iTilesPer>
# Either 0 or a power of 2. Sparseness? Again, might impact frequency.
			<iMinLandPercent>0</iMinLandPercent>
# Always 0, so I didn't touch it. Should try experimenting with this one (may do the obvious).
			<iUnique>0</iUnique>
# Can be any value, no pattern. No idea.
			<iGroupRange>0</iGroupRange>
# 0 or 1. Might de-uniqueify placement order?
			<iGroupRand>0</iGroupRand>
# Usually 0, but is 25 or 50 for some luxuries. Maybe has something to do with continent-specification?
			<bArea>0</bArea>
# 1 for land-based non-production resources. What is an Area?
			<bHills>1</bHills>
			<bFlatlands>0</bFlatlands>
			<bNoRiverSide>0</bNoRiverSide>
# Self-explanatory, 1->you can find it there (except riverside).
			<bNormalize>0</bNormalize>
# Mostly 0, sometimes 1. No idea.
			<TerrainBooleans>
				<TerrainBoolean>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
				<TerrainBoolean>
			<FeatureBooleans/>
			<FeatureTerrainBooleans/>
# I've deleted the other examples - you add one of these blocks for each terrain type in which the bonus can be generated.


Anyway, if anyone has already done extensive experiments (or just knows) what these things do, and can fill out the rest of the tags, I'd appreciate it greatly.

I'm particularly interested in the rarity numbers - all of them are pretty much the same (so I could just copy and modify an existing instance) but while I'm adding new resources I'd like to make some of them rarer than others - otherwise, iron and copper become impossible to obtain - alternatively, I could make bonuses more common overall, which I think is more fun anyway.

I've done some experiments but fiddling with these numbers but I don't see a huge impact. At the moment, I can't even figure out where in the python code the bonuses are added to the random map - are the bonuses just considered features? They don't seem to be called "bonuses" in the perl code (except where it deals with documentation)? I have to look through CvMapScriptInterface.py, actually - might be in there somewhere and just never used.

/cygdrive/c/Program Files/Firaxis Games/Sid Meier's Civilization 4/Assets/Python
$ grep -ci bonus *.py */*.py */*/*.py | grep -v :0
CvAdvisorUtils.py:17
CvDebugTools.py:6
CvUtil.py:1
PyHelpers.py:146
EntryPoints/CvMapScriptInterface.py:21
EntryPoints/CvScreensInterface.py:10
Screens/CvDebugInfoScreen.py:22
Screens/CvForeignAdvisor.py:21
Screens/CvMainInterface.py:53
Screens/CvPediaBonus.py:51
Screens/CvPediaBuilding.py:5
Screens/CvPediaHistory.py:8
Screens/CvPediaImprovement.py:12
Screens/CvPediaMain.py:19
Screens/CvPediaUnit.py:8
Screens/CvScreenEnums.py:1
Screens/CvTechChooser.py:19
Screens/CvWorldBuilderScreen.py:20
pyWB/CvWBDesc.py:8

No mention that I can see in any of the random map generation stuff.

Anyway, there are a bunch you might profitably add:
Tobacco is a luxury, made obsolete by Genetics (as people stop smoking it.)

Chocolate, coffee and tea are all luxuries.

Guano deposits are important for military purposes post gunpowder but pre-WWI - window is slightly narrower than the one for whales.

Oysters are a luxury found in sea hexes.

Honey makes mead - you could build wineries on the hexes.

Cedar is a luxury that appears only in forests - they are collected using timbermills. There are some other luxury woods - Ebony and Mahogany, for example.

Rubber is a construction material (+1 hammer) found only in jungles. It could halve the price of some wonders, I suppose.

The "gems" resource clearly represents corundum (rubies, sapphires) or possibly beryl (emerald) and is not interchargable with diamond, which is a luxury and may have military or industrial applications late in the game (subject to another mod, probably). There are several types of gems in the ancient world, which were definitely traded for each-other, so we might also add "jewels", meaning there would be three types to trade.

Platinum never played an important role in the ancient old world, but that is an accident of history and geology - the inca knew it used it.

Last edited by tndp; Nov 02, 2005 at 01:49 PM.
tndp is offline   Reply With Quote
Old Nov 01, 2005, 06:54 PM   #2
wilcoxchar
Warlord
 
Join Date: Oct 2005
Posts: 119
Perhaps we could add tin, and make ancient units require either copper and trin or iron
wilcoxchar is offline   Reply With Quote
Old Nov 02, 2005, 09:32 AM   #3
Gerikes
User of Run-on Sentences.
 
Gerikes's Avatar
 
Join Date: Jul 2005
Location: Massachusetts
Posts: 1,753
Quote:
Originally Posted by tndp
This post has been stripped of all tabs - can I post in plaintext on this system?
Try posting the code surrounded by "code" blocks by surrounding the code with [code] and [/code].

Code:
To make this code...

	I surrounded it with "code" blocks.
And if it's really big, maybe put is in a spoiler by doing [spoiler][code]Put code here[/code][/spoiler]

Spoiler:
Code:
This could be used for longer segments that may take up the full screen.
	Of course, it's not necessary, but makes the post readable I think.


Codes and examples here
__________________
MODDDDDS INNNNNN SPAAAAAAAACE

Last edited by Gerikes; Nov 02, 2005 at 09:37 AM.
Gerikes is offline   Reply With Quote
Old Nov 02, 2005, 01:50 PM   #4
tndp
Chieftain
 
Join Date: Nov 2005
Posts: 16
Thanks much.
tndp is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Adding new bonuses - anyone know what these cryptic XML tags do?

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone know what these XML tags do? tsentom1 Civ4 - Creation & Customization 8 May 06, 2008 07:24 PM
adding XML tags with SDK juni_be_good Civ4 - Creation & Customization 26 Dec 16, 2006 07:19 PM
Adding new tags to the game? alpaca Civ4 - Creation & Customization 2 Oct 11, 2006 06:06 AM
Creating new XML tags Slynky Civ4 - Creation & Customization 5 Jul 13, 2006 04:30 AM
New XML Tags n003lb Civ4 - Creation & Customization 6 Dec 01, 2005 12:44 PM


Advertisement

All times are GMT -6. The time now is 10:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR