HOWTO: Profile Parts

free(?!) clues!

HOWTO: Profile Parts

Postby Kannkor » 03 Nov 2022, 16:08

Profile Parts

What is it?
On November 3rd, 2022, this was patched out to development build.
Profile Parts is an option within Ogrebot, on the "Admin" tab. This allows you to load/save profile parts, basically Tabs of Ogrebot, to/from their own file.
The intended purpose of this feature, is to allow sharing of common tabs for yourself.
For example, I want all my OgreConsole, HUDs tabs, to be the same on all my characters. I will create a new profile part for this, then have all my characters load the same file. This way if I ever make a change to either of these tabs, once I save the option, and reload on the other characters, they will magically have the change also!
Image

Naming Conventions
While you can name these files, almost anything you want, I would recommend something sensible. Here are how I personally did it. Feel free to follow, or not.
<TabName>_<WhoCreatedIt>_<WhoItsFor>.xml
Lets use HUDs as an example.
HUDs_Kannkor_all.xml
HUDs being the tab name in Ogre.
Kannkor being the user who created this file.
"All" being who it's for.

Lets have a look at one other example.
The Load tab. I load things a little differently on my tank, vs non-tanks. So my files look like this.
Load_Kannkor_Tank.xml
Load_Kannkor_NonTank.xml

Ultimately, the decision is up to you, so Jiimbo, if you want to name your file asdlkfjaweoiasf.xml, you go right ahead.


File limitations
Each XML file can contain only 1 "version" of a tab. What I mean by this, is you can only save "HUDs" to it once. Unlike a regular profile, where you can have multiple profiles, each having a different "HUDs".
However, each xml file can contain multiple tabs. This means you could save HUDs and OgreConsole to the same file, if you wanted. As mentioned above, you just can NOT save a HUDs for tanks and a HUDs for nontanks, to the exact same xml file. That's why I use Tank and NonTank.


Behind the scenes naming
These tabs use internal naming schemes, and how things work internally. Most of it is easy enough to figure out, but thought I would point it out, just to be clear.
Generally speaking, listboxes are their "own" thing, and checkboxes and other basic options, are their own thing.
Lets take a look at the Load tab, this demonstrates it perfectly.
The "Load" portion of this tab, has 2 options, Radar on and radar off.
The "LoadExecute" portion of this tab, which is invisible to the user, is the listbox that contains all the execute stuff.
That is why on the Profile Parts (on admin tab), you will see there is a "Load" and "LoadExecute", because internally to Ogrebot, they are different.
Likewise, you still notice there is no "Settings 2", that's because all settings (for Settings tab and Settings 2 tab), are "Settings". Just because visually they are on different tabs, doesn't change anything internally.


How to create these new files?
On the UI, you can type into the box the name of the file you want to create, and hit Create new file. It will create it, and it will be available immediately in the File: Drop down.
If you do not add .xml, it will add it for you.
Image

Where are these new files located?
innerspace/scripts/eq2ogrebot/save/ProfileParts/
This is where you would put them if you wanted to share them also.

Lets run though a quick example, from start to finish.
Lets start with the HUDs tab. Going on the assumption we want a tank and non-tank version.
Type in the name of the file you want. (Don't use Kannkor... that's my name, not yours!).
HUDs_Kannkor_Tank
Image
Click the tab drop down, and select HUDs
Click the File drop down and select our new file, HUDs_Kannkor_Tank.xml
Image
Then hit the big button beside it "Add AND load tab immediately".
If you are doing exactly what I am, it won't actually do anything yet, because we don't have [x] Enable profile parts checked.

It should look like this.
Image

Lets do the same for OgreConsole, but this one is for everyone (all).
Image

One more quick example. Lets do the Load tab, because it has two sections, Load, and LoadExecute. I'm doing this one for tanks and non-tanks also.
Because visually it's the same tab, I'm going to use the same file for both of them. I'm calling this file:
Load_Kannkor_Tank.xml
I'm then adding: Load -> Load_Kannkor_Tank.xml
Then adding: LoadExecute -> Load_Kannkor_Tank.xml
Should look like this:
Image

Now, lets enable this whole thing!
Image

As soon as you check it, the magic happens. Assuming this is the first time you have created this file, you will see some messages like this:
Code: Select all
(16:39:50){1922656ms}[OgreBot]: ProfilePartsSettings -> Reloading [OgreConsole] from OgreConsole_Kannkor_all.xml.
16:39:50: Loading [OgreConsole] (28821) from RefToLoadedFile:Import["C:/Games/Innerspace/Scripts/EQ2OgreBot/save/ProfileParts/OgreConsole_Kannkor_all.xml"]
[OgreConsole] does NOT exist in [OgreConsole_Kannkor_all.xml]. Keeping your options.

It's a bit spammy, because it's new, but ultimately this is a feature of how this works. Because this file is empty (it's brand new), it is assuming you don't want your tab wiped completely out. So it's allowing you to keep the options for this tab. When you decide you like the options and are ready to save, you save your profile like normal, and Ogre will understand you want these options written to these special files. It will NOT modify your options for your profile, only modify the options on the profile parts.
Lets use an example.
Lets assume on the HUDs tab, in your main profile, you have [x] Display nearest PC checked.
Image
Lets assume for the profile part HUDs, you do NOT want it checked, so you uncheck it.
Then you save your profile.
If you look at your personal profile, it would still have [x] Dispalyed nearest PC checked. Likewise, if you looked like the ProfileParts file, Displayed nearest PC would NOT be checked.
This way, if you wanted to use a ProfilePart for a while, you could, but also remove it (or uncheck the box), and it would instantly revert to your regular profile.

At any time, you can always uncheck the Enable Profile Parts, and it will reload your profile, without any profile parts. Likewise, if you remove a single profile parts from the listbox, it will reload that one tab.

How to save
As mentioned above, when profile parts is enabled, any tab that has a file, those options will be written to that file specifically. Saving is the same way you've always saved. Just note, it will save all profile parts to their special files, and everything else to your regular profile.
Image

Quirks
When you interact with the listbox at all, it will run what is called "AfterProfileLoad", which are various things that happen after a profile is loaded. Some internal clean up, some visual things, like checking your ability research etc. There isn't much way around this, because some options (say, having mcp loaded) need to be parsed after a profile is loaded to know if it should run a script or not.
Reasonably, you will only notice this quirk while you're filling it out for the first time.
Kannkor
 
Posts: 354
Joined: 06 Nov 2013, 11:49

Return to Guides & Strats

Who is online

Users browsing this forum: No registered users and 2 guests

cron