[R&F] Enabling capturing of great people?

Question

King
Joined
Mar 12, 2008
Messages
950
We can capture builders/settlers but im not sure what allows that.

In the units.xml file, GP have : CanRetreatWhenCaptured="True", but even when I remove that part, you cant capture them.

What do you need to change so that they can be captured like settlers or builders?
 
I'm not sure it's possible. The correct answer is the UnitCaptures table, but that table requires you to name a UnitType to capture. That's easily done with other kinds of units but Great People work differently than most units.
 
Which file is the UnitCaptures table in?

Edit : Nvm, its in Units.xml

So i put :

Code:
    <Row CapturedUnitType="UNIT_GREAT_GENERAL" BecomesUnitType="UNIT_GREAT_GENERAL"/>
       <Row CapturedUnitType="UNIT_GREAT_MERCHANT" BecomesUnitType="UNIT_GREAT_MERCHANT"/>
       <Row CapturedUnitType="UNIT_GREAT_SCIENTIST" BecomesUnitType="UNIT_GREAT_SCIENTIST"/>
       <Row CapturedUnitType="UNIT_GREAT_WRITER" BecomesUnitType="UNIT_GREAT_WRITER"/>
       <Row CapturedUnitType="UNIT_GREAT_ARTIST" BecomesUnitType="UNIT_GREAT_ARTIST"/>
       <Row CapturedUnitType="UNIT_GREAT_MUSICIAN" BecomesUnitType="UNIT_GREAT_MUSICIAN"/>

But the GP instantly dies when i move a military unit in their square with -100 health damage. Why? GPs are still the civilian class...
 
Last edited:
Like @isau said, GP are treated a bit differently from other units. It might be better to say that UNIT_GREAT_GENERAL is more of a class of unit rather than an individual unit as each GP is defined individually and then assigned a GP Type. Try changing the BecomesUnitType to a Builder and see what happens.
 
The thing is i dont want to turn them into builders, i want to convert the GP into an identical GP for me to use...why cant it just flip the ownership flag?
 
The thing is i dont want to turn them into builders, i want to convert the GP into an identical GP for me to use...why cant it just flip the ownership flag?

Capturing does not work that way. Basically when a unit is "captured" it creates a new unit owned by a new player. I don't know for sure why, although it may be to make sure the captured unit inherits any Modifiers the Player has and any Modifiers from the previous owner are dumped.
 
Capturing does not work that way. Basically when a unit is "captured" it creates a new unit owned by a new player. I don't know for sure why, although it may be to make sure the captured unit inherits any Modifiers the Player has and any Modifiers from the previous owner are dumped.

So why cant the capture system see "okay this is GP X" and create a new GP X in that tile? Surely their programmers can figure out how to look up which GP it is and clone it. I mean, you can capture cities...
 
OK i was able to capture great artists but they dont have their charges so they are useless...im guessing theres no way of re-adding the charges back?

Im confused as to why great generals instantly die though...
 
So why cant the capture system see "okay this is GP X" and create a new GP X in that tile? Surely their programmers can figure out how to look up which GP it is and clone it. I mean, you can capture cities...


Because they programmed the system according to what they needed and not what modders needed. The only normally capturable units are Settlers and Builders, so they built and tested the system for those units.
 
Back
Top Bottom