Why don't you just take a real plain and simple to understand save/load trigger?
First 6 digits are gold, next 6 digits are lumber, next 3 digits are hero level, etc.
You'll get a code like '000246001242082', which would actually be 000246|001242|082, which is 246g, 1242 lumber and a hero level of 82. In your case, you could add research levels by single digits each. After the current save string, the next digit is for example for Ultra Vision, the 4 after that for the 4 common melee and ranged attack/defense enhance researchs. Then you'll get a code '00024600124208201322' which is actually 000246|001242|082|0|1|3|2|2 with the same explanation as before
Ofcourse people would easily crack this code, so you can convert the numbers to other numbers. For example:
1=3
2=8
3=5
4=0
5=1
6=7
7=9
8=6
9=4
0=2
So now you'll have a save/load code '22280722380826823588'. Nobody will know what each number means unless they do a lot of testing or you use an unprotected map.
To load it, simply check the substrings (0-6 for gold, 7-12 for lumber, etc.) Those values can be directly applied into a variable (Set substring 0-6 = GoldLoaded. Add GoldLoaded to current gold of Player 1 (Red)).
It might take a bit of time, but you'll have a very good save/load system that's easy to understand and edit.