GUIDE: Adding new units

Thanks again!

i got it working. :)

Here is beta version:
my.php

looks cool, glad I could help... :goodjob:
 
No no no! I know xml just fine. everything else is messed up. if i ask another question you are going to say you already told me but 1/2 of the things you say are confusing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I dont have the documents and settings/watever/watever/civ4/customassets so i have no clue where to put it!!! :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Ive been to all the pages you sugested none of them help.



I Need HELP!!!
 
Is there any make that every civilization can create only 1 unit at time.

Example, i created special Warlord units and i want that every civilization can create only one at time.
 
Is there any make that every civilization can create only 1 unit at time.

Example, i created special Warlord units and i want that every civilization can create only one at time.

Well if you want to limit the # of units like the spy or the missionary unit... its pretty easy...

copy and edit the CIV4UnitClassInfos.xml file

for easier reference on how to do it then find the spy unit like this:

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_SPY</Type>
			<Description>TXT_KEY_UNIT_SPY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			[COLOR="Blue"]<iMaxPlayerInstances>3</iMaxPlayerInstances>[/COLOR]
			<DefaultUnit>UNIT_SPY</DefaultUnit>
		</UnitClassInfo>


Notice:
<iMaxPlayerInstances>3</iMaxPlayerInstances>

change that to 1 and a civ can only make 1 of them at a time

FYI:

<iMaxGlobalInstances> = # a times this can be built for all civs (Usually a World Wonder/Unit - only one civ can make it)

<iMaxTeamInstances> = # a times this can be built for civs on the same team (Usually in the teams maps)

<iMaxPlayerInstances> # a times this can be built for one civ (Usually a National Wonder/Unit)


-1 = Unlimited

any other number specifies # of units can be made

this also applies to buildings in the CIV4BuildingClassInfos.xml file

REMEMBER: You would have to change this # for the special warlords unit you created. so look in that CIV4UnitClassInfos.xml file you edited for that particular unit you modded and change the # accordingly.



NOTE: For more info on the meanings of XML taglines go here:

http://civ4wiki.com/wiki/index.php/Xml_files

unfortunately it is not complete... but it has alot of info


Hope that helps ;)
 
Its worked, but now i have another problem. When i start game in future era there is 3 Warlord units in start. How can i put this off? I know how to put units off, so there isnt any units in start of game, but isnt there anyway to set what units you have in start of game?


And other problem is that i want my Hovercraft unit can go in water and land. I already asked in Hovercraft topic, there answer was to use flying mod, but its not working with warlord. So is there any other way?
 
Its worked, but now i have another problem. When i start game in future era there is 3 Warlord units in start. How can i put this off? I know how to put units off, so there isnt any units in start of game, but isnt there anyway to set what units you have in start of game?...

well that's a little bit tricky for me since I have messed with the this in my mod... with mixed results (Im suspecting alittle python in here)

however you can try to change the start units by:


CIV4EraInfos.xml file:

Code:
		<EraInfo>
			<Type>ERA_FUTURE</Type>
			<Description>TXT_KEY_ERA_FUTURE</Description>
			<Strategy>TXT_KEY_ERA_FUTURE_STRATEGY</Strategy>
			<bNoGoodies>1</bNoGoodies>
			<bNoAnimals>1</bNoAnimals>
			<bNoBarbUnits>1</bNoBarbUnits>
			<bNoBarbCities>1</bNoBarbCities>
[COLOR="Blue"]			<iStartingUnitMultiplier>3</iStartingUnitMultiplier>
			<iStartingDefenseUnits>3</iStartingDefenseUnits>
			<iStartingWorkerUnits>3</iStartingWorkerUnits>
			<iStartingExploreUnits>2</iStartingExploreUnits>[/COLOR]
...
...
...

and making them 0

and checking the CIV4CivilizationInfos.xml file:


Code:
		<CivilizationInfo>
			<Type>CIVILIZATION_AMERICA</Type>
			<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
...
...
...
			<Buildings/>
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_MARINE</UnitClassType>
					<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
				</Unit>
			</Units>
			<FreeUnitClasses>
			[COLOR="Blue"]	<FreeUnitClass>
					<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
					<iFreeUnits>1</iFreeUnits>
				</FreeUnitClass>[/COLOR]
			</FreeUnitClasses>


changing that to look like this:
(Im not sure but I think this what it should look like)

Code:
[COLOR="Blue"]<FreeUnitClasses/>[/COLOR]


You have to do it to ALL civ tagline entries (yes all civs) in that file! :crazyeye:

and I think that should do it :goodjob:


note that this would be for the vanilla version... Im not sure about warlords... you would have to check on the warlord files :mischief:

if that doesnt work...it may also need some python tweaks which I cannot do :sad:

hope that helps ;)


...And other problem is that i want my Hovercraft unit can go in water and land. I already asked in Hovercraft topic, there answer was to use flying mod, but its not working with warlord. So is there any other way?

sorry thats python/sdk and I dont know how to program that... ask the original author of the flying mod and see if he will update it to work in warlords... I also know some other modders are updating things to warlords.... so ask them :p
 
Hehe, its me again.
I got problem, is there any way to write own custom text to units special abilities box, Here is picture:
my.php


I wanna know because, i have added few unique units and they dont see there that they are unique units. I isnt important but if is possible to fix would bee cool. Same things is in WW2 mod too. It would clearer to see what units are UU.


By the way, in that picture you can see that it its uu, this problem comes only when adding units by that they dont replace any unit.

I hope you understand what i mean. :)
 
Hehe, its me again.
I got problem, is there any way to write own custom text to units special abilities box, Here is picture:
my.php

...

er yes and no :crazyeye:

basically the stats are based off the info you put in the tagline for that UU

so you can effect that box but changing the UU's city attack from (Example only) +10% and +15% then in that box it will display +15% vs Cities


but you cant write in your personal info there....

the info there only displays what info you put in the UU taglines data in CIV4UnitInfos.xml file

so the characteristics in that box will change if you edit/add/remove data in the taglines for that unit


but you cant just '"write in" your own info

you can change History text in the civilopedia if you wish (basically change the description .. but UU technically use the same info as normal units)

you can make your own units that a civ can make by themselves and no one else can you...where you can change the history text in the civilopedia that is different than the default text (basically like a UU) but it is alittle more complicated but not necessary hard to xml edit it... and I digress off topic :p


I hope that makes sense :mischief:


...I wanna know because, i have added few unique units and they dont see there that they are unique units. I isnt important but if is possible to fix would bee cool. Same things is in WW2 mod too. It would clearer to see what units are UU...

have you added the UU to the civs that have that you want to have that UU? (CIV4CivilizationInfos.xml file)

just look in that file for the US Navy Seal (UU for America replaces Marine)
and see how the info taglines are used... then follow that example... with your custom UU and put it for the that Civs you want to have as UU


(or just follow the tut I posted earlier :rolleyes: )




By the way, in that picture you can see that it its uu, this problem comes only when adding units by that they dont replace any unit.

I hope you understand what i mean. :)

hmmm not sure... but check to see you are adding it to CIV4CivilizationInfos.xml file (as mentioned above)

of course following the correct example (tagline info/etc)

hope that helps ;)
 
I am mean that example i want add KV-1 tank, i just learned way how to add that tank to russia and it doesnt replace any unit like unique units usually do.
In normal way i ofcourse know how to put unique units and it works perfect, just when i do that new way, units special abilities doesnt show that its unique unit.
But that doesnt matter, i write to units description that whos unique units it is. :)
 
I am mean that example i want add KV-1 tank, i just learned way how to add that tank to russia and it doesnt replace any unit like unique units usually do.
In normal way i ofcourse know how to put unique units and it works perfect, just when i do that new way, units special abilities doesnt show that its unique unit.
But that doesnt matter, i write to units description that whos unique units it is. :)

well you have to keep the class the same but the type needs to change:
(CIV4UnitInfos.xml file)

Code:
		<UnitInfo>
[COLOR="Blue"]			<Class>UNITCLASS_MARINE</Class>
			<Type>UNIT_AMERICAN_NAVY_SEAL</Type>[/COLOR]
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>


then you have to add to the type to your CIV4CivilizationInfos.xml file:

Code:
		<CivilizationInfo>
			<Type>CIVILIZATION_AMERICA</Type>
			<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
...
...
		<ArtDefineTag>ART_DEF_CIVILIZATION_AMERICA</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>
			<Cities>
				<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
				<City>TXT_KEY_CITY_NAME_NEW_YORK</City>
				<City>TXT_KEY_CITY_NAME_BOSTON</City>
...
...			</Cities>
			<Buildings/>
			<Units>
[COLOR="Blue"]				<Unit>
					<UnitClassType>UNITCLASS_MARINE</UnitClassType>
					<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
				</Unit>[/COLOR]
			</Units>

this replaces the marine unit

now if you did that for the russian tank and add it to the russian civ then it should replace the regular tank...

again are you sure you added the UU to the russian civ in the CIV4CivilizationInfos.xml file???




what special abilities are you adding?

most of the taglines will show... but I know some dont show... (they still work but I guess they sometimes it doesnt appear in Civilopedia)


check to make sure all files are in the correct mod/custom assets folder too! :crazyeye:

please explain further if it is still not working and you added those changes...

;)


check the syntax of your taglines to make sure you arent missing data/info or tagline puncuation
 
Ok this is the other style i use, whit it you can add unique units to civilization and it doesnt replace anything.
CIV4UnitClassInfos:
<UnitClassInfo>
<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>
CIV4UnitInfos:
<Class>UNITCLASS_ROCKET_ARTILLERY</Class>
<Type>UNIT_SDKFZ251ROCKET</Type>
CIV4CivilizationInfos:
<Unit>
<UnitClassType>UNITCLASS_ROCKET_ARTILLERY</UnitClassType>
<UnitType>UNIT_SDKFZ251ROCKET</UnitType>
</Unit>

And now its german unique unit and it doesnt replace anything. :) And other civilizations dont get any units, and this i wanted. :)

Only problem is that that now it doesnt show in civilopedia that is german uu.
But like i said before that doesnt matter, but i just asked is there any way. in normal way i can units working normally. :)

And yes i tryed all what you just said.

Like i said before this same tactic was used in WW2 mod, there too you can see about 1 unique units in civilopedia, but really almost all units are some civilization unique units like tigers tanks are german, but in pedia nothing reads abouts it is uu.

PS. i have tested this ofcourse, SDKFZ251ROCKET is germans uu, any other civilization cant do it.

Again my text is very confusing. i hope you understand it
 
Ok this is the other style i use, whit it you can add unique units to civilization and it doesnt replace anything.
CIV4UnitClassInfos:
<UnitClassInfo>
<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>
CIV4UnitInfos:
<Class>UNITCLASS_ROCKET_ARTILLERY</Class>
<Type>UNIT_SDKFZ251ROCKET</Type>
CIV4CivilizationInfos:
<Unit>
<UnitClassType>UNITCLASS_ROCKET_ARTILLERY</UnitClassType>
<UnitType>UNIT_SDKFZ251ROCKET</UnitType>
</Unit>

And now its german unique unit and it doesnt replace anything. :) And other civilizations dont get any units, and this i wanted. :)

Only problem is that that now it doesnt show in civilopedia that is german uu.
But like i said before that doesnt matter, but i just asked is there any way. in normal way i can units working normally. :)

And yes i tryed all what you just said.

Like i said before this same tactic was used in WW2 mod, there too you can see about 1 unique units in civilopedia, but really almost all units are some civilization unique units like tigers tanks are german, but in pedia nothing reads abouts it is uu.

PS. i have tested this ofcourse, SDKFZ251ROCKET is germans uu, any other civilization cant do it.

Again my text is very confusing. i hope you understand it



Im thinking that it's what I stated previously stated

you can make units where it DOESNT replace default units but it is only available to one civ

technically it ISNT a UU because it doesnt replace a default unit...

it has the same characteristics as a UU, but is only available to one civ

so that's why the civilopedia doesnt recognize it as a UU :crazyeye:


I have done this before with Wonders and Units.... I made it where to make a special Unit, you need to build that specific World Wonder

and since it's a world wonder no one else can make that wonder after you make it....

therefore since you built that world wonder...that means you can only build that Special Unit and no one else can....

yet this special unit doesnt replace any default unit.... therefore my civilopedia will not state it is a UU (but requires that World Wonder to be built)

:crazyeye: :crazyeye: :crazyeye:

I did this with the my World Wonder called The Royal Indian Academy which can create the Sepoy special unit.... The sepoy unit is based off of the default rifleman unit but with better/special abilities...

yet when you make the Royal Indian Academy, you can make Sepoy units AS WELL as rifleman units....


see my thread (in my sig) for details

I think thats what you did for your unit....


HOWEVER:
This highlight line I think you have wrong... and maybe making that error:
(in blue)

Code:
              <UnitClassInfo>
			<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
		      <Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			[COLOR="Blue"]<DefaultUnit>NONE</DefaultUnit>[/COLOR]
		</UnitClassInfo>


It should read similar to this example:

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_RIFLEMAN</Type>
			<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			[COLOR="Blue"]<DefaultUnit>UNIT_RIFLEMAN</DefaultUnit>[/COLOR]
		</UnitClassInfo>


that maybe why it's not recognized as a UU...

...and ignore my first part ramblings :lol:
 
Im wondering if I can get any help with renaming units on world builder. If I change the name of a great general, then when I restart the game it is changed back to something else, any help on permaneting name changes?
 
Im wondering if I can get any help with renaming units on world builder. If I change the name of a great general, then when I restart the game it is changed back to something else, any help on permaneting name changes?

how do you change their names?

if you change the CIV4UnitInfos.xml file and put it in the custom assets folder or the mod (and you load up that mod) it should keep your changes...

however Warlords may be set up differently... but if you change the file with the names... it should stay the same... as long as you put it in the custom assets folder or the mod and load up that mod...

I know the other GP... Great Artist ... Great Engr etc keep the new names... as long as you follow the above directions...

again I only deal with the vanilla version but the warlords version should be similar...

what files are you modding? and can you give me a step by step on what you are doing...?
 
HOWEVER:
This highlight line I think you have wrong... and maybe making that error:
(in blue)


Code:
		<UnitClassInfo>
			<Type>UNITCLASS_RIFLEMAN</Type>
			<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			[COLOR="Blue"]<DefaultUnit>NONE</DefaultUnit>[/COLOR]
		</UnitClassInfo>



It should read similar to this example:

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_RIFLEMAN</Type>
			<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			[COLOR="Blue"]<DefaultUnit>UNIT_RIFLEMAN</DefaultUnit>[/COLOR]
		</UnitClassInfo>


that maybe why it's not recognized as a UU...

...and ignore my first part ramblings :lol:[/QUOTE]

Yup it's the reason
I use this method in WW2 Mod - gives a lot of flexibility and allows to keep historic realities (i don't need to worry about default units - i have set of different units for each classes - and i choose them for nations or make unavailable - for example V1 rocket could be build only by germany, and other countries doesn't have other unit from this class to choose) - and it doesn't write that replace units cause it doesn't replace any.
 
No no no! I know xml just fine. everything else is messed up. if i ask another question you are going to say you already told me but 1/2 of the things you say are confusing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I dont have the documents and settings/watever/watever/civ4/customassets so i have no clue where to put it!!! :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Ive been to all the pages you sugested none of them help.



I Need HELP!!!

Go to you documents and click "up"folder keep on doing that untill you stop
Mycomp/(hard drive disk)/program files/firaxas games/civ4/warlords* and you are there (*you will not need this if you dont have warlords)
 
CAN someone explain me how to make a SKIN??? .DSS ???? i mean i cant even make it in paint or other paint programs then how do i make a skin pls explain this to m thanks
 
CAN someone explain me how to make a SKIN??? .DSS ???? i mean i cant even make it in paint or other paint programs then how do i make a skin pls explain this to m thanks


go here to find out:

http://forums.civfanatics.com/showthread.php?t=148507

this is for flags and pics but can apply to dds files

however basically if you want to change colors of an existing unit/building

follow the unpak tut here:

http://forums.civfanatics.com/showthread.php?t=136023

1) find the unit/building folder

2) find the dds file

3) convert it (using the civ tut above for coverter programs) to bmp

4) recolor the bmp to your preference

5) covert it back to a dds file

6) put it back in that folder (REMEMBER to back up files/folders)

7) follow this tut or the other ones to put files in respective folders (either your custom assets or your mod - use my previous posts for reference)

and that's it



this is another skin tut:

http://forums.civfanatics.com/showthread.php?t=153584

this one explaces alpha channel better (which is needed for icon pics in the civilopedia and city screen and flags - but not always necessary for buildings and units)



hope that helps ;)
 
scuse me how do i converte it to bmp?? what converter program u said i need to use??? where is it??

read my post carefully please

Hint: IT is the first link listed....

read the 1st post (all) of that link and you will find your answers....
 
Back
Top Bottom