• Visit Rebornbuddy
  • No Shiphand Event Tracking

    Discussion in 'Wildbuddy Developers' started by Lukov, Apr 3, 2015.

    1. Lukov

      Lukov New Member

      Joined:
      Apr 3, 2015
      Messages:
      63
      Likes Received:
      2
      Trophy Points:
      0
      There's no way to dump Public Events. This makes it impossible to make any Shiphand profiles as there is no way to check your current objective or progress.
       
    2. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Updated: April 14

      Extract PublicQuest.zip into your Plugin Folder.
      Extract ProfileBotOverride.zip into your Bots folder.

      Be sure to select the new BotBase from your dropdown list when testing the auto-reinitialization fix.


      Useage:
      HTML:
      IN PROFILE:
      
      <!-- Use with a closing tag as ExecTag is currently broken -->
      
      <!-- Queue for match (works with all matches found in MatchMaker) -->
      <If Condition="Buddy.MatchMaker.Queue('Veteran: Fragment Zero')" />
      <!-- Check to see if queued for a game -->
      <If Condition="Buddy.MatchMaker.IsQueued" />
      <!-- Check to see if a queue has popped -->
      <If Condition="Buddy.MatchMaker.IsGamePending" />
      <!-- Confirm pending game -->
      <If Condition="Buddy.MatchMaker.Join()" />
      <!-- Leave group / instance -->
      <If Condition="Buddy.MatchMaker.Leave()" />
      
      
      
      
      <If Condition="Buddy.PublicQuest.IsEventActive('Shiphand: Fragment Zero')" >
          <!-- Public Quest active -->
      </If>
      
      <If Condition="Buddy.PublicQuest.IsObjectiveActive('Kill X')" >
          <!-- Objective active -->
      </If>
      
      <If Condition="Buddy.PublicQuest.GetObjectiveProgress('Kill Y') == 1" >
          <!-- NOTE: When complete/inactive, returns 0, use this with IsObjectiveActive for best results -->
          <!-- Returns -1 if objective doesn't exist -->
      </If>
      
      
      
      <If Condition="Buddy.PublicQuest.ActorExists(12345, 10f, -15f, 120319203f, 12f)" >
          <!-- Checks if an actor (creature) exists at a specific location/radius -->
          <!-- ActorExists(int creatureId, float x, float y, float z, float radius) -->
      </If>
      
      <If Condition="Buddy.PublicQuest.CanInteract(12345, 10f, -15f, 120319203f, 12f)" >
          <!-- Checks if an actor (creature) exists and is interactable at a specific location/radius -->
          <!-- ActorExists(int creatureId, float x, float y, float z, float radius) -->
      </If>
      
      
      IN PEC:
      
      Log(Buddy.PublicQuest.DumpObjectives())
      
      
      
      
      
      Download disabled, please use QuestHelper (It contains MatchMaker and PublicQuest libraries as well)
       
      Last edited: Jul 7, 2015
    3. Lukov

      Lukov New Member

      Joined:
      Apr 3, 2015
      Messages:
      63
      Likes Received:
      2
      Trophy Points:
      0
      Can't get your code to compile due to syntax errors, and I don't have too much experience with C# enumeration and Lua to fix it myself.

      Second, even if it does print out all of the needed information, such as event and objective ids. I don't know if conditionals such as HasQuest(x), IsQuestComplete(x), IsQuestObjectiveComplete(x, x) etc will even function as it's classified as a Event and not a Quest.
       
    4. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Moved to the first post.
       
      Last edited: Apr 4, 2015
    5. dotbydot

      dotbydot Member

      Joined:
      Sep 29, 2011
      Messages:
      54
      Likes Received:
      0
      Trophy Points:
      6
      Is there a number for things that have multiple tasks? For example you need to collect 4 things for part of an event. Does it give a special number for each thing? What do you need to do to print out some where what info the plugin is getting?
       
    6. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      I can put more effort into building this up since it seems like it's going to be pretty handy.

      Right now it just dumps the objective id and short descriptions (no objective progress yet)

      If you want to see the entire current set of data, try something like:

      HTML:
      <Echo Message="Buddy.PublicQuest.CurrentObjective" />
       
    7. Lukov

      Lukov New Member

      Joined:
      Apr 3, 2015
      Messages:
      63
      Likes Received:
      2
      Trophy Points:
      0
      It's been working pretty well from what i've seen.
      A easier way to test the code would be opening Python Execute console and doing things such as
      Code:
      Log(Buddy.PublicQuest.CurrentObjective)
      Log(Buddy.PublicQuest.CurrentObjective.Contains('The Current Objective')
      I usually also do GameManager.ForceUpdate() in the Python console to prevent constantly needing to restart the bot whenever I restart the shiphand.

      Numerical objective tracking, collected 0/10, 2/10 etc would be fairly useful. For example, there are quite a few jump puzzles. Occasionally, the nav server decides to hiccup, fail the jump, then it has restart the entire sequence again to continue. Also there is times, for optionals when there is a bunch of objects spread across the map. Currently, you have to collect everything at once, instead of more ideally doing it room by room as you progress.
       
    8. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Updated my above post. ;)
       
    9. dotbydot

      dotbydot Member

      Joined:
      Sep 29, 2011
      Messages:
      54
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the plugin and all the info. For me currently I have a few issues with making a profile in Space Madness shiphand.

      #1 Is that the mesh is broken, there are ways around it using MoveTo but if you happen to die the bot would get stuck.
      #2 The "InteractRange" attribute appears to be broken as no matter what you put, it tries to interact at the same distance. Can't use it to collect the animals since it tries to while out of range.
      #3 Using the Collect tag will actually pick them up but has some issues.

      Code:
                   <While Condition="Buddy.PublicQuest.CurrentObjective.Contains('Collect escaped Experimental Creatures')" >
      				<Collect QuestId="-1" QuestObjective="0" CreatureId="69899, 69900, 69901" >
      					<SearchAreas>
      						<Hotspot X="-40.1287766" Y="4.95038748" Z="197.092987" Timeout="60" Range="200" />
      					</SearchAreas>
      				</Collect>
      			</While>
      Using the above code will pick them all up but will never leave the collect tag even though it is in that while statement. I'm guessing cause it is going by the quest and objective ids to see if it is done and ignoring the while condition.

      Code:
                    <Collect Condition="Buddy.PublicQuest.CurrentObjective.Contains('Collect escaped Experimental Creatures')" >
      				<CreatureIds>69899, 69900, 69901</CreatureIds>
      				<SearchAreas>
      					<Hotspot X="-40.1287766" Y="4.95038748" Z="197.092987" Timeout="60" Range="200" />
      				</SearchAreas>
      			</Collect> 
      Using the above code will most likely work better and leave the collect tag but it appears that the "CreatureIds" attribute is broken like it is in the grind tag so it doesn't collect anything. I also seen Echotiger comment about it as well in his profiles.

      I don't know if there is any other way around these things. I don't know if Apoc is still working on the bot but if he is these are some things he can take a look at.
       
    10. Lukov

      Lukov New Member

      Joined:
      Apr 3, 2015
      Messages:
      63
      Likes Received:
      2
      Trophy Points:
      0
      I know the mesh needs to be redone in several areas in the shiphands. Haven't seen Apoc on for a while.

      I sent Walter a message and he said he will fix the interact tag to function correctly.

      For the collect tag try doing

      Code:
                    
      <If Condition="Buddy.PublicQuest.CurrentObjective.Contains('Collect escaped Experimental Creatures')" >
      	<Collect CreatureId="69899, 69900, 69901" >
      				<SearchAreas>
      					<Hotspot X="-40.1287766" Y="4.95038748" Z="197.092987" Timeout="60" Range="200" />
      				</SearchAreas>
      	</Collect>
      </If>
      
       
    11. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      I can't help much with the incomplete mesh too much unfortunately.

      But verify it's still stuck in the Collect tag with QuestObjective also set to -1 (I don't know how the tag logic was implemented, so you never know)

      If not, reconsider the InteractTag, with the following definition below:

      Code:
      
              [XmlAttribute("CreatureId")]
              public int CreatureId { get; set; }
      
              [XmlAttribute("CreatureName")]
              public string CreatureName { get; set; }
      
              [DefaultValue(5f)]
              [XmlAttribute("InteractRange")]
              public float InteractRange { get; set; }
      
              [XmlAttribute("MapId")]
              public int MapId { get; set; }
      
              [DefaultValue(300)]
              [XmlAttribute("MaxWaitTime")]
              public int MaxWaitTime { get; set; }
      
              [XmlAttribute("RunOnce")]
              public bool RunOnce { get; set; }
      
              [XmlAttribute("SkipIfNpcNotFound")]
              public bool SkipIfNpcNotFound { get; set; }
      
              [DefaultValue(true)]
              [XmlAttribute("WaitForNpc")]
              public bool WaitForNpc { get; set; }
      
              [XmlAttribute("X")]
              public float X { get; set; }
      
              [XmlAttribute("Y")]
              public float Y { get; set; }
      
              [XmlAttribute("Z")]
              public float Z { get; set; }
      
      
      Specifically experiment with the 'RunOnce=true', 'SkipIfNotFound=true', and throw them in a While loop until it's complete?

      Consider trying to use '10f' or '5f' as a InteractRange and see if it performs better with that?

      Also remember that the XYZ coordinates are effectively a MoveTo and then attempt an interact, so you can use it to navigate the character to the room in question, and it'll move to the closest characterID afterwards just the same. (At least I think that's how it works?)

      Finally, Collect does NOT have a Condition attribute, so the final code you suggested likely wouldn't work regardless? Or were you suggesting an implementation? :D
       
    12. Lukov

      Lukov New Member

      Joined:
      Apr 3, 2015
      Messages:
      63
      Likes Received:
      2
      Trophy Points:
      0
      The code that I posted is in the same format on how I did all my collect tags. Seems to work fine everytime I use it and properly progress. For example, here's another collect tag I did in a Northern wastes quest profile.

      Code:
      		<If Condition="not IsQuestObjectiveComplete(7103, 0)" >
      		<Collect QuestId="7103" QuestObjective="0" CreatureId="34152, 34078, 34101" > <!-- Also will collect other mission objects on the way -->
      					<SearchAreas>
      						<Hotspot X="-28320.67" Y="-718.3105" Z="-28823.6074" Timeout="750" Range="200" />
      					</SearchAreas>
      				</Collect>
      		
      		
      		</If>
      I know that definitely did work.
       
    13. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Yes, but that was ensuring that the Objective #0 of Quest 7103 isn't flagged as complete in order to continue collecting items.

      As you're in a Shiphand, neither of those attributes are usable, so I suggested setting them both to -1 (or removing them completely as -1 is the default)
       
    14. dotbydot

      dotbydot Member

      Joined:
      Sep 29, 2011
      Messages:
      54
      Likes Received:
      0
      Trophy Points:
      6
      Yea using RunOnce=true and SkipIfNotFound=true along with while condition was the first thing I did. The animals you need to interact with run around so you basically need to catch them but also only one appears at a time based on your "insanity meter" from the shiphand. Using the "f" on InteractRange causes the bot to error, I also tried using it as an actual float (2.0) for example but no luck. Also setting both quest attributes to "-1" had no effect. If the InteractRange gets fixed then it should get the job done.

      I used that collect with an condition attribute because Echotiger used it for collecting things when you had a certain buff on you so I assumed it worked. It didn't make the bot error or anything when I used it and it ran to the hotspot. I figured it just didn't collect though because the CreatureIds doesn't work since it doesn't work in a grind condition.
       
    15. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      I see! That's unfortunate! There's ways to make it work by creating methods similar to the ones in the PublicQuest class, but they aren't very elegant! Haha

      I poked Apoc about giving us a ProfileElement interface so we can make our own custom tags, etc (Custom Behaviors for things such as this), but I suspect he's been fairly busy elsewhere!

      And yeah, Collect doesn't have a Condition attribute, so it was simply ignoring anything you put in there. :cool:
       
    16. Braken

      Braken Member

      Joined:
      Dec 3, 2011
      Messages:
      84
      Likes Received:
      4
      Trophy Points:
      8
      Just ran into the problem while trying to write my own shiphand profiles, I'll give this a go :p
       
    17. Braken

      Braken Member

      Joined:
      Dec 3, 2011
      Messages:
      84
      Likes Received:
      4
      Trophy Points:
      8
      Error during shiphand quest refresh

      @Deathdisguise I get this error when trying to refresh the quests in fragment zero, I'm using the newest WB version and put your plugins in the plugin folder and checked the plugins box.
       

      Attached Files:

      • Logs.zip
        File size:
        10.7 KB
        Views:
        100
    18. dotbydot

      dotbydot Member

      Joined:
      Sep 29, 2011
      Messages:
      54
      Likes Received:
      0
      Trophy Points:
      6
      That quest refresh thing you are using doesn't work. The way to dump quests is by pressing Alt, Shift + Q. There are no quests in shiphands though, they are events. The plugin gets the current event's name/number so you can use it to make if/while conditions.
       
    19. Braken

      Braken Member

      Joined:
      Dec 3, 2011
      Messages:
      84
      Likes Received:
      4
      Trophy Points:
      8
      Noted thanks! I'll mess around more tonight I have to move my fish to a new habitat right now
       
    20. Braken

      Braken Member

      Joined:
      Dec 3, 2011
      Messages:
      84
      Likes Received:
      4
      Trophy Points:
      8
      Alright I must be doing something wrong, I only get normal quests and not any shiphand events when I do the alt shift Q. Any idea where I went wrong? I put the PublicQuest.cs in the plugins folder
       

    Share This Page