Chuck Norris (World Unit?)

Joined
Nov 12, 2005
Messages
450
Location
Milwaukee, Wisconsin
Is there a way to make a unit a World Unit, as opposed to a National Unit, so that there can only be one? I need this for a Chuck Norris unit, and I've finished everything for the mod except making sure that there can't be 30 Chuck Norrises of different nationalities running all over the world (Madness!:eek:) Please help.
 
Well, one way is to save the id of the unit using pickle, when someone tries to create another of the same unit you can check to see if the value has been previously set or not. I have been using pickle through the SD-Toolkit, it has been working pretty good for me.
 
It is possible, the same concept is use in the Fall from Heaven mod by keal. Perhapse you should ask him how he did that.
 
Hardner said:
:rotfl: :rotfl: :rotfl: :rotfl: :rotfl:
CHUCK NORRIS!!!!!!!!!!!
Great!!!
Strenght: 1000!?!?!?!?!?!
For some reference:
www.chucknorrisfacts.com

Yeah but you'd have to take a pretty big culture hit. Have you seen his movies?

Roger Bacon
 
RogerBacon said:
Yeah but you'd have to take a pretty big culture hit. Have you seen his movies?

Roger Bacon

right, but..oh no, now he's surely coming for you with a roundhouse...:lol:
 
:rotfl: :rotfl: :rotfl: :rotfl: :rotfl: :rotfl:
Hardner said:
right, but..oh no, now he's surely coming for you with a roundhouse...:lol:
Chuck Noriss chief export is pain:lol:
 
Robo Magic Man said:
Is there a way to make a unit a World Unit, as opposed to a National Unit, so that there can only be one? I need this for a Chuck Norris unit, and I've finished everything for the mod except making sure that there can't be 30 Chuck Norrises of different nationalities running all over the world (Madness!:eek:) Please help.
Some would say that one Chuck Norris is already too much :p
 
Python is definitely not needed, all you need is XML!
In CIV4UnitClassInfos.xml:
Code:
		<UnitClassInfo>
			<Type>UNITCLASS_BUDDHIST_MISSIONARY</Type>
			<Description>TXT_KEY_UNIT_BUDDHIST_MISSIONARY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>3</iMaxPlayerInstances>
			<DefaultUnit>UNIT_BUDDHIST_MISSIONARY</DefaultUnit>
		</UnitClassInfo>

Make a new entry for the Chuck Norris unitclass and the Chuck Norris unit. Set iMaxGlobalInstances to 1. Keeping it on -1 means an unlimited amount. Set the other 2 tags to -1, and the max global instances will override them. Once there is 1 Chuck Norris, there is ONLY 1 Chuck Norris!

Also, be careful that this unit is not available WITHOUT any resources or technologies, just like the warrior. If it is, then it will be available as the starting unit to only 1 player upon starting a new game, since the game gives the player 1 free military unit (best one available) once the game begins.
 
You could also make a world wonder "The Texas Rangers" and it gives you a free unit, Chuck Norris.
 
In the CIV4UnitClassInfos.xml you can declare these values:

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_CONJURER</Type>
			<Description>TXT_KEY_UNIT_CONJURER</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_CONJURER</DefaultUnit>
		</UnitClassInfo>

The above unit isn't limited.

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_CONJURER</Type>
			<Description>TXT_KEY_UNIT_CONJURER</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			[b]<iMaxPlayerInstances>3</iMaxPlayerInstances>[/b]
			<DefaultUnit>UNIT_CONJURER</DefaultUnit>
		</UnitClassInfo>

The above unit is limited to 3 for each player.

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_CONJURER</Type>
			<Description>TXT_KEY_UNIT_CONJURER</Description>
			[b]<iMaxGlobalInstances>1</iMaxGlobalInstances>[/b]
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<DefaultUnit>UNIT_CONJURER</DefaultUnit>
		</UnitClassInfo>

The above unit is limited to 1 in the game (a world unit).
 
I thought I explained that :p Thanks for the hands-on approach :)
 
Shqype said:
I thought I explained that :p Thanks for the hands-on approach :)

Yeah, no worries. He had PM'ed me the question too, and I saw that before I saw this thread so I just copied my responce here. It is pretty much redundant with yours.
 
I like you Kael, you're a nice guy and always try to help people out. Thanks for your in-depth response (and for what you've helped me out with as well). :)
 
So once this Chuck Norris is made will you make it avaliable for download? I am afraid to even play the game now with out it for because Mr. Norris might roundhouse me. You know Chuck Norris' tears cure cancer. . . too bad he never cries!
 
Ok, thanks for the help everyone. The mod is now posted here
 
looks awesome!! just needs another unit icon, i think you can put a chuck pic in there. 50Strenght, enough?
 
Top Bottom