popstarfreas / dimensions-mcl

A mobile compatibility layer for Dimensions to support mobile clients.
1 stars 3 forks source link

Update to 1.4 #4

Closed Moneylover3246 closed 4 years ago

Moneylover3246 commented 4 years ago

As 1.4 Mobile will be released on the 20th, I was looking to update the extension myself. Can you give me any tips on which packets to handle/not handle and anything else that might be important?

Thanks in advance

Moneylover3246 commented 4 years ago

Also how does it work where you bypass the "not using the same version" message. Is it soli on changing the version protocol of a client to Terraria233?

popstarfreas commented 4 years ago

Yes just changing it to whatever works for the setup you use. It's not clear if mobile will still have the player limit it or not, so while I have updated my local version to remove all of the non-server player id specific changes (the ones for 1.3 compatibility) we have to wait until it's out to know what changes we need to make

Moneylover3246 commented 4 years ago

Last question, how exactly is tileframeimportant determined?

popstarfreas commented 4 years ago

The game's code itself defines it.

Moneylover3246 commented 4 years ago

Well I tested 1.4.1 servers on a PC 1.4.0.5 client (for DG it works) however when I do it, I get the Legacyinterface44 message, but I get a whole bunch of asterisks and other whitespaces after the message. I'll try and find the problem since there's no error in the console

popstarfreas commented 4 years ago

The terraria server is kicking you. Check your MCL code to make sure you're setting it to the right version.

popstarfreas commented 4 years ago

https://github.com/popstarfreas/dimensions-mcl/blob/master/app/priorclienthandler.ts#L70-L77

Moneylover3246 commented 4 years ago

well, it turn's out that (for PC at least), MCL isn't required to access a 1.4.1 server (except for maybe the player slot fix), I'll probably attend to MCL if needed, but as of now I don't believe it's necessary.

I must ask, when you were updating advancedwarpplates, where did you create/handle the dimensions packet in the C# code? And how is the dimensions packet connected to when the player uses a warpplate?

Moneylover3246 commented 4 years ago

Nevermind about that, I managed to figure it out myself. Thanks for the help

Moneylover3246 commented 4 years ago

I know I'm opening a lot of isues, and I'm sorry for the excessive amount. Hopefully this woll be my last one for a while:

There's a bug where iOS users will crash upon joining. The thing is android users join perfectly fine, along with PC players. I'm not exactly sure of it's a Terraria issue, but dark gaming seems to work just fine as well

Moneylover3246 commented 4 years ago

I traced what was happening. By default, when an android player joins a terraria server using dimensions, they're version automatically gets changed to Terraria233, however this doesn't happen with iOS

handleConnectRequest(client, packet) {

    let reader = new packetreader_1.default(packet.data);
    let version = reader.readString();
    // Mobile Version
    if (version === "Terraria230") {
        this._mcl.clients.add(client);
        packet.data = new packetwriter_1.default()
            .setType(packettypes_1.default.ConnectRequest)
            .packString("Terraria233")
            .data;
        return false;
    }
    return false;

}

the code is there but for some reason it isn't updating accordingly

Moneylover3246 commented 4 years ago

did you manage to find a fix?

popstarfreas commented 4 years ago

That's the same code I have and I don't think iOS users are having trouble, and someone else is using it too and doesn't report any problems. How do you know that the version isn't changing for iOS?

Moneylover3246 commented 4 years ago

I'm not actually sure, but I've tried modifying the version in C# and javascript (with no good results). It may have something to do with another thing in my code, that either I forgot to add or remove

Moneylover3246 commented 4 years ago

Is there any chance of you releasing an updated version to this?

popstarfreas commented 4 years ago

https://github.com/popstarfreas/dimensions-mcl/tree/feature/mobile-1.4

That's what I have.

Moneylover3246 commented 4 years ago

Thanks for that. In the end it was simply that I wasn't handling packets properly in postserverhandler. I'll tinker with dimensions a bit more im the future. Thanks for your help!