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

JRH quest

Ok, I'm on again but found a thing concerning the new SL_utils files.
There are at the moment 3 storylines (in my computer) that have SL_utils files with my function "openboxprocedure_JRH()".

If I play for ex WoodesRogers for a while a and then "NEW GAME" to another one with "openboxprocedure_JRH()" I get this error message:

COMPILE ERROR - file: storyline\GoldBug\SL_utils.c; line: 2
Function [OpenBoxProcedure_JRH] already declared in: storyline\WoodesRogers\SL_utils.c line 1

and it doesn't work.

I guess the solution is to avoid the same function name. Rename to "openboxprocedure_BART()" for ex.
I'll try to fix this and the references.
 
Really? I thought that still worked with the latest version I had posted.
Had similar problems to that before, but haven't seen any such error log messages for a while now.

Edit: UGH, yes now it DOES cause problems. :modding
Let me try to fix it.
 
Even stranger, now that I'm trying to check on this problem, it ISN'T happening anymore! :shock
 
This is not a problem with YOUR code; it is purely the game cocking up in bizarre fashion.
It SHOULD unload SL_Utils.c from the previous storyline before loading the new one. And most of the time, it DOES.

They ARE supposed to all be treated the same. And if a problem like this occurs, it might as well be in one of the QUESTS files.
And that is NOT easily avoided. Strange though that we've never seen that one.

Extract attached to your PROGRAM folder; it's only two files. I made another uniform function,
hoping that will help the game even further in treating SL_utils.c exactly the same as quests_reaction.c or both_reaction.c .

I started Standard, Bartolomeu and Woodes Rogers several times in row without closing the game first. No error messages.
If it still happens, it is rare. And easily avoided by closing the game and THEN starting a new game.
That might be safer to do always anyway.

Stupid, stupid game code!!! :boom:
 

Attachments

  • QuestFix.zip
    31.1 KB · Views: 103
Maybe why you don't get the problem but I did is because I also have the Goldbug and that one has
a lot of openboxprocedure. (where the problem was) In Bartolomeu's it's only in the not relased Cartagena I come in with
some JRH-style openbox etc.

I'll test your fix! :onya

Do yo think you can set the autoloot to off in WoodesRogers? When you get the time.
 
Maybe why you don't get the problem but I did is because I also have the Goldbug and that one has
a lot of openboxprocedure. (where the problem was) In Bartolomeu's it's only in the not relased Cartagena I come in with
some JRH-style openbox etc.
Oh, I DID get the problem between Bartolomeu and Woodes Rogers. It just isn't a very common one.
Should definitely NOT be happening each time, regardless of whether there is a lot of code in there or not.

Do yo think you can set the autoloot to off in WoodesRogers? When you get the time.
I thought I already did that in WIP 11. Is it not working?
 
I tested your latest fix & sorry but no difference. :(
But... I didn't notice there was a WIP11.:modding

I had hoped to upload before the next release.
So, I merge today and then upload all I got.
I'm getting nowhere at all - I have to get my changes into the game now.
Bugfixes can wait.
 
I tested your latest fix & sorry but no difference. :(
But... I didn't notice there was a WIP11.:modding
None at all? So you get those error messages ALL the time you switch storyline? But then why is it usually not happening for me?
This is really doing my head in. Perhaps we should prevent players from starting a new game again without closing the game first.
 
I havn't tested with wip11 yet. Working on it.
Should the 2 questfix file you sent me be on top of wip11?

Perhaps we should prevent players from starting a new game again without closing the game first.
If nothing else works, maybe that's the best.

Thanks Pieter for the autoloot off. :doff

I have tested a clean wip11 and also one with the 2 questfix files instead.
(clean = no extra new storyline)
Same problem. Maybe it's time to disable new game (without exit the game completely).
 
I havn't tested with wip11 yet. Working on it.
Should the 2 questfix file you sent me be on top of wip11?
Should be, yes.

Any chance you can upload all your files so that I can see if I can replicate it as well? So far, I only occasionally get the problem; you seem to have it MUCH more. :shock
 
As soon as I have merged I'll upload, hopefully this evening.
I noticed the problem directly after 1) WoodesRogers 2)new game: Bartolomeu

To me it looks like the autoloot off helped to prevent some bugs!:onya
 
I have uploaded "JRH files after wip11" on the ftp. Everything is there, also the unfinished new storyline.
I have temorary "blocked" it by renaming its StartStoryline. :)
 
Just finished merging your files. Couple of notes:

- I do STILL get the occasional error message:
Code:
COMPILE ERROR - file: storyline\Bartolomeu\SL_utils.c; line: 2
Function [OpenBoxProcedure_JRH] already declared in: storyline\GoldBug\SL_utils.c line 1
Not always though. Very inconsistent problem. And VERY mysterious too. It has NO reason to do that. None at all.
Why this happens, I really haven't the foggiest. But once it does, it happens for EVERY new game that is started afterwards until you close the game.
STUPID COMPUTER THING! :modding :modding :modding

- The portrait files for the American soldiers work fine for me even without your initModels.c change

- I don't think you need a separate "BUG_PUZZLES" variable. Just reuse the "JRH_PUZZLES" one. I was unable to spot much different between the two.

- I saw this code:
Code:
    ref cmdr = Group_GetGroupCommander(GetGroupIDFromCharacter("Greenford Commander"));
    cmdr.nation = "AMERICA";
 
    ref ctown = GetTownFromID("Greenford");
    ctown.nation = AMERICA;
    ctown.homeland = AMERICA;
    ctown.laigroup = "AMERICA_";
You might want to try this instead:
Code:
SetTown2Nation("Greenford", AMERICA);


- You'll be wanting to get rid of that Isla de Muerta code in your StartStoryline.c file.

- Your Charlestown locations need COL files! :whipa
Edit: Just for the sake of it, I've made some of my own for your outside locations.
I was just too curious to see what they'd look like! :wp

- What nation relations do you want for the player at game start? I put this in place for Woodes Rogers:
Code:
    // PB: Modify Default Relations
    SetRelationsAsNation(ENGLAND);                    // Set nations as per England for story start
    SetActualRMRelation(PIRATE, REP_LEAVEMIN);        // You ARE a pirate
Do you want to set your relations AS America for this one?

- Lots of item descriptions missing.

- Some Charlestown-related error, by the looks of it:
Code:
RUNTIME ERROR - file: Towns\Towntable.c; line: 316
missed attribute: island
 
Also, your storyline description is more than a little bit odd and confusing! o_O

Also, we COULD try this in PROGRAM\QUESTS\quests.c:
Code:
void UnloadStorylineFile(string FolderName, string FileName)
{
    string segName = GetStorylinePath(FindCurrentStoryline()) + FolderName + FileName;
//    if (SegmentIsLoaded(segName))
//    {
//        trace(segName + " was loaded, unloading now...");
        UnloadSegment(segName);
//    }
}
Perhaps that will FORCE the files being unloaded even if the game wasn't sure if it was loaded before...?

Edit: Nope, STILL doesn't work. Really, I've run out of options.
Perhaps indeed then it IS the best idea to rename those functions to _WR, _BART and _BUG instead.
Despite my every effort, it isn't working PROPERLY. :modding :modding :modding
 
Perhaps indeed then it IS the best idea to rename those functions to _WR, _BART and _BUG instead.
Just made the code changes for that. So far, it seems to be working. You'll need to check on it some time though. Make sure I didn't mix anything up. :facepalm
 
Thanks for your time with and interest in my files Pieter. :doff

The portrait files for the American soldiers work fine for me even without your initModels.c change
Yes but not in the Goldbug storyline. :no There is a soldier by the gate if you jump start to "Chinatown".

I don't think you need a separate "BUG_PUZZLES" variable.
No maybe not.

SetTown2Nation("Greenford", AMERICA);
Ok.
You'll be wanting to get rid of that Isla de Muerta code in your StartStoryline.c file.
Ok.

Just for the sake of it, I've made some of my own for your outside locations.
Wow, I had not got to that yet. :xmas

SetRelationsAsNation(ENGLAND); SetActualRMRelation(PIRATE, REP_LEAVEMIN);
Ok.

Do you want to set your relations AS America for this one?
Hmm yes I guess so.

Lots of item descriptions missing.
Some Charlestown-related error, by the looks of it:
Yes I know. It's very unfinished. :type1

Perhaps indeed then it IS the best idea to rename those functions to _WR, _BART and _BUG instead.
You have already fixed it! :dance
You'll need to check on it some time though.
Of course! :onya
Also, your storyline description is more than a little bit odd and confusing!
Yes, it's intentional. I thought it was fun to use the original quotation from Poe's short-story. :read

If you want to test (maybe you did that already) the Goldbug it's of course only to namechange the StartStoryline.
In that you can choose start for ex, now it will get you direct to Charleston.

Next thing for me is to clean up the WoodesRogers. I also found a bug or two there I'll try to fix.
Then I'll return to the Bug and gunpowder producing in Chinatown. :boom:
 
I'm preparing some files for you now so you can test.

Yes but not in the Goldbug storyline. :no There is a soldier by the gate if you jump start to "Chinatown".
That's exactly the guy I tested with. His portrait shows just fine. :shrug
[Just tested again and now he DOESN'T have it. WHA??? I know what I saw, dammit!!!]

BTW: I definitely like that Charlestown port with the Steam Frigate and sound effects. Very cool! :woot

If you want to test (maybe you did that already) the Goldbug it's of course only to namechange the StartStoryline.
In that you can choose start for ex, now it will get you direct to Charleston.
I got a bit stuck early on when you're supposed to light the fire to read what it says on that sheet or parchment.
I got the fire going just fine, but have no clue how to get to looking at that parchment. All I manage to do is to douse the fire again. :facepalm
 
[Just tested again and now he DOESN'T have it. WHA??? I know what I saw, dammit!!!]
Hum. Apparently it works the SECOND time, but not the first time. Really bizarre.

Anyway, see attached for some files I modified. I hope it helps some. :doff
 

Attachments

  • For JRH.zip
    1 MB · Views: 196
It's both the damper (up-down) and the 'air-pedal' (twice) to get max fire.
Then press the F3 button at the firplace. It's supposed to look like Legrand heats up the parchment.
(draws blade for a second)

Strange with the soldier portrait. o_O

Thanks for the files - I'll test tomorrow. :doff
 
Back
Top