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 Jun 24, 2008, 08:05 PM   #1
AlleyGator
Chieftain
 
Join Date: Jun 2008
Posts: 11
Vanilla Civ4 Which XML file to modify

My question, I know to modify most things you do so in the XML files and I have been able to modify a few things such as the default color of certain civilizations, move points but what I can't figure out is how to make an existing unit specific to only 1 civilization and how do you change the units you start out with, both the kind of units and how many?

Thanks
AlleyGator
AlleyGator is offline   Reply With Quote
Old Jun 24, 2008, 08:16 PM   #2
primordial stew
Emperor
 
Join Date: Sep 2005
Location: a puddle
Posts: 1,206
Both are in: CIV4CivilizationInfos.xml
UU maybe not be so simple, it depends on the classes:

Code:
<Unit>
			<UnitClassType>UNITCLASS_PRAESIDIUM</UnitClassType>
			<UnitType>UNIT_ROMAN_PRAESIDIUM</UnitType>
</Unit>
So here I'm using a generic garrison class of unit, and under the Roman civ they get the Roman flavor of it.

Another way to make a unit buildable by only 1 civ is to require a unique tech, and have that tech enable the unit.
primordial stew is offline   Reply With Quote
Old Jun 25, 2008, 02:09 PM   #3
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Actually, no need to use the tech for that. In Civ4UnitClassInfos:
Code:
		<UnitClassInfo>
			<Type>UNITCLASS_STARBASE_I</Type>
			<Description>TXT_KEY_UNIT_STARBASE_I</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<iInstanceCostModifier>0</iInstanceCostModifier>
			<DefaultUnit>UNIT_STARBASE_I</DefaultUnit>
		</UnitClassInfo>
For example, if you wanted to make the Starbase buildable by only 1 civ, you would replace UNIT_STARBASE_I in DefaultUnit to NONE. Then you would do something similar to the unique units as detailed in the post above.
deanej is offline   Reply With Quote
Old Jun 25, 2008, 04:43 PM   #4
AlleyGator
Chieftain
 
Join Date: Jun 2008
Posts: 11
Thanks I was hoping it would not take creating a new tech, but in the text below, lets say for instance I wanted to make the cannon only available to 1 civ behind "DefaultUnit>UNIT_CANNON" I don't see any number 1 or 0 if I put DefaultUnit>UNIT_CANNON_0 would that do it or am I missing something?


Code:
<UnitClassInfo>
			<Type>UNITCLASS_GUNSHIP</Type>
			<Description>TXT_KEY_UNIT_GUNSHIP</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_GUNSHIP</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_CATAPULT</Type>
			<Description>TXT_KEY_UNIT_CATAPULT</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_CATAPULT</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_CANNON</Type>
			<Description>TXT_KEY_UNIT_CANNON</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_CANNON</DefaultUnit>
		</UnitClassInfo>
AlleyGator is offline   Reply With Quote
Old Jun 25, 2008, 08:06 PM   #5
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Just put "NONE" without the quotes. Then for the civ(s) you want to have the cannon:

Code:
<Unit>
			<UnitClassType>UNITCLASS_CANNON</UnitClassType>
			<UnitType>UNIT_CANNON</UnitType>
</Unit>
deanej is offline   Reply With Quote
Old Jun 26, 2008, 07:21 AM   #6
AlleyGator
Chieftain
 
Join Date: Jun 2008
Posts: 11
Thanks I'll give it a go

I tried that and got this error

Click image for larger version

Name:	XMLERROR.jpg
Views:	45
Size:	31.0 KB
ID:	181240

and this is the section of the XML file.


Code:
<UnitClassInfo>
			<Type>UNITCLASS_SCOUT</Type>
			<Description>TXT_KEY_UNIT_SCOUT</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_SCOUT</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_EXPLORER</Type>
			<Description>TXT_KEY_UNIT_EXPLORER</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_EXPLORER_NONE</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_SPY</Type>
			<Description>TXT_KEY_UNIT_SPY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>4</iMaxPlayerInstances>
			<DefaultUnit>UNIT_SPY</DefaultUnit>

Last edited by AlleyGator; Jun 26, 2008 at 08:29 AM. Reason: So not to double post
AlleyGator is offline   Reply With Quote
Old Jun 26, 2008, 11:56 PM   #7
Dryhad
Prince
 
Join Date: Feb 2006
Posts: 451
Quote:
Originally Posted by AlleyGator View Post
Thanks I'll give it a go

I tried that and got this error

Attachment 181240

and this is the section of the XML file.


Code:
<UnitClassInfo>
			<Type>UNITCLASS_SCOUT</Type>
			<Description>TXT_KEY_UNIT_SCOUT</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_SCOUT</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_EXPLORER</Type>
			<Description>TXT_KEY_UNIT_EXPLORER</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_EXPLORER_NONE</DefaultUnit>
		</UnitClassInfo>
		<UnitClassInfo>
			<Type>UNITCLASS_SPY</Type>
			<Description>TXT_KEY_UNIT_SPY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>4</iMaxPlayerInstances>
			<DefaultUnit>UNIT_SPY</DefaultUnit>
Well first of all I think what you mean is <DefaultUnit>NONE</DefaultUnit> rather than <DefaultUnit>UNIT_EXPLORER_NONE</DefaultUnit>. But more importantly, what's all this nonsense about FormationInfos? That's UnitClassInfos, not FormationInfos.
Dryhad is offline   Reply With Quote
Old Jun 27, 2008, 09:30 AM   #8
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Yes, <DefaultUnit>NONE</DefaultUnit> is what is needed. Also, what expansion pack is this for? BtS doesn't need modifications to Civ4FormationInfos, but Warlords and Vanilla may.
deanej is offline   Reply With Quote
Old Jun 27, 2008, 07:21 PM   #9
AlleyGator
Chieftain
 
Join Date: Jun 2008
Posts: 11
Quote:
Originally Posted by Dryhad View Post
Well first of all I think what you mean is <DefaultUnit>NONE</DefaultUnit> rather than <DefaultUnit>UNIT_EXPLORER_NONE</DefaultUnit>. But more importantly, what's all this nonsense about FormationInfos? That's UnitClassInfos, not FormationInfos.
Thanks I'll try <DefaultUnit>NONE</DefaultUnit> instead of the way I had it, and I have no idea about the formation infos cause i didn't touch that file.


@deanej
This isn't for any expansion I just have the CIV4 original game
AlleyGator is offline   Reply With Quote
Old Jun 27, 2008, 09:00 PM   #10
deanej
Deity
 
deanej's Avatar
 
Join Date: Apr 2006
Location: New York State
Posts: 4,859
Since you have vanilla, if you remove any units you will have to find every instance of that unit in Civ4FormationInfos and remove it from there. Unfortunately, the vanilla Civ4FormationInfos file is a huge mess, with everything jumbled together without any formatting to make it easier to read (no new lines for different elements, no tabs, etc.). There are cleaned up versions that are far easier to read on this site. If you add units they will also have to be added to Civ4FormationInfos.
deanej is offline   Reply With Quote
Old Jun 30, 2008, 08:03 PM   #11
AlleyGator
Chieftain
 
Join Date: Jun 2008
Posts: 11
@Dryhad Using <DefaultUnit>NONE</DefaultUnit> did work the way I wanted it to,THANKS

@deanej Thanks for the info I will keep it in mind but right now I am not wanting to completely remove any units, just restrict which civs have use of them.

AG
AlleyGator is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Which XML file to modify

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
Which order should I modify XML files (XML Hierarchy) ww2commander Civ4 - Creation & Customization 19 Apr 04, 2007 05:13 AM
How much interest in a program to modify CIV4TechInfos.xml automatically? Darva Civ4 - Creation & Customization 7 Apr 20, 2006 05:17 PM
Edit XML file or Create alternate file TripleGemini Civ4 - Creation & Customization 3 Jan 23, 2006 03:57 PM
Modify the Origional file? Please no .... weakciv Civ4 - Creation & Customization 19 Nov 04, 2005 11:15 AM
Looking for Application to Modify a .sav file I_batman Civ3 - General Discussions 4 Aug 27, 2005 12:21 PM


Advertisement

All times are GMT -6. The time now is 07:43 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