MIDI Remote scripting question regarding offsetting middle position

I’m currently working on scripting a Stream Deck+ “console plug-in” controller, and there are a lot of moving parts - several of which I have had to figure out; a few more still baffle me.

I think I need @m.c for this one. If this question gets solved, this will be a major breakthrough for me:

If I have a total of 641 values from min to max position on a Cubase MIDI Remote encoder, Cubase will assume that approx. step 321 will be the half-way point, since it will assume that the dial has an equal amount of values on each side of the default “middle position” on the dial.
However, in my current situation, I need an algorithm that will put the half-way point at step 241, not 321.
In other words, the min position is step 1, the default “middle” position is step 241, and then the right side of the dial are steps 242-641.
I got it close on the Stream Deck side, with this equation that I put in on the hardware side:

[(config){TriggerOnLocalMidiEvents:No}]

[(init)
{minmax:1,641}
{vpot:321}
{vpotsize:full}
{step:s,1}
{titlevalueposition:Value at the side, Title on the V-pot}
{vpotspan:At current value}
{@l_nrpnvalue:241}
]

[(rotate)
{@l_nrpnvalue:#IF(@e_rotatevalue <= 320, 1 + (@e_rotatevalue - 1) * 240/320, 242 + (@e_rotatevalue - 322) * 400/320 )#}
{@l_nrpnvalue:#IF(@e_rotatevalue == 321, 241, @l_nrpnvalue)#}
{nrpn:12, 111, #@l_nrpnvalue#}
]

Quick note on the syntax:
local variables begin with @l_ and the colon is the equals sign. The value of a variable has to go inside hash tag brackets. The IF statement is IF(condition, if true, if false).
NRPN syntax is nrpn: channel, MIDI Remote CC, nrpn value.
Built-in events start with @e_ with the @e_rotatevalue automatically holding the updated visual position on the Stream Deck, which I have been using up to this point.
Lastly, squiggly brackets are actions (the thing that happens) and the parenthesis are the events (in this case, every time the dial is rotated, this code will run on the hardware side).

My objective is to do this on the MIDI remote side instead, if possible. The Stream Deck plugin is very limited and it’s skipping over some values. I’m looking for a more accurate curve, I suppose. Then I can give the hardware a basic min/max range of 1-641 (not 0-640), leave everything else alone on the Stream Deck side, then let the Cubase MIDI remote do the offset instead.
The idea thus far is to have two different values per side - treating the left side as one thing, and the right side as a separate line of code that only happens if its turned that way, vs doing a logarithmic equation that I was trying at first (attempting to create a curve from min/max, instead of two linear points from the middle position).

Please and thank you in advance!

P.S. This supposes that we will be able to access all 641 steps without it skipping over a few, when the dial is turned one tic.