Skip to content

[Windows][Steam] Multiple issues with Npcs spawning multiple times in dungeons

purple5003purple5003 Member Posts: 6
edited January 2015 in BGII:EE Bugs (v1.3.2064)
1. Load save in multiplayer
2. Walk to upper left corner of the temple ruins, Boy and Digdag should be spawned, with Boy fighting Digdag

Obsered: Npcs in top left
Expected: Nothing in top left
Notes: this happens in many areas,
Save appears to behave as expected when loaded in single player





Hi, me and my friend have been enjoying some enhanced multiplayer, but almost every dungeon we enter a select few Npcs are present. Nearly every dungeon includes pheasants running around. Often minister lloyd and his wife make an appearance, usually with multiple copies and worried townies from the initial meeting with lloyd. Chief DigDag also shows up, and most recently 3 copies of neera appeared.

Some sceenshots from Der anise hold and the cult of the eyeless dungeon
http://imgur.com/a/nbYF3
Post edited by purple5003 on

Comments

  • HurricaneHurricane Member, Translator (NDA) Posts: 730
    Would you say the symptoms are the same as reported here?
  • purple5003purple5003 Member Posts: 6
    edited January 2015
    A similar issue, but I believe the issue is triggered with events associated with entering an area, like enemies re-spawning, In most cases the npcs spawn in later visits to areas, but as we progress through the game this pattern does not hold, most recently entering the temple ruins caused Digdag, Boy, and a pheasant to spawn again, and I have been able to recreate the issue with myself loading the save file, as well as my friend loading the file.

    We are experiencing very little lag.

    Edit: progressing through the temple of amunator for the first time now, Digdag, neera, and a pheasant have been sighted, issue seems not to be correlated to returning to area.
    Post edited by purple5003 on
  • purple5003purple5003 Member Posts: 6
    edited January 2015
    Perhaps its related to reloading the game, we just died foolishly fighting Thaxll'ssillyia the shadow dragon, and when we reloaded the save Digdag was glitched inside of the walls of the area.

    Multiple saves and reloads in the same area provide inconsistent spawns of Digdag, Neera, and pheasants. Minister lloyd has not shown his face recently, My guess is completing his quest have satisfied the army of lloyds to not interfere with our game any more.
  • Gate70Gate70 Member, Developer Posts: 3,883
    edited January 2015
    @purple5003‌
    What is probably happening is that these characters are transitioning, i.e. moving to a new area. Minister Lloyd should move to his cabin, Chieftain Digdag to Tazok, Neera to the Wild Forest and the pheasant probably leaving an area in panic due to nearby combat.

    The game handles this by flagging the character as invisible and they then follow every area transition until their destination is reached. So if you never went to Umar again the mayor would end up following for the rest of the game.

    There were issues with this in earlier versions of the game and a fix was applied as part of the 1.3 patch but there are three possible scenarios where you may see this.
    1. Playing on a version of the game before 1.3, i.e. the original release or with the 1.2 patch.
    2. Starting a game on an earlier version and updating to 1.3 mid game. Any characters already affected cannot be fixed.
    3. Possibility that the fix included with 1.3 only picked up one cause of this and another cause also exists. Multiplayer may add extra scope for this, although in my multiplayer runs I haven't seen this behaviour.

    In your case, try heading to the Wild Forest to lose Neera, and to Tazok to lose Digdag. I'll have a look to see if I can work out where the pheasant is heading...
  • Gate70Gate70 Member, Developer Posts: 3,883
    hmm, I think you have the below.

    Neera. Hidden Refuge. 1 instance remains.
    Pheasant. Garren Windspears cabin. Creates a 2nd instance.
    Pheasant. Copper Coronet. Creates a 2nd instance.
    Boy. Keldorns house. Creates a 2nd instance.
    Chieftain Digdag. I didn't try as you've not done the later part of Windspear Dungeon.

    Your initial save had Digdag present and attacking, when I tried moving around he appeared to work as expected (transitioning, not visible, not hostile). Are you both using the 1.3 version - if not, I would recommend updating.
    Thanks
  • purple5003purple5003 Member Posts: 6
    edited January 2015
    I am am running 1.3.2064 and I am almost certain that my friend, the host of the game, is running at least 1.3. Bears have the ludicrous speed the patch gave them, and the genie Malaaq gave us an item from his updated loot table, leading me to believe that he has, and I can confirm this later today. Upon pushing into new areas I was unable to replicate the problem after downloading and playing the save myself, and I mistakenly thought Digdag was not present and attacking when the save was created, so the problem seems to be isolated to my friend hosting the game. None of his files were incorrect when he checked using steams verify integrity of game cache.
  • purple5003purple5003 Member Posts: 6
    edited January 2015
    Confirmed that my friend is running 1.3.2064, and the game has been created on 1.3.2064.
  • HurricaneHurricane Member, Translator (NDA) Posts: 730
    @Gate70 I'm not sure how useful this is, but I want to let you know. There is a component in TobEx that makes me think Ascension64 was onto this exact problem.

    From TobExReference.htm:
    Creatures Moving Between Areas
    TobEx fixes a bug whereby creatures moving between areas can get multiple copies saved in the area file in a saved game. This bug was fixed in the Throne of Bhaal 26499 BETA patch, and the fix is re-created by TobEx.
    TobEx also fixes a bug where creatures chasing targets through an area transition can be cloned because the creature was not removed from the previous area.
    And from TobEx_ini.txt:
    -----1250 Move Areas Fix [F]
    This hack tries to fix a bug where a creature that is moving between areas may have multiple requests to do so and thus creates multiple copies of the creature in the area and thus the saved game
    Courtesy of the Throne of Bhaal 26499 beta patch
    So there was original code written by Bioware for the beta patch that seems to address this type of problem, and this code was incorporated into TobEx.

    However, Ascension64 adjusted Bioware's code by adding an additional break command at the relevant position. See TobEx/src/ext/InfGameCore.cpp (source code on Github).

    //CMoveAreasList
    DefineTrampMemberFunc(void, CMoveAreasList, MoveAllTo, (CArea& area), MoveAllTo, MoveAllTo, 0x5EFA6D);

    void DETOUR_CMoveAreasList::DETOUR_MoveAllTo(CArea& area) {
    if (0) IECString("DETOUR_CMoveAreasList::DETOUR_MoveAllTo");

    ItmFileEffect* pItmEff = new ItmFileEffect;
    CEffect::ClearItemEffect(*pItmEff, CEFFECT_OPCODE_MOVE_TO_AREA);
    IECPtrList cp;

    POSITION pos_i = GetHeadPosition();
    while (pos_i != NULL) {
    MoveAreasElement* pElement = (MoveAreasElement*)GetNext(pos_i);
    MoveAreasComparator* pComp = new MoveAreasComparator;

    pComp->rArea = pElement->rArea;
    pComp->ptDest = pElement->ptDest;

    pItmEff->m_nParam2 = pElement->cOrient;
    pItmEff->m_nParam1 = pElement->nDelay;
    pElement->rArea.Copy(pItmEff->m_rResource);
    pItmEff->m_cTiming = 1;
    CPoint pt;
    pt.x = -1;
    pt.y = -1;
    CEffect* pEff = &CEffect::DecodeEffect(*pItmEff, pElement->ptDest, pElement->eCre, pt, -1);

    CInfGame* pGame = g_pChitin->pGame;
    CCreatureObject* pCre = NULL;
    char threadVal;
    do {
    threadVal = pGame->m_GameObjectArray.GetDeny(pElement->eCre, THREAD_ASYNCH, &pCre, INFINITE);
    } while (threadVal == OBJECT_SHARING || threadVal == OBJECT_DENYING);
    if (threadVal != OBJECT_SUCCESS) {
    delete pComp;
    } else {
    pComp->sCreLongName = pCre->GetLongName();

    bool bFoundIdentical = false;
    POSITION pos_j = cp.GetHeadPosition();
    while (pos_j != NULL) {
    MoveAreasComparator* pCompElement = (MoveAreasComparator*)cp.GetNext(pos_j);
    if (pCompElement->ptDest.x == pComp->ptDest.x &&
    pCompElement->ptDest.y == pComp->ptDest.y &&
    pCompElement->rArea == pComp->rArea &&
    pCompElement->sCreLongName.Compare(pComp->sCreLongName) == 0) {
    delete pComp;
    pGame->m_GameObjectArray.FreeDeny(pElement->eCre, THREAD_ASYNCH, INFINITE);
    bFoundIdentical = true;
    break; //Bioware forgot to break this loop
    }
    }

    if (!bFoundIdentical) {
    cp.AddTail(pComp);
    pCre->m_header.m_dwFlags |= CREFILEHEADER_FLAG_LIMBO_CREATURE; //bit14
    area.m_ObjectsToMarshal.AddTail((void*)pCre->e);
    pCre->ApplyEffect(*pEff, true, TRUE, FALSE);
    pGame->m_GameObjectArray.FreeDeny(pElement->eCre, THREAD_ASYNCH, INFINITE);
    }
    }
    }

    POSITION pos_k = cp.GetHeadPosition();
    while (pos_k != NULL) {
    MoveAreasComparator* pElement = (MoveAreasComparator*)cp.GetNext(pos_k);
    delete pElement;
    }
    cp.RemoveAll();

    delete pItmEff;
    pItmEff = NULL;

    return;
    }


    Of course I'm not sure whether the code has long been integrated into the EEs. But if that's not the case, it might be helpful if the devs take a look at what TobEx does there.
Sign In or Register to comment.