• Visit Rebornbuddy
  • Adding a DLL to Singular (Apoc's) -- namespace not found error

    Discussion in 'General Discussion Forum' started by roguetexan, May 15, 2011.

    1. roguetexan

      roguetexan New Member

      Joined:
      Mar 23, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      I've converted a SharpSteer positioning system for Honorbuddy (used it in KillBots I posted on MMOwned some time ago).

      I tried to add it to Singular (Apoc's). I added the DLL, ensured it was in the Singular BIN folder, and put it in the Honorbuddy root folder for good measure. When I try to run HB, I get:

      It's referenced correctly, and if I "compile" through Studio, it is compiles with no errors. But when I try to run the CC, it compiles with errors.

      Suggestions anyone?
       
    2. lepton17

      lepton17 New Member

      Joined:
      Jan 15, 2010
      Messages:
      149
      Likes Received:
      1
      Trophy Points:
      0
      Pretty sure they don't allow you to reference DLLs anymore for plugins
       
    3. roguetexan

      roguetexan New Member

      Joined:
      Mar 23, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      grrrrr...
       
    4. CodenameG

      CodenameG New Member

      Joined:
      Jan 15, 2010
      Messages:
      38,396
      Likes Received:
      231
      Trophy Points:
      0
      honorbuddy wont allow loading of external Dll files. besides you wouldn't wanna add it to the CC you would wanna make your own grinding Bot base and then make it use your navigation overrides. the CC only controls combat, and movement in combat If needed.
       
    5. highvoltz

      highvoltz Well-Known Member

      Joined:
      Mar 22, 2010
      Messages:
      1,729
      Likes Received:
      140
      Trophy Points:
      63
      Compile the CC into a dll then load it via a stub using Assembly.LoadFrom(). if you want to see an example just look at how AB,GB2 does it. don't expect to upload to these forums though :)
       
    6. roguetexan

      roguetexan New Member

      Joined:
      Mar 23, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      Excellent. Thanks. Shall do. If I upload anything, it would just be the C# code for the project itself so others can use it.
       
    7. cpy

      cpy New Member

      Joined:
      May 10, 2010
      Messages:
      106
      Likes Received:
      0
      Trophy Points:
      0
      This sharpsteer thing looks really nice! Wonder what you did with it.
       
    8. roguetexan

      roguetexan New Member

      Joined:
      Mar 23, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      I use it for positioning of characters on the BG based on where characters are, who is targeting you, etc. For instance, if you are being chased by 2 enemy players... which direction should you run? If there is a third character ahead and to the left... how do you angle. While it's not as smart as a "person", you can use the vector math to figure out which direction you should point the character. Also useful for "flocking" behavior.

      The original C# was here I used to port this: SharpSteer - Home
      The original C++ is here: OpenSteer

      I used it to great effect in a previous bot I wrote (KillBots).

      Anyway, when I finish adapting it to HB, trying what Highvoltz and CodenameG suggest, I will post the source code.
       
      Last edited: May 16, 2011
    9. Nesox

      Nesox Moderator Staff Member Moderator Buddy Core Dev

      Joined:
      Jan 15, 2010
      Messages:
      1,563
      Likes Received:
      48
      Trophy Points:
      48
      You can include external dll's to the compilation process by doing
      Code:
      //!CompilerOption:AddRef:MyAwesomeDll.dll
      
      Add that comment anywhere, just make sure the dll is in the same directory as the Honorbuddy 'root' directory.
       
    10. highvoltz

      highvoltz Well-Known Member

      Joined:
      Mar 22, 2010
      Messages:
      1,729
      Likes Received:
      140
      Trophy Points:
      63
      Sweet, good to know :) . I was under the impression that only worked for certain dlls e.g. ones that are part of the .net framework.
       
      Last edited: May 16, 2011
    11. Nesox

      Nesox Moderator Staff Member Moderator Buddy Core Dev

      Joined:
      Jan 15, 2010
      Messages:
      1,563
      Likes Received:
      48
      Trophy Points:
      48
      Any assembly installed in the GAC works, all of the .Net assemblies is.
      The compiler looks in the GAC first then the working directory so you either have to install it or copy it.
       

    Share This Page