• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Loading an Options File

    Discussion in 'Community Developer Forum' started by insanepoet, Apr 10, 2015.

    1. insanepoet

      insanepoet New Member

      Joined:
      Feb 12, 2015
      Messages:
      28
      Likes Received:
      1
      Trophy Points:
      3
      I have put together a "few" profiles to handle gathering items as a miner, botanist, fishing, and mob farming while I gather and test all of the required data to build a new and improved gather assist. I want to share these with folks while I am working through the code for the botbase however I wondered how best to handle class switching and other configuration. I am aware I am able to use a CodeChunk to handle the gear swap like:
      Code:
      <CodeChunk Name ="WhackAMole">
           <![CDATA[ff14bot.Managers.ChatManager.SendChat("/gs change 4");]]>
      </CodeChunk>
      
      However is it possible to create an options file and have it imported into each of the profiles in orderbot on load using <!ENTITY or <xi:include ?

      For example the options file would contain a few variables such as:

      • Miner (gs# for Miner)
      • Arbor (gs# for Botanist)
      • WhackAMole(gs# for mob farming)
      • MaxStacks(How many stacks to gather by default)
      This would then be loaded into the individual profiles meaning that the configuration options for the profile would be set in one place rather then having to edit each of the profiles. I'm away from home for work so i cannot test and would like to make these 300+ profiles available when i get home next week.

      I have been putting this off for too long... lol
       
      Last edited: Apr 10, 2015
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,330
      Likes Received:
      378
      Trophy Points:
      83
      No. This is extends far beyond what a profile is ment todo.
       
    3. insanepoet

      insanepoet New Member

      Joined:
      Feb 12, 2015
      Messages:
      28
      Likes Received:
      1
      Trophy Points:
      3
      Thanks Mastahg I figured that would be the case as I was unable to find any documentation of it but hey it never hurts to ask.
       
    4. kagepande

      kagepande Community Developer

      Joined:
      Oct 20, 2014
      Messages:
      289
      Likes Received:
      11
      Trophy Points:
      18
      You can't use XML variables for code chunks but you can make XML variables for how much to gather of each item, teleport locations, a ton of other stuff really. I released a ton of profiles that do just that in my mega thread, heres one that uses <!ENTITY to make somewhat of a user config.

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <!--
      Botanist - Elm Log
      KagePande
      V 1.0
      Teleport Locations:
      Bentbranch Meadows
      -->
      
      <!--User Configuration-->
      <!DOCTYPE Profile [
        <!ENTITY Count "2000"><!--Change 2000 to amount to gather-->
        <!ENTITY TeleportLoc "Limsa Lominsa"><!--Name of location you wish to teleport to-->
        <!ENTITY TeleportID "8"><!--ID of the location you wish to teleport to-->
        <!--Limsa ID = 8 | Gridania ID = 2 | Ul'dah ID = 9-->
      ]>
      <!--End User Configuration-->
      
      <Profile>
        <Name>Botanist - Elm Log</Name>
        <KillRadius>50</KillRadius>
        <!--User Configuration-->
        <CodeChunks>
          <CodeChunk Name="Botany">
            <![CDATA[ff14bot.Managers.ChatManager.SendChat("/gs change 10");]]>
          </CodeChunk>
        </CodeChunks>
        <!--End User Configuration-->
        <Order>
          <RunCode Name="Botany"/>
          <WaitTimer WaitTime="3"/>
          <If Condition="(ItemCount(5385) &lt; &Count;)">
            <LogMessage Message="Teleporting to Bentbranch Meadows &amp; Farming Elm Log."/>
            <If Condition="not IsOnMap(148)">
              <TeleportTo Name="Bentbranch Meadows" AetheryteId="3" />
            </If>
            <Gather while="(ItemCount(5385) &lt; &Count;)">
              <GatherObject>Mature Tree</GatherObject>
              <HotSpots>
                <Hotspot Radius="90" XYZ="-60.64636, -6.536706, -65.03856"/>
              </HotSpots>
              <Slot>5</Slot>
              <GatheringSkillOrder>
                <GatheringSkill SpellName="Blessed Harvest II" TimesToCast="1" />
              </GatheringSkillOrder>
            </Gather>
            <LogMessage Message= "Profile Complete, Teleporting to &TeleportLoc;"/>
            <TeleportTo Name="&TeleportLoc;" AetheryteId="&TeleportID;" />
          </If>
        </Order>
      </Profile>
      
      These profiles have been working flawlessly for many weeks now :)
       
    5. insanepoet

      insanepoet New Member

      Joined:
      Feb 12, 2015
      Messages:
      28
      Likes Received:
      1
      Trophy Points:
      3
      Yeah I saw the profiles you posted kagepande and got to thinking it would be easy to add a base amount to each profile as well as class switching if I could include xml from a base options file autoloading it into each item.

      Teaching myself c# by creating gather assist as a botbase so i was making profiles to test the data for each item and thought eh I might as well save each item as its own profile as i go, I may incorporate your user config chunk as it wouldn't involve much adaptation to the profiles but we shall see how much i get done before i get home. Essentially I have profiles for every item in the gathering log so if find and replace gives me issues due to odd spaces or poor code indentation then we shall see...
       

    Share This Page