Giter VIP home page Giter VIP logo

Comments (6)

h0tw1r3 avatar h0tw1r3 commented on June 22, 2024 3

@ben-bartholomew thank you! Exactly what I needed to see.

from valheim-webmap.

ben-bartholomew avatar ben-bartholomew commented on June 22, 2024 1

I ran into a similar issue with one of my mods, they made a change to the way messages are packed and I believe you will need to update WebMap.cs to reflect this. From the most recent de-compilation of Talker.Say, messages are now sent like this:

this.m_nview.InvokeRPC(ZNetView.Everybody, nameof (Say), (object) (int) type, (object) UserInfo.GetLocalUser(), (object) text, (object) PrivilegeManager.GetNetworkUserId());

In the middle there is the change, (I think to support Xbox players) they swapped out sending just the player name with the UserInfo object. De-serializing messages in the following way worked for me:

var package = new ZPackage(data.m_parameters.GetArray());
package.SetPos(0);

int _ = package.ReadInt(); //type of message

var userInfo = new UserInfo();
userInfo.Deserialize(ref package);

string message = package.ReadString() ?? "";
message = message.Trim();

FWIW I noticed no player messages (including pins) show up in the webmap on my server. I think this is the cause. I had the same trouble in another mod (unpacking would fail silently and messages would just be the empty string) until noticing this and unpacking the say messages correctly.

from valheim-webmap.

kandohar avatar kandohar commented on June 22, 2024

Same issue here

from valheim-webmap.

h0tw1r3 avatar h0tw1r3 commented on June 22, 2024

Noticed the same thing. Haven't been able to figure out why the data isn't being unpackaged properly. From what I can tell it's still the standard .net BinaryReader, no real changes to the valheim code. Every other field in the RPC package works fine, just not the message :(

I will try to put a hack in until I can get a proper fix.

from valheim-webmap.

h0tw1r3 avatar h0tw1r3 commented on June 22, 2024

I put as very unsightly hack in 5af53c0 which "fixed" the problem for me.
Also fixes the map color of Mistland's.

Need to do more testing tomorrow. If it works for others, I'll cut a new release.

from valheim-webmap.

kandohar avatar kandohar commented on June 22, 2024

Nice! Thanks!
Actually, I got another issue, the position of the players is really random, they just jump around the center position and is not related to the in-game position.

from valheim-webmap.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.