Is there an xml entry for a Great General leading a unit?

Ri-Hatz

Chieftain
Joined
Jun 23, 2008
Messages
93
Well, I just started to have a look around the modding possibilities in beyond the sword.

I changed the stats of a great general in the CIV4UnitInfos.xml but as soon as he gets attached to a unit (leads a unit) the changes are not there anymore.

So my question is: how can I change/edit a great general who is leading a unit?
 
Define "change"... what is it you're trying to change?
 
Im making a Mod so that I can capture Great Generals.

I changed the following line of the Great General in CIV4UnitInfos.xml
<Capture>UNITCLASS_PRISONER</Capture>

So now, whenever I attack a GG I capture a Prisoner. But this does not work yet for GGs attached to a unit. They just get killed. Thats what I want to change.

and thanks for helping.
 
I think I can aswer my own question now.

whenever a GG leads a unit only the graphics of that unit get updated + the 20 exp points. So if a warrior is lead by a GG its still a warrior.
 
Im making a Mod so that I can capture Great Generals.
I'm not a fan of that, even if you could get it to work in-game.

In WWII... if the Americans captured Germany's Erwin Rommel... would he then lead US troops?

If Austria captured a Marshall of France during the Napoleonic wars... would that Marshall then lead Austrian troops?

I think in all the above cases, and in-game, a great general for a different civilization would not want to lead (nor be trusted to) lead your troops into battle against his own civilization!

Just my two-cents. :p
 
I think you have missunderstod him wolfie.. as I understand it he gets a new unit "prisoner" when he captures a GG like a POW.. dont think he wants to lead his own troops with that unit.. but dont know what he wants with POWs...
 
The Mod Im doing will be called: 'Prisoners of War'
Capturing an enemy GG will result in a prisoner unit (which could be recapture/freed by original owner)

that prisoner, once taken to a city (maybe only military academy) has some options then.

-hang him in public -> gain war support
-torture him -> get enemy plans (like the steal plans mission with a spy) (well only the plans that where up to date at the time the GG got captured)
-try to bribe him -> the GG changes sides. Yes, there are some of us who would do anything for gold.
-and most important: trade him -> after war one could ask a ransom!

so now you know what im up to.
 
The Mod Im doing will be called: 'Prisoners of War'
Capturing an enemy GG will result in a prisoner unit (which could be recapture/freed by original owner)

that prisoner, once taken to a city (maybe only military academy) has some options then.

-hang him in public -> gain war support
-torture him -> get enemy plans (like the steal plans mission with a spy) (well only the plans that where up to date at the time the GG got captured)
-try to bribe him -> the GG changes sides. Yes, there are some of us who would do anything for gold.
-and most important: trade him -> after war one could ask a ransom!

so now you know what im up to.
Oh... well that's actually kinda cool! :goodjob:
 
I think I can aswer my own question now.

whenever a GG leads a unit only the graphics of that unit get updated + the 20 exp points. So if a warrior is lead by a GG its still a warrior.
Almost. It also gets a Great General promotion (the little GG icon you'll see on the unit. I think its main purpose is to be a prerequisite for the GG specific promotions). This can be found in CIV4PromotionInfos.xml. Unfortunately, promotions can't change the Capture field, but you could probably throw together a python call to give a prisoner to anyone who kills a Great General.
 
The Mod Im doing will be called: 'Prisoners of War'
Capturing an enemy GG will result in a prisoner unit (which could be recapture/freed by original owner)

that prisoner, once taken to a city (maybe only military academy) has some options then.

-hang him in public -> gain war support
-torture him -> get enemy plans (like the steal plans mission with a spy) (well only the plans that where up to date at the time the GG got captured)
-try to bribe him -> the GG changes sides. Yes, there are some of us who would do anything for gold.
-and most important: trade him -> after war one could ask a ransom!

so now you know what im up to.

Its fairly easy to trigger an event from combat results. If the defeated unit has the leader promotion or however you want to trigger it) you could have an event popup for the winning player that options you specified. The "after war" part would be hard becuase the event is going to want to do its magic right then, but I dont know why you wouldn't ransom him back during the war. Lots of prisoners get traded back and forth for cash during wartime in the pre-modern era.
 
thanks a lot for the answers. it helps.

ill be back with a new thread soon about the mod.

cheers everyone.
 
Back
Top Bottom