What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Classy - Adds a tag to OrderBot to allow Job changing.

Okay, I think I might have it fixed. as kagamihiiragi17 suggested, I added a decorator just for setting _done to true (pretty much a copy/paste from their post because its 3am and I am tired/lazy,, thank you by the way kagamihiiragi17). I also added treeroot.stop in that decorator, set _isdone to true, and called treeroot.start after setting the value. I know this probably is not the correct way to do this, but lets face it ... im new to creating plugins for buddybots, but have been using them for many years now.. if anyone knows of a better way, Please let me know.

I tested this with a cluster farm clipping that was posted in previous page.. since I did not feel like sitting here the hour to test it.. i made random time conditions in the profile and let the bot run for a little bit. At each timebetween condition, it switched to appropriate class and ran to specific hotspot and waited for the next timebetween condition.. it then changed class and ran to that one.. this is about the extent of the testing that was done so far.. please try it and monitor it and see how it works for you. Updated attachment in OP

thanks to everyone for input.

Yeah, I just had the thought that with the way you had it set up before (setting _done within one decorator), if the ChangeJob tag was called and the player was already the correct class, the tag would never exit because _done would never be set to true. With the way you have it set up now, if the ChangeJob tag is called and the player is already the right class, it'll set _done to true instantly and move on to the next thing in the profile. I think that's way better behavior.
 
There's nothing to fix, that's working as intended. When the bot is stopped and started, the entire profile is reevaluated and starts from the first place where it can. In your example, as far as the bot is concerned, once it restarts it hasn't even been to East Shroud, so it goes there again. That's proper behavior. You can change the profile so that the first If is IsTimeBetween(21,22) and the second one is IsTimeBetween(22,23) to make it act the way you want it to.

In saying that, I think that might trip mine up too, because it'll go back to the initial <MoveTo> tag after switching in the middle of a hotspot, and running back to the first location as miner or botanist unstealthed. So I added a few lines of code to check wether i'm miner or botanist, and applying stealth immediately. Thanks.
 
There's nothing to fix, that's working as intended. When the bot is stopped and started, the entire profile is reevaluated and starts from the first place where it can. In your example, as far as the bot is concerned, once it restarts it hasn't even been to East Shroud, so it goes there again. That's proper behavior. You can change the profile so that the first If is IsTimeBetween(21,22) and the second one is IsTimeBetween(22,23) to make it act the way you want it to.

Thanks for the help here. Kagamihiiragi, you've always helped me a lot and I greatly appreciate all the effort you put into this community.

That being said, any other ways around this? I could do as you suggested but there's a few problems with that. 1.) that doesn't allow for three nodes or more in a two hour window, so I would have to choose which nodes to gather. Not too big of a problem but my goal was to make a profile to gather all the nodes. 2.) It will still probably cause loops. It doesn't take a full hour to do each gather. So if the first tags gets done any time before 22 it's going to go try to gather the first one again. Looks kind of suspicious and a waste.

Is there a way I could set a variable to check if that node has been farmed? Like TrilliumBulb = 1 if it's been mined and 0 if it hasn't. Could I set it at the end of the gather and then reset all of them at the begining of a new day? And is there a way the profile will check the variable?
 
Thanks for the help here. Kagamihiiragi, you've always helped me a lot and I greatly appreciate all the effort you put into this community.

That being said, any other ways around this? I could do as you suggested but there's a few problems with that. 1.) that doesn't allow for three nodes or more in a two hour window, so I would have to choose which nodes to gather. Not too big of a problem but my goal was to make a profile to gather all the nodes. 2.) It will still probably cause loops. It doesn't take a full hour to do each gather. So if the first tags gets done any time before 22 it's going to go try to gather the first one again. Looks kind of suspicious and a waste.

Is there a way I could set a variable to check if that node has been farmed? Like TrilliumBulb = 1 if it's been mined and 0 if it hasn't. Could I set it at the end of the gather and then reset all of them at the begining of a new day? And is there a way the profile will check the variable?

Let me tackle these questions in order:

Are there other ways around this? I'm not sure, to be honest. I always thought that for non-combat classes you didn't need to stop and start the bot. Are we sure that the TreeRoot.Stop() and TreeRoot.Start() are necessary? Trying the tag without the stop/start would be my first idea.

So if the first tags gets done any time before 22 it's going to go try to gather the first one again. Add all the gather tags for a timeslot into one block and add a <WaitWhile Condition="IsTimeBetween(20,22) /> at the end. This will stop the bot from trying to go back to the first gather area for that block. I edited the sample code you gave on the previous page:

Code:
<If Condition="IsTimeBetween(21,23)">
	<!-- Botany: East Shroud - Kidragora, Trillium Bulb -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<If Condition="not IsOnMap(152)">
		<TeleportTo Force="true" Name="Hawthorne Hut" AetheryteId="4" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Lush Vegetation Patch</GatherObject>
		<HotSpots>
			<Hotspot Z="131.2229" Y="1.075165" X="-380.9028" Radius="500"/>
		</HotSpots>
		<Slot>7</Slot> <!-- 6=Kidragora, 7=Trillium Bulb -->
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<TeleportTo Name="Camp Dragonhead" AetheryteId="23" />
	<!-- Mining: Coerthas Central Highlands - Astral Rock -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Miner">
		<ChangeJob Type="Miner" />
	</If>
	<If Condition="not IsOnMap(155)">
		<TeleportTo Name="Camp Dragonhead" AetheryteId="23" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Rocky Outcrop</GatherObject>
		<HotSpots>
			<Hotspot Z="155.2625" Y="284.1149" X="125.8191" Radius="500"/>
		</HotSpots>
		<Slot>6</Slot> <!-- Astral Rock -->
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<TeleportTo Name="Revenant's Toll" AetheryteId="24" />
	<!-- Botany: Mor Dhona - Grade 4 Carbonized Matter and Elemental Clusters -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<If Condition="not IsOnMap(154)">
		<TeleportTo Name="Revenant's Toll" AetheryteId="24" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Rocky Outcrop</GatherObject>
		<HotSpots>
			<Hotspot Z="-484.7234" Y="-6.061276" X="3337.9405" Radius="500"/>
		</HotSpots>
		<!--
			Slot 0 = Grade 4 Carbonized Matter
			Slot 1 = Lightning Cluster
			Slot 2 = Fire Cluster
			Slot 3 = Wind Cluster
			Slot 4 = Water Cluster
			Slot 5 = Ice Cluster
			Slot 6 = Earth Cluster
		-->
		<Slot>5</Slot>
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<WaitWhile Condition="IsTimeBetween(21,23)" />
</If>

Is there a way I could set a variable to check if that node has been farmed? There's really no good way to store a variable in a profile between bot sessions. Theoretically you could write a plugin for that but I think it would be a massive waste of time. Ideally, we get the tag working without needing to stop/start the bot, and then this isn't necessary anymore.

- kagami
 
Let me tackle these questions in order:

Are there other ways around this? I'm not sure, to be honest. I always thought that for non-combat classes you didn't need to stop and start the bot. Are we sure that the TreeRoot.Stop() and TreeRoot.Start() are necessary? Trying the tag without the stop/start would be my first idea.

So if the first tags gets done any time before 22 it's going to go try to gather the first one again. Add all the gather tags for a timeslot into one block and add a <WaitWhile Condition="IsTimeBetween(20,22) /> at the end. This will stop the bot from trying to go back to the first gather area for that block. I edited the sample code you gave on the previous page:

Code:
<If Condition="IsTimeBetween(21,23)">
	<!-- Botany: East Shroud - Kidragora, Trillium Bulb -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<If Condition="not IsOnMap(152)">
		<TeleportTo Force="true" Name="Hawthorne Hut" AetheryteId="4" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Lush Vegetation Patch</GatherObject>
		<HotSpots>
			<Hotspot Z="131.2229" Y="1.075165" X="-380.9028" Radius="500"/>
		</HotSpots>
		<Slot>7</Slot> <!-- 6=Kidragora, 7=Trillium Bulb -->
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<TeleportTo Name="Camp Dragonhead" AetheryteId="23" />
	<!-- Mining: Coerthas Central Highlands - Astral Rock -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Miner">
		<ChangeJob Type="Miner" />
	</If>
	<If Condition="not IsOnMap(155)">
		<TeleportTo Name="Camp Dragonhead" AetheryteId="23" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Rocky Outcrop</GatherObject>
		<HotSpots>
			<Hotspot Z="155.2625" Y="284.1149" X="125.8191" Radius="500"/>
		</HotSpots>
		<Slot>6</Slot> <!-- Astral Rock -->
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<TeleportTo Name="Revenant's Toll" AetheryteId="24" />
	<!-- Botany: Mor Dhona - Grade 4 Carbonized Matter and Elemental Clusters -->
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<If Condition="not IsOnMap(154)">
		<TeleportTo Name="Revenant's Toll" AetheryteId="24" />
	</If>
	<Gather Loops="1">
		<GatherObject>Unspoiled Rocky Outcrop</GatherObject>
		<HotSpots>
			<Hotspot Z="-484.7234" Y="-6.061276" X="3337.9405" Radius="500"/>
		</HotSpots>
		<!--
			Slot 0 = Grade 4 Carbonized Matter
			Slot 1 = Lightning Cluster
			Slot 2 = Fire Cluster
			Slot 3 = Wind Cluster
			Slot 4 = Water Cluster
			Slot 5 = Ice Cluster
			Slot 6 = Earth Cluster
		-->
		<Slot>5</Slot>
		<GatheringSkillOrder>
		</GatheringSkillOrder>
	</Gather>
	<If Condition="Core.Me.CurrentJob != ClassJobType.Botanist">
		<ChangeJob Type="Botanist" />
	</If>
	<WaitWhile Condition="IsTimeBetween(21,23)" />
</If>

Is there a way I could set a variable to check if that node has been farmed? There's really no good way to store a variable in a profile between bot sessions. Theoretically you could write a plugin for that but I think it would be a massive waste of time. Ideally, we get the tag working without needing to stop/start the bot, and then this isn't necessary anymore.

- kagami

Would be interesting to find out, as it is, I have to add a whole lot of different variables to the profile to deal with the bot starting and stopping. Right now i'm tackling how to tell the bot to "dismount only when i'm mounted". As it stands, it's switching only to get stuck on the dismount runcode.
 
Add a check for IsMounted.

Code:
<If Condition="Core.Player.IsMounted">
    <RunCode Name="Dismount" />
</If>

I really recommend downloading Visual Studio Express, you can search through the RB API, you can see all members of a class very easily using the Object Browser.
 
Grrr, I had it as Core.Me.IsMounted. I Suck. Thanks Kagamihiiragi. I am downloading it now. Hope it helps. And sorry for all the questions.
 
Last edited:
Let me tackle these questions in order:

So if the first tags gets done any time before 22 it's going to go try to gather the first one again. Add all the gather tags for a timeslot into one block and add a <WaitWhile Condition="IsTimeBetween(20,22) /> at the end. This will stop the bot from trying to go back to the first gather area for that block. I edited the sample code you gave on the previous page:

- kagami

I did have several of them like this, but I separated them so it wouldn't go there if the window had already closed. Like say if someone started the bot at 22:14, it would have time to get the first one done, but by time it gathered the first one, the 21-23 window would have closed. Separating them keeps it from going there if the window is already closed.

That being said, i think I'll do what you suggested and just wait it out to see if we can get this plugin working without the treestart and stop. I might actually go try deleting those and see if it works.
 
Alright, so all I did was remove the TreeStart and TreeStop from his decorator that he made (he commented it well enough to find easily). Now it's doing the same thing that it did before

Code:
[16:11:16.163 N] Done building Actioncache
[16:11:16.164 D] [RoutineManager] Routines have been reloaded. Current class-specific list:
[16:11:16.176 N] [Classy] - OnDone() Called
[16:11:16.176 D] [POI Set] Type: None
[16:11:16.176 N] [Classy] - Current POI should be set
[16:11:16.176 D] Added new hook [PoiAction] a17deac1-9b25-42f9-b07f-802a442f7d45
[16:11:16.177 V] [Poi.Clear] Reason: Current behavior changed to GatherTag.
[16:11:16.177 D] Replaced hook [ProfileOrderBehavior_Hook] f8044df0-13ce-48d9-bc02-e004c81e0ff4
 
Alright, so all I did was remove the TreeStart and TreeStop from his decorator that he made (he commented it well enough to find easily). Now it's doing the same thing that it did before

Code:
[16:11:16.163 N] Done building Actioncache
[16:11:16.164 D] [RoutineManager] Routines have been reloaded. Current class-specific list:
[16:11:16.176 N] [Classy] - OnDone() Called
[16:11:16.176 D] [POI Set] Type: None
[16:11:16.176 N] [Classy] - Current POI should be set
[16:11:16.176 D] Added new hook [PoiAction] a17deac1-9b25-42f9-b07f-802a442f7d45
[16:11:16.177 V] [Poi.Clear] Reason: Current behavior changed to GatherTag.
[16:11:16.177 D] Replaced hook [ProfileOrderBehavior_Hook] f8044df0-13ce-48d9-bc02-e004c81e0ff4

Whole log and whole profile please.
 
I did notice that it will restart the entire profile after calling stop then start again.. but that was the only way i could get RB to see the job change.. Since the bot just stands still after changing the class without using the stop/start. I thought the POI would have been something RB would pick up from the profile, even after it is cleared due to class changing.. is this something that I need to set manually?
 
When switching from a combat class to a gathering class, I notice:
Code:
[18:59:33.901 D] Added new hook [PoiAction] 450e9004-2f16-4e65-8a02-9b0df867b9dd
[18:59:33.905 V] [Poi.Clear] Reason: Current behavior changed to GatherTag.

pops up (without using stop/start) and it continues to just sit. So this leaves me to believe that clearing the poi on class change (rb is doing automatically) is causing the issue.. I'll go look through the api documentation to figure out if i can set that poi manually.. i know that you can set the poi.current but i believe the way I am doing it is incorrect. I'll continue to mess with it since I am working from home today and have access to the bot/game to test with.. Again, I apologize for the issues this is causing for some people.
 
When switching from a combat class to a gathering class, I notice:
Code:
[18:59:33.901 D] Added new hook [PoiAction] 450e9004-2f16-4e65-8a02-9b0df867b9dd
[18:59:33.905 V] [Poi.Clear] Reason: Current behavior changed to GatherTag.

pops up (without using stop/start) and it continues to just sit. So this leaves me to believe that clearing the poi on class change (rb is doing automatically) is causing the issue.. I'll go look through the api documentation to figure out if i can set that poi manually.. i know that you can set the poi.current but i believe the way I am doing it is incorrect. I'll continue to mess with it since I am working from home today and have access to the bot/game to test with.. Again, I apologize for the issues this is causing for some people.

No need to appologize Yasuko. We're just happy to have someone working on this
 
Turns out that I was correct in assuming the POI is cleared completely when changing from a DoL/DoH to a DoW/DoM which is causing a Null Reference currently.. When trying to set the POI normally, it does set but once it meets that condition, it wont go back to being null, but it completely stops generating a path to the hotspot listed in the profile.. as if it completely stops reading the profile...

Code:
[22:21:04.286 V] [Poi.Clear] Reason: Current behavior changed to GrindTag: GrindRef: Raptor_Skins, WhileCondition: ItemCount(5310) < 1, IsDone: False, InCombat: False, QuestId: 0, StepId: 0, PostCombatDelay: 0, QuestName: null, IsDoneCache: False, Behavior: ff14bot.Behavior.HookExecutor, .
[22:21:04.286 D] Replaced hook [ProfileOrderBehavior_Hook] 6b74a7e3-cdf2-4177-95c6-5d8f12b329a8
[22:21:04.291 D] [POI Set] Type: Hotspot
[22:21:04.372 D] System.NullReferenceException: Object reference not set to an instance of an object.
   at TreeSharp.Decorator.<Execute>d__0.MoveNext()
   at TreeSharp.Composite.Tick(Object context)
   at TreeSharp.PrioritySelector.<Execute>d__0.MoveNext()
   at TreeSharp.Composite.Tick(Object context)
   at ff14bot.TreeRoot.()

Guess I'm going to hop over to the dev section and see if Mastahg has any suggestion.
 
Have you tried playing around with any of these and see if you can trigger the same functionality as stop/start?

ff14bot.Managers.RoutineManager.Reload()
ff14bot.Managers.RoutineManager.ReloadRoutineAssemblies()
ff14bot.Managers.RoutineManager.SetCurrentCombatRoutine()
 
Have you tried playing around with any of these and see if you can trigger the same functionality as stop/start?

ff14bot.Managers.RoutineManager.Reload()
ff14bot.Managers.RoutineManager.ReloadRoutineAssemblies()
ff14bot.Managers.RoutineManager.SetCurrentCombatRoutine()

I would be shocked if those affected profiles.

You could try getting the currect profile location from profilemanager and reloading it after the job change.
 
https://www.thebuddyforum.com/rebor...s-dol-doh-dow-dom-poi-completely-cleared.html
has full details on what is happening, I dont think its anything to do with routines.. its about RB not reading the rest of the profile after it clears the poi when the behaviour changes.. I have said in the above link that when switching from a dom/dow to a dom/dow class it works as it should.. the issue occurs only when switching from dom/dow to dol/doh .. and vice verse.

Ive thought about getting the correct position via profilemanager, but I really wouldnt know which hotspots they have visited, which they havent, for such a simple plugin it is sure confusing me as to why its not refreshing the poi when changing a class in that order.
 
Why do you think the problem is 'RB not reading the rest of the profile' when it works just fine switching DoW/DoM to DoW/DoM? It's not like your code changes when you're changing from DoW/DoM to DoL/DoH or vice versa.
 
Why do you think the problem is 'RB not reading the rest of the profile' when it works just fine switching DoW/DoM to DoW/DoM? It's not like your code changes when you're changing from DoW/DoM to DoL/DoH or vice versa.

Because when switching from DoL/DoH to DoW/DoM it clears POI for behaviour, then the POI is empty and not being refreshed with the info from the profile.. No hotspot location, no poitype, nothing in the POI when switching between the different Disciples. But when switching between Disciples of the same type, they behaviour doesnt change, and the profile will continue as normal.. I am assuming its something to do with RB in that instance since it clears POI when changing behaviour.. and I am not sure how to change it back to whatever it needs to be for specific order.
 
Back
Top