• 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 American Tutorial

Right for now here is an updated both.reaction.c where Malcolm does walk off to the tavern when dismissed in port/town. I haven't resolved where he put is in the tavern (larger door locator as per store and shipyard doesn't work)- it's ok if you walk down the stairs before he gets to speak but less so if you just stand at the door on entry. That needs either a new locator (as discussed) or me to master how to get PChar to autowalk down the stair and then get the conversation to autostart as normal. But since there are other problems (ie my bust store interface for one) that can stay as "to do" for now.
Adding the missing locators would definitely be the simplest and cleanest solution.
If you know how to do it, that only takes a few minutes.

I have updated Malcolm's dialogue to get rid of the phobia about the French (a French battle fleet or French Squadron) which would be odd/wrong in some combinations - a better solution would be a dynamic insertion of whom the enemy is (but I'm not sure in all character types and time periods there will be one?). I have altered the two pieces about street traders because Sao Jorge only has one, San Juan has two stalls but only one trader and Eleuthera has a woman.
The game should at least give you one enemy no matter what options you choose.
In fact, some weird stuff might happen if you're friendly with every single nation, because there are functions that deliberately try to find a random enemy.
It should be possible to dynamically display the name of a random enemy nation. When using preprocessors, that wouldn't even require adding extra lines in the dialog.h file.

However worse news is that any REBEL character type is not being landed at Nevis despite the interface saying you start there and dialogue being with Robert Fletcher who disappears (presumably to Nevis :confused:) when you land at the NATION port. I think this has arisen since the combining of all the free play options. You might see a simple fix or perhaps it needs a temporary re-allocation of Nation to carry through the tutorial after which I guess it's not an issue?
Is that with the latest update? I do remember noticing that problem before, but I thought I fixed it. If not, I'll look at it again.

@Hylie Pistof, @Grey Roger or @ANSEL: Can you test a normal Brave Black Flag start on the latest update and check if you do end up at Nevis?
 
Is that with the latest update? I do remember noticing that problem before, but I thought I fixed it. If not, I'll look at it again.

I thought it was but it clearly wasn't - sorry -- it is ok in my May version too.

In the hopes of being more of an asset than a nuisance I have finally worked out why Inez Diaz tool wouldn't install for me, wouldn't read the model files or save the altered GM file - mostly to do with where I wanted to install it and where it wanted to be.

So better late than never here is a"final??" both.reactionc.c with a new locator on the stairs which means Malcolm does approach on the tavern stairs before speaking.

I also append an amended Robert Fletcher where I have changed Royal Navy to Navy, crown to authorities and that island reference to here.

Apart from making an enemy reference dynamic in the main Malcolm Hatcher dialogue if wanted I think that wraps up this thread?
 

Attachments

  • both_reaction.7z
    13.9 KB · Views: 81
  • Robert Fletcher_dialog.h
    32.5 KB · Views: 167
Last edited:
Brilliant! Thanks a lot.

If you want to do that dynamic thing, you should search the dialogs folders for a reference to PreprocessorAdd if I recall.
I won't have access to my files for a few days so cannot check it myself.
This isn't technically too difficult and requires only a few extra lines of code.
But it might take a bit of figuring out how that system works.
 
I have added a dynamic to Malcom Hatcher dialogue.

two dialogue.h lines have #senemy# in them. The c file has two calls of

Preprocessor_Add("enemy",GetNationDescByType( FindEnemyNation2Character(PChar)));

But all it seems to return is Pirate. It works to put other nations if I put numeric values into GetNationDescBy Type() but only returns Pirate when I replace an integer value with FindEnemyNation2Character(PChar).

So that function call doesn't seem to do what I expected (ie find an integer being the value of an enemy nation to the character). Is that what it is meant to do?
 

Attachments

  • Malcolm Hatcher_dialog.c
    37.4 KB · Views: 90
  • Malcolm Hatcher_dialog.h
    34.1 KB · Views: 84
Have a look through program\nations\nations.c
I know there's a function that returns a random enemy nation, but I don't think it was that one.

You can also check the Free Play both_reaction.c as I remember using it there for some of the custom start scenarios.
 
That function looked the best candidate from program\nations\nations.c but never mind LotHostileNation(sti(PChar.nation)) the one you used in both.reactions.c does the job.
 

Attachments

  • Malcolm Hatcher_dialog.7z
    4.5 KB · Views: 81
  • Malcolm Hatcher_dialog.h
    34.1 KB · Views: 81
I just tested this and it seems to work well. Thanks a lot, mate! :bow
 
That function looked the best candidate from program\nations\nations.c but never mind LotHostileNation(sti(PChar.nation)) the one you used in both.reactions.c does the job.
This file made my game lock up on the Standard Storyline. I think because there the player nation is PERSONAL_NATION and the ends up in an endless loop.
This is modified with the attached file.

This also lead me to find some double function calls for the early game, which might have been the reason for my game sometimes randomly locking up in the early tutorial.
 

Attachments

  • Malcolm Hatcher_dialog.zip
    5.3 KB · Views: 80
Yes well I did say I wasn't sure there would always be an enemy! and saw that the function being used would lock into a loop with no get out if not.

At least it gave you the opportunity to restore a definite French enemy for the standard storyline (since they take the fort soon after) I was going to mention that if you intended to transfer the amended dialogue file to the standard too. Both.reactions.c is a real mess with lots of setting and re-setting port, town etc which wouldn't be needed if the original Oxbay stuff before each Nation switch was cleaned out, since once you've picked which nation they would stay static but since the file is only used the once and when the player is presumably a newbie (or they wouldn't need the tutorial) I guess it doesn't matter much.

I still think the function in nations I mentioned is intended to produce an enemy to character (that is what it is called!!) but doesn't work. I may search to see where else it is being called and look at the impact
 
I still think the function in nations I mentioned is intended to produce an enemy to character (that is what it is called!!) but doesn't work. I may search to see where else it is being called and look at the impact
Looks like it does work if you call it with the character index:
Code:
   LogIt("Enemy 1 = " + GetNationDescByType(FindEnemyNation2Nation(GetServedNation())));
   LogIt("Enemy 2 = " + GetNationDescByType(FindEnemyNation2Character(sti(PChar.index))));
:doff
 
OK I'll take that as a polite way of telling me to read :readwhat it says on the function header!! Not that I understood what the character.index was anyway. But it would be more elegant as a one liner (apart from needing to keep the French for Nathaniel Hawk standard).

The only other thing I saw was once being given an Aztec coin :treasure:in the cabin with Malcolm which I thought was a bit unfair on someone needing a tutorial (but fun nevertheless).
 
The only other thing I saw was once being given an Aztec coin :treasure:in the cabin with Malcolm which I thought was a bit unfair on someone needing a tutorial (but fun nevertheless).
The game apparently treats random as RANDOM. All I can say is that is definitely NOT intentional. :no
 
Back
Top