• 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 Land Encounters during Quest Scenes

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Grey Roger: I found where those raiders are generated. Sort-of.
The relevant code is in PROGRAM\LandEncounters\LanEnc_init.c:
Code:
int InitLandEncounters()
{
    int n;

    n = 0;

    LandEncounters[n].id = "ENC_RAIDERS";

    LandEncounters[n].StartingQuest1 = "LandEnc_RaidersLogin";
    LandEncounters[n].StartingQuest1.QuestType = "Location";
    LandEncounters[n].StartingQuest2 = "LandEnc_RaidersStart";
    LandEncounters[n].StartingQuest2.QuestType  = "Locator";
This then triggers the following from quests_common.c:
Code:
//------------------------------------------RAIDERS----------------------------------------------------
        case "LandEnc_RaidersLogin":
I think this actually gets executed by LEnc_login.c:
Code:
bool LEnc_LoginStart(ref location, string encGroup, string encLocator, int maxChrQuant)
{
   

    ref player, CurTemplate;
    player = GetMainCharacter();
    string sTempName;
    if(!CheckAttribute(location, "type")) return false;

    CurTemplate = GetLandEncTemplateByID(location.type);

    if(CheckAttribute(location, "DisableEncounters") == true && sti(location.DisableEncounters) != 0 ) return false;
Nothing .vcskip related there; instead it checks for a "DisableEncounters" attribute instead.
Simple solution might be to replace that with .vcskip and just use that one attribute for EVERYTHING instead of having two separate ones, as appears to be the case. :facepalm
 
The disable encounters you need to keep. It's a location depended one so some locations wont have encounters.
 
The disable encounters you need to keep. It's a location depended one so some locations wont have encounters.
Vcskip can be added to the player OR to the location. Usually it is added to the location.
Which makes it work very similarly to DisableEncounters. In fact, looking into this a bit further, I noticed many instances where there is a vcskip and DisableEncounters line for the same location to ensure they're both disabled.
I propose merging them into one general toggle and be done with it.
See attached.
 

Attachments

  • DisableEncountersToVCskip.rar
    296.2 KB · Views: 50
going to mark this as fixed. if problems do arise again please move again.
 
Technically there may still be a lot of quest scenes where .vcskip isn't added as required or that isn't removed afterwards.
But I suppose addressing that is another task for another day. At least things should be more generic now.

Since @Grey Roger originally notified me of this, hopefully he can provide some comments on this though.
 
Back
Top