• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Summoning 2 Different Golems

    Discussion in 'Archives' started by yeahnope, Jun 13, 2016.

    1. yeahnope

      yeahnope New Member

      Joined:
      Jun 13, 2016
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      Alrighty, came up against this yesterday since i'm currently testing an elementalist build with 'liege of the primordial' that actually benefits really well from having 2 golems deployed to boost 2 different damage types.

      After stuffing around making it far more complicated than it actually is, i cheated and just copy pasted shit.
      Here's a quick and dirty way of editing oldroutine so that it deploys 2 golems of different types instead of just summoning 2 of the same type as it does now.

      anyway since quite frankly i can't be bothered making all the combinations here's a run through of what to do.

      For starters we find the second golem type that we want summoned in oldroutine, in my case the ice golem for yours whatever.

      and we edit the sgslot to 'sg2Slot' like so. easy. so that's setting it as a separate golem for us to summon.

      next up. find the summon golem routine in there. copy and paste it below it. this is what summons the golem. the second copy underneath summons the second.

      here's the first
      edit 'max' in there to '1'. that's it. don't touch that first one again.

      next up we have the second one. edit each instance of 'sgSlot' to 'sg2Slot'. there are 3.
      edit 'max' to '2'.
      edit '_summonGolemStopwatch.Restart();' to '_summon2GolemStopwatch.Restart();' there are 2.

      it will look like this




      now we're done with those.
      next up search for the int for sgslot ie 'private int _sgSlot;'
      copy and paste the copy below it.
      edit the copy to '_sg2Slot;'
      that bits done.

      next we find the stopwatch for summoning the golem 'Stopwatch _summonGolemStopwatch = Stopwatch.StartNew();'
      copy and paste it below. edit the copy 'summonGolemStopwatch' to 'summon2GolemStopwatch' like we did above.

      like this
      done. save. hopefully you've made a copy of the installed oldroutine. bit late now if you've screwed it but eh.
      copy the edited version into the oldroutine folder in 3rdparty and replace the original. then delete the oldroutine folder in _CONFIGS_.
      please don't delete the oldroutine folder in 3rdparty.

      no guarantees it doesn't screw anything up it probably works fine even though there's almost certainly a better way to do it that actually checks to see if there's already a golem of the first type so it doesn't cast a second but eh.
      no guarantees if you screw it up :p

      done.
       
    2. gogo134

      gogo134 Member

      Joined:
      Jun 10, 2016
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      6
      thanks for solution,though it seems a little confusing but hope i can figure out:D ,ty again
       
    3. TappedD3

      TappedD3 Member

      Joined:
      Jan 18, 2016
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Attempted this and it broke the entire routine, just runs around trying to loot boxes/chests and doesn't attack, cast auras, etc.


      Edit: I was able to get it a second time around. I have attached it below for ease of use for others, just make sure you put it in your 3rd party > old routine folder.. (BACKUP YOUR OLD FILE FIRST)

      I have noticed now that once the timer goes down it will just resummon a new one and this on a repetitive cycle, is there any way that we can program this to recognize "if golem missing resummon" I do not know code or I would try to resolve myself.



      View attachment OldRoutine.cs
       
      Last edited: Jun 15, 2016
    4. yeahnope

      yeahnope New Member

      Joined:
      Jun 13, 2016
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      works fine here, even used a fresh oldroutine and followed the instructions to see if i missed anything. post your oldroutine and i'll have a look.
       
    5. TappedD3

      TappedD3 Member

      Joined:
      Jan 18, 2016
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Edited the original post, good job. See my second question, not sure if you are able to solve that part of it
       
    6. 777MAX777

      777MAX777 Member

      Joined:
      Jan 14, 2013
      Messages:
      31
      Likes Received:
      1
      Trophy Points:
      8
      yeahnope, thank you!

      Check _summon2GolemStopwatch.ElapsedMilliseconds in second section.
      and skill.NumberDeployed < 1 in first
       
      Last edited: Jun 17, 2016
    7. 777MAX777

      777MAX777 Member

      Joined:
      Jan 14, 2013
      Messages:
      31
      Likes Received:
      1
      Trophy Points:
      8
      Seems its ignored skill.NumberDeployed < 2 or skill.NumberDeployed < 1, so i increased ElapsedMilliseconds >180000
       
    8. yeahnope

      yeahnope New Member

      Joined:
      Jun 13, 2016
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      skill.NumberDeployed is just a dirty way of making it so that it doesn't just summon 2 of the same golem.
      ie summons flame golem if amount of golems is less than one, summons an ice golem if golems is less than two.
      in ideal conditions. summons flame golem because less than one, moves onto next line, summons ice because less than two. easy, dirty, but it works.

      the timer is a separate issue as to how the basic oldroutine handles the summoning of golems, it's far from perfect but works well enough, free to change that but i wouldn't have it over 50000, i've found it develops issues over around that.
      old routine is pretty basic. it gets the job done but that's about it.

      you can use an aura check to see if a golem is summoned so it doesn't recast but tbh i couldn't be bothered testing the code i wrote for it because this was just a stop gap while i was figuring out how to get something else working optimally for my build.
       
    9. WiN

      WiN Member

      Joined:
      Sep 2, 2014
      Messages:
      294
      Likes Received:
      15
      Trophy Points:
      18
      This is actually a genius piece of code in its elegance and simplicity. The only downside is that it doesn't work - the golems keep getting re-summoned every 10 seconds which can be heavy on the mana and inconvenient when fighting.

      Quick Note worth mentioning - the OldRoutine will summon 2 Golems without any editing - this code is specifically if you want 2 DIFFERENT Golems i.e. Fire and Lightning.

      The Long Story
      My theory is that skill.NumberDeployed counts based upon _sgSlot; - so each time the delay of 10 seconds is up - it re-summons another thinking there is only 1 on _sgSlot; (which there actaully is). Hence the solution of setting max on _sgSlot; to 1 and max on _sg2Slot; to 1 it works because it only summons 1 golem for each - and re-summons them perfectly. Code edits are:

      if (skill.NumberDeployed < 1)

      should be

      if (skill.NumberDeployed == 1)

      and

      if (skill.NumberDeployed < 2)

      should also be

      if (skill.NumberDeployed == 1)

      The Short Version

      Set the max to 1 for both golems, instead of 1 and a 2 - counter intuitive i know - but try it - it works.

      Anywho - great work :) Hacky and awesome - 2 Golems adds a pure 25% to the top line of my build damage - gotta love Liege of the Primordial.
       
      Last edited: Dec 11, 2016
    10. papagal

      papagal Member

      Joined:
      Dec 11, 2014
      Messages:
      68
      Likes Received:
      0
      Trophy Points:
      6
      WiN thanks for the tip! Why == though? If it's counting based on each slot, shouldn't it stay < ... that's what seems to work for me anyway.
       
    11. Tumzie

      Tumzie Member

      Joined:
      Feb 16, 2013
      Messages:
      341
      Likes Received:
      3
      Trophy Points:
      18
      I'm running this with 3-5 fire golems. Any way to stop the bot from casting the Clay Shaper (1h mace) stone golem? I already unchecked the ''use auras gained through items'' box and it's still casting stone golem...

      Anyone has a proper routine for running multiple flame golems? thanks!
       
    12. Hisp

      Hisp Member

      Joined:
      Feb 11, 2015
      Messages:
      48
      Likes Received:
      1
      Trophy Points:
      8
      Some news for don`t casting Stone golem from ClayShaper?
       
    13. Tumzie

      Tumzie Member

      Joined:
      Feb 16, 2013
      Messages:
      341
      Likes Received:
      3
      Trophy Points:
      18
      Yes please. How to prevent this?
       
    14. Hisp

      Hisp Member

      Joined:
      Feb 11, 2015
      Messages:
      48
      Likes Received:
      1
      Trophy Points:
      8
    15. ridz89

      ridz89 Member

      Joined:
      Jul 1, 2012
      Messages:
      249
      Likes Received:
      3
      Trophy Points:
      18
      I wanted the routine to check for golem aura on my lightning and fire instead of recast so frequently:

      Code:
                      // If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
                      if (_sgSlot != -1 && (LokiPoe.Me.HasAura(LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Flame Golem").Name) == false))
                      {
                          // See if we can use the skill.
                          var skill = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Flame Golem");
                          if (skill.CanUse())
                          {
                              var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                              if (skill.NumberDeployed < 1)
                              {
                                  await DisableAlwaysHiglight();
      
                                  var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot, true, myPos);
                                  if (err1 == LokiPoe.InGameState.UseResult.None)
                                  {
                                      
                                      
                                      return true;
                                  }
      
                                  Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
                              }
                          }
                      }
                      
                      
                      if (_sg2Slot != -1 && (LokiPoe.Me.HasAura(LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Lightning Golem").Name) == false))
                      {
                      // See if we can use the skill.
                          var skill = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Lightning Golem");
                          if (skill.CanUse())
                          {
                              var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                              if (skill.NumberDeployed < 1)
                              {
                                  await DisableAlwaysHiglight();
      
                                  await Coroutines.FinishCurrentAction();
      
                                  var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sg2Slot, true, myPos);
                                  if (err1 == LokiPoe.InGameState.UseResult.None)
                                  {
                                      
      
                                      await Coroutines.FinishCurrentAction(false);
      
                                  return true;
                                  }
      
                              Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
                              }
                          }
                      }
      I basically made the if statement check for golem aura before recast, and then make each actual skill for Golem, Fire etc.

      Shoulde be easy to add one of each golem like the other posts. But I prefered aura checking!
       
    16. Krazydrummer

      Krazydrummer Member

      Joined:
      Mar 18, 2013
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      6
      I did a similar thing but with a little more clarity. Since the golemskill is already declared.

      Code:
                          var skill = LokiPoe.InGameState.SkillBarHud.Slot(_summonIceGolemSlot);
                          if (skill.CanUse())
                          {
                              var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                              if (skill.NumberDeployed < 1 && !LokiPoe.Me.HasAura(skill.Name))
                                    var skillName = skill.Name;
      You can see that you just need to declare "&& !LokiePoe.Me.HasAura(skill.Name) in the if statement. The default oldroutine already has the _summonIceGolemSlot variable declared.
       

    Share This Page