Sign in to follow this  
Alexgopen

Having to build epic structures AGAIN

Recommended Posts

On affliction we had already completed building all of our epic structure missions, so we were not supposed to get these missions anymore.

 

We were just now given a mission to build one of these again, when they had all already been completed.  Additionally, in the past these would have to be built in the northwest, northeast, southwest, and southeast.  The new mission states to build it just in the "east".  No "build epic structure" mission has ever requested a structure to be built anywhere other than a corner (northwest, northeast, southwest, and southeast).

 

5d9b005db15f3bb495a80cd111ccc279.png

 

The bugs are as follows:
1. We are not supposed to receive this mission.  We already built all of our spirit gates on affliction.

2. The requested build location seems to be wrong.  These have always been built in the NE/NW/SE/SW. 

 

3. Also the last time we had to build these spirit gates, there was a bug with the tile checking where it would not find nearby marsh unless it was on one specific tile, a few tiles out to the northwest.  I ended up having to figure this out through the WU code, as it would start the tile search for marsh in the northwest, but never work its way through the rest of the search area because of incorrect for loops.  I don't know if this ever got fixed, and when we ran into this bug while building our spirit gates last time, we ended up having to show it to enki and have him paint an extra tile to marsh because the rest of the marsh tiles around the slabbed area were not being counted.

Share this post


Link to post
Share on other sites

I can literally take a GM on a tour of our server to show you all 18 (3 of each type) of our epic structures that we already built, to show that we are not supposed to get these missions anymore.  It will take awhile to get around to all of them but if that's what it takes, so be it.

 

Or even just check the Affliction twitter for when we built all 3 of our spirit gates:

 

Additionally, a mission reset on affliction is needed.

Edited by Alexgopen

Share this post


Link to post
Share on other sites

Would need a Budda clarification but afaik the other sectors (center north west east south) being checked now is part of the valrei update, and it was just bugged until recently where it wasn't checking upon generation that the sector was already finished.  If it doesn't let you start the gate (says "nows not the right time" or whatever) then it does need a reset and another fix

 

Kinda sucks but on the bright side action timers are insanely fast now

Share this post


Link to post
Share on other sites

I am of the mind whether it was intentional or not, the constructions of the epic structures were either reset during the re-do of missions, or budda decided they can be a regular feature, either way be nice if patch notes were more detailed.

 

We spent a lot of time to grind out all the epic build missions so that they were all finished on exodus, only to have them crop up all over again.

 

These are no fun to build just for the sake of doing a mission, and now that they are back, no one wants to do them so there sits a mission that no one is going to do for a week, if it is something like a pylon.

Edited by JakeRivers

Share this post


Link to post
Share on other sites

I checked and this is how it is now intended to be, there is no limit per region anymore and 8 regions instead of 4 now.  They should be pretty uncommon, but it might be best to remake this in the suggestions forum as it is not considered a bug.

Share this post


Link to post
Share on other sites
    final int getNextBuildTarget(int difficulty) {
        difficulty = Math.min(5, difficulty);
        final int start = difficulty * 3;
        int templateFound = -1;
        for (int x = start; x < 17; ++x) {
            if (this.epicTargetItems[x] <= 0L) {
                templateFound = x;
                break;
            }
        }
        if (templateFound == -1) {
            for (int x = start; x > 0; --x) {
                if (this.epicTargetItems[x] <= 0L) {
                    templateFound = x;
                    break;
                }
            }
        }
        if (templateFound <= -1) {
            return -1;
        }
        if (templateFound < 3) {
            return 717;
        }
        if (templateFound < 6) {
            return 714;
        }
        if (templateFound < 9) {
            return 713;
        }
        if (templateFound < 12) {
            return 715;
        }
        if (templateFound < 15) {
            return 712;
        }
        return 716;
    }

 

epicTargetItems is an array of longs of size 18 containing the wurmids of the epic structures already built on the server.  This is not a dynamic array, it is never increased beyond size 18, and it is never checked at any indices beyond 0-17.  There are 6 different types of epic structures, and you are required to build 3 of each type.  You can easily see that here, in the if (templateFound < 3) etc checks, it's determining which type of item template id it should use to tell you which type of epic structure to build. 

 

templateFound starts at a default value of -1, and it only changes from this if it finds an entry in the epicTargetItems array where there there does not exist a valid wurmid.  The epicTargetItems array is only checked from indices 0-17, so if we build any additional epic structures, like you say, then they would never even be counted and we would forever after have to continue building more epic structures, filling up the server. 

 

In normal circumstances, after checking the epicTargetItems array for invalid wurmids (or the default value of 0), if the array is filled in all 18 indices with valid wurmid (as it should be in our case, where we already built all 18 of our epic structures), then it would leave templateFound set to -1, and the method would return -1.  This would result in generateNewMissionForEpicEntity rerolling a new mission type to try to create a new mission, and it would attempt to roll a new mission up to 10 times, until a new mission is actually created. 

 

What seems to be happening here, is that templateFound is being incorrectly set to something other than -1 (the value it should be when all 18 epic structures area already made and in the epicTargetItems array), and greater than 15.  This results in execution passing all of the if statements, and returning 716, the item template id for spirit gate.  This is likely due to the new difficulty system being used to determine the starting index for checking the epicTargetItems array for some reason.  This doesnt make much sense to do, and in our case, the mission is difficulty 5, so it would've started by checking indices 16,17 in the first for loop, then indices 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 in the second for loop.  From the start this is quite obviously wrong as it's never checking index 15, and it makes no sense to check different parts of the epicTargetItems array in different order and direction based on mission difficulty. 

 

As a result, something is going wrong in the check of the 18 indices of epicTargetItems,  templateFound is getting set to something other than -1 (but greater than 14), when it should be -1 if all 18 epic structures are found in that array, and execution of this method reaches the bottom, where it returns 716 for spirit gate, despite all of the epic structures being already built.

 

To fix this, return 716 should be contained within an if statement such as

if (templateFound < 18){
	return 716;
}
return -1; //something went wrong, generate a different mission type

 

And the default value of returning -1 because something went wrong should be returned afterwards.  (no available indices for unbuilt epic structures could be found)

 

 

Please fix this or we will have to continually build more and more epic structures on all of our servers to complete missions, when they will never even be considered as targets for future missions (as they will not be part of the epicTargetItems array, or if the game does attempt to add them to this array of size 18, you will get an ArrayIndexOutOfBounds error and potentially crash the server) and they will never be counted towards the total required number to build.  We are currently being made to build pointless epic structures forever, because templateFound doesn't get set correctly ever since the difficulty of the mission was factored into the checking of the epicTargetItems array. 

Edited by Alexgopen

Share this post


Link to post
Share on other sites

That code is unused after the valrei update.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this