The state of the game can be desribed by
$$
(g,s,G,S),
$$
where $g$ is the number of golden coins on the table, $s$ is the number of silver coins on the table, $G$ is the sum of the numbers in the first paper, and $S$ is the sum of the numbers in the second paper. The initial state is $(0,n,0,0)$, and we want to show that if the state of the game is $(g,0,G,S)$, then $G=S$.
If we are at $(g_i,s_i,G_i,S_i)$ and add a golden coin, the state changes to
$$
(g_{i+1},s_{i+1},G_{i+1},S_{i+1}) = (g_i+1,s_i,G_i,S_i+s_i),
$$
and if we remove a silver coin, the state changes to
$$
(g_{i+1},s_{i+1},G_{i+1},S_{i+1}) = (g_i,s_i-1,G_i+g_i,S_i).
$$
One plan to solve the problem is to find an invariant, for example, a function from $(g,s,G,S)$ to integers, such that these transformations do not change the value of that function. Looking at the equations for a while suggests something with $gs$ because that's how we would get changes of size $g$ and $s$. A bit more looking gives us
$$
f(g,s,G,S) = gs+G-S.
$$
Once we have found the above formula, it is easy to verify that a step does not affect the value of $gs+G-S$.
Thus if we start from $f(0,n,0,0)=0$ and end with $f(g,0,G,S) = G-S$, we can see that $G=S$.
To understand the formula, it would be easiest to explain how it works conceptually before we derive it.
Let's simplify the problem and say there are only 3 bags each with 2 coins in them. 2 of those bags have the 1 gram coins and one has the 1.01 gram gold coins. Let's denote the bags arbitrarily as $Bag_0$, $Bag_1$, and $Bag_2$. Similarly to your problem, let's take 0 coins from $Bag_0$, 1 coin from $Bag_1$, and 2 coins from $Bag_2$. We know that the gold coins must be in one of those bags, so there are three possibilities when we weigh the three coins we removed:
Gold Coins in $Bag_0$: So the weight of the 3 coins on the scale are all 1 gram. So the scale will read 3 grams.
Gold Coins in $Bag_1$: So the weight of 1 of the coins is 1.01 grams and 2 of the coins are 2 grams. So the scale will read 3.01 grams.
Gold Coins in $Bag_2$: So the weight of 2 of the coins is 2.02 grams and 1 of the coins is 1 gram. So the scale will read 3.02 grams.
So each possibility has a unique scenario. So if we determine the weight, we can determine from which bag those coins came from based on that weight.
We can generalize our results from this simplified example to your 100 bag example.
Now for deriving the formula. Say hypothetically, of our 100 bags, all 100 coins in each of the 100 bags weigh 1 gram each. In that case, when we remove 0 coins from $Bag_0$, 1 from $Bag_1$, up until 99 coins from $Bag_{99}$, we'll have a total of 4950 coins on the scale, which will equivalently be 4950 grams. Simply put, if $n$ is our Bag number (denoted $Bag_n$), we've placed $n$ coins from each $Bag_n$ onto the scale for $n = 0, 1, 2, ... 99 $.
So the weight of the coins will be $Weight = 1 + 2 + 3 + ... + 99 = 4950$
But we actually have one bag with gold coins weighing 1.01 grams. And we know that those 1.01 gram coins must be from some $Bag_n$. In our hypothetical example, all of our coins were 1 gram coins, so we must replace the $n$ coins weighed from $Bag_n$ with $n$ gold coins weighing 1.01 grams. Mathematically, we would have:
$Weight = 4950 - n + 1.01n = 4950 + .01n = 4950 + n/100$
Rearranging the formula to solve for n, we have:
$100(Weight-4950) = n$, where $Weight$ is $W$ and $n$ is $N$ in your example.
I have no knowledge of an alternative answer to this puzzle, but perhaps another member's answer may be enlightening if there is. Technically speaking, you could have denoted the bags from 1 to 100 and gone through a similar process as above, but the method is still the same, so I wouldn't treat it as a new answer.
If our electric scale is replaced by a scale of libra, I don't believe it would be possible to answer this puzzle with only one measurement of weight. But again, perhaps another answer may be enlightening on that.
Best Answer
If you ask for $13,13,13$, then you get nothing if the boxes are $10,8,12$.
If you ask for $12,12,12$, you will always get exactly $12$ coins, since in all cases, exactly one of the boxes has at least $12$ coins.
Claim $12$ is best possible.
Certainly it's best possible with all requests equal.
Suppose a better request triple is $a,b,c$, with $a \le b \le $c, and $a < c$.
But any of the $3$ requests might fail if that box contains $0$ coins, hence to be sure to get more than $12$ coins, every pair must sum to more than $12$.
From $a \le b \le c $, and $a + b > 12$, we get $6 < b \le c$.
But if the boxes are some permutation of $26,0,4$, the $b,c$ requests might both fail, so to be sure to get more than $12$, we must have $a > 12$.
But then $a,b,c$ all exceed $12$, so all requests would fail if the boxes are $10,8,12$.
Thus, unequal requests can't beat the uniform $12,12,12$ request strategy.
It follows that $12$ is the maximum number of coins which can be guaranteed.