[UNIT] Privateer: new function

KJ Jansson

Prince
Joined
Oct 7, 2008
Messages
509
RTFM or let's read the C4C manual, more precisely a section about privateer.

C4C manual p.31:

The Privateer:

The Privateer is a special kind of naval unit designed to allow one to harass foreign shipping without necessarily going to war with the foreign nation.
Privateers move, carry cargo and fight like other naval units; however, Privateers are issued "Letters of Marque and Reprisal" and
do not fly under a national flag: therefore they can attack foreign shipping without triggering war.
In other words, you can purchase or build a Privateer and send it off to attack your opponents and they won’t know who’s behind it.

Note, however, that all navies consider Privateers hostile, and they’ll attack ‘em on sight. Remember that Privateers can capture
cargo from defeated cargo vessels too; see above.


And above in C4C manual p.30:

Privateers:

When a privateer defeats a cargo vessel, it captures a portion of the defeated vessel’s cargo.



Well, as you see, the privateer can captures only a portion of the defeated vessel’s cargo. However, a lot of immigrants from Europe travel to New World on transport vessels, too. What's happen with them when a privateer defeats a transport vessel? According to current game's code all immigrants must die. It's rather bloodthirsty, isn't it?

Such situation could be very easily corrected.

Open in Notepad file "CIV4UnitInfos.xml" and find a <Type>UNIT_PRIVATEER</Type>.

Add in the section:


<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_PIRATE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>

couple new lines:


<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_PIRATE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_TRANSPORT_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>

</UnitAIs>

Now your privateer can carry units (immigrants) as well. When a privateer defeats a cargo vessel, it captures not only "a portion of the cargo", but also the travelling immigrants from the defeated vessel.

Such privateers are very effective especially on early stage of the game. Two-three privateers can fully block the connections of your opponents with Europe. Moreover, you could capture not only quite cheap and small cargo (in the beginning) but also your opponent's immigrants that are very valuable and "must have" as soon as possible.
 
Your code change does not work by itself. For Privateers to steal colonists from defeated ships, you also need to change
Code:
<SpecialCargo>[B]SPECIALUNIT_YIELD_CARGO[/B]</SpecialCargo>
to
Code:
<SpecialCargo>[B]NONE[/B]</SpecialCargo>

From what I can tell from brief testing, your privateer will also not steal any combat units, like soldiers, only unarmed colonists, which seems nicely realistic (due to killing armed combatants).
 
Your code change does not work by itself.

What do you mean??? I use described above changes during last week on PatchMod_1.03/PatchMod_1.05 and all is working perfectly.

For Privateers to steal colonists from defeated ships, you also need to change

Code:
<SpecialCargo>SPECIALUNIT_YIELD_CARGO</SpecialCargo

to Code:
<SpecialCargo>NONE</SpecialCargo

No, I didn't make these changes.

Frankly speaking, I changed also one additional parameter for my privateer. Instead

<iCargo>2</iCargo>

I use

<iCargo>3</iCargo>

However, I don't think that this small addition somehow affect on privateer's possibility to capture immigrants from the defeated vessel. I don't propose the cargo change in my first post because such change (2 => 3 cargo) will work only on new privateer that you buy in Europe or build in your colony.

From what I can tell from brief testing, your privateer will also not steal any combat units, like soldiers, only unarmed colonists, which seems nicely realistic (due to killing armed combatants).

Here I'm absolutely agree with you. During last week I cannot capture any armed unit like veteran soldiers.
 
CassiusA should be right. The Specialcargo tag should allow Privateers to only carry Goods.

But since it works for you... Maybe the function used for stuff-capturing ignored this tag/requirement...
 
I can see the potential need for transport AI though if you plan on capturing colonists, just to make sure the privateer will know to go put them in a settlement rather than sail around all game with a cargo hold full of colonists.
 
Top Bottom