Questions for Modders: Unit Capture and GP sound...and others

Officer Reene

It hates you all
Joined
Jan 21, 2006
Messages
698
Location
In the middle of nowhere
I noticed that Settlers and Workers have this:
(In the CIV4UnitInfos.XML File)


<Class>UNITCLASS_SETTLER</Class>
<Type>UNIT_SETTLER</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>UNITCLASS_WORKER</Capture>

and this:

<Class>UNITCLASS_WORKER</Class>
<Type>UNIT_WORKER</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>UNITCLASS_WORKER</Capture>


but no other units have this (I think)


I understand that <Capture> means that when a city is captured... there is a possibility that the unit is capture too...

Also if a foreign city successfully revolts to your civ... you get some units of that civ, including some military units...

my questions are:

1) is this only when the city is captured? or can this be in open ground combat too? (not capturing cities)

2) a) Is there a percentage for it? or is it automatically captured if you are victorious in capturing a city or victorious in combat?

b) If it is a percentage, where is that data/script stored?

3) Where is the data/scripts for the city revolts action? Can that be applied in open (non-city) combat where there is a possibility to capture some units after a victorious combat?

4) a) What happens if you make ALL units capturable? (I noticed that military units are not capturable (<Capture>DATA</Capture>) yet they can be capturable if you capture a city by culture...

b) What does that <Capture> actually do?


Other Questions:

I noticed that in the CIV4BuildingInfos.XML File all buildings have a construction sound defined....

ex. <ConstructSound>AS2D_BUILD_WALLS</ConstructSound>


I also checked that this sound is defined in the AudioDefines.XML and Audio2DScripts.xml


For the Great People the sound is defined in the AudioDefines.XML

ex. SND_MOD_ENG_ACTIVATE (Sound for Using a Great Engineer I believe)

yet I could not find that sound defined for GP (engineer) in the CIV4UnitInfos.xml or its defined in the Audio2DScripts.xml or Audio3DScripts.xml


1) Is this sound hardcoded?

2) Does anyone know where this sound is referenced?

I am using fitchn's CivMore Mod which uses Great Generals and I am trying to add sounds when you "use" a GG...

Any help would be greatly appreciated! :)


NOTE: for the Capture questions:

I have tried to use Snaitf's Allegiance Mod which does exactly what I want it to do... but it doesnt work in MP :mad: (because it changes Python Files - and MP hates Python changes when the python changes have to do with AI behavior)

I am trying to do it myself (possibly just trying to edit XML files), that's why I am asking for any info, that is if it can be done... :mischief:

and see if I am missing any Capture reference files...

Thanks again for any assistance you can provide! ;)
 
No the <Capture> flag is for actualy attacking a unit, basicaly when said unit is defeated you recive what ever is defined in capture (if its nothing you get that) it has no bearing on culture fliping which is a total different concept.

That sound is probably pointed to by the "Hurry Construction" ability on another file, I dont know which, anything with that ability would make the sound, the Great Engineer is the only unit normaly having that ability so they named it after him.
 
thx for the response...

now I have somewhere to start looking... ;)

Impaler[WrG] said:
No the <Capture> flag is for actualy attacking a unit, basicaly when said unit is defeated you recive what ever is defined in capture (if its nothing you get that)


I notice that early on you have a better chance of capturing a unit (settler/worker) but later on you just destroy it (in combat)

is there a way to change this?

Is it era based?

or based on percentages? (meaning later eras have a less of a chance to capture)


and where can I find this info? (XML/Python/etc)


Impaler[WrG] said:
it has no bearing on culture fliping which is a total different concept.

ok just had to check

Impaler[WrG] said:
That sound is probably pointed to by the "Hurry Construction" ability on another file, I dont know which, anything with that ability would make the sound, the Great Engineer is the only unit normaly having that ability so they named it after him.



ok I'll look for that ...

thx for your help Impaler...

and if you have any other suggestions to my other questions... :mischief:
 
Their is no percetage or chance invovled in Capturing a unit, if you win (which you will alwasy do vs a worker or settler) you get the unit, these units are never destroyed (except when Barbs attack them) ware did you get it in your head that it is? Are you playing that Mod that gives a slave unit when defeating units, that mod uses Python not XML and did include a probability to get or not get the slaves. Regular XML based Capture is unconditional
 
Impaler[WrG] said:
Their is no percetage or chance invovled in Capturing a unit, if you win (which you will alwasy do vs a worker or settler) you get the unit, these units are never destroyed (except when Barbs attack them) ware did you get it in your head that it is? Are you playing that Mod that gives a slave unit when defeating units, that mod uses Python not XML and did include a probability to get or not get the slaves. Regular XML based Capture is unconditional


really? When I played the vanilla civ (no mods)

in earlier eras the AI would capture my workers... but in later eras they would destroy them....
 
Their probably just imediatly running the worker away to a City on the developed road networks that exist by that time and you dont notice.
 
er..............no
 
The AI disbands workers if it thinks it cant protect them. There isnt any chance for not being able to capture a worker.
 
Kael said:
The AI disbands workers if it thinks it cant protect them. There isnt any chance for not being able to capture a worker.


ok that makes more sense
 
Back
Top Bottom