GithubHelp home page GithubHelp logo

wynntils / artemis Goto Github PK

View Code? Open in Web Editor NEW
152.0 9.0 73.0 19.28 MB

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

Java 99.99% Shell 0.01%
minecraft-mod wynncraft wynntils

artemis's Introduction

⚠️ Deprecation Notice ⚠️

We officially bid farewell to 1.12.2 as an allowed game version for Wynncraft. To continue using Wynntils, upgrade to Wynntils Artemis.



About Wynntils

Wynntils is a Wynncraft mod that seeks to enhance the user's gameplay with a variety of customizable options and additions. If you find any bug or have crashed because of the mod, please report it at our official Discord server!

Setup the Workspace

To set up the workspace, just import the project as a gradle project into your IDE
To build the mod just call the buildDependents and the artifact should be generated in build/libs.

You can also setup a test environment. Run the task for generating run configurations for your IDE

  • Eclipse - genEclipseRuns
  • Intellij - genIntellijRuns
  • VSCode - genVSCodeRuns

When launching a run configuration use the generated run configuration

  • All IDEs - runClient

Authenticating

To authenticate in the development environment, you should use DevAuth. Download and place the forge-legacy.jar from their releases in run/mods. When you first launch the game with the generated runClient task, there will be a prompt in the console with a link to authenticate. No other configuration is required.

Alternative Accounts

This repository is pre-configured with one main and one alternative account. To use the alternative account, you should duplicate, then edit the generated runClient configuration. In the JVM arguments for your duplicated configuration, add -Ddevauth.account=alt. You will be prompted to authenticate with the new account when you run the new instance.

To add more alternative accounts, you should edit .devauth/config.toml in your local copy of this repository and follow the existing entries as examples. You may also refer to the DevAuth repository for more information.

Pull Request

All pull requests are welcome. We'll analyse it and if we determine it should a part of the mod, we'll implement it.

We welcome all forms of assistance. =)

If you would like to make a pull request, please compare and merge it with Wynntils:development rather than Wynntils:production.
Additionally, please name your pull request according to the Conventional Commits specification.

License

Wynntils is licensed over the license GNU Affero General Public License v3.0
All the assets are over Wynntils domain © Wynntils.

artemis's People

Contributors

atiedebee avatar bybackfish avatar cmkohnen avatar coehlrich avatar dalwynwastaken avatar devscyu avatar donkeyblaster avatar ekgame avatar enormouz avatar github-actions[bot] avatar halcyonsuoh avatar highcrit avatar incompleteusern avatar jadedbay avatar jh-devv avatar joshieman06 avatar kristofbolyai avatar magicus avatar mbnkwm avatar mcplayhd avatar mcrtin avatar p0kedev avatar rafii2198 avatar re-vc avatar san7890 avatar shadowcat117 avatar shadowshift avatar spacemonkeyy86 avatar tomasajt avatar wynntilsbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artemis's Issues

`WorldStateImpl` occasionally has wrong world state

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.

OverlayManagementScreen: Bugs

List:

  • Minimum width/height, disallow negative sizing
  • Only snap if dragged edge/corner is relevant to snapping point

Assign stable UUIDs to characters

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:

  • class
  • reskinned or not (the API name is "darkwizard" for a reskinned mage)
  • combat level (bearing in mind that the class selection level can be slightly higher, but never lower, since the API lags a bit)
  • combat XP percentage (with the same caveat; also if level has increased then XP can be lower as well)
  • number of finished quests

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());

Info variable system in Artemis

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.

@magicus @HighCrit @Incompleteusern @P0keDev @DonkeyBlaster

Encode Component into strings losslessly

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.

Test Result of Item Tier / Scroll Letters

Success:

  • scrolls have the town letter
  • powders have their tier

Fail:

  • Town pairs like Nesaak and Nemract get same letter
  • boat passes don't have letters
  • broken keys where the Forgery note is missing don't have letters
  • old dungeon keys don't have letters
  • emerald pouches don't have their tier

Malformed Dialog / Failed to parse NPC dialog

[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.

Item Tooltip Sizing and Positioning

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.

ChatManager wrong chat type

@magicus
image
[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.

InfoMessageFilterFeature regex incorrect

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?

UserFeatures config problems

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:

  • Make FeatureInfo annotation required by throwing Exception on feature registration
  • Make ConfigManager assume blank ("") category for features without annotation (the annotation already has "" as default category).

Overlays merging into Features

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

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.