Ancient Warfare 2

Ancient Warfare 2

6M Downloads

Inaccurate warehouse counts

wadewegner opened this issue ยท 14 comments

commented

I'm beginning to suspect that warehouse counts are not accurate.

image

Here you see Light Torque Distributors & Shafts. When I click on them, though, I get nothing -- I can drag into inventory.

If I add the 3 from my inventory back in ...

image

... and then shift-click to take out ...

image

... notice it only takes out there, leaving two (which now can't be clicked).

I'm on latest: ancientwarfare-1.12.2-2.5.82.jar

commented

Are you on dedicated server? I am guessing there's something funky happening with synch packets.

commented

Yes, it's on a dedicated server. Anything I can do to help you confirm?

commented

The best would be if you had steps to recreate that I can follow, but I understand that may not be that easy when this is happening to half full warehouse so I will try to recreate on my side as well.

commented

Btw, I hope you're not expecting clean code because what's in is pretty far from that. If you would like to I could give you some pointers, but that's probably easier to explain in a chat app than here (I know, I sound like a broken record here)

commented

@P3pp3rF1y I can't find your contact info you shared in another issue. Can you share again so we can can chat w/o going through issues? :)

commented

It's P3pp3rF1y#8473 on discord if that works for you

commented

Is there an easy way to use Eclipse to debug a plugin running on a Server?

commented

So, I am using IntelliJ myself, but I hope Eclipse has similar setup after running gradle eclipse task. In which case you should see Run Server configuration in there and run dedicated server locally that you can debug as any other project. Just be prepared to run into issues with client dropping off that server because it's unresponsive.
However I have tried recreating this locally in single player first and found a small issue where when you take from a big stack of a single item very quickly it would sometimes give you more than a stack size, the same count would be removed from warehouse so no duplication issue, but potentially this could keep client out of sync on dedicated server. I have that fixed and am going to check dedicated server now.

commented

One more question that I believe I know the answer to:
When you close the UI does it get fixed or does server restart help?
I would think that you have tried the first, but am wondering if this persists after restart as well.

commented

Thanks for the info. I'm going to switch to IntelliJ. Been looking for an excuse. (I'm actually a VS Code guy.)

No, closing the UI doesn't help/fix it. Haven't tried a server restart, but I can next time I notice it happening.

commented

And actually can you check if the items you cant take out you have in one of the storage blocks. After looking through code i am guessing it lost cached pointer to the storage where the item is stored.

I am VS C# guy originally and find idea closer to vs than eclipse is. Not as simple as vs code though.

commented

did you have a chance to check if these inaccurate counts have gone away?

commented

No, but I'll get the latest and check today.

commented

Closing this as I haven't seen any discrepancies since, feel free open a new issue if you still see any.