• 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 Correcting "Early Explorers" Period

Very clever!
Did you ever figure out how to use console to display your current location? It should be really quite easy.
I can't use the console. Windowed mode does not work very well for me. ;)

If you can't find the relevant switch value, this line should do the trick too:
Code:
LogIt(pchar.location);
That's useful. I sometimes put 'logit' lines into code files to send diagnostic messages at key points. If I can't do that in console, I may be able to put it somewhere where I can trigger it by doing something in game. (Where's the code for drawing a weapon?)

I think that is one of the custom added details that @Jack Rackham added to the Golden Hind.
There are two other characters there, one near the cabin railing and one in the crow's nest.
Any chance of them being replaced by standard sailor models rather than an incorrect uniform? Especially if they're specific to Golden Hind! Soldier uniforms correct for "Early Explorers" could also be used.
 
I can't use the console. Windowed mode does not work very well for me. ;)
How does it not work well? I always find it one of the best features of the game, so if we can figure out a way that we can help it work for you too, that might be nice.

Also, you don't need to use windowed mode to use the console. Only then you'll have to close the game every time you want to put something new in there.

That's useful. I sometimes put 'logit' lines into code files to send diagnostic messages at key points. If I can't do that in console, I may be able to put it somewhere where I can trigger it by doing something in game. (Where's the code for drawing a weapon?)
@Jack Rackham, you have been working with that; do you remember where that code is?
My memory says somewhere in seadogs.c; search for "SG" for shotgun mode because that should be referenced close to the relevant function, I think.
 
Yes in seadogs.c
search for

case "ChrFightMode":

and under that

if(LAi_IsFightMode(PChar))
{





}
else
{
//here is the place for a
Logit("text of your choice");
 
How does it not work well? I always find it one of the best features of the game, so if we can figure out a way that we can help it work for you too, that might be nice.
Several versions of Beta 3.5 ago, I installed the then latest version, then complained that movement was horrible - when on land, I turned round very slowly. Someone suggested I try windowed mode. That's when I realised that apart from being a new install, what was different this time was that I was trying windowed mode. When I went back to full screen mode, I could turn round as quickly as ever. I haven't been back to windowed mode since.
 
Several versions of Beta 3.5 ago, I installed the then latest version, then complained that movement was horrible - when on land, I turned round very slowly. Someone suggested I try windowed mode. That's when I realised that apart from being a new install, what was different this time was that I was trying windowed mode. When I went back to full screen mode, I could turn round as quickly as ever. I haven't been back to windowed mode since.
Is that always on land? I recall such a problem, but it was in inside locations only.
 
@Grey Roger: You may want to do a WinMerge with the latest ZIP; I think your SideQuest.c file is missing out on some of your own fixes.... :wp

Also, did you happen to test this one?
Code:
text.t5=François Moulin was clearly relieved when he heard of #sAntoineChamfort#'s death. Now we just have to meet Angelique at #sPort au Prince#.
I think that one is used here:
Code:
    case "retourprince":
       AddQuestRecord("Moulin", 5);
       LAi_SetActorType(characterFromID("Francois Moulin"));
       LAi_ActorFollowEverywhere(characterFromID("Francois Moulin"), "", 60.0);
       Characters[GetCharacterIndex("Angelique Moulin")].dialog.currentnode = "begin_6";
     break;
Unless I am mistaken, that would need a preprocessor add too.... :oops:
 
@Grey Roger: You may want to do a WinMerge with the latest ZIP; I think your SideQuest.c file is missing out on some of your own fixes.... :wp
I don't see anything wrong. What have you found missing?

Also, did you happen to test this one?
Code:
text.t5=François Moulin was clearly relieved when he heard of #sAntoineChamfort#'s death. Now we just have to meet Angelique at #sPort au Prince#.
I think that one is used here:
Code:
    case "retourprince":
       AddQuestRecord("Moulin", 5);
       LAi_SetActorType(characterFromID("Francois Moulin"));
       LAi_ActorFollowEverywhere(characterFromID("Francois Moulin"), "", 60.0);
       Characters[GetCharacterIndex("Angelique Moulin")].dialog.currentnode = "begin_6";
     break;
Unless I am mistaken, that would need a preprocessor add too.... :oops:
Could be; I'll need to start yet again and see how it turns out... If so, it's an easy enough addition. Just stick this right after 'case "retourprince':
Code:
    Preprocessor_Add("AntoineChamfort", GetMySimpleName(CharacterFromID("Antoine Chamfort")));
You can also try it out and see if you spot anything I missed. Enable cheatmode, start a game as Francis Drake, zap yourself up to at least level 15 (so the quest will trigger) and for preference give yourself a few ranks so you get Francis Drake's sword. For good measure, enable godmode because there are lots of highwaymen around these days. Either look round the traders and see if someone will sell you maps for Cuba and Hispaniola, or since you can use windowed mode and therefore the console while a game is in progress, just give them to yourself. Set Portuguese flag because that's good for both France and Spain. Sail-To Santa Maria del Puerto, find Angelique and do the quest. Once you've got the journal (you'll know if you've got the right one because it should have references to 1492 instead of 1595) head for Cuba, Sail-To Punta de Maisi, go to the jungle and turn right to the next bit of jungle. This should be the same sort of place as the normal sword location on Antigua but you're entering it from the opposite direction. You'll know you're in the right area, partly because you should be able to find the sword, and partly because if you continue down the road where the sword is supposed to be buried, you'll end up in a smuggler's fort.
 
The missing stuff I noticed are the period correct ships you did for the Will Turner and Pieter Boelen characters.
 
This should have it all.

Meanwhile, you were right about the questbook entry, sort of. It didn't work without the 'Preprocessor' line. The trouble is, it didn't work with the 'Preprocessor' line either. :(

First I tried putting the line where I've put it in the "dialog.c" files, i.e. just outside the 'switch' block so it is called every time the file is run. When that didn't work, my first thought was that the apostrophe at the end of the variable name could be messing it up, so I rephrased the line to leave "#sAntoineChamfort#" isolated, and that's when I was reminded that I'd need to restart the whole quest for it to work - I'd reloaded a savegame where I'm standing in front of Francois about to tell him the good news and receive questbook line 5, and what I got was the old version of line 5. After putting the 'Preprocessor' line right above the 'AddQuestRecord' line and starting again, it still doesn't work - I now get the reworded version of the line but the name doesn't show up. Unless you can figure out how to make it work, the only solution I can think of is to lose the name entirely and just have the questbook say "François Moulin was clearly relieved when he heard of the officer's death".

In other news, I've tried playing the quest with another free-play start set in a later time period and confirmed that this still works as intended. Apart from questbook line 5, everything still happens according to plan, the officer is French Antoine Chamfort, and Francis Drake's sword is where it should be on Antigua. So once the issue of line 5 is resolved one way or another, that should be this side-quest ready for any period.
 

Attachments

  • SideQuest.c
    149.5 KB · Views: 97
First thing to try is to take the relevant code for that questbook line and put it in console.c for testing purpose.
I won't be able to check my files until quite a bit later today (if at all), but if you post all the relevant sections here, I might be able to take a gander.
 
Here are "quests_side.c" (with the 'Preprocessor' line added) and the original version of "Moulin.txt" (before I rephrased line 5 to lose the apostrophe).

Which thread had the discussion about storekeepers and other characters greeting you with the wrong gender title, e.g. "Monsieur" when you're playing a female character? Because for that later period test, I tried starting off as a female character so I could test that as well...
 

Attachments

  • quests_side.c
    360.1 KB · Views: 102
  • Moulin.txt
    2.5 KB · Views: 99
You could try putting this in console.c to do an immediate test on a new game:
Code:
SetQuestHeader("Moulin");
Preprocessor_Add("AntoineChamfort", GetMySimpleName(CharacterFromID("Antoine Chamfort")));
AddQuestRecord("Moulin", 5);
Can you also post quests_common.c? I know that one uses some preprocessors in questbook entries so that should give us an example to follow.

Which thread had the discussion about storekeepers and other characters greeting you with the wrong gender title, e.g. "Monsieur" when you're playing a female character? Because for that later period test, I tried starting off as a female character so I could test that as well...
Here it is: http://www.piratesahoy.net/threads/gender-problems-some-women-think-im-female.25430/
 
Here you go.

You can also download your own zip update file from here, right-click on it to open it with 7-zip, then right-click on the file of your choice and copy it to your hard drive. That's how I got this. ;) (It also works on the main installer.)
 

Attachments

  • quests_common.c
    171.6 KB · Views: 86
You can also download your own zip update file from here, right-click on it to open it with 7-zip, then right-click on the file of your choice and copy it to your hard drive. That's how I got this. ;) (It also works on the main installer.)
Ah, yes; could've done that, of course. :facepalm
In my defence: I'm being distracted from my piratey affairs by my real work..... :wp

Anyway, looks like the preprocessors work slightly different for questbook entries. Try this:
Code:
Preprocessor_AddQuestData("AntoineChamfort", GetMySimpleName(CharacterFromID("Antoine Chamfort")));
SetQuestHeader("Moulin");
AddQuestRecord("Moulin", 5);
Preprocessor_Remove("town");
 
My guess is you're copying that from something like case "trade_quest_open" which is in "quests_common.c", and that's calling 'SetQuestHeader' because it's generating a whole new quest. Here, though, we're in the middle of an on-going quest, so 'SetQuestHeader' probably won't be needed. That's the command to open a new chapter in the questbook; you'll find it in cases "Missing_search_refused" and "Missing_start_search" in "quests_side.c". One leads to a very short chapter where you refuse the quest and close the chapter immediately, the other leads to the actual quest. Other 'AddQuestRecord' lines are not preceded by 'SetQuestHeader'.

And, of course, if I'm adding quest data "AntoineChamfort" then removing "town" probably won't do much good. ;)
 
My guess is you're copying that from case "trade_quest_open" which is near the top of "quests_common.c", and that's calling 'SetQuestHeader' because it's generating a whole new quest. Here, though, we're in the middle of an on-going quest, so 'SetQuestHeader' probably won't be needed. That's the command to open a new chapter in the questbook; you'll find it in cases "Missing_search_refused" and "Missing_start_search" in "quests_side.c". One leads to a very short chapter where you refuse the quest and close the chapter immediately, the other leads to the actual quest. Other 'AddQuestRecord' lines are not preceded by 'SetQuestHeader'.
The reason why I did add that line is because this way it can be executed directly through console without playing the story.
Indeed if you put it in its proper place, the 'SetQuestHeader' line can be skipped. The only important part is using Preprocessor_AddQuestData instead of Preprocessor_Add .

And, of course, if I'm adding quest data "AntoineChamfort" then removing "town" probably won't do much good. ;)
I'm not sold on leaving preprocessors in the memory somewhere.
So far I've had the impression that it isn't always a robust system and doesn't always work the way I would imagine it should, so I'd rather clean things up if the existing examples do that too.
Also, rather than using specific variables for different characters, you could also use "CharName" and initialize that one with the relevant character just prior to needing it.
That might be a bit of a cleaner solution. There would be less different names used then, which would also make searching for similar instances in the future much easier.
 
I'm not sold on leaving preprocessors in the memory somewhere.
That's not quite what I meant. If I add quest data "AntoineChamfort", should I not then remove "AntoineChamfort" rather than "town"? ;)

So far I've had the impression that it isn't always a robust system and doesn't always work the way I would imagine it should, so I'd rather clean things up if the existing examples do that too.
Not to mention what happens if some other quest, either existing or to be written in the future, wants to use the same character. I'd thought about leaving the definitions for Father Bernard and Father Jerald in place until the end of "Help the Church". But Father Bernard is also involved with "Strange Things Going On" so he'll probably need to be cleaned up at once. I don't think Father Jerald is used again, so it might have been alright to leave him defined until the end of the quest. But tidying him up immediately means if anyone else later writes a quest involving him, the author doesn't need to worry about definitions already existing.
 
That's not quite what I meant. If I add quest data "AntoineChamfort", should I not then remove "AntoineChamfort" rather than "town"? ;)
Oh... Uhm.... YES YOU SHOULD!!!! :wp

Not to mention what happens if some other quest, either existing or to be written in the future, wants to use the same character. I'd thought about leaving the definitions for Father Bernard and Father Jerald in place until the end of "Help the Church". But Father Bernard is also involved with "Strange Things Going On" so he'll probably need to be cleaned up at once. I don't think Father Jerald is used again, so it might have been alright to leave him defined until the end of the quest. But tidying him up immediately means if anyone else later writes a quest involving him, the author doesn't need to worry about definitions already existing.
It depends on double code versus common variable names. This could work:
Code:
Preprocessor_AddQuestData("FatherBernard", GetMySimpleName(CharacterFromID("Father Bernard")));
Preprocessor_AddQuestData("FatherJerald",    GetMySimpleName(CharacterFromID("Father Jerald")));

case "something1":
    AddQuestRecord("HelpChurch", 1); // Assume this one needs Bernard
break;

case "something2":
    AddQuestRecord("HelpChurch", 2); // Assume this one needs Jerald
break;

Preprocessor_Remove("FatherBernard");
Preprocessor_Remove("FatherJerald");
But this should work too:
Code:
case "something1":
    Preprocessor_AddQuestData("CharName", GetMySimpleName(CharacterFromID("Father Bernard")));
    AddQuestRecord("HelpChurch", 1); // Assume this one needs Bernard
    Preprocessor_Remove("CharName");
break;

case "something2":
    Preprocessor_AddQuestData("CharName",  GetMySimpleName(CharacterFromID("Father Jerald")));
    AddQuestRecord("HelpChurch", 2); // Assume this one needs Jerald
    Preprocessor_Remove("CharName");
break;;
I think the second one might be better, because:
- The preprocessors aren't added every time the quest function is called, only when a specific entry actually needs it
- It uses the same "CharName" variable, so you can search the questtext folder for "CharName" to find all dynamic character names

On the other hand, the first has some advantages too:
- You aren't repeatedly adding and removing the same processors when they're used multiple times
- You can still search for uses of specific characters
 
Snag one is that it doesn't all happen in the same place. Questbook entries are made in various dialog.c files as well as "quests_side.c". Snag two is that some of them refer to several characters at once, starting with the first line, which mentions both Father Bernard and Father Jerald. So it's going to need different variable names and it's going to need 'Preprocessor_AddQuestData' and 'Preprocessor_Remove' lines at each occasion. (I hadn't realised just how convoluted this quest is when I had the idea of leaving some preprocessor definitions in place!)
 
Back
Top