Code Monkey home page Code Monkey logo

Comments (12)

thedefside avatar thedefside commented on August 21, 2024 1

So, I guess @CruxCraft and I are asking for different things.

@CruxCraft is asking for option1, while I am asking for option2. unless I am misunderstanding and @CruxCraft just wants the records separated by steamId and doesn't care about combining by name.

from valheim-discordconnector.

CruxCraft avatar CruxCraft commented on August 21, 2024

We change our character names often and this makes a new entry for each category on the leaderboards instead of adding to the existing record. Would it be possible to use the steamId to identify and increment existing records?

image

Unless this was configurable, I feel as though this would hurt more servers than it would help...

We have players who role play multiple personalities. We also have players whose kids that turns on their accounts in addition to them playing. These area all separate players despite one account.

It is probably possible to edit the files to reconcile the different numbers, but a better alternate solution might be something like what OdinQOL does with this option:

chatPlayerName =

It would allow your players to change their chat name while keeping the same in game name... might be helpful =]

I'm all for more options even if they break old things as long as they are configurable/optional

from valheim-discordconnector.

nwesterhausen avatar nwesterhausen commented on August 21, 2024

Yeah I could see this being a set of options -- you can turn on using steamid to store the record. When the leaderboard gets sent, if that option is set it can return their current in-game name.

from valheim-discordconnector.

thedefside avatar thedefside commented on August 21, 2024

I would think you would want to always store the steamId with the record. That way it would not matter if you turned the toggle on or off. The data would always be stored the same. You would just have to use different logic to generate the messages.

from valheim-discordconnector.

nwesterhausen avatar nwesterhausen commented on August 21, 2024

I think there's use cases for both ways. Doing a toggle seems prudent, but maybe the default will be by steamid

from valheim-discordconnector.

CruxCraft avatar CruxCraft commented on August 21, 2024

Okay, so just ran into sort of a major issue... Players with the same name are being stored together...

It might be good if it could be stored as steamID:player_name

Then have a config option such as
treat namechanges as same character: false

if true, it would add up everything from the same steamID, and if falss it would treat them separate. This would allow the setting to be fully reversible

from valheim-discordconnector.

thedefside avatar thedefside commented on August 21, 2024

So, I think regardless of this feature being implemented it would be a good idea to use the steamId as the key for the records instead of the name. I'm not sure why would want a toggle, though. Would you ever want to store different players with the same name as a single record?

Edit: nevermind. You are asking for the same thing I am.

from valheim-discordconnector.

nwesterhausen avatar nwesterhausen commented on August 21, 2024

In 1.5.1 the way they are being stored is with their name and steam ID as part of the record but when they're being retrieved it's not filtering that by unique steam ID. I'll have to add some filtering to the query

from valheim-discordconnector.

thedefside avatar thedefside commented on August 21, 2024

I figured you were already on top of it 👍

from valheim-discordconnector.

nwesterhausen avatar nwesterhausen commented on August 21, 2024

So I'll reiterate in my words to make sure I get what's going on and what we really want to have happen (and provide some back-end info about how things were stored):

What we want:
Players to be able to have the same name, but be treated as separate players in leaderboards or records. (This setting to have a toggle so that if someone had a use of people using a name across multiple accounts to mean the same person -- I mean why do this but seems easy enough to allow).

before 1.5.0 and LiteDB:

  • all records were stored basically as = [ { Name: name, Count: someInteger }, ... ] in a JSON file

1.5.0+:

  • all records are stored in a database with a table for each category. Entries in the tables are counted when we want to get the total for a play. The records have these properties: _id, name, steamid, time, position.
  • when pulling for a leaderboard, as of 1.5.1 we just do a GROUP BY Name and SELECT Name, Count(*) to get the number of for the player

The way things will work is:

when pulling for a leaderboard, doing GROUP BY Name,SteamID and SELECT Name, Count(*) to get each playername and count but dependent on steamID being different.

OR --

should be doing a GROUP BY SteamID and SELECT SteamID, Count(*) then some SELECT TOP 1 Name WHERE SteamID=sid ORDER BY time ASC to get the current name of the player.

Basically option1 would treat each player name as a different character per steam id; option 2 treats the steamid as the player regardless of what name they used and it will use their most recent name in the system.

from valheim-discordconnector.

CruxCraft avatar CruxCraft commented on August 21, 2024

So, I guess @CruxCraft and I are asking for different things.

@CruxCraft is asking for option1, while I am asking for option2. unless I am misunderstanding and @CruxCraft just wants the records separated by steamId and doesn't care about combining by name.

Sort of a togetherness of both ideas =] stored as steamID:player_name but an option to display them as separate records, or to add up all the values for one steamID when retrieving

My names issue had to do with two people on different accounts with the same player name... So technically a different problem but same solution =]

& Yes NW

Basically option1 would treat each player name as a different character per steam id; option 2 treats the steamid as the player regardless of what name they used and it will use their most recent name in the system.

That sounds perfect =]

from valheim-discordconnector.

thedefside avatar thedefside commented on August 21, 2024

Works perfectly! Thanks, @nwesterhausen !

from valheim-discordconnector.

Related Issues (20)

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.