What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Feature suggestion: culling skill

imdivesmaintank

New Member
Joined
Oct 30, 2013
Messages
342
Reaction score
0
The bot has skill slots for melee single target, aoe, fallback, etc...
It would be nice if you could add a "culling" option, with the adding option of specifying whether to use it on magic+, rare+, or just unique mobs.

I had written it in myself on the previous version and I've seen others asking for it.
 
I think this is achievable via plugin, some one just need to write it.
 
I think this is achievable via plugin, some one just need to write it.

You'd want to do it in the CR itself. Trying to modify CR logic though plugins will get really messy, so core modifications to a CR and maintaining a separate copy is the best approach.

The current design of ExampleRoutine was done in the way it was for this specific reason. Designing around various combat scenarios, and then assigning skill slots provides and easy way to have generic logic usable for a wide variety of skills, without having to code in all those skills. You could even auto-detect the culling strike aspect and remove the need for manual assignment as well.

It's a good feature, but aside from adding a few examples of various things to the CR, I can't start taking feature requests for the default CR and adding them in at this stage. ExampleRoutine has to be something that works in as many cases as possible, and try to show enough for users to get an idea of how they can do their own thing using what's there. It's not that I don't want to personally, but there's a model that needs to be followed for the project, and some of the new guides being worked on will cover that.
 
Yes as pushedx said it is impossible to code this into a generalized CR because of the way it needs to be coded, it would force the use of a skill that doesn't exist for many users as culling strike is a support gem and is not autodetectable as opposed to say Freezing Pulse you can directly check if you are able to cast. However if you need some help you can do it by making the following changes in the exampleroutine.

Code:
// Auto-set, you do not have to change these.
private int _CullingSlot = -1;

Code:
public void Tick()
        if (_needsUpdate)
            {
               _CullingSlot = -1;
            }

Code:
foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills)
                {
		     var cullingskill = ExampleRoutineSettings.Instance.CullingStrikeSkill;
                     var culling = LokiPoe.InGameState.SkillBarPanel.Skills.FirstOrDefault(s => s.Name == cullingskill);
                      if (IsCastableHelper(cs))
                           {
                                _CullingSlot = culling.Slot;
                           }
                 }

After cold snap logic in the cr:

Code:
var bestTarget = CombatTargeting.Targets<Monster>().FirstOrDefault();

if (bestTarget != null && bestTarget.IsActive && LokiPoe.BestTarget.HealthPercent < ExampleRoutineSettings.Instance.CullingStrikePercentage)
            {
                if (_CullingSlot != -1)
                    {
                         var culling = LokiPoe.InGameState.SkillBarPanel.Slot(_CullingSlot);
                          if (culling.CanUse)
                            {
                                var culling1 = LokiPoe.InGameState.SkillBarPanel.UseAt(_CullingSlot, true, cachedPosition);

                                if (culling1 == LokiPoe.InGameState.UseError.None)
                                return true;

                                Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", culling1, skill.Name);
                            }
                     }
            }


In exampleroutinesettings you must add:

Code:
private int _CullingStrikePercentage;
private int _CullingStrikeSkill;

Code:
[DefaultValue(10)]
        public int CullingStrikePercentage
        {
            get { return _CullingStrikePercentage; }
            set
            {
                if (value.Equals(_CullingStrikePercentage))
                {
                    return;
                }
                _CullingStrikePercentage = value;
                NotifyPropertyChanged(() => CullingStrikePercentage);
            }
        }
[DefaultValue("SkiLL")]
        public int CullingStrikeSkill
        {
            get { return _CullingStrikeSkill; }
            set
            {
                if (value.Equals(_CullingStrikeSkill))
                {
                    return;
                }
                _CullingStrikeSkill = value;
                NotifyPropertyChanged(() => CullingStrikeSkill);
            }
        }

In settingsgui you must add:

Code:
<Label Grid.Row="15" Grid.Column="0" Content="CullingStrikePercentage"  Margin="3,5,3,1" ToolTipService.ToolTip="Health percentage at which to use a culling strike supported skill."/>
                    <TextBox Name="CullingStrikePercentage" Grid.Row="15" Grid.Column="1" Margin="3"/>
<Label Grid.Row="16" Grid.Column="0" Content="CullingStrikeSkill"  Margin="3,5,3,1" ToolTipService.ToolTip="Exact name of culling strike supported skill. Capitals matter, insert name between quotation marks as shown."/>
                    <TextBox Name="CullingStrikeSkill" Grid.Row="16" Grid.Column="1" Margin="3"/>
 
Last edited:
What I meant about adding it, was not about the idea itself, since the current slot based design can simply default the culling skill to -1 to avoid using it (as with the other slots right now), but rather I can't start the process of adding all possible features into ExampleRoutine, because it's not meant to be an end-be all routine that does everything. It's only meant as an example as something that mostly works for as many cases as possible, to help show users one way about making a CR for various things in this game.

I would still suggest taking the approach shown for culling strike as Cold Snap was done. Auto-detect a skill or set a slot, then simply have your logic checks done before the main skill casts to ensure it's used. What naut has shown could work as well, aside from some errors, like LokiPoe.BestTarget should be bestTarget, but that's exactly the idea behind the current setup. Get people going with how things are done, and then QoL things and better functionality can be community provided.
 
i totally get what you're saying pushedx. i just hate the idea of doing custom routine at this point since you're still fleshing out the example routine it seems like and i'll have to keep porting your changes into my custom routine every time there's an update. if my code were only supplemental to the example routine, that would be ideal, but i'm guessing that isn't feasible in the current product.
 
i totally get what you're saying pushedx. i just hate the idea of doing custom routine at this point since you're still fleshing out the example routine it seems like and i'll have to keep porting your changes into my custom routine every time there's an update. if my code were only supplemental to the example routine, that would be ideal, but i'm guessing that isn't feasible in the current product.

ExampleRoutine is pretty much "done" now in terms of what we will provide, so don't worry about any future changes with the design. The whole goal of ExampleRoutine is explained here: ExampleRoutine Guide.

Basically, I've added as much possible to give people an idea of the things they'll have to work around. I feel the new ExampleRoutine is much better than the previous Exile routine, and in terms of providing the basics, it's certainly doing it's job.

From it, users can either design around a similar style of picking combat scenarios to have users configure skills to use (like this idea), or they can try something totally different if they want to find something that works better.
 
Back
Top