1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Need Help Some tweaking

Discussion in 'POTC Gameplay & Tips' started by Rolee9309, Oct 25, 2017.

  1. Rolee9309

    Rolee9309 Landlubber

    Joined:
    Oct 24, 2017
    Messages:
    9
    Gender:
    Male
    Location:
    Hungary
    Hi all!

    I recently started tweaking/customizing the stock PoTC, and I have two questions:

    -How can I change the relation between spain and portugal to be enemies (my character's nation is now spanish :D)? Also how to apply it to the worldmap, like in the case of english-french fleets fighting?

    -How can I increase the number of crewmembers (let's say.. to 6) each side in boardings and fort capturings?
    Please someone help me, because those 2 changes are the last ones to finish my "fine-tuning-collection".

    Ps.: sorry for the grammar mistakes, I'm not a perfect english-speaker!
     
  2. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I assume you have a recent version of the mod?

    I think it was SetNationRelationBoth(SPAIN, PORTUGAL, RELATION_HOSTILE);
    Can't remember for sure though.

    That's not easy. You'd have to add extra locators everywhere.
    And it might get crowded.
     
  3. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,420
    Almost. It should be SetNationRelationBoth(SPAIN, PORTUGAL, RELATION_ENEMY);

    (I have an installation of stock PoTC whose normal purpose is to be copied into a new folder which then becomes the base for a clean Build Mod install. But it also means I can look at how original functions were written. There's also SetNationRelation(int iNation1, int iNation2, int iRelationType) which sets the relation of Nation1 to Nation2, but not the other way round. I can't imagine why you'd want, for example, Spain to be at war with Portugal but Portugal to not be at war with Spain. xD But if you can think of a reason, that's how to do it...)
     
    Pieter Boelen likes this.
  4. Rolee9309

    Rolee9309 Landlubber

    Joined:
    Oct 24, 2017
    Messages:
    9
    Gender:
    Male
    Location:
    Hungary
    Thanks for the answers!
    I'll leave the plus members then.
    I already edited these lines (sorry I forgot to mention):

    SetNationRelation(PORTUGAL,SPAIN,RELATION_ENEMY);
    SetNationRelation(SPAIN,PORTUGAL,RELATION_ENEMY);

    I completed the main/sidequests, but I did not see a single combat between them in the seas. I'll give 'SetNationRelation(int iNation1, int iNation2, int iRelationType)' a try, and let's see what will happen. But I'm afraid, my game loading will take a couple of ten seconds (even minutes probably), because... ARRor log.... he needs food... a lot. And he's fed with my fails :D
     
  5. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,420
    You have already used 'SetNationRelation(int iNation1, int iNation2, int iRelationType)'. 'int iNation1' and 'int iNation2' are parameters to the function, which should be replaced with "PORTUGAL", "SPAIN", "FRANCE" etc. Likewise 'int iRelationType' should be replaced with something like 'RELATION_ENEMY'. So 'SetNationRelation(PORTUGAL, SPAIN, RELATION_ENEMY);' is exactly that command with the values filled in.

    'SetNationRelationBoth' just does the same thing both ways, so 'SetNationRelationBoth(PORTUGAL, SPAIN, RELATION_ENEMY);' should do the same as your two lines.

    Where did you put those lines? They might not do anything until you start a new game.
     
  6. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Which game/mod version do you use?
    The original game and earlier mod versions had the world map relations hard coded.
    It wasn't until Beta 3.4 or maybe even Beta 4 that I did the Nations Relations rewrite and fixed it to use the actual nation relations.
     
  7. Rolee9309

    Rolee9309 Landlubber

    Joined:
    Oct 24, 2017
    Messages:
    9
    Gender:
    Male
    Location:
    Hungary
    Ahh, right. I found these lines in the Program/NATIONS/nations.c file under the 'void SetNationRelationBoth(int iNation1, int iNation2, int iRelationType)', and changed to the ones I mentioned. And I did started a new game. Maybe is it in the wrong place? I'm still a newbie, I'm experimenting, and I learn from my own mistakes.

    @Pieter Boelen The stock version without any mods. I also got the New Horizons, but now I'm playing and messing around with the original one.
     
  8. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,420
    Does that mean you changed "nations.c"? If so, you should put it back the way it was - that's the definition of the functions. There are also a group of lines:
    Code:
        /*SetNationRelation2MainCharacter(PIRATE,RELATION_ENEMY);
       SetNationRelation2MainCharacter(FRANCE,RELATION_ENEMY);
       SetNationRelation(FRANCE,ENGLAND,RELATION_ENEMY);
       SetNationRelation(FRANCE,PIRATE,RELATION_ENEMY);
       SetNationRelation(PIRATE,FRANCE,RELATION_ENEMY);
       SetNationRelation(FRANCE,HOLLAND,RELATION_ENEMY);
       SetNationRelation(HOLLAND,FRANCE,RELATION_ENEMY);*/
    If you added your lines in there, they'll be ignored because the "/*" at one end and the "*/" at the other end mark that entire section as a comment, so the game will ignore them.
     
  9. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Then indeed you still have that world map relations bug.
    Look in the WorldMap folder; you need to change something separately there, if I recall.
     
  10. Rolee9309

    Rolee9309 Landlubber

    Joined:
    Oct 24, 2017
    Messages:
    9
    Gender:
    Male
    Location:
    Hungary
    @Grey Roger yeah, that's definitely works, I didn't even noticed those lines :D (blind me....)
    But this version also works, I saw random encounters between the Spanish and portuguese naval forces.

    @Pieter Boelen In the stock game? Because if the version I attached here works (battles between them do occur and when I enter in, the game does not crash), shoud I change other things too?
     

    Attached Files:

  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Hmm... Maybe I'm misremembering.
    Could be the "chase ships" that didn't take into account the actual relations in the stock game.
    But that didn't matter, because those relations never changed.
     
  12. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,420
    That might work for the purpose of creating random encounters, but it's going to mess up main gameplay because you've overwritten the definition for 'SetNationRelation2MainCharacter'. So any part of the story which wants to set the player's relation to anyone else, e.g. France or England, is just going to repeatedly set the player hostile to Portugal instead.

    'NationsInit' starts by calling another function, 'InitNations', and then sets everyone to be friendly to everyone else. So wars must be set up somewhere else because by the time it gets to playing the game, England is hostile to France. See if you can find out where that happens, then add your lines to make Portugal hostile there.
     
  13. Rolee9309

    Rolee9309 Landlubber

    Joined:
    Oct 24, 2017
    Messages:
    9
    Gender:
    Male
    Location:
    Hungary
    Thanks, I will work on that. I also re-edited the 'NationsRelations2MainCharacter[PORTUGAL] = RELATION_ENEMY;' to 'NationsRelations2MainCharacter[iNation] = iRelationType;', because I will attack Conceicao anyway (I need the xp from the forts capturings and battleships, and I feel the sailing too peaceful with only 1 hostile (France then England - pirates are not a big deal in this game in my opinion).
     

Share This Page