awgil / ffxiv_bossmod

BossMod FFXIV dalamud plugin
BSD 3-Clause "New" or "Revised" License
246 stars 98 forks source link

Question for the plugin devs: How to contribute? #143

Closed farchord closed 4 weeks ago

farchord commented 1 year ago

Hello, I'm a c# coder (In my free time) and I play FFXIV in Linux. I've been using this plugin for a while, and I love it. It helps a lot.

I wanted to ask if you were looking for collaborators, and if so, how I would go about helping. I've been browsing the code for the repo a little bit, but I don't know if you use special tools to "capture" a fight, or if you simply need testers. I'd be happy to help.

awgil commented 1 year ago

Re. capturing - the pipeline is really simple - dump a log (config -> General -> Dump world state events), then run UIDev standalone executable, open it there and analyze. Typically I just enable that every time before entering instance, and store single log per lockout.

That's one of the process I'd like to improve:

  1. Create dedicated window (hidden by default) with start/stop recording actions.
  2. Move the whole replay framework from UIDev to main project, allowing using it in-game (and add some UI to e.g. open any log, open last written log, open cooldown planner with last pull, and so on).
  3. Allow adding custom messages with timestamp to the replays (e.g. to mark last pull as interesting for later analysis).
  4. Reduce log size (instead of writing text lines, use some binary format + compression), since now I have tens of gigs of logs already...

As for contributions - just make a PR if you wanna improve something (if it's a larger thing, might be worth discussing first).

farchord commented 1 year ago

Alright, I'll look into this. I tried to compile UIdev on linux. It succeeded, but I'll either have to do a couple more modifications or install it on my Windows VM. But I'll look into it, thanks!

jtabox commented 1 year ago

Hi, regarding the analysis pipeline you described, is there some specific way to run UIDev? I built everything, created a world state events log, but running the executable doesn't seem to do anything. I run it and it just exits silently, no messages or windows opening or anything. I ran it with and without the game open with the same result.

awgil commented 1 year ago

I just run from VS directly (set as startup project and hit F5). I always do that in debug mode, it needs some slight tweaking to make it run in Release. Game doesn't have to be open.

See whether there are any messages in VS console.

jtabox commented 1 year ago

Alright, at least I know it's completely independent from the game. And I assume some kind of GUI pops up. The console shows a dependency error, some cimgui module missing, but I use the dlls that already exist in XIVLauncher's directory, and even downloaded and used an extra cimgui.dll, but still same. I'm going to give it a new try later today, thanks for replying.

awgil commented 1 year ago

Oh yeah, I remember I needed to copy cimgui dll from somewhere to somewhere... I think from dalamud to wherever UIDev exe is built? I did it only once and never had to touch it, I guess I really need to add that thing to the build system...

cptjabberwock commented 1 year ago

Hello, I really like this and as such would like to contribute. However, I'm not good at anything else than recording the battle with a log and then posting it somewhere here for someone knowledgable to do the graph and timeline

I mostly like it for Foray content like Eureka's Baldesion Arsenal (maybe outdoor NM ?) and Bozja

There are some CE and DRS

How would I go about recording CE (for those that aren't in the list) and DRn, Castrum and Dalriada Can I make a dump file for each encounter individually ? and where would they be stored ?

jtabox commented 1 year ago

Hello, I really like this and as such would like to contribute. However, I'm not good at anything else than recording the battle with a log and then posting it somewhere here for someone knowledgable to do the graph and timeline

I mostly like it for Foray content like Eureka's Baldesion Arsenal (maybe outdoor NM ?) and Bozja

There are some CE and DRS

How would I go about recording CE (for those that aren't in the list) and DRn, Castrum and Dalriada Can I make a dump file for each encounter individually ? and where would they be stored ?

Don't get me wrong, but the recording itself is the absolutely easiest part of the process, you just tick a box in-game and go do the duty. It's the part that comes afterwards that takes the majority of time & energy in creating new duty modules, which is why there's limited support at the moment. You have to build and run the UIDev project from this repo and feed it the recording you created. It will show you a boatload of information which you then need to read through to analyze what happened during the battle (retrieving the relevant data from other sources works too I guess). Like which abilities were used, what they looked like, their type and duration, which actors spawned and other typical FFXIV combat parameters. You compile this information and then write and test the corresponding module in C#.

So while your gesture is surely appreciated, unfortunately it's only a very small first step (like maybe 2% of the whole process), and recording a fight is really not the limiting factor in the whole thing. That said, maybe someone would have use of your recordings, but they must be already willing to walk the rest 98%. To record a duty you just open the plugin's settings, tick the Dump World State Events box at the top and run the duty as you would normally. It will write a .log file in the BossMod folder in your AppData/Roaming/XIVLauncher/pluginConfigs folder. Untick the box when you're done with the duty and that's it, you now have your recording.

What you could do is to try and figure out how things work and try to do the process yourself, if you have some time and some crude understanding of programming concepts. It's the boat I'm in 😄 Especially now with Chat GPT you can use it as a tutor to help you understand things. Worst case scenario you give up, frustrated, and hope someone else writes the modules you'd like, but at least you'll have learned something new. If you're interested, I can tell you what I did to get started, I'm currently writing modules for the latest raid's normal bosses.

jtabox commented 1 year ago

Oh yeah, I remember I needed to copy cimgui dll from somewhere to somewhere... I think from dalamud to wherever UIDev exe is built? I did it only once and never had to touch it, I guess I really need to add that thing to the build system...

Yes, apparently there's a cimgui.dll that's not in the XIVLauncher\addon\Hooks\dev folder that's referenced by the project. It's inside XIVLauncher\addon\Hooks\7.6.3.0\runtimes\win-x64\native (obviously the path changes depending on current Dalamud version, and the dll is only available for win-x64 architecture). I added cimgui.dll and cimguizmo.dll to the project's folder (not sure if the latter is needed) and set it to copy them to the build directory if newer. It's been working fine afterwards and it's a great tool for combat data analysis 😄

ViennaGuy commented 1 year ago

How might one contribute towards autorotations?

Stryker627 commented 1 year ago

How might one contribute towards autorotations?

this is something i would also like to know

awgil commented 4 weeks ago

Outdated. Not an issue.