• 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 Disable saving in cartenga fort

Bartolomeu o Portugues

Buccaneer
Staff member
Administrator
Storm Modder
Storm Modeller
About my quest, do NOT save in the Cartagena fort location (the quest is messed up otherwise). If Pieter or Levis can do something about that (preventing to save in this location), it would be great.
By the way, why the fantom characters and even some building set models disappear when you load a save game? I have no idea o_O
 
We should also disable saving on ship decks.

Fantom characters and build set things are probally stored in a object which isn't saved. I might be able to look into this....
 
Had a quick look at the other problem.
the saving is triggerd in LAi_group_SaveInfo in LAi_groups.c
For saving at sea etc there are cases defined in seadogs.c to save some extra things which are recovered again at loading. I think this should also be done for the fantoms etc. I will look into this a bit more but I think I could fix this for you @Bartolomeu o Portugues
 
oh and @Pieter Boelen I would change it in mainmenu.c I think and just disable the save button there, or am I missing something?
 
oh and @Pieter Boelen I would change it in mainmenu.c I think and just disable the save button there, or am I missing something?
That isn't how it has been handled in similar instances elsewhere in the game, so that would be a bit weird.
Also, doing it in the Save menu allows you to add an explanatory string on why. Otherwise players might go like "agh, my save button is disabled" or something.

Actually, for the On-Sea thing disabling the button should be OK. Not for Bartolomeu's quest thing though.
 
We should also disable saving on ship decks.
PROGRAM\INTERFACE\mainmenu.c replace this:
Code:
if (LAi_IsBoardingProcess() || bMutinyDeckStarted) SetSelectable("B_SAVE",false);
With this:
Code:
if (LAi_IsBoardingProcess() || ownDeckStarted()) SetSelectable("B_SAVE",false); // PB: No save on ship's deck to prevent errors
 
About my quest, do NOT save in the Cartagena fort location (the quest is messed up otherwise).
PROGRAM\INTERFACE\save_load.c find:
Code:
// KK -->
   //SetNodeUsing("PROFILES_BUTTON", !bThisSave);
   SetNodeUsing("PROFILES_BUTTON", true); // Screwface

   bNightmareMode = false; // NK defaults to off, needed due to CA below
   if (bThisSave) {
     // scheffnow -->
     ref PMainCharacter = GetMainCharacter();
     if(CheckAttribute(PMainCharacter, "NoSave.Resurrection"))
     {
       bNightmareMode = true;
       GameInterface.strings.NoSave = TranslateString("", "You can't save until") + " " + GetMyFullName(ResurrectingOfficiant) + " " + TranslateString("", "leaves.");
       EnableString("NoSave");
     }
     if (CheckAttribute(PMainCharacter,"NoSave.CarryRelic") == true && PMainCharacter.NoSave.CarryRelic != "none") {
       bNightmareMode = true;
       GameInterface.strings.NoSave = TranslateString("","You can't save while carrying a holy relic! Give it to a monk") + " " + PMainCharacter.NoSave.ReleaseMonkLocation + "."; // NK
       EnableString("NoSave");
     }
     // scheffnow <--
   //   if(sCurProfile=="" || FindProfile(GetStoryline(FindCurrentStoryline()), sCurProfile) < 0) // Screwface
     if(sCurProfile=="") // PB: Simplify to allow saving
     {
       bNightmareMode = true;
       GameInterface.strings.NoSave = "You can't save without an active Profile";
       EnableString("NoSave");
     }
   }
// <-- KK
Add lines marked with PB like this:
Code:
// KK -->
   //SetNodeUsing("PROFILES_BUTTON", !bThisSave);
   SetNodeUsing("PROFILES_BUTTON", true); // Screwface

   bNightmareMode = false; // NK defaults to off, needed due to CA below
   if (bThisSave) {
     // scheffnow -->
     ref PMainCharacter = GetMainCharacter();
     if(CheckAttribute(PMainCharacter, "NoSave.Resurrection"))
     {
       bNightmareMode = true;
       GameInterface.strings.NoSave = TranslateString("", "You can't save until") + " " + GetMyFullName(ResurrectingOfficiant) + " " + TranslateString("", "leaves.");
       EnableString("NoSave");
     }
     if (CheckAttribute(PMainCharacter,"NoSave.CarryRelic") == true && PMainCharacter.NoSave.CarryRelic != "none") {
       bNightmareMode = true;
       GameInterface.strings.NoSave = TranslateString("","You can't save while carrying a holy relic! Give it to a monk") + " " + PMainCharacter.NoSave.ReleaseMonkLocation + "."; // NK
       EnableString("NoSave");
     }
     // scheffnow <--
     // PB -->
     if (CheckAttribute(PMainCharacter,"NoSave.Custom")) {
       bNightmareMode = true;
       GameInterface.strings.NoSave = "You can't save " + PMainCharacter.NoSave.Custom + ".";
       EnableString("NoSave");
     }
     // PB <--
   //   if(sCurProfile=="" || FindProfile(GetStoryline(FindCurrentStoryline()), sCurProfile) < 0) // Screwface
     if(sCurProfile=="") // PB: Simplify to allow saving
     {
       bNightmareMode = true;
       GameInterface.strings.NoSave = "You can't save without an active Profile";
       EnableString("NoSave");
     }
   }
// <-- KK
Now you can disable saving like this:
Code:
pchar.NoSave.Custom = "while you are in the Cartagena Fort location
Re-enable with:
Code:
DeleteAttribute(pchar, "NoSave.Custom");
Coding it this way allows flexibility for future quest use, since you can enable/disable saving whenever you want and provide a logical reason to prevent confusing the player.
^ Also @Jack Rackham, if you may be interested in that.

Since I am lazy, I didn't bother about translation options! :razz
 
Its going to be to much work to get the fantom saving for this release so I move that to the next one.
@Pieter Boelen did disable the saving at the fort right?
 
I added the support to do it. It just has to be enabled and disabled at appropriate times in the quest.
Alternatively, I can also do it permanently and location-related, but that wouldn't be my first choice.
 
That's what I was hoping for, but he'll be without his computer for a few days. :facepalm
 
My computer is back for one hour.:D
After the dinner, I'll send the fixes about the Bartolomeu side quest and the enabled/disabled code for the savegame feature that I need to add in the quests_reaction.c, right?
 
Final fix for this must be made. If nobody does it before Sunday, I'll make it location-dependent.

What is the correct location ID where save is to be disabled again?
 
Code added as requested. I also add the following line at the point where saving is disabled:
Code:
DoQuickSave();
That might prevent some frustration if you forgot to make a save before going into the fort. :facepalm
 
Back
Top