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

Auto-read attributes from the game and auto-send macro into the game #74

Open
Limiana opened this issue Jun 15, 2023 · 5 comments
Open

Comments

@Limiana
Copy link

Limiana commented Jun 15, 2023

Hello.
It would be nice if current stats, food could be read directly from the game.
Additionally, it would be nice if once a macro is generated, it would be automatically sent into game for further processing as user will configure.
Unfortunately I do not know JS so I can not implement these features myself. However, I'm willing to make a backend (Dalamud plugin) that will provide requested data and accept generated macro.
Would you be willing to add these functions to the solver?

@dazemc
Copy link
Collaborator

dazemc commented Jun 16, 2023

I'm willing to work on this. I'm not too familiar with dalamud though

@Limiana
Copy link
Author

Limiana commented Jun 16, 2023

I would handle the Dalamud part, it will basically be a web server which you can query for stats in JSON format, something like http://127.0.0.1:37914/CRP for carpenter each time before macro generation is started. Output is something like this:

{
    "Level": 90, 
    "Crafting": 3122,
    "Control": 2987,
    "Manipulation": true
}

or empty if not logged in/doesn't have requested class unlocked on this character/doesn't have data for it yet

I don't know JS though so that's where I'd need help with frontend. I imagined it somewhat like that:
Basically before macro is generated make a request for stats, if received empty/timed out just keep whatever is there, if received response update stats for job and actions for level and manipulation status and begin solver run.
Once solver completes, just send raw macro lines in format like http://127.0.0.1:37914/?item=itemIDOrName&macro=content and whatever to do with received macro user will configure inside the plugin

@dazemc
Copy link
Collaborator

dazemc commented Jul 2, 2023

I've delved deeper into this code base and it appears that there is already a function that checks for updates made to the stats of the crafter before it generates macros. This makes sense when you think about how the buffs get implemented. If I can pull json data like the one you have above then it should be pretty straight forward to change the stats and output the macro line by line. You are linking to a local host though so I cannot see the desired macro output.

Basically, you want a way to accept new stats (including buffs) on crafters to update within the solver. Then output the macros, as plaintext line by line? Again I'm assuming it's plain text because I can't see it.

It'd be much easier to use something like selenium to import the relevant data from dalamud into the solver though. Could make a headless selenium script that just outputs the macros as plaintext. I'm just throwing ideas out there

@Limiana
Copy link
Author

Limiana commented Aug 16, 2023

Could make a headless selenium script that just outputs the macros as plaintext

this could also work probably, I'm going to try that once I finish currently ongoing projects

You are linking to a local host though so I cannot see the desired macro output

this is because web server would run inside the game itself

@dazemc
Copy link
Collaborator

dazemc commented Aug 16, 2023

Check out Dalamud and this repo, https://github.com/WorkingRobot/craftimizer

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

No branches or pull requests

2 participants