• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Keeping Colonies

Durallan

Landlubber
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />
Hi guys, I'm just wondering, some days I feel like playing AOP but then theres only disappointment beacuse I load up my save game and remember that nations I've wiped from the carribean are triyng to take my colonies.

But in the colonies.c file it has this piece of code

if(iHovernor != -1)
{
characters[iHovernor].location = "none";
}
GenerateRumour("country_lost_all_colonies", iEnemy, -1, -1);
//ãåíåðèì ðóìîð, ÷òî íàöèÿ òàêàÿ-òî ïîòåðÿëà âñå êîëîíèè
NationsState[iEnemy].isCanCaptureColonies = 0;
}

so in actual fact the game is meant to stop a nation from taking colonies once it doesn't have any any more, but why does this not work?? it confuses the hell out of me, are there any good programmers out there, either AOP or PoTC Build Mod fans that can have a look at the aop files to see why this doesn't work? I'm trying to look myself but I'm no programmer, I've only learnt a couple of scripting languages. This kinda stuff is beyond me right now <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

it would be really nice to be able to figure this out and either stop nations attacking when they don't have a presence anymore or if anyone can figure out how to stop the rediculous times you get for defending colonies ( like 10 days for a colony on the other side of the map) not to mention that constantly getting these things wears you down after awhile I'd like to remove the ability for the game to make other nations attack colonies when you get them altogether, unrealistic I know but at the moment it makes it unplayable.

Edit:
Ahh, just found the file needed, its program/scripts/colony.c I'm pretty sure it is anyway because it talks about player colony at the start and setting up governor and event timers and something, if anyone wants me to post the code from the file here so they don't have to bother finding the file themselves or because they don't have it, but would like to help stop the impossible waiting time thing that would be great <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Well, when you kill spainish dogs they still have own Spain from where they come and try get what belong to them <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" /> . But if u wish, the only place where can be found 'isCanCaptureColonies' is country definition in smugglers. So i think this is only for some kind of AI then try this, in 'Colonies.c'

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void Event_CaptureColonyByNation(int iNation, int iEnemy, string sColony)
{
    ref fortcommander;

    if(iNation == PIRATE)
    {
        for(int i = 0; i < MAX_NATIONS; i ++)
        {
            SetNationRelation2MainCharacter(i, RELATION_ENEMY);
        }
        SetNationRelation2MainCharacter(PIRATE, RELATION_NEUTRAL);
    }

    
    int iColony = FindColony(sColony);
    Colonies[iColony].nation = iNation;
.
.
.<!--c2--></div><!--ec2-->

add this, and one line position change:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void Event_CaptureColonyByNation(int iNation, int iEnemy, string sColony)
{

    int iColony = FindColony(sColony); // this line is moved from bottom, so delete same line under this code.
    if(NationsState[iEnemy].isCanCaptureColonies == 0)
    {
      int iMoney = rand(Colonies[iColony].money) + 1;
      Event_RobbingColonyByNation(iNation, sColony, iEnemy, iMoney);
      return;
    }
    
    ref fortcommander;

    if(iNation == PIRATE)
    {
        for(int i = 0; i < MAX_NATIONS; i ++)
        {
            SetNationRelation2MainCharacter(i, RELATION_ENEMY);
        }
        SetNationRelation2MainCharacter(PIRATE, RELATION_NEUTRAL);
    }

    
    Colonies[iColony].nation = iNation;<!--c2--></div><!--ec2-->

After this change wiped Nations can only Rob u colonies. Not tested, if this work, say ^^
 
Back
Top