-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location Sharing, Path Recording, and Discord Overlay #36
Conversation
Use websockets to host a central location server, and use websocket-client to connect and share location data. The server will broadcast location info for all players to all connected clients. A future client addition might be an additional window to display all other shared player names and zones. This code is currently a bit of a mess, as it was the result of a proof-of-concept implementation. I still need to clean it up a lot before making a PR.
Will probably squash this commit before making a PR.
I forget all of what happened here because I went away for a couple of months and didn't take any notes... :(
Set player color using a consistent hashing algorithm. Add fake data sender for testing. Still VERY basic.
Users can toggle maps/spells or other parsers on/off with tells!
Use numbering with Noble island being 1.5 not 2.
Update some default config options Add config option for "flush" window placement
P 491.8852, 479.3287, 1005.2204, 0, 0, 0, 2, DA_Jump_to_island_3 | ||
P -839, -1419, 0, 0, 0, 127, 2, 2-Swords | ||
P 349.81, -501.7633, 125.11, 0, 127, 0, 2, 5-Evians | ||
P -1108, -516, -15.2926, 0, 0, 127, 2, 1.5-Swords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this change will be contentious -- obviously it's been this way for a long time, but the universally accepted numbering on P99 Green is 1, 1.5, 2-8. I don't know if it's the same on Blue, did we just invent a new numbering scheme randomly?
@@ -17,6 +17,7 @@ tower of frozen shadow = frozenshadow | |||
icewell keep = thurgadinb | |||
the feerrott = feerrott | |||
ruins of sebilis = sebilis | |||
old sebilis = sebilis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do all of these change at some point in the P99 timeline and Green just isn't there yet? Or are they all broken on Blue as well?
@@ -41,7 +41,7 @@ | |||
42^Invisibility^PLAYER_1^^^^You vanish.^ fades away.^You appear.^100^0^0^0^5000^2250^2250^3^200^0^30^1^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2502^2115^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^0^12^254^254^254^254^254^254^254^254^254^254^254^43^25^18^-1^0^0^255^255^255^255^255^255^255^255^255^29^255^16^8^4^255^255^42^0^0^9^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^100^0^138^95^0^0^0^0^0^0^0^0^0^0^0^51^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^12^82^3^200^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0^0^0^0^-1^0^0^0^1^0^0^1^1^^0 | |||
43^Yaulp II^PLAYER_1^^^^You feel a surge of strength as you let forth a mighty yaulp.^ lets loose a mighty yaulp.^Your surge of strength fades.^0^0^0^0^500^2250^18000^8^3^0^15^0^30^20^-1^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2518^2113^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^0^10^1^4^24^254^254^254^254^254^254^254^254^6^0^4^-1^0^0^255^19^39^255^255^255^255^255^255^255^255^255^255^255^255^255^43^0^0^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^44^88^0^0^0^0^0^0^0^0^0^0^0^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^20^92^8^4^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0^0^0^0^-1^0^0^0^1^0^0^1^1^^0 | |||
44^Yaulp III^PLAYER_1^^^^You feel a surge of strength as you let forth a mighty yaulp.^ lets loose a mighty yaulp.^Your surge of strength fades.^0^0^0^0^500^2250^12000^8^3^0^25^0^40^30^-7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2518^2113^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^0^10^1^4^24^254^254^254^254^254^254^254^254^6^0^4^-1^0^0^255^44^56^255^255^255^255^255^255^255^255^255^255^255^255^255^43^0^0^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^44^88^0^0^0^0^0^0^0^0^0^0^0^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^52^92^8^4^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0^0^0^0^-1^0^0^0^1^0^0^1^1^^0 | |||
45^Pacify^PLAYER_1^^^^You feel your aggression subside.^ looks less aggressive.^^200^0^0^0^3000^2250^6000^8^7^0^100^1^1^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2504^2059^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^1^30^86^18^254^254^254^254^254^254^254^254^254^5^15^5^-1^0^0^255^39^51^255^255^255^255^255^255^255^255^255^255^39^255^255^44^0^0^12^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^100^0^40^87^0^15^0^0^0^0^0^0^0^0^0^11^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^49^98^8^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0^0^0^0^-1^0^0^0^1^0^0^1^1^^0 | |||
45^Pacify^PLAYER_1^^^^You feel your aggression subside.^ looks less aggressive.^^200^0^0^0^3000^2250^6000^8^70^0^100^1^1^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2504^2059^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^1^30^86^18^254^254^254^254^254^254^254^254^254^5^15^5^-1^0^0^255^39^51^255^255^255^255^255^255^255^255^255^255^39^255^255^44^0^0^12^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^100^0^40^87^0^15^0^0^0^0^0^0^0^0^0^11^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^49^98^8^7^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0^0^0^0^-1^0^0^0^1^0^0^1^1^^0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was probably just a typo somehow, but I have confirmed that it is definitely supposed to last for duration 70, not 7.
helpers/config.py
Outdated
@@ -52,18 +52,51 @@ def verify_settings(): | |||
data['general']['parser_opacity'] = get_setting( | |||
data['general'].get('parser_opacity', 80), | |||
80, | |||
lambda x: (x > 0 and x <= 100) | |||
lambda x: (0 < x <= 100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just a style preference, I could undo them (you'll see several changed throughout this file). I just changed them out of habit while I was scrolling through and forgot about it until now.
extensions = ['.txt', '_1.txt', '_2.txt', '_3.txt', '_4.txt', '_5.txt'] | ||
maps = [os.path.join(MAP_FILES_LOCATION, m) for m in [(map_file_name + e) | ||
for e in extensions] if os.path.exists(os.path.join(MAP_FILES_LOCATION, m))] | ||
maps = MAP_FILES_PATHLIB.glob( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows for custom zone files in any subdirectory!
Hey buddy, I think it's awesome that you are adding on this functionality! I am about to archive this repository though. I am not sure the best way to handle this though. I would be interested in transferring this if it is something you would like to upkeep. I have 0 time to work on this and I don't play eq99 anymore which was my main driving force for creation. |
Yeah, I'd be willing to take over upkeep on at least the 0.5.x (master) branch. |
Should prevent some crashes on unexpected network disconnects.
Coloring was causing too many problems to be worth doing, except for the discord window, so it is still allowed there. Clickthrough has been split out so it can be set individually.
Just assume a default timer if the data really can't be parsed.
On death, drop a corpse marker waypoint that is visible for 60min.
Version check is not useful on this branch until it is released officially upstream.
4c0e25b
to
94a3a1a
Compare
Zones have different names from zoning in than from /who, so make a new file with secondary names so as to not clutter the map select menu with duplicates.
Trap loc data donated by an anonymous third party. Verified two, got tired of dealing with the traps, and assume the rest are accurate.
This is super buggy and honestly I don't recommend people use it yet... Or possibly ever.
All zones should work correctly now.
Make this option checked by default.
Users can't be trusted to set their own names. Also, bump the log lookback to 1000 bytes on load.
Because I just know someone will complain about not being able to name themselves something stupid.
On camp-cycling, users would log in and have timers extended since their last zone time, which might have been HOURS before, but regardless should not be added to spell timers.
If a user had never /loc'd in a zone, they wouldn't have a player object present, and constructing the death packet would fail catastrophically. Also, make sure death signal is only connected once.
Newer Python and Qt versions have changed some of their APIs, and some code needs to be adjusted to account for this. For now, just pin an older version.
Useful for timing TL boxes at raids.
Update Notes
If you are updating an old installation, please extract the entire zip-file. Due to map-file, spell-file, and other data additions, extracting just
nparse.exe
is not enough to apply all of the changes.Bugfixes / Minor Tweaks
/tell toggle_maps
and/tell toggle_spells
. The new Discord overlay window also works with/tell toggle_discord
./who
and it should auto-load the correct zone, if for some reason your zone was not correctly detected.New Feature: Location Sharing
Your location can now be shared with other users running this version of nParse or newer. Simply enable the feature in the Sharing settings page, and your location will be broadcast to other users with the same
group key
(or share with a Discord channel, but this requires configuring the Discord overlay). Think of it like a password for your guild or group, so only people given access can see your location.Deaths are also recorded and shared, based on your last location before you died. Remember to
/loc
often! I recommend binding a loc macro to a movement key.There is a default sharing server, but if you would prefer to run your own, the server code is included as
location_server.py
.New Feature: Custom Path Recording
Custom path recording is now available (though consider it "beta"). Your feedback is appreciated!
To use it:
Custom Pathing
->Start Recording
./loc
will draw part of a new path on the map.Custom Pathing
->Stop Recording
to finish recording a path.Alternatively, you can type
/tell start_recording_PATHNAME
to begin and/tell stop_recording
to end recording.PATHNAME
does not support spaces, but any underscores will be replaced with spaces automatically.Custom path files are created in
data/maps/map_files/recordings/
and you can share these files with others, they just need to put them in theirrecordings/
directory and ensure they are using at least this version of nParse. It's also possible to manually edit these files if you want to clean up the paths after initial recording. The format is as follows:Lines:
L x1, y1, z1, x2, y2, z2, R, G, B
Points:
P x, y, z, r, g, b, size, text
New Feature: Discord Overlay Window
Now you can see your Discord voice channel overlay as an nParse window. You may need to authorize Discord StreamKit the first time you configure the overlay. Configuration is done via the ⚙️ icon on the nParse Discord window, or from the system tray icon.
/tell toggle_discord
.