How does 'chancePerPositionCurve' work?

Started by Cryusaki, July 06, 2017, 05:18:40 PM

Previous topic - Next topic

Cryusaki

I am trying to mod how roads are drawn on the map so I have been fiddling around with the xml file 'Defs/RoadDefs/RoadDefs.xml' and lines 11 to 22 contain 3 ordered pairs of numbers. When I change these around the best I can come up with is that if you put in 1's you get a solid road, if you put in numbers like 0.3 you get a scattered road and if you put in 0 you get no road.

I tried looking into the C# code using ILSpy but it seems to be part of a function called SimpleCurve and I can't make heads or tails of it. I have been putting in many different combinations to try and understand it indirectly but I have made no progress in several hours. If anyone could figure out this riddle of code I would be very grateful!