Ulviirala

[ALPHA] Better Gamemasters 1.1.1 (Hotfix)

Recommended Posts

3 hours ago, Ulviirala said:

I checked every single one of the very few changes, that the mod actually makes. There should be nothing that makes items disappear anywhere in the existing features, or upcoming features.

I loaded an older map, thinking it was the map i'm on, and it came up with the same result, using your mod, makes items dropped into the cart vanish into thin air. i'm not even seeing anything in log, related to it,

 

[09:24:58 AM] INFO com.wurmonline.server.items.Item: large cart freevol(-1008000
)<=log.getWeightGrams()*10 (5600)
java.lang.Exception
        at com.wurmonline.server.items.Item.insertItem(Item.java:4943)
        at com.wurmonline.server.items.Item.insertItem(Item.java:4590)
        at com.wurmonline.server.items.Item.moveToItem(Item.java:3518)
        at com.wurmonline.server.creatures.Communicator.reallyHandle_CMD_MOVE_IN
VENTORY(Communicator.java:5026)
        at com.wurmonline.server.creatures.Communicator.reallyHandle(Communicato
r.java:2446)
        at com.wurmonline.communication.SocketConnection.tick(SocketConnection.j
ava:615)
        at com.wurmonline.communication.SocketServer.tick(SocketServer.java:172)

        at com.wurmonline.server.Server.run(Server.java:2433)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)

 

this is all I have in front of me.

Edited by ozmods

Share this post


Link to post
Share on other sites
1 hour ago, ozmods said:

I loaded an older map, thinking it was the map i'm on, and it came up with the same result, using your mod, makes items dropped into the cart vanish into thin air. i'm not even seeing anything in log, related to it,

 

[09:24:58 AM] INFO com.wurmonline.server.items.Item: large cart freevol(-1008000
)<=log.getWeightGrams()*10 (5600)
java.lang.Exception
        at com.wurmonline.server.items.Item.insertItem(Item.java:4943)
        at com.wurmonline.server.items.Item.insertItem(Item.java:4590)
        at com.wurmonline.server.items.Item.moveToItem(Item.java:3518)
        at com.wurmonline.server.creatures.Communicator.reallyHandle_CMD_MOVE_IN
VENTORY(Communicator.java:5026)
        at com.wurmonline.server.creatures.Communicator.reallyHandle(Communicato
r.java:2446)
        at com.wurmonline.communication.SocketConnection.tick(SocketConnection.j
ava:615)
        at com.wurmonline.communication.SocketServer.tick(SocketServer.java:172)

        at com.wurmonline.server.Server.run(Server.java:2433)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)

 

this is all I have in front of me.

I'm pretty sure that this has nothing to do with this mod, no place in the stack trace is being remotely touched by it. I also can't reproduce it as a GM or as a player, trying to drop more items into a large cart than it has volume available. Which is pretty much what the exception and the code is saying:

        freevol = this.getFreeVolume();
        if (!unconditionally) {
            if (this.itemCanBeInserted(item) == false) return toReturn;
        }
        canInsert = true;
        if (checkItemCount && !unconditionally) {
            canInsert = this.mayCreatureInsertItem();
        }
        if (unconditionally || this.getTemplateId() == 177 || (this.getTemplateId() == 0 || freevol >= item.getVolume()) && canInsert) {
            this.addItem(item, false);
            this.setThisAsParentFor(item, true);
            this.updatePileMaterial();
            return true;
        }
        if (freevol > item.getWeightGrams() * 10) return toReturn;
        Item.logInfo(this.getName() + " freevol(" + freevol + ")<=" + item.getName() + ".getWeightGrams()*10 (" + item.getWeightGrams() + ")", new Exception());

Looking at the stack trace though, and the code, I assume it's either a vanilla bug, or what seems more likely, it's another mod. Something that breaks any one of the previous checks, that this mod doesn't touch at all though. Maybe a mod that changes container volume related things (bag of holding, unlimited quacks, and the other 2 I can't recall). What other client and server mods are you running?

 

If the answer is none, then it should also happen with Better Gamemasters disabled, and if you can reliably reproduce it then, I'd report it via the google doc link provided in the E-Mail with the alpha access code.

Edited by Ulviirala

Share this post


Link to post
Share on other sites

it's possible it could be one of the bigger container mods, that's causing it, but i'm not sure, I don't understand programming languages so it's all double dutch to me.. if it's not happening with anyone else only me, then it means I have a conflicting mod somewhere. this is what I use, as for client i'm really only using the live map and that's about all.

 

.mods.jpg

Share this post


Link to post
Share on other sites

The code quoted by @Ulviiralawas changed in 1.3, they added a new method itemCanBeInserted that replaced some of the conditions that were there... It's probably some other mod that was patching them in insertItem but doesn't know about the new method.

 

I'd say Big Containers is a prime suspect, try to see if it happens without it.

 

Edit: Yeah, Big Containers replaces the calls to getContainerSizeX/Y/Z in insertItem, but not in the new itemCanBeInserted, which is possibly what causes that bug.

Edited by bdew

Share this post


Link to post
Share on other sites

@bdewI quoted the 1.3 alpha code, and the itemCanBeInserted call is there right at the top, but I didn't even notice it, as odd, new, or at all (been a  long day). But yeah, I also see now that they've added the rift rune modifiers in the container size calls.

 

Funny how I mentioned the mods that actually are the least likely cause, as you already fixed Bag of Holding, and Unlimited Quacks changes the variables passed to the ItemTemplate constructor instead :D .

Share this post


Link to post
Share on other sites

Actually i didn't change anything in bag of holding, and it does modify insertItem, so it might be it as well.

 

When i updated the modloader i only did very cursory testing with the mods that come with it (mostly to see that they don't outright crash the server).

 

I do have it installed on my 1.3 test server and nobody complained about stuff disappearing, but i'll look into it later today.

Share this post


Link to post
Share on other sites

I've tried with just bag of holding mod and i can't reproduce it on my test server, so i think there's a good chance that it's Big Containers.

Share this post


Link to post
Share on other sites

I fixed BigContainersBAEA for 1.3. I"m waiting for 1.3 to leave alpha before I publish releases. I don't remember exactly what changed with 1.3. I just updated the mod so it worked for me again. 

I'm also not sure why you'd want to use big containers and bag of holding. Big containers essentially makes containers unlimited in size (replaces every piece of code that check x,y,z sizes and available volume with Integer.MAX_VALUE).

 

My best guess about what's going on here is bag of holding is trying to increase a int value to something larger then Integer.MAX_VALUE. Although, I'd think that would cause an overflow error...idk. 

Share this post


Link to post
Share on other sites
10 hours ago, joedobo said:

Although, I'd think that would cause an overflow error...

 

Java don't treat numeric over/under flows as errors, it just wraps around. And yeah that's might be what is going on as well.

 

Also 1.3 (public) beta is out now.

Share this post


Link to post
Share on other sites
On 4.11.2015 at 1:19 AM, Ulviirala said:

Game masters' walking speed is not affected by inventory weight.

I like to push this topic because it seems, this function is not working

I dont know if Ulvviirala is still working on this mod, if not, it would be very nice if anyone of you awesome modders can look into this mod :/

 

That would be realy nice ;)

 

Eject

Share this post


Link to post
Share on other sites

double

Edited by Eject

Share this post


Link to post
Share on other sites

Still works fine for me on WU 1.3.5.5 beta and 0.25 modloader. I'm sure it's probably still a mod conflict where another mod that loads later, replaces the whole method body and voids BetterGamemaster's patches, which is largely out of my hands.

 

You can try renaming BetterGamemasters.properties to zBetterGamemasters.properties, and the BetterGamemasters directory to zBetterGamemasters, to try and force it loading later because of alphabetical order. This worked for me before, when also having movemod from bdew loaded which DOES replace the carry weight method body entirely for example.

 

It's not a guaranteed workaround, because whatever mod it is, might do its changes in a different method than preInit, i.e. "later".

Edited by Ulviirala

Share this post


Link to post
Share on other sites

ah ok

Yes i have the movemod too, i will try your suggestion.

Thank you very much :)

 

Eject

Share this post


Link to post
Share on other sites

i tried it, its not working for me, i am very slow ^^

Share this post


Link to post
Share on other sites

I can't work around it at this point then, I'm walking just fine with 6 obelisk in my pocket :) 

Share this post


Link to post
Share on other sites
On 5/15/2017 at 8:48 AM, Ulviirala said:

I can't work around it at this point then, I'm walking just fine with 6 obelisk in my pocket :) 

I thought you were just happy to see me :(

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