Skip to content
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

Merged
merged 59 commits into from
Jul 17, 2022

Conversation

rm-you
Copy link
Collaborator

@rm-you rm-you commented Apr 9, 2021

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

  • Fix zone key for Sebilis, Runnyeye, Siren's Grotto, Sleeper's Tomb and Plane of Air so they will autoload properly on zone-in.
  • Re-number Plane of Air islands from 1.5 to 8, with Noble island as 1.5.
  • Pacify duration should now be correct (previously it was much too short due to a typo).
  • Updated some default window locations.
  • Added a config option to use "Flush Vertical Placement". This makes it possible for the windows to be pinned directly to the top of the screen, at the expense of making the button move around a little when actually (un)pinning the windows. This option is enabled by default -- if you don't like it, you can turn it off.
  • Maps and Spells overlay windows can be toggled on and off via in-game macros, with /tell toggle_maps and /tell toggle_spells. The new Discord overlay window also works with /tell toggle_discord.
  • Fixed several bugs that caused the correct character's logfile to fail to load automatically. You should never need to restart nParse to pick up a new character's logfile, for example.
  • You can now just type /who and it should auto-load the correct zone, if for some reason your zone was not correctly detected.
  • Add some additional zone waypoints (eg: some pathing in EW, Spectre camps in Feerrott, traps in PoM).
  • Add default spawn times for most zones, based on wiki data. These may not always be correct for every mob, but should overall represent the current zone better than simply defaulting to "6:40".
  • Translocate and Translocate: Group will now appear in the casting Wizard's spell timers, for purposes of maintaining TL boxes.
  • Added an experimental feature to catch the effects of "clickies" that otherwise would not be detected, like the Coldain Rings and a few others with no "cast text". This must be enabled explicitly in the Settings menu, and is extremely buggy so its use is not encouraged unless you absolutely NEED to see them.

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:

  • Right click on the map window and choose Custom Pathing -> Start Recording.
  • Provide a name for your new path.
  • While in recording mode, every /loc will draw part of a new path on the map.
  • Right click and choose 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 their recordings/ 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.

  • Added a config option to automatically use your configured Discord channel as your location sharing key. If enabled, this will override whatever group key you've set manually.
  • The Discord Overlay window can be toggled via in-game macros with /tell toggle_discord.
  • Thanks to @trigg for a lot of their great work on https://github.com/trigg/DiscordOverlayLinux!

rm-you and others added 18 commits November 23, 2019 08:23
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
README.md Outdated Show resolved Hide resolved
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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@@ -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)
Copy link
Collaborator Author

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.

parsers/discord.py Show resolved Hide resolved
parsers/discord.py Outdated Show resolved Hide resolved
parsers/maps/mapcanvas.py Outdated Show resolved Hide resolved
parsers/maps/mapcanvas.py Outdated Show resolved Hide resolved
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(
Copy link
Collaborator Author

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!

@nomns
Copy link
Owner

nomns commented Apr 11, 2021

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.

@rm-you
Copy link
Collaborator Author

rm-you commented Apr 12, 2021

Yeah, I'd be willing to take over upkeep on at least the 0.5.x (master) branch.
So, you're dropping the new dev branch as well? :(
I guess you could transfer it, though if you want to retain repo ownership that's cool too, maybe you could just add me as a maintainer/admin? I honestly wish you were still planning to be around, would love some code reviews, especially since you know this codebase a lot better than I do. :P

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.
@rm-you rm-you merged commit e11dd09 into nomns:master Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants