-
Notifications
You must be signed in to change notification settings - Fork 120
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
WIP deep dungeon auto clear modules #580
Conversation
// the only separate-cooldown GCD that increases to >1 charge via trait is currently MCH Drill; others have multiple charges at unlock - SGE Phlegma, RPR Soul Slice, BLU Surpanakha | ||
var cooldownSingleCharge = IsGCD && max > 1 && cdg.Total > 0 ? cdg.Total / max : Cooldown; | ||
|
||
return !IsMultiCharge || cdg.Total < cooldownSingleCharge ? cdg.Remaining : cooldownSingleCharge - cdg.Elapsed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I don't understand this change... Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have the level 94 trait Enhanced Multiweapon on machinist, Drill stops being affected by skill speed/haste/slows, so the separate cooldown is always 20s and using both charges will set it to 40. before then it is affected by haste despite still technically having multiple charges, so like in Palace of the Dead, where you have some inherent skillspeed from the aetherpool gear, the single charge cooldown of Drill is 19.2s and using the one charge you have at that level will set the cooldown to 38.4s. also, if you use a single charge of drill at these levels while slowed or hasted, you can get a cooldown total of like 32 or 54 seconds, and checking Cooldown against that gives you incorrect results.
so what this line is doing is just dividing cdg.Total by the maximum number of charges of the ability, which SHOULD give us the effective single charge CD.
i do not think it's possible to accurately calculate this information based on only the user's stats, because the total cooldown is basically snapshotting the stats we had when the skill was used, which may not be the ones we have now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then why can't we just always return cdg.Total / MaxChargesAtCap() - cdg.Elapsed
, clamped to 0? Why do we need IsGCD etc checks here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should work in theory yeah. this code was originally only checking for specifically Drill, since it's the only action that is affected and i wanted to avoid introducing other bugs, but it seemed to work fine in practice
@@ -18,6 +18,7 @@ | |||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> | |||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | |||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> | |||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this property set, the plugin will fail to load because it won't be able to find the sqlite3 DLL
@@ -19,6 +19,8 @@ protected virtual void Dispose(bool disposing) | |||
|
|||
public virtual void Update() { } | |||
public virtual bool WantToBeDrawn() => false; // return true if it wants to be drawn (higher priority than inactive boss modules, but lower priority than active) | |||
public virtual bool DrawSeparately => false; // return true if the contents of DrawExtra should be shown in a separate window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need two modes? What are the usecases for both options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only usecase in master atm is the Sastasha module, which draws one line of hints in the regular bossmod hints window, and I felt like drawing a whole separate window for that would probably be overkill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd then make two independent functions (draw extra in main window & draw dedicated window).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well yeah but we still need to know whether to display the hints window and the zone module window
@@ -134,6 +135,8 @@ public sealed class Actor(ulong instanceID, uint oid, int spawnIndex, string nam | |||
public bool PredictedDead => PredictedHPRaw <= 1 && !IsStrikingDummy; | |||
public float PredictedHPRatio => (float)PredictedHPRaw / HPMP.MaxHP; | |||
|
|||
public bool IsTransformed => Statuses.Any(Autorotation.RotationModuleManager.IsTransformStatus); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these statuses need to be moved to Data\
(something like CommonStatusId or something...). This is a logical dependency inversion here.
@@ -481,6 +513,17 @@ private bool UseBozjaFromHolsterDirectorDetour(PublicContentBozja* self, uint ho | |||
return res; | |||
} | |||
|
|||
// TODO add to manual q | |||
private void UsePomanderDetour(InstanceContentDeepDungeon* self, uint slot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I remember you also mentioned some bozja thing not getting hooked?..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public ReplayManager(RotationDatabase rotationDB, string fileDialogStartPath) | ||
{ | ||
this.rotationDB = rotationDB; | ||
this.fileDialogStartPath = fileDialogStartPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming convention (_ prefix for private variables), no this.
please, it's too ugly.
[PropertyDisplay("Remember playback position for previously opened replays")] | ||
public bool RememberReplayTimes; | ||
|
||
public List<ReplayMemory> ReplayHistory = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of storing this 'invisible' state in configs tbh. At very least, it would mean that config would always be 'modified' in UIDev, preventing close by esc.
I wonder if we need a separate config (user preferences or something), it could also be used to store shit like default filtered statuses in planner, default filtered out actions for replays, etc etc etc.
@@ -53,6 +53,7 @@ public readonly bool InRect(WDir direction, float lenFront, float lenBack, float | |||
} | |||
|
|||
// 2d vector that represents world-space position on XZ plane | |||
[Serializable] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh?
@@ -48,6 +49,7 @@ | |||
<ItemGroup> | |||
<PackageReference Include="DalamudPackager" Version="11.0.0" /> | |||
<PackageReference Include="SharpDX.Mathematics" Version="4.2.0" /> | |||
<PackageReference Include="System.Data.Sqlite" Version="1.0.119" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What code uses it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AutoClear.cs, scroll to the bottom
note that, because PalacePal doesn't have an IPC and it sounded like a huge PITA to add one, and it wouldn't even work in UIDev, the new zone module's trap avoidance functionality relies on just directly opening the PP sqlite file and reading trap locations from there.
i'm not a big fan of this solution but also like, i have no idea how to do it better, other than copying PP's entire dataset into the vbm source tree and assuming it will never change
In addition to some changes to the boss modules themselves since they mostly suck:
UIDev
framework
ui
other
fixed/improved some of my rotation code
NextGCD
, a previously wasted feature, to correctly predict reassemble/life surge/true north usage