NikG said:Yes there is...
NikG said:Yes there is...
So, did you mean that in the abstract like "Yes there is a way since we have access to the code and we can change anything with enough time and effort" or did you means something a little more concrete like "Yes there is and I know how to do it"?
Grakl said:Ok, sorry, been working on a mod that includes this feature. I'm at work atm but I'll post my code when it's fully functional tonight. After initial reseach I've found that giving a unit a specific promotion "PRIVATEER" (by Kael's advice in a thread somewhere) and checking for it during actions is the easiest. I havn't delved into the AI code yet.
Here's the steps:
1) Create the PRIVATEER promotion.
2) Add PRIVATEER as a free promotion to all privateer units.
3) Check for the promotion when the unit attempts to enter or move through territory you aren't at war or have an open borders pact with.
4) Check for promotion when the unit attempts to attack a non-enemy unit.
5) Check for promotion when the unit attempts to attack a non-enemy city.
6) Check for promotion when the unit attempts to destroy an non-enemy improvement.
Steps 1-2 should only require editing XML while 3-6 will require code additions in the SDK..mainly CvUnit.cpp.