• 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!

Need Help Some tweaking

Rolee9309

Powder Monkey
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!
 
I assume you have a recent version of the mod?

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?
I think it was SetNationRelationBoth(SPAIN, PORTUGAL, RELATION_HOSTILE);
Can't remember for sure though.

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".
That's not easy. You'd have to add extra locators everywhere.
And it might get crowded.
 
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.
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...)
 
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
 
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.
 
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.
 
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.
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.
 
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.
 
The stock version without any mods. I also got the New Horizons, but now I'm playing and messing around with the original one.
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.
 
@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?
 

Attachments

  • nations.c
    6 KB · Views: 211
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?
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.
 
@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.
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.
 
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.
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).
 
Back
Top