MV 1.4.0 default object plugin encounter bug?

● ARCHIVED · READ-ONLY
Started by MushroomCake28 7 posts View original ↗
  1. I don't know where I should post this since I've already resolved the issue so I figure I'd post here.

    My current project is using version 1.4.0 of MV and for the first time I used regionID as a condition for encounters (I rarely use them). Curiously there was a crash when I tested, but the error wasn't coming from one of my numerous plugins, but rather from the default object plugin. It wasn't recognizing the regionID() function in the Game_Player object. Sure I fixed it, but it seems curious to me that an obvious bug like this would be in the default plugin. Here's the default function:

    Code:
    Game_Player.prototype.meetsEncounterConditions = function(encounter) {
        return (encounter.regionSet.length === 0 ||
                encounter.regionSet.contains(this.regionId()));
    };

    Now I don't know if it's only in my project, but there's is no regionId() function in Game_Player. Anyone else got that issue?
  2. Game_Player inherits from Game_Character, which inherits from Game_CharacterBase, which has the regionId function.

    I don't have 1.4.0 but I checked 1.3.3 and it's there.

    What was the code prior to your fix? What you've got in your post there is exactly the same as what I have in 1.3.3
  3. I've checked Game_CharacterBase and it didn't have the regionId function. That was the issue, and that's why I find it weird.
  4. wow! I wonder if it got removed just in that build for some reason?
  5. Or maybe I accidentally delete it? Honestly I usually don't touch the default plugins, but perhaps I did slip once. Or maybe someone touched my computer while I was away from it (I sometimes have sublime text open in class and leave my computer open during the 10 min breaks).

    If it was intentionally removed, then I don't understand why.

    Anyways, if someone else with version 1.4.0 encounters this bug, you know what the problem is. Just add the regionId() functino to Game_CharacterBase and it'll be fixed.
  6. MushroomCake28 said:
    Or maybe I accidentally delete it?

    I think that's it.

    I just downloaded 1.4.0 and checked the core files in the NewData folder. Game_CharacterBase.prototype.regionId is definitely there.

    It seemed strange, because if it really was missing, a LOT of people would have complained about it. There was nothing at all in the 1.4.0 release thread, and 1.4.1 had no mention of the bug in the update log.
  7. Yeah. Thanks for confirming.