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

Fixed Opium Smuggling: Errors With "List of Opium Buyers"

Try attached version of the file. Save to your PROGRAM folder.
I cannot guarantee this will always give 100% appropriate Opium Buyers, but it is much closer than it was.
But I did test with 50-100 names at a time, so I checked rather a lot of them.

The game may give you an on-screen error message regarding missing locations, but it will pick up on that and then find another character instead.
So basically this should work fine on @Talisman's savegame; you just potentially get some log messages when the names are generated.

I made several changes to my character init files to avoid these and also to disable some extra quest characters (the Slavers on Eleuthera and Coastbrothers on Turks, for example).
These changes will be included in the next modpack update, but do of course require a New Game to take effect.
 

Attachments

  • smuggling.c
    68.6 KB · Views: 77
So that's my accidental mistake fixed then AND the code cleaned up AND updated to prevent inappropriate/inaccessible characters being Opium Buyers.
Definitely some steps forward there. :woot

Special thanks to @Mere_Mortal for making that code so much more readable! :cheers
 
My Opium List shows Padre Dominques - San Juan Church

PotC_B14Beta4_1_OpiumList.jpg

I don't think he would normally cause a problem - but I thought I should mention it.

Also the location for the person on Guadeloupe is a bit vague - might be difficult to find - I looked him up in the compile log - would have taken me ages otherwise. :napoleon

:drunk
 

Attachments

  • compile.log
    9.9 KB · Views: 67
  • system.log
    1.4 KB · Views: 78
My Opium List shows Padre Dominques - San Juan Church
There is nothing to prevent them from being Opium Buyers.

Do you reckon there should be?

So far I have been adding the "questchar" attribute, but that also prevents their names being randomized when the towns belong to different nations.
But we don't really want that, because "Father Bernard" and "Father Jerald" are meant to get renamed like that in Early Explorers.

Could do a generic check on "if character location has church in the name" if necessary.
Or maybe set ch.abordagemode = 0; for them, so that check actually serves a purpose, even if it is a weird and counter-intuitive one.

Also the location for the person on Guadeloupe is a bit vague - might be difficult to find - I looked him up in the compile log - would have taken me ages otherwise.
That is due to the location labels. For example, in QuebradasCostillas.c this:
Code:
   Locations[n].id = "Charlestown_shipyard";
   locations[n].id.label = "Shipyard";
Should be this:
Code:
   Locations[n].id = "Charlestown_shipyard";
   locations[n].id.label = "#stown_name# shipyard";

And this:
Code:
   Locations[n].id = "Guadeloupe_Plantation_inside";
   locations[n].id.label = "House";
Could be this:
Code:
   Locations[n].id = "Guadeloupe_Plantation_inside";
   locations[n].id.label = "#sisland_name# Plantation Residence";
RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt should then also get this line added:
Code:
#sisland_name# Plantation Residence{#sisland_name# Plantation Residence}

New game required for such changes, unless you want to update them manually through console.

There could very well be a LOT of other such "nondescript" labels.
If you find any, feel free to change them and post your updated files here. :doff
 
There is nothing to prevent them from being Opium Buyers.

Do you reckon there should be?

So far I have been adding the "questchar" attribute, but that also prevents their names being randomized when the towns belong to different nations.
But we don't really want that, because "Father Bernard" and "Father Jerald" are meant to get renamed like that in Early Explorers.

:no - I think it is fine as it is - it was just with the previous mentions about quest characters - it caught me by surprise.

That is due to the location labels. For example, in QuebradasCostillas.c this:
Code:
   Locations[n].id = "Charlestown_shipyard";
   locations[n].id.label = "Shipyard";
Should be this:
Code:
   Locations[n].id = "Charlestown_shipyard";
   locations[n].id.label = "#stown_name# shipyard";

And this:
Code:
   Locations[n].id = "Guadeloupe_Plantation_inside";
   locations[n].id.label = "House";
Could be this:
Code:
   Locations[n].id = "Guadeloupe_Plantation_inside";
   locations[n].id.label = "#sisland_name# Plantation Residence";
RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt should then also get this line added:
Code:
#sisland_name# Plantation Residence{#sisland_name# Plantation Residence}

New game required for such changes, unless you want to update them manually through console.

There could very well be a LOT of other such "nondescript" labels.
If you find any, feel free to change them and post your updated files here. :doff


I might manage to have a look at it later in the week if I can find the time :read



:keith
 
Back
Top