chunk_pc

How exactly do I properly utilize sr2 ksy? I would like to use it but I am unfamiliar with Kaitai.

Also do you know if chunk files contain light source data?
 
How exactly do I properly utilize sr2 ksy? I would like to use it but I am unfamiliar with Kaitai.
The essential steps are the following:
* Use kaitai-compiler to generate a parser from the ksy (you don't even need to install anything, if you do it in the web IDE),
* Put the source file to your project.
* There's a small dependency you need too. I used c#, so this.
* You call the kaitai api, which should be very easy, but the documentation is rather lacking.
Also do you know if chunk files contain light source data?
You're in luck, I found it yesterday, and it's in the git repo. Note that I'm not sure how reliable it is yet. Don't trust anything beyond light_names at least, though I think I commented it out anyway. If you run into trouble somewhere, do ping me.

Oh, and it does not support writing files, though I've understood that it's planned.
 
Last edited:
Alright good to know, thanks for answering. I have been poking around in the Saints Row 2 a bit and made a discovery. It made me want to mess around with the lighting for... reasons. I will message you about it. I have a theory, and I am fairly confident that it is true. Good things just may come soon.
 
I moved this fence 10 (metres?) along world x axis. Weirdly enough it culls if I look away from it's original position and not the new one.
View attachment 29446


I pulled this knowledge from my ass with a hex editor so something's probably inaccurate.

Iirc, that's symptomatic of one of two things:
1. The object's center is considered far enough off screen by the renderer that it doesn't need to draw, which then decides to cull it.
2. My memory is more fuzzy on thsi one, but if I remember right, the object's bounding box is too big and the renderer also culls it.
 
Iirc, that's symptomatic of one of two things:
1. The object's center is considered far enough off screen by the renderer that it doesn't need to draw, which then decides to cull it.
2. My memory is more fuzzy on thsi one, but if I remember right, the object's bounding box is too big and the renderer also culls it.
Oh it's awesome to see Volition staff! The struct contains transform and model id. Way further in the file, I found another type that has among other stuff the cull box + render distance.
 
Oh it's awesome to see Volition staff! The struct contains transform and model id. Way further in the file, I found another type that has among other stuff the cull box + render distance.
Oh sweet.

Yeah, the latter are the things you want to mess with to get it to behave the way you expect it to.
 
Back
Top