It took a couple tries to figure out, and an example from a different character sheet I could steal from. Do note that when making "variables" like this, the "variable" has to be assigned before it is used. That's why I added it to the Level definition line instead of later in the sheet where it is explicitly printed out. In the examples below, I put them inside spoilers so that they don't look horrible, as I assume the posting will try to interpret them. To see the actual encoding, you'll have to quote my post to see it.
I changed my "Level" line to look like this ...
[ +- ] Level Line
Level: 3
Note that this gives the formula for an Expert and/or Psychic. For a Warrior, just use level directly. For a partial Warrior, you'll have to do something far more complicated, like is done in the standard SWN sheet for the ability bonus values. (Since it is not a mathematical formula for partial Warrior.) The "color" attribute makes the creation of the bab variable not shown so you won't see it. (That was another cool trick I found in that other character sheet.
Regardless of how it is formulated, I just used the "bab" variable after that. For example, here ...
[ +- ] Shoot Line
Shoot|0|Dex|1d20+
(Note that this line is part of a table, but it shows how the roll is constructed.)
I hope that helps! When I look at the sheet, there are a couple other items I should be able to automate like this, but I just haven't yet.