View Full Version : Idoit's Guide to Civ4 Moding?


Tygari
Jul 20, 2009, 02:21 AM
OK I have spent the last 2 days looking up and down these forums at various programing guides hoping one would be simple enough for me to comprehend mew.
I have read several and other then most accurately understanding the definations between many of the things spoken about I am no closer to figuring out how to write a simple program mew.
I am on of those people that can not learn from reading how to books.
I have to get in and start working on it my own self.
Now I don"t need to jump right into the hardest stuff a tiny simple program that i can pull part and dechipher is all that i need to get going mew.
When I taught myself PHP I looked online for books that trained PHP mew.
I read them not that it did much good mew.
Then I copy pasted a tiny 6 line PHP program and ran it mew.
Then I ripped it apart in various ways till I understood each part of it mew.
Then I went back to the book and reread the parts that covered that program and I understood them mew.
I then read more of the book in tiny pieces with each Peace i would insert their examples into my first program and with each piece made the program and my understanding grow mew.
Three months later I was still teaching my self and that tiny itty bitty 6 line program had grown massive and become a large functioning program for an internet store mew.
Though it was broken into pieces and i was getting to the point where i would have to assemble them together into one unified program when life interseeded and I had to shelf the project and then i just never got back to it mew.
But I still remember how I taught myself the basics of PHP from that tiny little program mew.
I did the same when I learned HTML, C++ and Basic mew.
Is there any guides in here that are like that so I can try to learn enough to make my own simple little mods for civilizations, units, buildings, promotions, wonders, and projects mew?
Something like a bare bones of the program with each part layered out and explained would be great so i can have a working program to rip apart and play with till i understand it mew.

phungus420
Jul 20, 2009, 02:28 AM
If you know C++, just open up the SDK and start looking at it.

I had no knowledge of programming at all, but just used common sense to decipher alot of Python, alot of the Python in Civ4 is very intuitive. (some isn't though). Same with the XML, open it up, look at it, it's fairly obvious.

Of course the main thing is saying you want to write a little program says absolutely nothing. What exactly do you want to do?

This is the tutorial I first used, it's on how to add units. Gets you familiure with how the XML is interconnected and what not. Not being able to use that tutorial to add a new unit means that you fail at following directions, not that the tutorial is poor, or you have a different learning style. The tutorial is straitforward, it's just all about following directions. Also if you're wanting to do actual programming in Python or the SDK, the XML should be way below your level. So basically my main conclusion from your post is that you're skewing your abilities and perceptions, or that you're just not really trying and are using your post more for social reasons.

How to Add Units to Civ4 (http://forums.civfanatics.com/showthread.php?t=139721)

Tygari
Jul 20, 2009, 02:40 AM
Phungus
I tried opening up the files on my computer in the civ4 program both for civ4 and for BtS but I couldnt make heads or tails what I was looking at mew.
As I said I only managed to teach myself the basics of C++ no advanced stuff mew.
As for what I would like mew.
I just like to play Civ4 with my own player design civilization mew.
I leave the real programing to the experts who do things like that Legends of Revolutions mew.
Wow those guys are like gods compared to my skills mew.
When I look At the stuff t is like I can almost understand it but then it just falls apart mew.
Still I am sure with the right guild I can do most of this mew.
I am only concerned about the new ability on the unit and the projects being out of my range of ever hoping to manage mew.

This is all I wish to program mew.
1 Civilization
1 Trait
1 Building
1 Unit
2 Promotions
2 Projects

Leader Traits
Explorer, Protective

Starting Technology's
Fishing, Mysticism

Sniper Academy (Unique Military Academy)
Cost Great General (Moderate Disadvantage)
+4 Culture
+50% Military Unit Production
Gunpowder Units built in this city gain Sniper promotion.
Sniper promotion +2 Base Strength, +2 First Strike Chances

Assault Cycle (Unique Mechanized Infantry)
Cost 250 (Increased Cost Disadvantage)
Attack 32
Movement 3 (Increased Movement Advantage)
First Strike 1-2 (First Strike Advantage)
20% Interception Rate
-50% Opponent Evade Interception (New Ability Advantage)
Mobility Promotion (Free Promotion Change)
Access to Flanking 1 and Flanking 2

Trait Mod
Explorer -- Free Guerrilla I and Woodsman I promotions for Archery and Gunpowder units.
Double production speed of Granary and Monastery.

Destined Leader - 500 Hammers - Project
A civilization's leader gain's a 3rd leader trait chosen from the list of remaining traits.
Requirement Monarchy.

Legends - 1000 Hammers - Project
Units of the type of the LVL 12 Military Unit.
All units you make of the given type gain Legend Promotion
Requirement LVL 12 Military Unit
Legend: +2 Base Strength, +1-2 First Strikes, +10% Withdrawal Chance

As for that Guide I never found it mew.
Let me read it and get back to you mew.

PieceOfMind
Jul 20, 2009, 02:44 AM
I am on of those people that can not learn from reading how to books.
I have to get in and start working on it my own self.

You forgot to say mew.

Seriously though, as phungus said, just go to your game installation, and open the assets folder. In there you can head towards XML (easiest) or Python, or if you like the real nitty gritty go back and go into CvGameCoreDLL and look at the C++ files (hardest).

I should add, when you start to mod, don't alter the game's assets directly (like in the folders I just mentioned). Instead, copy them into the Assets folder of a mod, and work on them from there. That way you won't be permanently changing the game, and you can always undo any changes you make, especially ones that cause errors and crashes.

phungus420
Jul 20, 2009, 02:44 AM
You need to focus. Pick one goal and try to achieve that first, once you succede at that then begin a new project. My advice would be to first try to add a new unit to your game. Use the tutorial I linked above to do that. I'm also one of those people who learns by doing, instead of reading, and that tutorial is perfect for that as it is a clear set of directions you simply follow and when you're done you have added a new unit. If you hit a snag while doing that, post in the thread with specific information on what you are stuck on and someone will help point you in the right direction, this community, especially the modding community is very helpful.

phungus420
Jul 20, 2009, 02:48 AM
Seriously though, as phungus said, just go to your game installation, and open the assets folder. In there you can head towards XML (easiest) or Python, or if you like the real nitty gritty go back and go into CvGameCoreDLL and look at the C++ files (hardest).

I may be kind of an oddball in this respect, but I've honestly found the SDK to be more direct and simple to work with then the Python. At least since Xienwolf wrote his Idiot's guide to the DLL (http://forums.civfanatics.com/showthread.php?t=314201), that tutorial was awesome and has opened up alot of options to me. Maybe it's because I'm not a programmer and have no institutionally learned knowledge on coding, but really I've found the SDK to be less of a challenge to code functions into then the python, though when you code something that requires changing a header file it does take longer due to compiling times.

Tygari
Jul 20, 2009, 02:57 AM
What I asked for was a link to a guide that would help with my style of learning mew you were kind enough to provide one so I am reading it mew.
As for one of the things you two said of going into the game and just opening files and looking at the code mew. That ended up being one of my problems mew.
Though I understand a bit of the meanings in the file names to get a fague idea what was in the files i couldnt make heads or tails of what was in side them nor if what i was hoping to find was what I was looking for mew.
It honestly felt like files were missing but I know thats not possible since my game runs fine mew.
But like I just went looking for civ leader names to see what the all had in common and all i could find were 4 of the mew.
I have no idea where the rest are mew. Same goes for a lot of the rest of it mew. I just could not find it mew.

PieceOfMind
Jul 20, 2009, 03:04 AM
I may be kind of an oddball in this respect, but I've honestly found the SDK to be more direct and simple to work with then the Python. At least since Xienwolf wrote his Idiot's guide to the DLL (http://forums.civfanatics.com/showthread.php?t=314201), that tutorial was awesome and has opened up alot of options to me. Maybe it's because I'm not a programmer and have no institutionally learned knowledge on coding, but really I've found the SDK to be less of a challenge to code functions into then the python, though when you code something that requires changing a header file it does take longer due to compiling times.

I also prefer the C++ stuff, but probably only because in the past I've become familiar with java which is similar in many ways. Python is much more foreign to me and I have more trouble with it. Some of the conventions it adopts are not very natural IMO (how white space is handled for example).

I rate the SDK modifying to be reasonably tricky mainly because it's difficult to set up in the first place. It took me a while to get code::blocks compiling a working DLL, but once I had done that I agree it was then fairly straight forward.

phungus420
Jul 20, 2009, 03:10 AM
It took me a while to get code::blocks compiling a working DLL, but once I had done that I agree it was then fairly straight forward.

You really need to move on to MSV2005 instead of codeblocks ;)

The utility of a debug dll can't be understated. For instance let's say you add a few new ethnic units to your mod, and suddenly you start getting a crash. You can be reasonably sure somewhere in there you have screwed up and there is a typo in your UnitInfos, ArtDefinesUnit, or UnitArtstyles files, but you have no idea where it is. It can take hours (if not days) to track it down by in game testing means (I know I used to have to do things this way before I discovered how to make a debug dll). But with a degug dll you'll get an assert failure message like "Assert Failed, bla, bla, bla in CvGlobals.cpp "ART_DEF_UNIT_MYETHNICUNITT" doesn't exist. This means debugging something that used to take hours takes minutes. Anyway just my 2 :commerce: on the matter.

Tygari
Jul 20, 2009, 03:17 AM
OK this might be my problem and why i feel like the program is missing stuff mew.
I have no clue what .fpk file extention is nor is my computer able to read and unpack it as is asked by the guide mew.
Since the guide is assuming I am familiar with this file extention and already have the programs for it can some please explain to me what it is and what program to use on it mew?

phungus420
Jul 20, 2009, 03:22 AM
Well you really don't need to deal with packed art to add a new unit, as you'll be adding unique art models you download from the mod makers here. But if you want to unpack the main Civ4 art to look at it the utility program is here:

Pak Build Utility (http://forums.civfanatics.com/downloads.php?do=file&id=2384)

Civ4's packed art is found in the assets folder of the main Civilization4 directory, in the Art0-Art4 files, though most of the art you are interested in is in the Art0.fpk file

Tygari
Jul 20, 2009, 03:25 AM
Mew? now i am really confused mew. It asked for it right in the first part mew. If it isnt needed why did it ask me to go retrieve it mew?

phungus420
Jul 20, 2009, 03:29 AM
It's a very old guide, it was written before mod makers figured out how to make new units:
First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit. Since new models can't be created you will have to use an existing one. Copy the whole ...arts/units/warrior folder from the unpaked .fpk file and paste it in your assets folder (either of your mod or the custom one) keeping the file structure.
This doesn't apply anymore. Instead just download a model from the database for whatever unit you want to add.

Civilization4 Unit Graphics Database (http://forums.civfanatics.com/downloads.php?do=cat&id=5)

Tygari
Jul 20, 2009, 03:43 AM
oh, well cool mew, at this rate this thread will slowly become my own personal refrence guide mew. thanks again for the link and the help mew.
though I would like to keep reading and asking questions sleep is finally demanding I take a break mew. I get back to reading the guide as soon as i wake up mew.
thank you so much for the help mew.
this finally is beginning to feel doable for one such as me mew.

Ginger_Ale
Jul 20, 2009, 05:55 AM
Thread moved.

xienwolf
Jul 20, 2009, 09:38 AM
Honestly the way you describe that things work for you to learn them your best bet is to play the game for a while and get used to things, then open up one of the XML files and look for something which you are familiar with in game (like a warrior). Then look at the tags and find where his stats are stored (OK, he has 3 strength in game, so where do I find a 3, what is the field called?) And eventually choose a few numbers to change, load the game and see what those numbers did to him.

Doing this repeatedly will reveal to you what all of the XML means, and help you understand how to deal with modifications to the XML. Won't take long for you to be comfortable adding a completely new unit, promotion, or building of your own. Civilization adding might take longer, but by the time you have added your other bits you should be familiar enough with things to glance through an "Add a Civ" tutorial and be able to piece together what they are saying.

Tygari
Jul 20, 2009, 01:02 PM
xienwolf
yeah it would and that is exactly what i orginally tried to do mew. but I couldn"t find where that stuff was mew.
I looked and looked and looked but i jut could not find it mew.
Even now I am still looking and am unsure where that is mew.
well time to get back to reading the guide mew.

xienwolf
Jul 20, 2009, 02:10 PM
Right click on the shortcut you use to launch BtS, select PROPERTIES, then from the window that pops up, choose FIND TARGET. A file explorer window should open with an .exe file selected to launch BtS with. In that same folder you will see an ASSETS folder, that contains all modifiable data. Assets/XML is where most of the easier to identify portions are. Units being in Assets/XML/Units/CIV4UnitInfos.xml.

Open that file with Notepad or Notepad++ or some other text editor, and search for "Warrior" to find stats for the warrior unit (files are formatted such that indentation levels group items together, though indentation is not required for the data to properly parse for the game, it is done for readability. So all data indented as far as what you find with the search is data for the warrior unit)

Tygari
Jul 20, 2009, 07:17 PM
OK, After a lot of reading and a lot of playing around I managed to modify theses codings in an attempt at trying and get what I desire mew.

For a Civ mew:

<CivilizationInfo>
<Type>CIVILIZATION_KITSUNEKO</Type>
<Description>TXT_KEY_CIV_KITSUNEKO_DESC</Description>
<ShortDescription>TXT_KEY_CIV_KITSUNEKO_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_KITSUNEKO_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_KITSUNEKO_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_WHITE</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_KITSUNEKO</ArtDefineTag>
<ArtStyleType>ARTSTYLE_SPIRIT</ArtStyleType>
<bPlayable>1</bPlayable>
<bAIPlayable>1</bAIPlayable>
<Cities>
<City>TXT_KEY_CITY_NAME_Kitsuneko</City>
</Cities>
<Buildings>
<Building>
<BuildingClassType>BUILDINGCLASS_MILITARY_ACADEMY</BuildingClassType>
<BuildingType>BUILDING_SNIPER_ACADEMY</BuildingType>
</Building>
</Buildings>
<Units>
<Unit>
<UnitClassType>UNITCLASS_MECHANIZED_INFANTRY</UnitClassType>
<UnitType>UNIT_KITSUNEKO_ASSAULT_CYCLE</UnitType>
</Unit>
</Units>
<FreeUnitClasses>
<FreeUnitClass>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<iFreeUnits>1</iFreeUnits>
</FreeUnitClass>
</FreeUnitClasses>
<FreeBuildingClasses>
<FreeBuildingClass>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
<bFreeBuildingClass>1</bFreeBuildingClass>
</FreeBuildingClass>
</FreeBuildingClasses>
<FreeTechs>
<FreeTech>
<TechType>TECH_FISHING</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>
<FreeTech>
<TechType>TECH_MYSTICISM</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>
</FreeTechs>
<DisableTechs/>
<InitialCivics>
<CivicType>CIVIC_DESPOTISM</CivicType>
<CivicType>CIVIC_BARBARISM</CivicType>
<CivicType>CIVIC_TRIBALISM</CivicType>
<CivicType>CIVIC_DECENTRALIZATION</CivicType>
<CivicType>CIVIC_PAGANISM</CivicType>
</InitialCivics>
<Leaders>
<Leader>
<LeaderName>LEADER_KITSUNEKO</LeaderName>
<bLeaderAvailability>1</bLeaderAvailability>
</Leader>
</Leaders>
<DerivativeCiv>NONE</DerivativeCiv>
<CivilizationSelectionSound>AS3D_KITSUNEKO_SELECT</CivilizationSelectionSound>
<CivilizationActionSound>AS3D_KITSUNEKO_ORDER</CivilizationActionSound>
</CivilizationInfo>
</CivilizationInfo>


For a Trait mew:

Explorer -- Free Guerrilla I and Woodsman I promotions for Archery and Gunpowder units.
Double production speed of Granary and Monastery.


<TraitInfo>
<Type>TRAIT_EXPLORER</Type>
<Description>TXT_KEY_TRAIT_EXPLORER</Description>
<ShortDescription>TXT_KEY_TRAIT_EXPLORER_SHORT</ShortDescription>
<iHealth>0</iHealth>
<iHappiness>0</iHappiness>
<iMaxAnarchy>-1</iMaxAnarchy>
<iUpkeepModifier>0</iUpkeepModifier>
<iLevelExperienceModifier>0</iLevelExperienceModifier>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
<iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
<iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
<ExtraYieldThresholds/>
<TradeYieldModifiers/>
<CommerceChanges/>
<CommerceModifiers/>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_GUERILLA1</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
<FreePromotion>
<PromotionType>PROMOTION_WOODSMAN1</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<FreePromotionUnitCombats>
<FreePromotionUnitCombat>
<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
<bFreePromotionUnitCombat>1</bFreePromotionUnitCombat>
</FreePromotionUnitCombat>
<FreePromotionUnitCombat>
<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
<bFreePromotionUnitCombat>1</bFreePromotionUnitCombat>
</FreePromotionUnitCombat>
</FreePromotionUnitCombats>
</TraitInfo>

Insert Coding for buildings that get their speed doubled mew.
<ProductionTraits>
<ProductionTrait>
<ProductionTraitType>TRAIT_EXPLORER</ProductionTraitType>
<iProductionTrait>100</iProductionTrait>
</ProductionTrait>
</ProductionTraits>


For a Building mew:

Sniper Academy (Unique Military Academy)
Cost Great General (Moderate Disadvantage)
+4 Culture
+50% Military Unit Production
Gunpowder Units built in this city gain Sniper promotion.
Sniper promotion +2 Base Strength, +2 First Strike Chances


<BuildingInfo>
<BuildingClass>BUILDINGCLASS_MILITARY_ACADEMY</BuildingClass>
<Type>BUILDING_SNIPER_ACADEMY</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_SNIPER_ACADEMY</Description>
<Civilopedia>TXT_KEY_BUILDING_SNIPER_ACADEMY_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_ACADEMY_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_SNIPER_ACADEMY</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<bStateReligion>0</bStateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<FoundsCorporation>NONE</FoundsCorporation>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<GlobalCorporationCommerce>NONE</GlobalCorporationCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_MILITARY_SCIENCE</PrereqTech>
<TechTypes/>
<Bonus>NONE</Bonus>
<PrereqBonuses/>
<ProductionTraits/>
<HappinessTraits/>
<NoBonus>NONE</NoBonus>
<PowerBonus>NONE</PowerBonus>
<FreeBonus>NONE</FreeBonus>
<iNumFreeBonuses>0</iNumFreeBonuses>
<FreeBuilding>NONE</FreeBuilding>
<FreePromotion>PROMOTION_SNIPER</FreePromotion>
<FreePromotionUnitCombats>
<FreePromotionUnitCombat>
<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
<bFreePromotionUnitCombat>1</bFreePromotionUnitCombat>
</FreePromotionUnitCombat>
</FreePromotionUnitCombats>
<CivicOption>NONE</CivicOption>
<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
<iHurryAngerModifier>0</iHurryAngerModifier>
<bBorderObstacle>0</bBorderObstacle>
<bTeamShare>0</bTeamShare>
<bWater>0</bWater>
<bRiver>0</bRiver>
<bPower>0</bPower>
<bDirtyPower>0</bDirtyPower>
<bAreaCleanPower>0</bAreaCleanPower>
<DiploVoteType>NONE</DiploVoteType>
<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
<bCapital>0</bCapital>
<bGovernmentCenter>0</bGovernmentCenter>
<bGoldenAge>0</bGoldenAge>
<bAllowsNukes>0</bAllowsNukes>
<bMapCentering>0</bMapCentering>
<bNoUnhappiness>0</bNoUnhappiness>
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
<bNeverCapture>0</bNeverCapture>
<bNukeImmune>0</bNukeImmune>
<bPrereqReligion>0</bPrereqReligion>
<bCenterInCity>0</bCenterInCity>
<iAIWeight>0</iAIWeight>
<iCost>-1</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>-1</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iConquestProb>100</iConquestProb>
<iCitiesPrereq>0</iCitiesPrereq>
<iTeamsPrereq>0</iTeamsPrereq>
<iLevelPrereq>0</iLevelPrereq>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
<iAnarchyModifier>0</iAnarchyModifier>
<iGoldenAgeModifier>0</iGoldenAgeModifier>
<iGlobalHurryModifier>0</iGlobalHurryModifier>
<iExperience>0</iExperience>
<iGlobalExperience>0</iGlobalExperience>
<iFoodKept>0</iFoodKept>
<iAirlift>0</iAirlift>
<iAirModifier>0</iAirModifier>
<iAirUnitCapacity>0</iAirUnitCapacity>
<iNukeModifier>0</iNukeModifier>
<iNukeExplosionRand>0</iNukeExplosionRand>
<iFreeSpecialist>0</iFreeSpecialist>
<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
<iMaintenanceModifier>0</iMaintenanceModifier>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
<iEnemyWarWearinessModifier>0</iEnemyWarWearinessModifier>
<iHealRateChange>0</iHealRateChange>
<iHealth>0</iHealth>
<iAreaHealth>0</iAreaHealth>
<iGlobalHealth>0</iGlobalHealth>
<iHappiness>0</iHappiness>
<iAreaHappiness>0</iAreaHappiness>
<iGlobalHappiness>0</iGlobalHappiness>
<iStateReligionHappiness>0</iStateReligionHappiness>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iMilitaryProductionModifier>50</iMilitaryProductionModifier>
<iSpaceProductionModifier>0</iSpaceProductionModifier>
<iGlobalSpaceProductionModifier>0</iGlobalSpaceProductionModifier>
<iTradeRoutes>0</iTradeRoutes>
<iCoastalTradeRoutes>0</iCoastalTradeRoutes>
<iGlobalTradeRoutes>0</iGlobalTradeRoutes>
<iTradeRouteModifier>0</iTradeRouteModifier>
<iForeignTradeRouteModifier>0</iForeignTradeRouteModifier>
<iGlobalPopulationChange>0</iGlobalPopulationChange>
<iFreeTechs>0</iFreeTechs>
<iDefense>0</iDefense>
<iBombardDefense>0</iBombardDefense>
<iAllCityDefense>0</iAllCityDefense>
<iEspionageDefense>0</iEspionageDefense>
<iAsset>6</iAsset>
<iPower>6</iPower>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges/>
<RiverPlotYieldChanges/>
<GlobalSeaPlotYieldChanges/>
<YieldChanges/>
<CommerceChanges/>
<ObsoleteSafeCommerceChanges>
<iCommerce>0</iCommerce>
<iCommerce>0</iCommerce>
<iCommerce>4</iCommerce>
</ObsoleteSafeCommerceChanges>
<CommerceChangeDoubleTimes/>
<CommerceModifiers/>
<GlobalCommerceModifiers/>
<SpecialistExtraCommerces/>
<StateReligionCommerces/>
<CommerceHappinesses/>
<ReligionChanges/>
<SpecialistCounts/>
<FreeSpecialistCounts/>
<CommerceFlexibles/>
<CommerceChangeOriginalOwners>
<bCommerceChangeOriginalOwner>0</bCommerceChangeOriginalOwner>
<bCommerceChangeOriginalOwner>0</bCommerceChangeOriginalOwner>
<bCommerceChangeOriginalOwner>1</bCommerceChangeOriginalOwner>
</CommerceChangeOriginalOwners>
<ConstructSound/>
<BonusHealthChanges/>
<BonusHappinessChanges/>
<BonusProductionModifiers/>
<UnitCombatFreeExperiences/>
<DomainFreeExperiences/>
<DomainProductionModifiers/>
<BuildingHappinessChanges/>
<PrereqBuildingClasses/>
<BuildingClassNeededs/>
<SpecialistYieldChanges/>
<BonusYieldModifiers/>
<ImprovementFreeSpecialists/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_MILITARY</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
</Flavors>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
</BuildingInfo>


For a Unit mew:

Assault Cycle (Unique Mechanized Infantry)
Cost 250 (Increased Cost Disadvantage)
Attack 32
Movement 3 (Increased Movement Advantage)
First Strike 1-2 (First Strike Advantage)
20% Interception Rate
-50% Opponent Evade Interception (New Ability Advantage)
Mobility Promotion (Free Promotion Change)
Access to Flanking 1 and Flanking 2


<UnitInfo>
<Class>UNITCLASS_MECHANIZED_INFANTRY</Class>
<Type>UNIT_KITSUNEKO_ASSAULT_CYCLE</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_GUN</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_CITY_DEFENSE</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_KITSUNEKO_ASSAULT_CYCLE</Description>
<Civilopedia>TXT_KEY_UNIT_KITSUNEKO_ASSAULT_CYCLE_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_KITSUNEKO_ASSAULT_CYCLE_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bSabotage>0</bSabotage>
<bDestroy>0</bDestroy>
<bStealPlans>0</bStealPlans>
<bInvestigate>0</bInvestigate>
<bCounterSpy>0</bCounterSpy>
<bFound>0</bFound>
<bGoldenAge>0</bGoldenAge>
<bInvisible>0</bInvisible>
<bFirstStrikeImmune>0</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
<bCanMoveImpassable>0</bCanMoveImpassable>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<bSuicide>0</bSuicide>
<bHiddenNationality>0</bHiddenNationality>
<bAlwaysHostile>0</bAlwaysHostile>
<UnitClassUpgrades/>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_RESERVE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_COUNTER</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads/>
<CorporationSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>TECH_ROBOTICS</PrereqTech>
<TechTypes>
<PrereqTech>TECH_RIFLING</PrereqTech>
<PrereqTech>NONE</PrereqTech>
<PrereqTech>NONE</PrereqTech>
</TechTypes>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>250</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>3</iMoves>
<bNoRevealMap>0</bNoRevealMap>
<iAirRange>0</iAirRange>
<iAirUnitCap>0</iAirUnitCap>
<iDropRange>0</iDropRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<TerrainPassableTechs/>
<FeaturePassableTechs/>
<iCombat>32</iCombat>
<iCombatLimit>100</iCombatLimit>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<iFirstStrikes>1</iFirstStrikes>
<iChanceFirstStrikes>1</iChanceFirstStrikes>
<iInterceptionProbability>20</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>0</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>0</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>16</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>6</iAsset>
<iPower>36</iPower>
<UnitMeshGroups>
<iGroupSize>2</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>2</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>2</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_KITSUNEKO_ASSAULT_CYCLE</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_MACHINE</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_MOBILITY</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>


I believe to add a brand new ability like the the tracking systems to reduce an opponents evade interception is going to require a bit more complex programing and have to be done in DLL OR SDK mew.


For a Promotion mew:

Sniper promotion +2 Base Strength, +2 First Strike Chances


<PromotionInfo>
<Type>PROMOTION_SNIPER</Type>
<Description>TXT_KEY_PROMOTION_SNIPER</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>NONE</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<bLeader>0</bLeader>
<bBlitz>0</bBlitz>
<bAmphib>0</bAmphib>
<bRiver>0</bRiver>
<bEnemyRoute>0</bEnemyRoute>
<bAlwaysHeal>0</bAlwaysHeal>
<bHillsDoubleMove>0</bHillsDoubleMove>
<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
<iVisibilityChange>0</iVisibilityChange>
<iMovesChange>0</iMovesChange>
<iMoveDiscountChange>0</iMoveDiscountChange>
<iWithdrawalChange>0</iWithdrawalChange>
<iCollateralDamageChange>0</iCollateralDamageChange>
<iBombardRateChange>0</iBombardRateChange>
<iFirstStrikesChange>0</iFirstStrikesChange>
<iChanceFirstStrikesChange>2</iChanceFirstStrikesChange>
<iEnemyHealChange>0</iEnemyHealChange>
<iNeutralHealChange>0</iNeutralHealChange>
<iFriendlyHealChange>0</iFriendlyHealChange>
<iSameTileHealChange>0</iSameTileHealChange>
<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
<iCombatPercent>0</iCombatPercent>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<iKamikazePercent>0</iKamikazePercent>
<iRevoltProtection>0</iRevoltProtection>
<iCollateralDamageProtection>0</iCollateralDamageProtection>
<iPillageChange>0</iPillageChange>
<iUpgradeDiscount>0</iUpgradeDiscount>
<iExperiencePercent>0</iExperiencePercent>
<TerrainDefenses/>
<FeatureDefenses/>
<UnitCombatMods/>
<DomainMods/>
<TerrainDoubleMoves/>
<FeatureDoubleMoves/>
<UnitCombats/>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/Promotions/Combat1.dds,Art/Interface/Buttons/Promotions_Atlas.dds,8,2</Button>
</PromotionInfo>


I noticed while doing this one that there only seems to be percentile boosts of the strength stat mew. This makes it impossible to add a simple +2 to a Unit mew. This means programing in DLL or SDK will be required to make this simple alteration from a Promotion mew.


As for the Project I was thinking of giving a paw at they proved to be completely undoable with just XML and will require DLL or SDK to be programed mew.
So for those who have replied with help and offerings thank you mew. Also can you double check my coding to make sure I did it correctly and kept it BtS compatable mew?
I will also need to mod a leader for my civ but when i looked at the programing under a leader i actually got scared mew.
Then I need to learn how to tie it all together as a mod back that my civ4 game can use without having to directly change the core game programs mew.
I wonder if there is anything else I need to do to make this dream of a personal empire design complete mew?

xienwolf
Jul 21, 2009, 01:47 AM
use instead of just Makes it more readable by maintaining the tabs

Tygari
Jul 21, 2009, 12:11 PM
xienwolf
Oh sorry mew.
I will remember that mew.
Should I repost it fixed like that or is it fine as is mew?
Also should I redo these to LoR or keep them as is for BtS mew?

xienwolf
Jul 21, 2009, 07:04 PM
You could just edit your previous post to include the [code] tags. Not sure what LoR is.

TC01
Jul 21, 2009, 10:26 PM
You could just edit your previous post to include the [code] tags. Not sure what LoR is.

I think it's Legends of Revolution.

Tygari
Jul 22, 2009, 01:59 AM
OK, its fixed mew.
And yes LoR is Legends of Revolution mew.

xienwolf
Jul 22, 2009, 11:48 AM
You'll want more than 1 city name most likely, but not required.

The double </CivilizationInfo> at the end will cause problems, hopefully it is a copy/paste error on the forums, not in your code.

Everything else seems pretty good. And for a leader, just copy/paste another leader who acts like you want yours to act for the most part, then shift a few numbers up/down a little bit and call it good.

Tygari
Jul 22, 2009, 03:48 PM
Thanks mew.
It was all pretty simple once I knew where to find the stuff and what I was looking at it mew.
That first step always seems the hardest mew.
Now to look into the DLL and SDK programing mew.
But I suffer the same problem mew.
I don't know exactly where to find the DLL and SDK coding mew.
I would really like to try to get the new ability I designed for the unit up and running if at all possible mew.

Also the trait was simplified from what it originally was due to it being to complicated mew.
I like to give a shot at maybe fixing it back to what I originally wrote mew.
Course the name explorer isn't quite what I wish for either but I can't quite think of a proper name mew...
I wish for the trait name to be a civ trait the emphasises nature mew.
I originally thought naturalist but when I looked it up I found out that is in reference to a the nudist life style and that is NOT what I have in mind mew. What I desire is name that honors and cherishes nature mew.
I had the idea of what about a civ trait that allowed a civ's city's to be built on a forest square without destroying the forest leaving it the forest defensive bonus mew?
Also originally it was recon and gunpowder units that got the free guirrella and woodsman promotions not archery mew.
As for double production on buildings none quite fit except monastary mew.
Monastary's in old times were often built with nature in mind so as to not harm the natural surroundings but rather work with them and blend in mew.
Monastaries were out in the wilderness and wished to be hidden and require no dependancy on any near by community centers if there were any close by mew. Many were to far out to even have that as an option mew.

xienwolf
Jul 22, 2009, 04:09 PM
Follow the Idiot's Guide for the DLL. As for WHERE the code is, BtS folder contains a folder called "CvGameCoreDLL" which holds all the code. But Python/XML you just edit and you are good. DLL you need to edit THEN COMPILE and you are good. Hence the guides you will find on the forums for how to set up a compiler. (linked early in the Idiot's Guide)