1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Confirmed Bug fetch quests do not expire

Discussion in 'Build Mod Bug Tracker' started by Hylie Pistof, Oct 29, 2017.

  1. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    As the title says the fetch quests do not expire. What this means is that later in a game when there are 3 items locked out as contraband plus another 2-3 items locked out due to fetch quests there isn't much to choose from when trying to trade with a merchant.

    It doesn't help to do the fetch quests because as soon as one is done another one starts. This forces one to only haul cargo for merchants instead of trading for meself.
     
  2. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,621
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I thought they did expire at some point?
    With only one at a time per town?
     
  3. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    No they do not expire so they do pile up.
     
  4. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,621
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
  5. Levis

    Levis Find(Rum) = false; Staff Member Programmer Creative Support Storm Modder

    Joined:
    Oct 6, 2013
    Messages:
    6,701
    Gender:
    Male
    Occupation:
    ICT
    Location:
    University Twente (Netherlands)
    Ah the fetch quests which exists do expire but once they are accepted the "cargo" can be removed but the quest itself wont expire and therefore it will keep blocked.
    I can't change this now but in the different dialog files for the fetch quest at this point:
    Code:
            case "agree fetch":
                d.Text = DLG_TEXT[8];
                Link.l1 = DLG_TEXT[9];
                Link.l1.go = "exit";
                if(!CheckAttribute(PChar,"fetchquestactive")) PChar.fetchquestactive = 0;
                //Questbook
                Preprocessor_AddQuestData("town",ctown.name);
                Preprocessor_AddQuestData("type","apothecary");
                Preprocessor_AddQuestData("amount",sti(NPChar.fetch_quest.amount));
                Preprocessor_AddQuestData("good",Goods[sti(NPChar.fetch_quest.good)].name);
                Preprocessor_AddQuestData("money",sti(NPChar.fetch_quest.money));
                Preprocessor_AddQuestData("date",NPChar.fetch_quest.expire);
                questbookname = "fetch&number="+NPChar.fetch_quest.cargoid+NPChar.index; //Set a questname
                SetQuestHeader(questbookname);
                AddQuestRecord(questbookname, 1);
                Preprocessor_Remove("town");
                Preprocessor_Remove("type");
                Preprocessor_Remove("amount");
                Preprocessor_Remove("good");
                Preprocessor_Remove("money");
                Preprocessor_Remove("date");
                PChar.fetchquestactive = sti(PChar.fetchquestactive) +1;
                NPChar.fetch_quest_active = TRUE;
            break;
    
    a line should be added to call for a quest case which sets a timer something like this:
    Code:
    pchar.quest.generate_trade_quest.win_condition.l1 = "Timer";
                pchar.quest.generate_trade_quest.win_condition.l1.date.day = GetAddingDataDay(0, 1, 0);
                pchar.quest.generate_trade_quest.win_condition.l1.date.month = GetAddingDataMonth(0, 1, 0);
                pchar.quest.generate_trade_quest.win_condition.l1.date.year = GetAddingDataYear(0, 1, 0);
                pchar.quest.generate_trade_quest.win_condition = "generate_trade_quest";
    
    but with the right questname etc the questname you probably want to be the "Questbookname" so you have to set this to the pchar to make sure the data is transfered to the quest, afterward you can remove it again. Same goest for the expire date. You could also sent the NPChar index to the quest and then get the data from the NPChar.
    When the timer is up the quest should be stopped and everything should be set back again.
    I remember this used to be in the game when I first made it. I don't know why it doesn't now ...
     
    Pieter Boelen likes this.

Share This Page