• Visit Rebornbuddy
  • Trinity v1.6 - New Profile XML Tags

    Discussion in 'Trinity' started by GilesSmith, Oct 4, 2012.

    1. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Edit: All good fixed



      PS: TrinityMoveTo is just ... perfect :)
       
      Last edited: Oct 7, 2012
    2. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      +1 to that. Right now it is now its ok for short routes or single uses of objects, but long routes where is more likely that you die are a problem.

      Also, would be nice to have some kind of <else> or <TrinityAlreadyUsedOnce /> feature for the use once tag (it will run the code inside only if the id is already used), so we can do more complex things, like skipping big parts of an already discovered map using a shortcut. Something like:
      Code:
      Move to A
      <TrinityUseOnce id="12345">
           Move to B
           Move to C
           Move to D
      </TrinityUseOnce>
      <TrinityAlreadyUsedOnce id="12345">
           Move to E
      </TrinityAlreadyUsedOnce >
      Move to F
      
      Edit: Well, for this to work the Already used code should be BEFORE the use once, so it won't try to run both codes in the first run
       
      Last edited: Oct 7, 2012
    3. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      This is intentional behavior for good death handling support. Utilize the optional "max" parameter and you have yourself full death handling.

      <TrinityUseOnce id="12345" max="3">
      </TrinityUseOnce>

      If you want something to be SKIPPED after one death - don't use the max tag (or set it to 1).

      If you want your bot to *RE-DO* the area inside a useonce tag after death, set the max to 2.

      If you want your bot to re-do it three times maximum, set the max to 3...

      etc.

      The options are there for you to use so that you can fine-tune death-handling (and max deaths for each area) to your liking, broken down into each individual area :D

      Check out my sample profile attached to post #1 of this thread - you can see I set a max of 2 in each "useonce" area - so that if the bot dies in the middle of either area, it can go through that area at least once more. But it will skip that entire area if it dies too many times, and move to the next area altogether.

      Can you show me the tag as you tried to use it (paste it exactly)? And was the file definitely in the same folder as the profile that was already loaded?
       
    4. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      For example, my code for the tower of the damned lvl1 looks like this:
      Code:
      Some MoveTos
      <!--TrinityUseOnce id="10"-->
      	BIG chain of MoveTos
      	<TrinityUseOnce id="8">
      		A single MoveTo
      	</TrinityUseOnce>
      	Some MoveTos
      	<TrinityUseOnce id="9">
      		Some MoveTos
      	</TrinityUseOnce>
      	Some MoveTos
      <!--/TrinityUseOnce-->
      Some MoveTos
      
      The id=10 tag does a full run of the external circle (A3CH Style, starting and ending at the WP), 8 and 9 handle the small corridors in the bottom left, the final movetos cover the path from the WP.
      Right now if I die inside the id=10, the whole section is skipped. If I use max=2, that won't happen, but say I die after completing the useonce tag, in my way to the stairs, then I'll have to walk the entire outer cycle again, which beats the intend of the UseOnce tag...

      I understand there are some scenarios where the UseOnce as it is now is useful (although I can't think of one now that won't work if the id is flagged upon completion instead of the way it is now), but having a <TrinityCompleteOnce> tag that works as awww and I suggested would be really nice to cover cases as the one exposed here.
      Also, please take into consideration the idea of the <TrinityAlreadyUsed> tag of my previous post.
       
      Last edited: Oct 7, 2012
    5. awww

      awww New Member

      Joined:
      Oct 4, 2012
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      giles: so suppose we have a group of code id 1 (max 3) and another group id 2 (max 2). suppose the bot complete id 1 successfully on first try, and dies while doing id 2. now the bot will do id 1 again (because it has max 3), then id 2. what i want is it skips id 1 because it already successfully pass that group of code.
       
    6. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Use the "disable previous" flag. I'll re-paste a small sample snippet from post #1 (also be sure to check out the sample profile attached to the first post, it's very useful! :D)
      Code:
      <TrinityMaxDeaths questId="1" max="3" />
      <TrinityUseOnce questId="1" id="20" max="2">
        <TrinityLog questId="1" output="Now Running A3 Cursed Towers" />
        <!-- insert cursed towers profile stuff -->
      </TrinityUseOnce>
      <TrinityUseOnce questId="1" id="21" max="2" disableprevious="true">
        <TrinityLog questId="1" output="Now Running A3 Battlefields" />
        <!-- insert battlefields profile stuff -->
      </TrinityUseOnce>
      <LeaveGame reason="Run is done!" />
      Once it reaches ID 21 - that "disableprevious" tag means all previous useonce tags that have EVER been hit *EXCEPT* the one it's currently doing, will be disabled from any further use (so 21 will *NOT* be disabled since that tag is in 21... but tag 20 and any other tags would be disabled).

      Use the disable flag to disable all previously met useonce ID's from being run again. I'm not actually entirely clear what you are trying to do with your sample code, but I think you want to do this;
      Code:
      Some MoveTos
      <TrinityUseOnce id="10" max="3">
      	BIG chain of MoveTos
      	<TrinityUseOnce id="8">
      		A single MoveTo
      	</TrinityUseOnce>
      	Some MoveTos
      	<TrinityUseOnce id="9">
      		Some MoveTos
      	</TrinityUseOnce>
      	Some MoveTos
      </TrinityUseOnce>
      
      <TrinityUseOnce id="666" disableprevious="true">
      </TrinityUseOnce>
      
      Some MoveTos
      
      So if it dies inside of #10, it can re-do #10 again (but it won't re-do ID 8 if ID 8 has already been done, and it won't re-do ID 9 if ID 9 has already been done, since they have no max).
      But once it finished ID 10, it'll hit the "empty" ID 666 - which is simply there to disable all previous ID's - so if it dies after hitting ID 666 - it'll skip ID 10 next time even if it's only done ID 10 once.

      NOTE: Currently disableprevious disables *ALL* ID's except the ID listed in that tag. I think I need to change it so it DOESN'T disable parent ID's? Currently, in your above example, if you had a "disableprevious" in ID 9 - it would disable it's "parent" ID 10, too. I think it should always ignore ITSELF, and the parent?

      Perhaps I could even add a specific disable tag, eh;
      <TrinityDisableUseOnce id="10" />
      Would disable ID 10 from ever being done again, that might be a safer way of doing it?

      ^^ Given all the above, is there still a use for having a... what did you want... specifically a COMPLETED tag? You can kind of do that already, if at the *END* of ID 10 (but still inside ID 10), you did this;
      Code:
      <TrinityRandomRoll id="123" min="5" max="5" />
      
      ^^ That would make Random ID 123 ALWAYS be 5.
      Then if you use RandomIf;
      Code:
      <TrinityIfRandom id="123" result="5"> 
      </TrinityIfRandom>
      
      That will only happen *IF* 123 has been set to 5.
       
    7. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      All good, was my bad trying to plug in blank profile manager.
       
      Last edited: Oct 7, 2012
    8. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      You are right, thanks. This does the trick for id=10. But be ware, having an empty Use once as you did in the example hangs the profile, I had to add a waittimer of 50ms inside in order to work. <TrinityUseOnce id="666" disableprevious="true"/> and <TrinityUseOnce disableprevious="true"/> hangs the profile too.
      A parameter like disableuponcompletion or something to mimic this behaviour without the need of an aditional use once tag would be great.

      Yep, it would be best if it doesn't disable the parent/parents.

      Btw Giles, if you wanna see exactly what my profile does I can PM it to you, but since its based on ciggarc's A3CH 1.3 pre release i didn't see fit to post it in the public forum.
       
    9. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      I've come up with what I think is a better solution to the "disableuponcompletion" and other issues, next release (which will be v1.6.2, and is in testing atm, I *HOPE* to have it out in the next 12-24 hours, depending on the tests and feedback from testers about new avoidance changes) contains a new XML tag;
      <TrinityUseStop id="12345" />
      To "disable" any UseOnce using that ID again (even if it's a UseOnce further down the profiles/in another file due to be loaded - it will prevent it running until the game exits and a new run starts).

      So you can add that to the end (but INSIDE) of a useonce tag - so if it manages to reach the end of a useonce tag, it'll hit that, and you can make it disable the useonce tag that just ended, safely - so it only gets disabled when it reaches the end.

      As for what you're working on - when you've finished for sure I would like a copy, sounds like you might be doing what I was hoping people would do with all the new tags... ;)
       
    10. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      All is working great with the new tag in 1.6.2, thanks Giles.
       
    11. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Adding a new tag next v too to "reset" a useonce. I don't know if anyone will have use for it, but I thought creative people might have some cool ideas. So as well as the "stop" tag to completely disable a useonce tag (eg when the end of a useonce has been reached), a "reset" to reset another tag to ALLOW it to happen again (as if it'd never happened before). (perhaps you could disable an ID at the start of a useonce area, and it only gets enabled/reset if you reach the end of that area... so it'll keep re-doing that one small area over and over until it reaches the end, then the other useonce will be activated and the current one disabled, to achieve something complicated!).
       
    12. imakii

      imakii New Member

      Joined:
      Jul 11, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0

      Wow this ^ codes makes profile making simplier although i need bosshogs to work ffs, then again this and the other code giles made about bot wont need backtracking "if died" and resume to last death point
       
    13. Olesya

      Olesya New Member

      Joined:
      Oct 7, 2012
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      Hello. look this
      why new tags not working?
      tnx
       
    14. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      I don't know what any of your <If> tags are trying to accomplish. You haven't commented it at all so it's not very clear, for example;
      Code:
      <If condition="ActorExistsAt(3795, 4272.047, 4252.328, -24.9, 50)">
      I have no idea what that is checking, or if it's valid, or if the commands inside the If are being processed.

      Also, I should point out that DemonBuddy <If> commands are unreliable. Try replacing them with <TrinityIf> and </TrinityIf> instead.

      Secondly, while it might not be needed, I find it safer to *ALWAYS* put the "questID" in EVERY opening tag/standalone tag, eg;
      Code:
      <TrinityIf questId="1" condition="ActorExistsAt(3795, 4272.047, 4252.328, -24.9, 50)">
      Finally, you have put TrinityLog commands into your script - which is good! - but you haven't told us which of those logs are being output, which defeats the point of using them to debug your profile! When you run the profile, do you see "We are starting" ? Do you see "Revived on HOP2?"?

      Use the Log commands wisely, and pay attention to which of them appears in your DemonBuddy log box when you run the profile - they will help you work out which parts of your profile are running, and which parts aren't running.
       
    15. Gardettos

      Gardettos New Member

      Joined:
      Jun 11, 2012
      Messages:
      522
      Likes Received:
      6
      Trophy Points:
      0
      3795 is a checkpoint. A place where you spawn on death
       
    16. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Sticky this please
       
    17. Gardettos

      Gardettos New Member

      Joined:
      Jun 11, 2012
      Messages:
      522
      Likes Received:
      6
      Trophy Points:
      0
      Found a bug


      Code:
      <TrinityUseOnce questId="1" id="01" max="2" disableprevious="true">	
      id="01" doesn't work, id="1" works fine though.

      Bot won't finish ondone.

      Hmmm might be something else. I tried making a big Act 3 profile all in one. But the bot is having issues calling ondone. Seems to be having issues with going straight from a </TrinityIf> to </TrinityUseOnce> with nothing inbetween.
       
      Last edited: Oct 12, 2012
    18. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      For those who wants to use the LevelAreaId in their profile do:

      PHP:
      <While questId="1" condition="ZetaDia.Me.CurrentScene.Mesh.LevelAreaSNO == 60396">
                          <
      TrinityInteract questId="1" snoid="176008" />
                          <
      WaitTimer questId="1" WaitTime="1000" />
                      </While>
       
      Last edited: Oct 13, 2012
    19. Gardettos

      Gardettos New Member

      Joined:
      Jun 11, 2012
      Messages:
      522
      Likes Received:
      6
      Trophy Points:
      0
      Doesn't need to be that complicated just

      Code:
      <If condition="CurrentLevelAreaId == 57425">
       
    20. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      Hi again!

      I have another suggestion for the new xml tags, Giles.

      Code:
      <!-- Beginig of the profile -->
      <TrinityZoneControl id="Azmodan" enable="1">
      <TrinityZoneControl id="KeepsLvl3" enable="1">
      
      <!-- Awful lot of code -->
      
      <TrinityZone id="Azmodan">
           <!-- Azmodan code-->
      </TrinityZone>
      <TrinityZone id="KeepsLvl3">
           <!-- KeepsLvl3code-->
      </TrinityZone>
      
      I think this should be easy enough to implement, and allowing to choose at the start of the profile if you want to do some optional zones or not, will simplify a lot the customization of big/complex profiles for the end users, specially for profiles with a single file, or the ones with variations of a zone.
      EDIT: The code inside the zone should be skipped by default if not <TrinityZoneControl id="xxx" enable="1"> is found, so multi-file profiles won't bug if the profile is started from any other file than the one containing the enables (the START_HERE)
       
      Last edited: Oct 14, 2012

    Share This Page