• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • What are the API calls to use HQ materials on a craft?

    Discussion in 'Community Developer Forum' started by Neverdyne, Feb 8, 2015.

    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      For the life of me, I can't find the API calls to set HQ materials when crafting. Searched on CraftingLog and CraftingManager but can't seem to find it. Any help would be appreciated :p
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      They aren't and wont be exposed due to their complex nature.
       
    3. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Alright, thanks.
       
    4. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      I guess I'll ask here so I don't start another thread. I was hoping I could make an instance of the Synthesize tag and get it's behavior in order to synthesize with HQ mats on a custom crafting bot base I'm making. However, I noticed it's constructor is private so it can't be instantiated or inherited from. Just so I stop looking if it's the case, is there absolutely no way we can synthesize with HQ mats on plugins / bot bases outside of using OrderBot profiles? Last resort I was thinking of making an XML tag and deserializing it into a Synthesize object and getting it's composite like that so I can hook it up with the other logic.
       
    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      Just create an instance of the sythesize tag and grab the async task via reflection.
       
    6. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Alright, managed to create an instance with reflection. How's the async method called and what parameters does it use? Using Reflector only thing I could find was two private Task<bool> methods:

      Code:
      [DebuggerStepThrough, AsyncStateMachine(typeof(ff14bot.NeoProfiles.Tags.Synthesize.))]
      private Task<bool> ()
      {
          // This item is obfuscated and can not be translated.
      }
              
      [CompilerGenerated]
      private Task<bool> (object )
      {
          // This item is obfuscated and can not be translated.
      }
      
      Or do you mean that just by creating an instance of a Synthesize and then setting it's HQMats property how I need, the CraftingManager.SetRecipe() is enough for the HQ mats to be used?
       
      Last edited: Feb 10, 2015
    7. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      Its a coroutine which i suggest you start using instead of behavior trees. The one without any parameters, so you just (await reflectioncall)
       
    8. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Alright sounds good. Could you tell me the method's name? For whatever reason, I can't get that method's name using reflection. It detects there is something, but just returns an empty string.
       
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      It's obfsucated. The name is converted to random gibberish.
       
    10. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Ah that's why. Found it by enumerating the GetMethods() return values in the log and using it's index lol. It seems to be working, thanks.
       

    Share This Page