wynntils / artemis Goto Github PK
View Code? Open in Web Editor NEWArtemis is a rewrite of Wynntils in 1.20.2 using Architectury, to support Fabric and Forge.
Home Page: https://wynntils.com
License: GNU Lesser General Public License v3.0
Artemis is a rewrite of Wynntils in 1.20.2 using Architectury, to support Fabric and Forge.
Home Page: https://wynntils.com
License: GNU Lesser General Public License v3.0
Things we can do:
At the moment, none of these seems really worth the effort. Keeping it here as a reminder.
During development I have found that WorldStateImpl#onServer
returns false
on multiple occasions, while connected to the server. This is likely related to the mixins that call the world state change events.
I was going to create a PR fixing this, but this one is a controversial topic, so I thought an issue might be better to start with.
ConfigManager
has a requirement that a Feature
must be annotated with FeatureInfo
to get the Feature
's category or else config options won't load. This is obviously not a good thing.
Here is the things we could do:
FeatureInfo
annotation required by throwing Exception on feature registrationConfigManager
assume blank ("") category for features without annotation (the annotation already has ""
as default category).I have a plan, but I'm not going to be able to address it for a while. I'll sketch my idea here, and leave it open for anyone else to implement if they want. (Otherwise I'll do it when I get around to it.)
From the Wynncraft API we can get a json description of a player. Here is one describing me: https://api.wynncraft.com/v2/player/ca3ee631-a36c-48f4-9007-3c3c52c79840/stats
This contains, among other things, an array with all classes. The order in this array is similar to the order in the class selection screen, but not the same. API order is "total level", but class selection is "combat level". So there is not a simple 1-to-1 match that way. Also, API updates rather slowly. Actual changes in the characters take time (hours?) to propagate.
But. Thew good news is that the API has a stable naming of characters. In the object describing each class, there is a field "name", which will be unique per character. It is comprised of the class type (e.g. "archer") plus a monotonically increasing number (starting at 0, which is omitted). So the first archer you create is named "archer", the second "archer1", the next "archer2" etc. Even if you create and remove classes, numbers are not reused (confirmed).
What remains is to match characters found in the class selection screen with these characters from the API. We'll have to do a bit of fuzzy matching, but I think it'll be okay for all practical purposes. We can match on:
It would be really bad luck if a player has two characters that match on all these properties. If that happens I think we might be excused if we make a mismatch. (We can detect if this happens and either print a warning, or refuse to do matching until they have changed level/number of quests) on one of them.)
Finally, I think we should assign these characters an unique UUID. We can do this by:
String uniqueName = player.getUUID() + "-" + character.getName();
characterUUID = UUID.nameUUIDFromBytes(uniqueName.getBytes());
or if we want to be really fancy and do it the Right Way for v3 UUIDs:
public static final UUID WYNNCRAFT_CHARACTER_NAMESPACE = new UUID("ac64c234-48c3-4e3f-ad29-6694affcfbfa"); // randomly generated UUID that just needs to be kept the same
String uniqueName = WYNNCRAFT_CHARACTER_NAMESPACE + "-" + player.getUUID() + "-" + character.getName();
characterUUID = UUID.nameUUIDFromBytes(uniqueName.getBytes());
I think the LEVEL_UP_1
regex is incorrect. I played today, and the message looked like user is now combat level 10
, not matching the regex, ^§6.* is now level .* in §.*$
. Is that regex only working for professions?
@magicus
[21:45:06] [Render thread/INFO] (Minecraft) [CHAT] BACKGROUND-PARTY: §r§8[§r§7VIP+§r§8] §r§7FancyFedora§r§8 has just logged in!
This breaks InfoMessageFilterFeature
as expected.
Hey, is 1.19 support planned for the mod?
As requested in #60
If a feature fails to load duo to condition failure, overlays (and possibly keybinds/events) still get loaded.
After looking at the code from the Wynntils and seeing the changes implemented so far during the port to Artemis, I believe that this is an obvious next step.
Reasons for this move:
Simplicity
Instead of splitting features into multiple different things, keeping it all the same essential thing which can have addons like keybinds, config and in this case a visual feature (or overlay, not too sure about the naming since it's an addon so VisualFeature feels more appropriate than Overlay). This makes making new features easy as all you have to do is add what you want and no need to find what goes where and how.
Benefits:
In Wynntils it was easy to use hookElements in the RenderGameOverlayEvent and it makes sense, but with the cross version this causes some issues. Mainly that events are now done by Architectury or Mixins. This change will allow you to simply import and subscribe to the render event needed for the situation.
This will allow for Visual stuff to be completely redone and made more appropriate for the situation it finds itself in.
Now we have reasons and benefits for the move lets answer the "how":
What we need to store about the Visual part is it's location on screen, yeah, that's all. I mean we could store the name of the overlay but simply getting the feature name it's a part of is way more practical.
Well this will make Feature Registry a lot simpler and easier to follow as it does its steps.
Last issue to tackle, how do we make a way to allow for the user to move their displays around (no need to add the ability to toggle since that can be done by the feature itself). Remember how we need to store the location? Well we have 2 possibilities, we can use annotations or we can use a custom class that stores the data (the former will be easier to store cross instance though). Yeah, this kind of invalidates my draft PR. Anyway, so what we can do with this stored data is just load it like what was done in Wynntils, but with some UI Improvements since it feels a little clunky.
Thank you for reading this, I hope this can atleast show there are some other ways to handle Overlays
More info in #47.
With the use of TranslatableComponent
. we can easily add translations for configs. Translation keys will be useful for easily changing category names for ConfigurableInfo
.
ClientboundBossEventPacketAccessor
, which is used in FixPacketBugsFeature
is not registed in wynntils.mixins.json
.
@magicus, as you wrote that feature, is there a reason is or was it just a mistake?
We should intercept the Brigadier construction and block these commands:
bungee
galert
gcountdown
glist
gsend
perms
pfind
plist
pwlist
sendtoall
sparkb
sparkbungee
wcl
wynnproxy
We get the error Directory /home/kristof/Artemis/fabric/run/wynntils/config could not be created
when we already have the directory.
The userEnabled
field should act a super on-off switch to the feature, so if userEnabled
is false, all parts of the feature should be turned off, even if other configs explicitly enable a specific thing (for example hotbarHighlightEnabled
in ItemHighlightFeature
).
... even though it shouldn't. Also, ServerboundUseItemOnPacket should sent notification as well.
List:
When I halve my Minecraft window to one side of the screen (yes, I do that sometimes - don't beat me - for item management stuff where I need several things next to each other), the tooltip on some items isn't inside the game window bounds, but it pushed out to the side. It becomes unreadable when the left half of a tooltip is missing.
[14:07:05] [Render thread/WARN]: Malformed dialog [#3]: [§r , , §7[1/4] §r§2Bandit Leader: §r§aHere-- maybe you'll help us pull the heist if I give you some of this gold we just stole.§r]
[14:07:16] [Render thread/INFO]: [CHAT]
[14:07:18] [Render thread/WARN]: Malformed dialog [#3]: [§r , , §7[2/4] §r§2Bandit Leader: §r§aAhah. I had a feeling we had a guard on our tail.§r]
[14:07:19] [Render thread/WARN]: Malformed dialog [#3]: [§r , , §7[3/4] §r§2Bandit Leader: §r§aI wouldn’t want to wear out my new-stolen weapons killing you... I'll just trap you in here with all of this TNT!§r]
[14:07:29] [Render thread/INFO]: [CHAT]
[14:07:31] [Render thread/WARN]: Malformed dialog [#3]: [§r , , §7[4/4] §r§2Bandit Leader: §r§aThis'll blow up in a few seconds. Good luck getting out of here!§r]
Happened in Sandy Scandal
quest.
Fix this by adding KeyHolder "scopes" (Inventory, Game, All, etc..), so the keyholder is active in the specific scope.
See #64 (comment)
This is caused by the overriding method in forge's GUI wrapper. Not sure if we can work around this.
Qodana code report should be a much better replacement for legacy's Codefactor.
What do you think? @magicus @P0keDev @Incompleteusern
Example PR/Report: kristofbolyai#1 (comment)
I have tried to embed the report into the comment, but I only could manage to send the link. It should be fine.
Also, FontRenderer could use MC builtin string splitter to split text to max width.
Tested with both "/wynntils config reload" and overlay management screen and overlay sizes stay the same, while position, etc gets reset.
Success:
Fail:
Using a texture to draw an arc is undesirable.
The time has come to deal with this.
My idea is to have features expose variables (to an InfoVariableManager?) and the user can use all enabled info variables. This is clear and easy for not so basic variables, but the question comes, where do we put the simple info variables (FPS, player coordinates). Simple info variables do not require processing, so making a feature for all of them seems unnecessary. My idea would be to put them into a singular InternalFeature (as disabling them would not give any performance benefit).
I hope to hear your opinion.
Like in title. Straight forward to reproduce
Several parts of Wynntils (like the ChatManager, and the Translation API) would benefit from us being able to convert a Component into a text encoding, which can then losslessly be converted back to a Component. Basically, I'm thinking something like this:
§6{Hello there, }§7{Stranger!} §0{Click on §L{http://www.wynntils.com;this link}!}
In the best of all worlds, we could even use this encoding to do regexp matching. The current code that converts to the "classic" format codes is a one-way street, basically since we lose the "end of formatting" information that is present in the Component. While it might have it's uses (it's served us well, so far), I think it is suboptimal. But the regexp matching on strings is much easier than trying to match an actual Component. So a faithful but still readable representation of Components as a string would be a benefit for all of the mod.
Before deciding on a format, I need to look into what kind of formatting is allowed by Component. The format also needs to be regexp friendly. And trivial to parse and generate.
@magicus is this something ChatManager should handle?
Tried out #173, noticed that the bar-textures weren't showing up. Turns out they just weren't added to Git.
Neither with esc nor enter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.