diff --git a/docs/RotationDev/README.md b/docs/RotationDev/README.md index 51023e944..c6ecbe960 100644 --- a/docs/RotationDev/README.md +++ b/docs/RotationDev/README.md @@ -1,5 +1,17 @@ # Development of Rotation. -Thank you for join the circle of rotation developers. +Thank you for join the circle of rotation developers who have a role called `xxx dev` in [Discord](https://discord.gg/4fECHunam9). -In here you can try to creat you own rotation for your combat! I would like you to share your own rotation to the public! +Actually, all the rotations should be developed by the players who who have a certain understanding of the job, not me who doesn't. I would like you to share your own rotation to the public! + +I'll make it easier and easier to develop a custom rotation. + +## Responsibility + +- Basic + - Maintain your own rotation. + - Answer the questions about your own rotation. +- Advanced + - Maintain the action list. + - Maintain the id of action or status. + - Raise the issue encountered in the development. diff --git a/docs/RotationDev/_sidebar.md b/docs/RotationDev/_sidebar.md index 7761f3b17..030deaaea 100644 --- a/docs/RotationDev/_sidebar.md +++ b/docs/RotationDev/_sidebar.md @@ -6,10 +6,7 @@ - [Rotation Info](RotationDev/rotation-info.md) - [Action](RotationDev/action.md) - [Character](RotationDev/character.md) - - Advanced - - Customization - - Action List - - Data Maintain - - Debug + - [Customization](RotationDev/customization.md) + - [Data Maintenance](RotationDev/data-maintenance.md) diff --git a/docs/RotationDev/assets/image-20230123142747722.png b/docs/RotationDev/assets/image-20230123142747722.png new file mode 100644 index 000000000..a07944959 Binary files /dev/null and b/docs/RotationDev/assets/image-20230123142747722.png differ diff --git a/docs/RotationDev/assets/image-20230123142852650.png b/docs/RotationDev/assets/image-20230123142852650.png new file mode 100644 index 000000000..ac00433d9 Binary files /dev/null and b/docs/RotationDev/assets/image-20230123142852650.png differ diff --git a/docs/RotationDev/assets/image-20230123144205172.png b/docs/RotationDev/assets/image-20230123144205172.png new file mode 100644 index 000000000..a3cebf611 Binary files /dev/null and b/docs/RotationDev/assets/image-20230123144205172.png differ diff --git a/docs/RotationDev/character.md b/docs/RotationDev/character.md index 8411e9a73..e48ebd959 100644 --- a/docs/RotationDev/character.md +++ b/docs/RotationDev/character.md @@ -1,6 +1,6 @@ # Character -The last source of information is character. Very inportant. +The last source of information is character. Very important. ## Basic diff --git a/docs/RotationDev/customizaion.md b/docs/RotationDev/customizaion.md new file mode 100644 index 000000000..10f5fc279 --- /dev/null +++ b/docs/RotationDev/customizaion.md @@ -0,0 +1,99 @@ +# Customization + +Want to write a better rotation? You need to customize it! + + + +## Configuration + +Do you want to have your own configuration to control the rotation? Then, you need to override the `CreateConfiguration` method. + +Here is an example in BRD: + +``` c# + private protected override IRotationConfigSet CreateConfiguration() => base.CreateConfiguration() + .SetBool("BindWAND", false, "Use Raging Strikes on WAND") + .SetCombo("FirstSong", 0, "First Song", "WAND", "MAGE", "ARMY") + .SetFloat("WANDTime", 43, "WAND Time", min: 0, max: 45, speed: 1) + .SetFloat("MAGETime", 34, "MAGE Time", min: 0, max: 45, speed: 1) + .SetFloat("ARMYTime", 43, "ARMY Time", min: 0, max: 45, speed: 1); +``` + +Just use the methods whose name started with `Set`. They are `SetFloat`, `SetString`, `SetBool`, `SetCombo`. + +If you want to get the value of configuration, You can do like this by using the methods whose name started with `Get`. + +```c# +var time = Configs.GetFloat("WANDTime"); +``` + + + +## Custom Field + +Sometimes, for saving the resource. We want to save the value to the field. But when to update these value? In method `UpdateInfo`. + +``` c# + private protected override void UpdateInfo() + { + //Set your value to field here. + } +``` + + + +## Description + +More description about your rotation? Overrive the `DescriptionDict`. + +Here is an example in BRD: + +``` c# + public override SortedList DescriptionDict => new() + { + {DescType.Description, "Please make sure that the three song times add up to 120 seconds!"}, + {DescType.DefenseArea, $"{Troubadour}"}, + {DescType.HealSingle, $"{NaturesMinne}"}, + }; +``` + + + +## RotationCheck + +It is a special delegate to make your rotation clear. + +Sometimes, some action has a special usage logic, and throughout. You can add it to the RotationCheck in BaseAction. + +Here is an example in SCH: + +``` c# + public SCH_Default() + { + SummonSeraph.RotationCheck = b => WhisperingDawn.ElapsedAfterGCD(1) || FeyIllumination.ElapsedAfterGCD(1) || FeyBlessing.ElapsedAfterGCD(1); + } +``` + + + +## Heal & Defense + +If you don't want to use the auto heal or defense by default, you can override them! They are `CanHealAreaAbility`, `CanHealAreaSpell`, `CanHealSingleAbility` and `CanHealSingleSpell`. + +Here is a simplified example in SCH: + +```c# + protected override bool CanHealSingleSpell => base.CanHealSingleSpell && Configs.GetBool("GCDHeal"); + protected override bool CanHealAreaSpell => base.CanHealAreaSpell && Configs.GetBool("GCDHeal"); + + private protected override IRotationConfigSet CreateConfiguration() + { + return base.CreateConfiguration().SetBool("GCDHeal", false, "Aut use GCD to heal"); + } +``` + + + +## BurstItem + +You can use burst item when you call `UseBurstItem` method in rotation. It will only be used in full party at level 90. \ No newline at end of file diff --git a/docs/RotationDev/data-maintenance.md b/docs/RotationDev/data-maintenance.md new file mode 100644 index 000000000..6b2a8f318 --- /dev/null +++ b/docs/RotationDev/data-maintenance.md @@ -0,0 +1,48 @@ +# Data Maintenance + +Things above all is about the rotation. but some information from rotation needs maintenance too. It is also the rotation developer's work. + +## ActionID + +In order to maintenance this, I recommend a plugin called [SimpleTweaksPlugin](https://github.com/Caraxi/SimpleTweaksPlugin), which can help you to find the id easily. + +![Simple Tweeks](assets/image-20230123142747722.png) + +![Get Action ID](assets/image-20230123142852650.png) + +Then modify the id in this [ActionID](https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver/Data/ActionID.cs) file in the right region. + +## StatudID + +When you use `Debug` mode to build this plugin, you'll see the tabitem like this, and it will show all the status. + +![Status ID](assets/image-20230123144205172.png) + +Then modify the id in this [StatusID](https://github.com/ArchiDog1998/RotationSolver/blob/main/RotationSolver/Data/StatusID.cs) file. + +Oh, yeah! You find my debug tab! There is your id hash. This is a `little easter egg`. People will great you the developer if you are in the same duty. So how to add this? Add your Hash id to this [field](https://github.com/ArchiDog1998/RotationSolver/blob/dd517a0bb3a664d008b8eb88d7bc9a0da56e0973/RotationSolver/Helpers/ConfigurationHelper.cs#L29). And then, you are in! + +## Action + +All the action you used in rotation are defined in this [directory](https://github.com/ArchiDog1998/RotationSolver/tree/main/RotationSolver/Rotations/Basic). It is great to modify it for all rotation developers in this job. + +There are several parameters you need to know for constructor. + +| Parameter | Description | +| ---------------- | ------------------------------------------------------- | +| isFriendly | is a friendly or supporting action | +| shouldEndSpecial | end special after using it | +| isEot | is hot or dot action | +| isTimeline | should I put it to the timeline (heal and defense only) | + +Some Property you can set. + +| Property | Description | +| ------------- | ------------------------------------------------------------ | +| ComboIdsNot | If combo id is on this list, this aciton will not used. | +| ComboIds | The combos that are not written on the action list. | +| StatusProvide | If player has these statuses from player self, this aciton will not used. | +| StatusNeed | If player doesn't have these statuses from player self, this aciton will not used. | +| ActionCheck | Check for this action, but not for the rotation. It is some additional conditions for this action. | +| AOECount | If this is an aoe action, how many hostile target would want to attack on, when you use this action. | +