• Visit Rebornbuddy
  • Bug report: Trinity tags loosing their isDone / bComplexDoneCheck after world transf

    Discussion in 'Archives' started by supermofo, Oct 16, 2012.

    1. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Hello,

      For the following use case (check if door is present go in, clear, go out), the profile order loops on the first TrinityIfSNOInRange.

      This is only happening when a <UseObject> tag is used. By the way interacting with TrinityInteract leads to random errors such as described in http://www.thebuddyforum.com/demonb...or-nonetype-object-has-no-attribute-mesh.html .

      Code:
      <TrinityIfSNOInRange snoid="176008" range="70">
      					<TrinityLog output="Bot left spawn found ..." />
      
      					<TrinityMoveTo questId="1" x="524.192" y="707.4615" z="20.1" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="523.9973" y="671.5768" z="15.91158" pathPrecision="10" />
      					<TrinityMoveToSNO questId="1" snoid="176008" pathPrecision="3" />
      					<UseObject questId="1" x="522.9449" y="665.2502" z="15.94455" actorId="176008" isPortal="True" destinationWorldId="60393" />			
      
      
      					<TrinityMoveTo questId="1" x="375.8704" y="291.1845" z="0.1000305" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="275.3366" y="322.3193" z="8.907692" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="203.1937" y="356.364" z="0.1000305" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="158.5083" y="379.6682" z="0.1000091" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="203.1937" y="356.364" z="0.1000305" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="275.3366" y="322.3193" z="8.907692" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="375.8704" y="291.1845" z="0.1000305" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="398.0682" y="267.4958" z="0.1000305" pathPrecision="10" />
      
      					<TrinityIfSNOInRange snoid="176008" range="70">
      
      						<TrinityMoveToSNO questId="1" snoid="176008" pathPrecision="3" />
      						<UseObject questId="1" x="416.9084" y="245.3037" z="3.9" actorId="176008" isPortal="True" destinationWorldId="71150" />
      
      					</TrinityIfSNOInRange>
      					<!-- go to resume pos -->
      					<TrinityMoveTo questId="1" x="519.2653" y="710.9178" z="20.1" pathPrecision="10" />
      					<TrinityMoveTo questId="1" x="556.848" y="719.6807" z="20.1" pathPrecision="3" />
      
      
      
      				</TrinityIfSNOInRange>
      
      The output would like this after trying to complete this:

      Code:
      [04:49:21.021 N] Bot left spawn found ...
      [04:49:23.924 N] Interacting with object g_Portal_Square_Orange-17306
      [04:49:27.115 N] LevelAreaID changed: 60396
      [04:49:29.995 N] ========== Grid segmentation resetting!!! ============
      [04:49:51.106 N] Interacting with object g_Portal_Square_Orange-17375
      [04:49:54.246 N] LevelAreaID changed: 19953
      [04:49:56.878 N] Bot left spawn found ...
      [04:49:57.148 N] ========== Grid segmentation resetting!!! ============
      [04:49:57.158 N] Bot left spawn found ...
      
      I hope there is an easy solution for this :)
       
      Last edited: Oct 16, 2012
    2. bodosko

      bodosko New Member

      Joined:
      Sep 18, 2012
      Messages:
      173
      Likes Received:
      1
      Trophy Points:
      0
      I'm having the same problem, but with TrinityUseOnce.

      Code:
                           <TrinityUseOnce questId="1" id="111" max="1"> 
                                  <TrinityLog questId="1" output="############ Starting Mines ############" />
                                  <!-- TO TOWN -->
                                  <If condition="not Me.IsInTown">
                                         <UseTownPortal questId="1" />
                                         <While condition="not Me.IsInTown">
                                                <WaitTimer questId="1" waitTime="50" />
                                         </While>
                                  </If>
      
                                  <!-- TO ZONE -->
                                  <If condition="Me.IsInTown">
                                         <UseWaypoint questId="1" actorId="6442" x="324.2319" y="291.6554" z="1.64563" waypointNumber="2" />
                                         <While condition="Me.IsInTown">
                                                <WaitTimer questId="1" waitTime="50" />
                                         </While>
                                  </If>                                     
                           </TrinityUseOnce>

      Bot TP to town, go to mines through waypoint then freezes with this:

      Code:
      TrinityUseOnceTag:ID: 111, DisablePrevious:null, Max:1, Conditional:null, IsDone:False, Body:System.Collections.Generic.List`1[Zeta.CommonBot.ProfileBehavior], QuestId:1, StepId:0, QuestName:Quest Id:1, IsDoneCache: False, Behavior:Zeta.TreeSharp.Decorator,
      Log Output is this:
      Code:
      [01:08:40.593 N] ############ Starting Mines ############
      [01:08:46.691 N] ========== Grid segmentation resetting!!! ============
      [01:08:48.378 N] Using Waypoint Waypoint-13798 Number:2
      [01:08:49.651 N] ========== Grid segmentation resetting!!! ============
      [01:08:52.797 N] ############ Starting Mines ############
       
    3. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Dang, I hope Giles get well soon :p
       
    4. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      These only happen when DB tags that "change worlds" occur, eg useobject for an orange doorway, or townportal, right? (ie - those DB tags seem to be doing something... "silly" - when nested inside of parent conditional tags like If etc.?)

      Just making sure that this is the ONLY time it happens - because I was trying to reproduce with a huge chain of complex nested checks and useonce's and if's but just stood in town the whole time outputting log-lines and using wait-timers, and it ran perfectly every time.
       
    5. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Yes I believe you're right on: the change world seems to be the cause.

      I think you had those done before the .255 release e.g.

      I have it on the orange portals yes. It seems bodosko has it when using waypoints.


      Let me know, if I can help.

      PS: You have a ACT 1 profile that will reproduce that bug in your inbox. You will notice that the Festering woods part will be cleared but it never goes to the next part (Leoric Manor + Norther Highlands). In this case the loop will happen on the <TrinityIfRandom questId="1" id="12" ... tag
       
      Last edited: Oct 18, 2012
    6. bodosko

      bodosko New Member

      Joined:
      Sep 18, 2012
      Messages:
      173
      Likes Received:
      1
      Trophy Points:
      0
      Yep, pretty much it.

      Here its a simple profile test that easily reproduces the bug.
      Go to some zone out of town and test it.
      Code:
      <Profile>
      <Name>TEST</Name>
      <KillMonsters>True</KillMonsters>
      <PickupLoot>True</PickupLoot>
      <Order>
      <ToggleTargeting combat="True" looting="True" lootRadius="50" killRadius="50" />
      
             <TrinityUseOnce questId="1" id="111" max="1"> 
                    <TrinityLog questId="1" output="############ Test 1 ############" />
                    <If questId="1" condition="not Me.IsInTown">
                           <UseTownPortal questId="1" />
                           <While questId="1" condition="not Me.IsInTown">
                                  <WaitTimer questId="1" waitTime="50" />
                           </While>
                    </If>
                    <If questId="1" condition="Me.IsInTown">
                           <UseWaypoint questId="1" actorId="6442" x="324.2319" y="291.6554" z="1.64563" waypointNumber="2" />
                           <While questId="1" condition="Me.IsInTown">
                                  <WaitTimer questId="1" waitTime="50" />
                           </While>
                    </If>                                     
             </TrinityUseOnce>            
             <TrinityLog questId="1" output="############ Test 2 ############" />
             
      </Order>
      </Profile>
      It never gets to the 2nd Test, and Test 1 is outputed twice, and bot like pauses inside TrinityUseOnce.
       
    7. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0

      Thanks. I can't promise this is something I can fix yet as I have no idea what DemonBuddy might be doing when the world-state changes, and whether or not it's code for general world-state change events *OR* code specifically in useobject/usetownportal/usewaypoint functions.... but I will have a look at it and see if I can debug it. It may be fixable - if not, it may be that we are limited to advanced tags that can have "child-nodes" and never use them with a world-state-change command in the middle of them (which would be a shame - it won't render UseOnce tags etc. useless, just limit their use a fair bit).

      I'll see what I can find :)
       
    8. bodosko

      bodosko New Member

      Joined:
      Sep 18, 2012
      Messages:
      173
      Likes Received:
      1
      Trophy Points:
      0
      You sir are the boss here.
      It can takes the time you want, we are already happy for having such a great developer like you that are always in touch with the community and trying to make things better.
      :D
       
    9. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      I changed your code slightly (since your code would then try to run to that waypoint AFTER portalling to town), but atm, this works fine;
      Code:
      <Profile>
      <Name>TEST</Name>
      <KillMonsters>True</KillMonsters>
      <PickupLoot>True</PickupLoot>
      <Order>
      <ToggleTargeting combat="True" looting="True" lootRadius="50" killRadius="50" />
      
             <TrinityUseOnce questId="1" id="111" max="1">
                    <TrinityLog questId="1" output="NOT IN TOWN - now portalling to town..." />
                    <If questId="1" condition="not Me.IsInTown">
                           <UseTownPortal questId="1" />
                           <While questId="1" condition="not Me.IsInTown">
                                  <WaitTimer questId="1" waitTime="50" />
                           </While>
                    </If>
                    <If questId="1" condition="Me.IsInTown">
                     <TrinityLog questId="1" output="(we are now in town!)" />
                    </If>
             </TrinityUseOnce>
             <TrinityLog questId="1" output="END OF PROFILE" />
             <TrinityLog questId="1" output="Success?" />
      </Order>
      </Profile>
      
      The output I see is;
      [13:24:23.495 N] NOT IN TOWN - now portalling to town...
      [13:24:28.906 N] ========== Grid segmentation resetting!!! ============
      [13:24:29.309 N] (we are now in town!)
      [13:24:29.339 N] END OF PROFILE
      [13:24:29.438 N] Success?
      [13:24:29.470 N] Profile completed
      [13:24:29.470 N] Number of games completed:1
      [13:24:29.473 N] Success?

      ^^ which is correct (you see "Success?" twice because DemonBuddy will repeat the last behavior in a profile *IF* it isn't loading a new profile or leaving the game).

      NOTE: I am using a brand new DB beta build (not sure it's been released, was testing new animation code) - could somebody try my above code to see if it works on your CURRENT demonbuddy build (before updating)? It might be that the new DB fixes this automatically, or maybe it only happens randomly anyway?
       
    10. bodosko

      bodosko New Member

      Joined:
      Sep 18, 2012
      Messages:
      173
      Likes Received:
      1
      Trophy Points:
      0
      Teleporting to town or UseWaypoint inside UseOnce works here too.
      The problem is when you have both inside UseOnce, like when bot finished a zone and TP back ot town to get waypoint to next zone.
       
    11. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Ok got it. It affects all complexnodetags - DemonBuddy ones and mine. I've created something reproducible and will pass this up the chain of command for the DB team to work on ^^
       
      Last edited: Oct 18, 2012
    12. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Ok good news, I've got this all fixed now, expect to see this propagating into future DemonBuddy and Trinity builds (complexnodetags in both DB & Trinity need updating to a new system that's a bit more stable).

      Can I just add, this one was a *PAIN IN THE ASS* to find the actual problem.
       
      Last edited: Oct 18, 2012
    13. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Ok, try Trinity v1.6.3.3, and DemonBuddy beta from build #34+, should both have my fixes in, hopefully no more fear of complex nested nodes! :p
       
    14. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Numero Uno :D

      I wish I could be at that level. Working hard to get there :)

      Thanx to you and to the DB team as *nothing* would be possible without you guys.


      This is just amazing, I really have no words left ...
       
      Last edited: Oct 18, 2012
    15. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      Just a warning - I have found one or two odd circumstances where it CAN still fail, but the test I was working on was this one below, and this now works fully;

      (run this in act 3 while in a random map - it portals to town if not already there, then goes into the tower of the damned through the town waypoint, with a number of log messages between).

      Code:
      <Profile>
        <Name>TEST</Name>
        <KillMonsters>True</KillMonsters>
        <PickupLoot>True</PickupLoot>
        <Order>
          <ToggleTargeting combat="True" looting="True" lootRadius="50" killRadius="50" />
      
          <TrinityUseOnce questId="1" id="123" >
              <TrinityIf questId="1" condition="not Me.IsInTown">
                <LogMessage questId="1" output="First, checking if not in town..." />
                <TrinityIf condition="not Me.IsInTown">
                  <LogMessage questId="1" output="NOT IN TOWN, now town-returning!" />
                  <UseTownPortal questId="1" />
                  <While questId="1" condition="not Me.IsInTown">
                    <WaitTimer questId="1" waitTime="50" />
                  </While>
                  <LogMessage questId="1" output="Return to town successful?" />
                </TrinityIf>
                <LogMessage questId="1" output="Next, checking we ARE in town..." />
                <TrinityIf questId="1" condition="Me.IsInTown">
                  <LogMessage questId="1" output="IN TOWN, now using waypoint..." />
                  <UseWaypoint questId="1" actorId="6442" x="402.5403" y="414.342" z="1.5338" waypointNumber="9" />
                  <While condition="Me.IsInTown">
                    <WaitTimer questId="1" waitTime="50" />
                  </While>
                  <LogMessage questId="1" output="Use waypoint successful?" />
                </TrinityIf>
                <LogMessage questId="1" output="Reached end inside of the parent node successfully!" />
              </TrinityIf>
              <LogMessage questId="1" output="END OF PROFILE" />
              <LogMessage questId="1" output="Success?" />
          </TrinityUseOnce>
      
        </Order>
      </Profile>
      
      Pre-update, that would get stuck in a loop and immediately at the end of the If check, it would jump to the start and spam the "First, checking if not in town..." log-line (the first command at the start of the If). Post-update, it works as expected and continues the profile (correctly displaying "END OF PROFILE" and "Success").

      If people find other specific circumstances that screw it up, let me know.
       
    16. supermofo

      supermofo New Member

      Joined:
      Sep 14, 2012
      Messages:
      178
      Likes Received:
      0
      Trophy Points:
      0
      Ok so this used to *not* work before the update:

      Code:
      <TrinityIf condition="CurrentLevelAreaId == 69504">
      				<TrinityIfSNOInRange snoid="176001" range="50">
      					<TrinityLog output="Dungeon found" />
      					<TrinityMoveToSNO questId="1" snoid="176001" pathPrecision="3" />
      					<UseObject questId="1" x="1373.309" y="587.0353" z="-22.31143" actorId="176001" isPortal="False"  />	
      					<TrinityLog output="Now processing dungeon ..." />
      					<TrinityMoveTo questId="1" x="169.3696" y="45.55481" z="-11.60704" pathPrecision="3" />
      					<TrinityMoveTo questId="1" x="169.4414" y="82.66295" z="-24.37995" pathPrecision="3" />
      					<TrinityMoveTo questId="1" x="133.4059" y="83.91159" z="-24.9" pathPrecision="3" />
      					<TrinityMoveTo questId="1" x="170.716" y="84.45959" z="-24.33275" pathPrecision="3" />
      					<TrinityMoveTo questId="1" x="164.5469" y="44.65145" z="-11.86563" pathPrecision="3" />
      					<TrinityMoveTo questId="1" x="111.5776" y="41.89542" z="0.8060888" pathPrecision="3" />
      					<!-- [22:27:52.839 N] [287D4420] GizmoType: Portal Name: g_Portal_ArchTall_Orange-5203 ActorSNO: 176001 Distance: 17.43262 Position: <94.25379, 40.16687, 1.696674> Barracade: False Radius: 11.69234 -->
      					<TrinityIfSNOInRange snoid="176001" range="50">
      						<TrinityMoveToSNO questId="1" snoid="176001" pathPrecision="3" />
      						<UseObject questId="1" x="94.25379" y="40.16687" z="1.696674" actorId="176001" isPortal="True" destinationWorldId="95804" />	
      					</TrinityIfSNOInRange>
      				</TrinityIfSNOInRange>
      			</TrinityIf>
      
      In other words, clearing maps with a few random dungeons is working perfectly.

      Will report back when soon, cause this is still dev.
       
      Last edited: Oct 18, 2012
    17. bodosko

      bodosko New Member

      Joined:
      Sep 18, 2012
      Messages:
      173
      Likes Received:
      1
      Trophy Points:
      0
      Working now, Giles \o/
      Now I can run pretty insane complex smart entire act runs :p

      Just another thing to bother you... Trinity is handling deaths very slow, I mean when bot dies it spends about 20secs doing nothing before clicking revive button.
      Is this normal behavior or it's because a huge profile is loaded? It has 5000 lines (90% moveto)
       

    Share This Page