• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [work in progress] Singular + SimcraftImpl all-in-one CR

    Discussion in 'All in One' started by aash, Aug 31, 2015.

    1. aash

      aash Member

      Joined:
      Oct 14, 2014
      Messages:
      179
      Likes Received:
      9
      Trophy Points:
      18
      [div=font-family:segoe ui;color:#333333;font-size:10pt;font-style:normal; -webkit-font-smoothing:antialiased; text-rendering: optimizelegibility;]
      @shineey
      Honestly I would love to do it, really. I really like the idea of implementing class logic (regardless of spec dps|heal|tank) in a domain specific language like *.simc. It is simple to understand and behaviors are simple to modify/extend. The major limiting factor is amount of free time I have right now. Sorry.
      [/div]
       
      Last edited: Sep 20, 2015
    2. shineey

      shineey Member

      Joined:
      Nov 14, 2014
      Messages:
      133
      Likes Received:
      0
      Trophy Points:
      16
      No rush! I was just thinking that it would be a great addition. I realize that it would probably be a pretty time-intensive thing to add that functionality. I currently don't have any of those classes/specs, but it would be something good to look forward to sometime in the future for everyone i think. I'd love to try to help if possible. I've done my fair shair of edits to SimcraftImpl, but still can't really tell where the code is that determines what to do with each action or condition. Kane's code seems a bit messy/convoluted for me, or maybe just not commented enough.
       
    3. Lauw

      Lauw New Member

      Joined:
      Aug 7, 2011
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      Not working for me :-(

      Ach help me out please? :)

      Cannot get it to work, my toon just stands till.
      If i change back to singular in class, it starts doing stuff.

      I have downloaded the right zip from github and replaced the files and folders under Honorbuddy\Routines\Singular with the ones from the zip.
      Configured class config -> Generals group -> Override tags changed from singular to simcraftimpl
      I do not have the Simcraft Impl bot installed, just clean HB with built in bots.
      Deleted everything in CompiledAssemblies, just in case.
      I downloaded profiles from archive link, but it does not contain any priest profile.
      So i installed simcraft and imported my character.
      Created a file with same name as my priest - Eldárwén.simc
      Copied the data when importing into the Eldárwén.simc file.

      Attached log where i start combatbot and started attacking a mob, but nothing happens.
      I open class config, change from simcraftimpl to singular.
      Save and close, wupti... now it starts killing.

      What am i doing wrong?

      Kind regards,
      LauW
       

      Attached Files:

    4. shineey

      shineey Member

      Joined:
      Nov 14, 2014
      Messages:
      133
      Likes Received:
      0
      Trophy Points:
      16
      Some possible issues that may be causing the problem you are facing:

      1. The strange characters in the file name
      2. I know that when I was trying to get SimcraftImpl to work with my shadow priest back in March-ish, I had to make significant changes to the .simc file, since some of the conditionals were not implemented. The cycle_targets action is not implemented correctly either, well, it seems to cycle the targets correctly, but the target=1,2,3,etc was definitely not implemented.
      3. In the log, i noticed the lines that say "I dont recognize the option target_if=max:spell_targets.mind_sear_tick" - SimcraftImpl has not implemented the "spell_targets.*" conditional. I work around this by using "active_targets" instead of the "max:spell_targets.*"
      4. There is also "Invalid expression term '&&' - line c:\Users\LauWRené\AppData\Local\Temp\xlabox44.0.cs(116,79) : error CS1525: Invalid expression term '&&'" in your log. go through your simc file and make sure the conditionals only use ONE ampersand instead of two.
       
    5. Fubsnoobs

      Fubsnoobs New Member

      Joined:
      Jan 25, 2015
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      @Lauw- I've ran into the same issue with my priest. Did you try the fix shineey talked about ? "3. In the log, i noticed the lines that say "I dont recognize the option target_if=max:spell_targets.mind_sear_tick" - SimcraftImpl has not implemented the "spell_targets.*" conditional. I work around this by using "active_targets" instead of the "max:spell_targets.*"

      I'm trying to edit my simc file but still get tons of errors on the priest.

      Found on my Pally I get the following:

      63578717027.7454>:Compiling Action Lists
      <63578717028.1692>:New Apl: Paladin_Retribution_T17H
      <63578717028.3135>:Loading configuration
      <63578717028.3485>:Configuration successfully loaded.
      <63578717031.5786>:Behaviors created !

      If I figure it out I'll post.

      @Shineey can you post your priest file to kind of point me in the right direction? Github maybe?
       
    6. shineey

      shineey Member

      Joined:
      Nov 14, 2014
      Messages:
      133
      Likes Received:
      0
      Trophy Points:
      16
      Well I currently don't have a priest anymore, but I do have profiles that I know work for a frost DK, WW monk, and BM hunter if you'd like to take a look at those. My Ret pally may still work as well. I still have my priest profile from march, but I don't have a priest to test it on since I don't really enjoy casters. Another point that I should mention, is that any conditions that are appended with ".react" will not function properly. As far as I can tell, the Simcraft API just uses it as a proc conditional and it functions the same if you remove it. So as soon as I start a new simc file from an imported SimulationCraft simc, i do a Find and Replace for ".react" and delete them all. Note: I am saying that I only delete the part that says ".react", not the part that precedes it.
       
    7. Fubsnoobs

      Fubsnoobs New Member

      Joined:
      Jan 25, 2015
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Shineey I’d love to take a look at your old priest and other working scripts to try and learn how to edit the imported SIMC files. Thanks for the tip on the .react stuff and thanks for trying to explain to this noob how this program works. I really appreciate your help and time.

      Fubs
       
    8. Fearce

      Fearce Member

      Joined:
      Jan 15, 2010
      Messages:
      39
      Likes Received:
      0
      Trophy Points:
      6
      hey, my frost mage doesnt use ice nova or comet storm? :)
       
    9. pookthetook

      pookthetook Member Buddy Store Developer

      Joined:
      Jan 28, 2012
      Messages:
      214
      Likes Received:
      21
      Trophy Points:
      18
      Normal code reuse in multiple projects is by creating a common core library and including that in the new projects.
      If you want to share code that's only in a plugin to be able to use it in other things then use reflection.

      Say I have this plugin (irrelevant plugin overrides omitted):
      PHP:
      namespace Pookthetook.Examples
      {
          public class 
      LoggingPlugin Styx.Plugins.HBPlugin
          
      {
              public 
      override string Name => "Logging Plugin";

              public static 
      void WriteToLog(string message)
              {
                  
      Styx.Common.Logging.Write("[LoggingPlugin]: " message);
              }
          }
      }
      Then to use that WriteToLog method from a different plugin, botbase, profile etc:
      PHP:
      // Hold the method from the plugin.
      private Action<stringWriteToLogAction;

      // Initialize WriteToLogAction
      private void Initialize()
      {
          var 
      assembly AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(=> a.GetName().Name.Contains("Logging Plugin"));
          var 
      type assembly.GetType("Pookthetook.Examples.LoggingPlugin");
          var 
      methodInfo apiType.GetMethod("WriteToLog"BindingFlags.Public | BindingFlags.Static);
          
      WriteToLogAction = (Action<string>)Delegate.CreateDelegate(typeof(Action<string>), methodInfo);
      }

      // Once initialized, call this to easily use the method from the plugin
      public void WriteToPluginLog(string message)
      {
          
      WriteToLogAction(message);
      }
      When you call WriteToPluginLog after initializing, it would show up with "[LoggingPlugin]: " as a prefix because it's getting called from that separate plugin.
      This example is more work than just writing the same method twice, but is just a simple demo. Defensive coding practices were omitted for brevity as well - in production code it should handle things like the assembly not existing.

      Reflection can be used for all kinds of things like creating instances of classes and more complex code than this.
      It can even be called from a profile by using RunCode.

      That said, reflection is slow and I don't personally suggest requiring dependencies of separate projects. Just wrap everything in a common core project and include it in all others that will use it.
      You said you were curious so I showed you even though I don't recommend it. Maybe you'll find some great use (I personally use it in profiles). Either way, you can check that off your to do list. :)
       
      Last edited: Sep 26, 2015
    10. aash

      aash Member

      Joined:
      Oct 14, 2014
      Messages:
      179
      Likes Received:
      9
      Trophy Points:
      18
      [div=font-family:segoe ui;color:#333333;font-size:10pt;font-style:normal; -webkit-font-smoothing:antialiased;text-rendering: optimizelegibility]@pookthetook
      Using reflection in a such manner involves too much boilerplate code. Reusing classes or the groups of classes is a pain: you should import `em all. I have invented the other way to reuse whole assembly. I will share it later.
      [/div]
       
    11. Fubsnoobs

      Fubsnoobs New Member

      Joined:
      Jan 25, 2015
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Sounds awesome even if I don't totally understand everything you guys are talking about.

      Keep up the good work and thanks again aash for taking this project on.
       
    12. shineey

      shineey Member

      Joined:
      Nov 14, 2014
      Messages:
      133
      Likes Received:
      0
      Trophy Points:
      16
      Here's a BM hunter rotation
      I got some of it from someone else that was trying to get it to auto tranq-shot for bosses like Beastmaster if he had the enrage buff, but I'm not sure if it worked. I just tried to do a "target.buff.savage_howl.up" and SimcraftImpl threw an error and wouldn't compile like that, so idk how to get that to work exactly
      You need to register and have one post to see spoilers!
      Here's a Dual Wield Frost DK
      You need to register and have one post to see spoilers!
      Here's my Priest from a while back. Idk if it is in working condition though
      You need to register and have one post to see spoilers!
       
      Last edited: Sep 28, 2015
    13. Fubsnoobs

      Fubsnoobs New Member

      Joined:
      Jan 25, 2015
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Thanks Shineey!

      For anyone that is using this and is a new to this stuff like me after the last honor buddy update you have to reload the files and replace the singular files again to get the .simc to work again.
       
    14. ryot00

      ryot00 Member

      Joined:
      Aug 25, 2014
      Messages:
      31
      Likes Received:
      0
      Trophy Points:
      6
      I've followed all the instructions in the OP and imported the .simc profiles into the "Simcraft Profiles" folder.
      After I changed the Override tags to "simcraftimpl" the bot does not cast any spells.
      Any ideas on what I'm doing wrong?
      Log:
      View attachment 13604 2015-10-06 09.44.txt
       
    15. Fubsnoobs

      Fubsnoobs New Member

      Joined:
      Jan 25, 2015
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Did you delete everything in the compiled assemblies folder inside your honor buddy folder?
       
    16. r0sc0

      r0sc0 New Member

      Joined:
      Jan 15, 2010
      Messages:
      410
      Likes Received:
      2
      Trophy Points:
      0
      Hey guys, I have loaded the routine, and it says no routine for warlock affliction for simc.
      still does all the casts but im guessing its normal rotation? if that is the case can you give a list of rotations that you have customized for the simc?

      Cheers
       
    17. andehhhhh

      andehhhhh New Member

      Joined:
      Oct 14, 2015
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      Problem

      What happens if I don't have that setting file?
      And my bot also just stand still.
      I followed the instructions to the best of my abilties.
       

      Attached Files:

      Last edited: Oct 14, 2015
    18. aash

      aash Member

      Joined:
      Oct 14, 2014
      Messages:
      179
      Likes Received:
      9
      Trophy Points:
      18
      [div=font-family:segoe ui;color:#333333;font-size:10pt;font-style:normal; -webkit-font-smoothing:antialiased;text-rendering: optimizelegibility]Sorry guys right now I don't have much spare time to resolve your issues. Try yourself. Or see the original "simcraft impl" thread.
      [/div]
       
    19. MCHammer87

      MCHammer87 New Member

      Joined:
      Aug 30, 2015
      Messages:
      56
      Likes Received:
      0
      Trophy Points:
      0
      how is this for fury warrior?
       

    Share This Page