gbasood/ShatteredEuropeEU4 — pull request #4 by taw (2014-09-27 14:13:29+00:00)
Title: Technology rescaling

This is technically not a "bug" as such, but the choice is really between rescaling tech by simple formula (like here), setting up entirely new tech system (like Extended Timeline), or almost nothing happening techwise first 50 years of the game.

Years are actually off by one tech due to weird design of the engine - each tech's year is when next tech stops being ahead of time, so last one (1835->1837) is completely unused by the game. 1820 is the last one used, and it stays the same.

Script to rescale (to redo this with new EU4 version if techs changed):

```
$ cat rescale.rb
def rescale(val, range_a, range_b)
position_in_range = (val-range_a.begin).to_f / range_a.size
(range_b.begin + position_in_range * range_b.size).round
end
$ ruby -i -pe 'require "./rescale"; $_.gsub!(/year\s*=\s*\K(\d+)/){ rescale($1.to_i, 1444..1820, 1399..1820) }' ShatteredEurope/common/technologies/*.txt
````