I've never written a script before so this could be a simple one but I couldn't find any previous answers for the matter. (probably because I don't really speak the language :D)
So I have in a folder 160 or so .ini files which all contain the variable "fill_dist = n".
I need to replace the n in all of these files and am not keen on doing it manually file by file.
This value (n) differentiates between .ini files so I can't find+replace the whole string. The replacement value would be the same for all .ini files though. (10000)
The row of this variable also differs depending on file. It seems to be written to the row after "cube_size" in every file though.
Any ideas?
Example .ini 1:
[Field]
cube_size = 400
fill_dist = 1600
diffuse_color = 220, 220, 180
ambient_color = 120, 120, 120
ambient_increase = 70, 40, 30
empty_cube_frequency = 0.6
Example .ini 2:
[Field]
cube_size = 400
fill_dist = 1500
diffuse_color = 220, 255, 255
ambient_color = 70, 70, 70
ambient_increase = 40, 40, 40
empty_cube_frequency = 0.5