Hi,
Ran into a problem and thought id share in case any others are stuck with a similar problem:
I was trying to achieve no price to remove but also still provide a refund with specific amounts for each resource (twig, wood, stone, metal, top tier).
I was able to achieve this besides for the stone refund which was always giving me 255 or something despite having it set at 75.
After some long hours looking over my code (even with a validated JSON file), I finally realised that in the given code on the plugin page it reads:
To fix this I simply changed the code to look like this and can confirm it is a valid JSON as well as refunding 75 stone every time (can be set to any amount obviously):
Ran into a problem and thought id share in case any others are stuck with a similar problem:
I was trying to achieve no price to remove but also still provide a refund with specific amounts for each resource (twig, wood, stone, metal, top tier).
I was able to achieve this besides for the stone refund which was always giving me 255 or something despite having it set at 75.
After some long hours looking over my code (even with a validated JSON file), I finally realised that in the given code on the plugin page it reads:
},
"Stone": 50,
"Stone Barricade": {
"stone barricade": 1
},
Now, this is valid and does work but it is wrong in the sense that if you are trying to get 50 or any amount of stone refund when you remove a building you simply will get 255 every time or something.To fix this I simply changed the code to look like this and can confirm it is a valid JSON as well as refunding 75 stone every time (can be set to any amount obviously):
},
"Stone": {
"Stones": 75
},
"Stone Barricade": {
"stone barricade": 1
},
*** stone barricade part is only there to show you how I separated them
**These are not valid unless used in the existing JSON file supplied in the plugin page which is set up already
* If you were to only want a refund for stone and stone barricades the valid JSON would look exactly like this under the Remove normal refund section:
{
"Stone": {
"Stones": 75
},
"Stone Barricade": {
"stone barricade": 1
}
}
So overall idk if the plugin page config needs to be updated or not but I hope that this helps someone or anyone :)
<3 k1ng.