• 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 Several minor bugs + questions

Maybe separate folder only could be set for crew deck|cargo|gundeck and such locations, while I need all other textures in the main folder, right? If containment of the BlackPearl folder (in textures/locations/decks) is only for interiors. I mean,what deck GM model uses (textures showed by GMviewer) seems to can't be placed here.

Edit
Now it's ok with gundeck/crew quaters/cargo after I renamed textures in subfolder to standard names and left only needed like in Blackpearl one's.
now only need to figure out where to place other edited textures (for separate deck and captain cabin models)
 
Last edited:
Also, started to editing model head and
wupwupwup I accidentally applied changes to wrong model. So, can someone attach "h_wr_mummy2" file from resource/models/heads? Because I cannot get it rather that reinstall full game, it's packed quite deep and not in it's folder if trying to search for file through the archive.

Btw it seems most of the model head parts cannot be detached with the tool. So, hello 3dsMax
 
There are 3 parts: a skeleton head, an additional retextured head (for the hair) and a retextured torso + head part.
You can't separate the original head from the torso with the TOOL. That's why I covered it instead.
 

Attachments

  • h_wr_mummy2.7z
    28.9 KB · Views: 216
Thank you!
:shrug
I think I'm gonna do it with any program soft that allows it. Much simplier that way according to tutorials. I don't remember does skeletons necks and hands only retextured or it's needs a bit of model editing.
Because now I can't (not technically) play the game until I finish, haha
And, what important, how do I apply cursed model at night to char instead of basic one? Jack Sparrow, for example, got unique cursed skin, so it probably would be easy to set specific cursed skin to any char model?
 
And, what important, how do I apply cursed model at night to char instead of basic one? Jack Sparrow, for example, got unique cursed skin, so it probably would be easy to set specific cursed skin to any char model?
If I recall, the code for that is in PROGRAM\NK.c .
Search for "curse" in that file and you should find all sorts of stuff, including that one.
 
Yeah, all of them there) Btw I heard that in older Build versions curse was still in effect even if you drop the coin out of inventory. Isn't settings of it in this file?

I'm in process now with model, but at least two things still unsolved) I'll get back to that deck and cabin textures soon, but for now they didn't show up. And about that damned island (Cozumnel). I sailed around it and cannot find anything. Is it certain it's not some kind of bug? :8q
 
heard that in older Build versions curse was still in effect even if you drop the coin out of inventory. Isn't settings of it in this file?
That was never the case.
But in older versions, you couldn't drop the coins out of your inventory at all.
I think you still can't default, but @Grey Roger added a toggle that does allow you to do that.
 
Then it's better like this indeed. Also, I edited model with Maya, but not sure what needs to be done to actually be able to open it in the tool after saving and not getting index error/model coudn't be read. :read
 
And, what important, how do I apply cursed model at night to char instead of basic one? Jack Sparrow, for example, got unique cursed skin, so it probably would be easy to set specific cursed skin to any char model?
Jack Sparrow has a custom zombie skin but I don't think it is for the general coin curse. He gets that outfit at one specific time in the "Hoist the Colours" storyline.
That was never the case.
But in older versions, you couldn't drop the coins out of your inventory at all.
I think you still can't default, but @Grey Roger added a toggle that does allow you to do that.
Yes, in "PROGRAM\InternalSettings.h":
Code:
#define CURSES_DISABLED               0       // INT - 0=default: Cursed items can be dumped or given away. 1 = cursed coins, 2 = cursed albatross, 0 = neither, 3 = both
Also, the curse of the coins should be disabled in "Realistic" mode regardless of this setting - you may still find them but they don't jump into your inventory and stay there.
 
Jack Sparrow has a custom zombie skin but I don't think it is for the general coin curse. He gets that outfit at one specific time in the "Hoist the Colours" storyline.
It is used in the general coin curse too.
Story-wise, it is the same curse (even if code-wise it isn't).
 
Thanks again) I'll finish with models then get back to ship interiors and then maybe finally sail to Jamaica to make a slaughter visit this nice island, I mean.
 
It is used in the general coin curse too.
Story-wise, it is the same curse (even if code-wise it isn't).
@Grey Roger, in case you were curious, this is the way the game chooses the skeleton model for the player:
Code:
string GetCharacterCursedModel(ref chr)
{
    ref pchar = GetMainCharacter();
    if(HasSubStr(chr.model, "sparrow"))                return "47_Jack_Skel";
    if(HasSubStr(chr.model, "47_Jack"))                return "47_Jack_Skel";
    if(chr.model == "Jack")                            return "47_Jack_Skel";
    if(chr.model == "depp")                            return "47_Jack_Skel";
    if(chr.model == "JGod")                            return "47_Jack_Skel";
    if(chr.model == "47YoungJack")                    return "47_Jack_Skel";
    if(chr.model == "Bmunk")                        return chr.model;
    if(chr.model == "Skel1")                        return chr.model;
    if(chr.model == "Skel2")                        return chr.model;
    if(chr.model == "Skel3")                        return chr.model;
    if(chr.model == "Skel4")                        return chr.model;
    if(chr.model == "Skelt")                        return chr.model;
    if(chr.model == "DavyJones")                    return chr.model;
    if(chr.model == "davy1")                        return chr.model;
    if(chr.model == "davy2")                        return chr.model;
    if(chr.model == "davy3")                        return chr.model;
    if(chr.model == "davy4")                        return chr.model;
    if(chr.model == "davy5")                        return chr.model;
    if(chr.model == "Vanderdecken")                    return chr.model;
    if(IsMainCharacter(chr))                        return "Bmunk";
    if(chr.index == GetOfficersIndex(Pchar, 1))        return "Skelt";
    if(chr.index == GetOfficersIndex(Pchar, 2))        return "Skel3";
    if(chr.index == GetOfficersIndex(Pchar, 3))        return "Skel1";
    return "Skel"+makeint(1+rand(3));
}
[/COD]
 
There will be no time delay after dividing plunder if I can help it! If you need to divide plunder while a quest is in progress which involves a time limit, forcing a delay while dividing plunder will break the quest.
Update: I've been looking into this. For one thing, an option in the loanshark's dialog should keep everyone happy:
divide_plunder1.jpg divide_plunder2.jpg divide_plunder3.jpg
Choosing "Time to draw a line under this voyage..." takes you to the existing section to divide plunder, repair and restock ships. Choosing "Just divide up the gold, if you please" takes you to a similar section which does nothing to your ships and does not try to trigger the delay. I've tested it and it works, except that the time delay still doesn't happen, and I've yet to figure out why.

"Usurer_dialog.c", case "divide1", does this:
Code:
           if(REFIT_TIME)
           {
               PChar.updatedays = REFIT_TIME;
               PChar.updatedays.disableDCU = true;
               PChar.updatedays.disableIT = true;
               AddDialogExitQuest("DPFader");
           }
REFIT_TIME is defined in "InternalSettings.h" and is currently set to 60, so that's how long you're supposed to wait, not a mere couple of weeks!

"DPFader" is in "PROGRAM\QUESTS\quests_common.c" and just calls 'DPDoFade()', which is defined in "PROGRAM\Reinit.c":
Code:
void DPDoFade()
{
   if (musicID)
   {
       SendMessage(Sound,"lll",MSG_SOUND_STOP, musicID, 0);
       //oldMusicID = musicID;
   }
   ResetSoundScheme();
   PauseAllSounds();
   if(sti(GetStorylineVar(FindCurrentStoryline(), "DISABLE_TIPS")) < 1) SetReloadNextTipsImage(); // JRH
   SetEventHandler("FaderEvent_StartFade", "DPStartFade", 0);
   SetEventHandler("FaderEvent_EndFade", "DPEndFade", 0);
   CreateEntity(&reload_fader, "fader");
   SendMessage(&reload_fader, "ls", FADER_PICTURE, FindReloadPicture("Ship_Repair.tga")); // KK
   SendMessage(&reload_fader, "lfl", FADER_OUT, RELOAD_TIME_FADE_OUT, false);
}

void DPStartFade()
{
   DelEventHandler("FaderEvent_StartFade", "DPStartFade");
   ReloadProgressStart();
   QuestComplete("updatedays");
}
Trace statements show that "DPDoFade" is called, "DPStartFade" is called, but "updatedays" is not triggered. That is also defined in "quests_common.c" and is the part which is supposed to advance the calendar, one day at a time:
Code:
       case "updatedays":
           PChar = GetMainCharacter();
           if(!CheckAttribute(PChar,"updatedays")) break;
           int daysn = sti(PChar.updatedays);
           bool disableDCU = CheckAttribute(PChar,"updatedays.disableDCU");
           bool curDCU = !CheckAttribute(PChar,"disableDCU");
           bool disableIT = CheckAttribute(PChar,"updatedays.disableIT");
           bool curIT = CheckAttribute(ShipLookupTable,"itemtraders") && sti(ShipLookupTable.itemtraders);
           if(disableDCU) PChar.disableDCU = true;
           if(disableIT && curIT) ShipLookupTable.itemtraders = false;
           //if(FindLoadedLocation() != -1) LAi_Fade("", "");
           int s, dn;
           //int start = 0; if(CheckAttribute(wdmgrid,"lastupdate.day")) { start = sti(wdmgrid.lastupdate.start)+1; }
           for(dn = 0; dn < daysn-1; dn++)
           {
               trace("Gauging: Start day " + dn);
               AddDataToCurrent(0, 0, 1, true); //Changed to true so everything is updated
               ReloadProgressUpdate();
               //DailyCrewUpdate();
               //ReloadProgressUpdate();
               //UpdateAllTowns(false);
               //trace("Gauging: Towns done");
               //ReloadProgressUpdate();
               //UpdateAllStores(false);
               //wdmFleetsUpdateDay(); //wdmFleetsUpdate(false, false); // WM 05-04-24
           }
           if(curDCU) DeleteAttribute(PChar,"disableDCU");
           ReloadProgressUpdate();

           if(curIT)
           {
               ShipLookupTable.itemtraders = true;
               UpdateAllItemTraders(2); // make everyone blank, but put off the actual updates until you speak with them.
           }
           ReloadProgressUpdate();
           AddDataToCurrent(0, 0, 1, true); // do the last day with the normal post.
           DeleteAttribute(PChar,"updatedays");
       break;
 
Choosing "Time to draw a line under this voyage..." takes you to the existing section to divide plunder, repair and restock ships. Choosing "Just divide up the gold, if you please" takes you to a similar section which does nothing to your ships and does not try to trigger the delay.
I wonder now... I don't think all that many people use Divide the Plunder, despite the in-game encouragement.
If there are two options, one with time delay and one without, would anyone EVER use the one with delay?

"updatedays" is not triggered
At a glance, I didn't even see a call to it anywhere.
Am I missing something?!?
 
I wonder now... I don't think all that many people use Divide the Plunder, despite the in-game encouragement.
If there are two options, one with time delay and one without, would anyone EVER use the one with delay?
Presumably @SSD would, as he's the one asking for the delay. It's also the only way you get the free repair and restock of the ship. (I'm pretty sure I recall someone else who does not want the restock, and I won't miss it either as I then need to go to the store and sell most of it to free up space for other purposes.)

At a glance, I didn't even see a call to it anywhere.
Am I missing something?!?
It's in "DPStartFade()":
Code:
void DPStartFade()
{
trace("DPStartFade: started");
   DelEventHandler("FaderEvent_StartFade", "DPStartFade");
   ReloadProgressStart();
   QuestComplete("updatedays");
}
I'm not sure how "DPStartFade" is called, but that trace statement which I added at the start shows that it is called.
 
Last edited:
So DPStartFade does get called, but Updatedays does not?
How about QuestComplete? I thought that was a hard function call to immediately trigger a certain quest case.
I'm confused on why that wouldn't work. Maybe put trace statements EVERYWHERE?
That's what I used to do for confusing investigations...
 
@Grey Roger: Looks like 'QuestComplete' specifically triggers quests_reaction.c, but "updatedays" is actually in 'CommonQuestComplete' these days.
Since quests_common.c was added many years after the Divide the Plunder mod, I assume that change is what broke it.
You could try swapping those function calls and that might be all that's needed to fix it.

Alternatively, 'CompleteQuestName("updatedays")' is probably even safer.
That is the function that checks ALL possible places where a quest case could be hiding, so it no longer matters which file it's in.
This is also the function that now logs all quest case calls to compile.log, making debugging much easier.
 
Yes, I'd just come to the same conclusion. "QuestComplete" is defined in each storyline's "quests_reaction.c", and ends by setting attribute "PChar.questnotfound" if the quest name is not in the storyline file. "CompleteQuestName" is defined in "PROGRAM\QUESTS\quests.c" and is the one which searches every quest definition file it can find, using that "questnotfound" attribute to find out whether the file it's just tried was the one which contains the quest.

I'll see what happens when I next get the chance to play the game...
 
Update: that worked! As a bonus, it now uses a different load screen - not my doing, it must previously have been using the wrong screen as well as failing to wait for a couple of months. 'DPDoFade' includes this line:
Code:
SendMessage(&reload_fader, "ls", FADER_PICTURE, FindReloadPicture("Ship_Repair.tga"));
And now the screen does indeed look like something about ship repair. Then I stand around in the loanshark's office for a long time and collect lots of free money from my estates.
divide_plunder_load_screen.jpg divide_plunder4.jpg

@SSD: download "PROGRAM.zip", extract and copy it into place, and you should then have all the delay you want plus more. :D If you want to change the length of the delay, edit "PROGRAM\InternalSettings.h" and find this line:
Code:
#define REFIT_TIME                       60       // INT - number of days to refit for next expedition
 

Attachments

  • PROGRAM.zip
    88.3 KB · Views: 192
Update: that worked!
Great news!
Sounds like it was ultimately a logical and quick fix then. Those are my favourite ones. :cheeky

As a bonus, it now uses a different load screen - not my doing, it must previously have been using the wrong screen
Hey, it's BACK! Excellent, I like that one. :woot
(I maaay also have picked that picture and made the loading screen, so I'll admit honestly that I am biased. :wp )
 
Back
Top