Ok, kudos on the record keeping. In all aspects a thankless job in general, but one that beats the band's drum. The reason for subtracting the contributions from the self contribution amount is because they are filling the container you, as the owner, are also filling. And, as the owner and not the sniper, your goal is to fill the container just enough for your partners ( or other outside contributors ) to be able to fill it and lock out the other contributors already filling the container, but also to have to fill it enough that you as the owner is getting what is expected ( i.e. 1.x * reward). Probably, for me anyways, much better explained or realized in number format. Using Nicholas002's handy shortcut, 3.8 :
631 - ( 3.8 * 80 ) + 9 = 336 your self fill calculation (I'm not sure what your + 9 is in reference but can only assume it is in fact + ( 9 / 2 ) + 4 )
631 - 336 - 13 = 282 left to fill container, with a highest non-locked contributor contributing 9
( 282 + 9 / 2 ) / 2 = p1( 144 ) #value for which your building p1 now locks
-- correct p1 ( 152 ) --
631 - ( 3.8 * 80 ) - ( 9 / 2 ) - 4 = 318 self fill amount to get ( or rather force ) the desired 1.9 contribution
631 - 318 - 13 = 300 left to fill container, with highest non-locked contributor 9
( 300 + 9 / 2 ) / 2 = p1( 153 ) #value for which your building p1 now locks
We were looking for 152, but since I rounded up as a habit of the sniping math for the self fill amount, we, as the owner, paid 1 less. So, just remember to round down the highest non-locked contributor / 2 when calculating self fill amount.
Another way you could look at the problem:
part of the container that is filled = part of the container to be filled
WHERE
(-631) (+9) (+4) (+selfFill) (+[contribution3, contribution4, ...]) = (+631) (-9) (-4) (-selfFill) (-[contribution3, contribution4, ...]);
But, possibly a formula with which you're already came up or are familiar (this is what I came up with for sniping thus far):
fp amount to lock = ROUNDUP(
fp amount remaining on gb +
your current contribution fp amount +
highest non-locked contributor
) / 2;
WHERE "your current contribution fp amount" is either you as a contributor to another's gb or to your own. If the desired lock amount as an owner is 152, then:
152 = ROUNDUP(
( 631-13 ) +
your current contribution fp amount +
9
) / 2;
152 = ( ( 631 - 13 ) + cc + 9 ) / 2;
304 = 627 + cc;
-323 = cc;
Whoops, I failed to follow my formula in the original post. The what gets multiplied or divided by two gets confused now and then
. The largest, or the next largest contributor has to be fully accounted for, and not halved itself. Rather, the total amount in the container to be displaced is halved. Anyways, 323 is the amount that needs to be added in the stated example, and that is THE formula, or at least the best I got for now. I'll give it a go walking through the weeds:
LOGIC
the amount needed to either displace or allow for the displacement of the current total displacement is an amount either larger or less than the total current displacement
WHILE
that amount needed is equal to or less than the amount remaining to be displaced
AND
to displace the largest or next largest displacement, an amount is needed that is larger than such
OR
to allow for the displacement of the largest or next largest displacement, an amount is needed that is less than such
AND
to displace the least amount needed, an amount half that of the remaining plus the next largest and our self
WHICH
is an amount that the next largest can't displace because the remaining is less the amount needed
WHERE
the values with which we're concerned are:
container size = cs; #total fp needed for the total gb level
next largest displacement = nld; #highest non-locked contributor, or the next next largest contributor if not yourself, either present or not
sum of other contributors = soc; #(total current displacement, sum of contributions, etc.)
your current contribution = cc; #either present, needed, or none
desired contribution = dc; #either present, needed, or none (aka to lock amount)
**note: nld and cc can both be yourself if you're a contributor to another container and not your own, in which case becomes one value (enter 0 for one or the other)
0 = cs - soc - nld - cc - dc;
0 = 631 - 4 - 9 - cc - 152;
-466 = - cc;
466 is what is needed to fill the container completely, by you, the owner or sniper, after other contributors are considered
152 is both the desired contributor and the wanted next largest displacement, or rather, THE wanted largest displacement
152 - 9 = 143; the amount that can't be allowed to be added to to displace the desired contributor by the next largest displacement
466 - 143 = 323; amount that needs to be added for 152 to be THE largest displacement after it is added
SO
where do the dirty twos come from? They account for the minimum part of the container that is to be displaced.
( cs - soc - nld - cc ) / 2; #minimum space left in the container for a new largest displacement
2 * dc; #minimum space needed in the container to force desired contribution
0 = cs - soc - nld - cc - dc;
0 = ( cs - soc - nld - cc ) / 2 - ( 2 * dc );
0 = ( 631 - 4 - 9 - 0 ) / 2 - ( 2 * 152 );
0 = 309 - 304;
0 = 5; #amount that either a lesser displacement or the container owner will have to put in to make both spaces equal, negative value here would be the amount for which an owner can be sniped
309 + 5 + 9 = 323; #space of the container to be filled so the minimum space to force desired contribution can be filled by a new largest displacement that can't be displaced
631 - 323 - 13 = 295; #new space of the container that can be filled by THE new largest displacement
295 - 152 = 143; #space left to completely fill the container
9 + 143 = 152; #the most for which that the next largest displacement can fill the container
AND SO
the amount of space we want to displace in the container while also not either being or allowing another to be displaceable = half the space left to be displaced in the container plus the next largest displacement, and if that isn't our self, then also for which what we are our self currently in the container
fp amount to lock = ROUNDUP(
fp amount remaining on gb +
your current contribution fp amount +
highest non-locked contributor
) / 2;
2 * fp amount to lock -
fp amount remaining on gb +
highest non-locked contributor =
your [needed] current contribution fp amount
;
Anyways, this turned into what might as well be a wiki page. All that's missing are illustrations (yet to be added to my own work, I'm sure, as I continue editing it). If you made it this far, Cheers
.