Programs converting .trc files to an .xml and back


The maps\city\ai\city.trc file in Slrr defines the traffic behaviour in Valocity.

I made two simple programs one for converting the trc to a human readable xml and one for back I still have no (not much) clue what the values represent but maybe someone will be enthusiastic enough to try changing them and figuring out what they mean this will maybe help that hero.
What I do know; the float values of the second list in the file are affecting the traffic lights if they are zeroed out they stay red forever.
The float values in the 4th list define the splines of the roads the first three floats define the position of a control point the second three the normal in the given point (I think its safe to assume these will define a Hermite spline just like the .spl files but that is just speculation), also the position of the (traffic)intersections are not defined here in the 4th list but the traffic cars will use that position when calculating their path this means if you add some value to the y position of the splines the traffic will not consistently hoover above the road but will snap back to the ground when crossing an intersection.

I hope someone will have the patience and/or the time to figure out the other stuff (there is a lot of other currently unknown data) if someone does I will be more than happy to upgrade these small programs to utilise the additional knowledge nevertheless the sourcecode is included so the ones feeling adventurous can use that as a starting point.

(If you have a question or anything please refer to this forum: LINK)

RawTrcDecode on GoogleDrive
No comments yet