xvwyh / BuildPad

A build storage plugin for ArcDPS
https://buildpad.gw2archive.eu
MIT License
29 stars 3 forks source link

How does the [Builds] in config works? #4

Closed soundofyogi closed 4 years ago

soundofyogi commented 4 years ago

Hi, I am trying to make a spreadsheet to edit your config file directly..

It's just there's one thing i need to know on config file, what are the numbers means?

=3|[&DQEuOjEZPj9LF0sXUxdTFzYBNgE1ATUBGBYYFgAAAAAAAAAAAAAAAAAAAAA=]|8|0||WvW Firebrand

the 8 and 0 (or something else, before the build names is something i need to decode

Thank you for your time, and pardon my broken english

xvwyh commented 4 years ago

Hi. The format goes like this:

The number in the very beginning is the version. Depending on the version - the format might change. BuildPad can load any older version, but only saves in a newest one. Here's the format for all the versions:

Version Format
1 =1\|chatlink\|selectedFlags\|name
2 =2\|chatlink\|selectedFlags\|keybind\|name
3 =3\|chatlink\|selectedFlags\|displayedFlagIcons\|keybind\|name

chatlink

Self-explanatory, the chat link that gets copied when you click on a build. Doesn't even have to be a chatlink, you can put any text in there to make it copyable by clicking.

selectedFlags

These are the flags that you select here when editing a build to make the filtering work: image You can always find the latest up-to-date list of flags in Build.h. The number inside the BITMASK macro are the powers of 2 that you need to add together to form the final number that gets saved into the file. In other words,

        Favorite    = 1,
        PvE         = 2,
        PvP         = 4,
        WvW         = 8,
        OpenWorld   = 16,
        Dungeons    = 32,
        Fractals    = 64,
        Raids       = 128,
        Power       = 256,
        Condition   = 512,
        Tank        = 1024,
        Support     = 2048,
        Heal        = 4096,

Add the values that correspond to the icons you want selected together and you get the final number. And to find out which flags are set from the number, you need to use "bitwise AND" function and see if the result is not 0. Suppose you're using google spreadsheets, they have BITAND function there, so, for example, if you wanted to check if "Condition" flag is set on a build that has the number 1541 saved in the file, you would use =BITAND(1541, 512) <> 0 in the spreadsheet.

displayedFlagIcons

You can read/write this value in the absolute same way as the previous "selectedFlags" one. It controls what flags icons are drawn next to the build's name in the list: image You set them by right-clicking on flags: image

keybind

This is the combination of keys that you can press to quickly copy the build to clipboard. It simply consists of optional modifiers and a key, chained together with + symbols, with an optional  >GW2 at the end (which specifies whether the key combination should be passed to the game as well, to, for example, switch to a corresponding gear loadout). The keys that can appear there are either A-Z, 0-9, or any of the names from this table (the second column). Modifiers (CTRL, ALT, SHIFT) can appear in any order. And you just put them together, like, for example: INSERT F10 >GW2 ALT+F4 ALT+SHIFT+N >GW2 SHIFT+CTRL+ALT+LEFT

name

Self-explanatory. Can even contain | symbols inside of it. Everything that appears after keybind and until the end of the line will be read as the build's name.

soundofyogi commented 4 years ago

Ah thank you very much, this is all the infos I wanted