STR2_PC Repacking Help?

I guess I'm new here, so hi! :)

With that out of the way.. is there a trick to using the str2 repacking tool? I could well be using it wrong, but using the program to pack a directory to file it results in an str2_pc file, but when I use that in the game directory.. it doesn't want to work.

I'll be a bit more clear.. I was checking if there's a trick to how the activities are stored.. sure there's xtbls for each in the misc_tables, but there's also copies in the da_tables. Trying to replace the files in either of those did nothing as did putting the modified xtbl in the game root (it doesn't change the activities like I modified). So instead I noticed there's also str2_pc files in the sr3_city_0.vpp_pc package with the names of the game files.. so extracting those str2s gave an @streams.xml file, and lo and behold a third copy of the xtbl for each mission. Modifying that one and repackaging the str2 then putting the new str2s in the game root did change something.. when I tried to use one of the modified activities... the game didn't run it at all, as if I hadn't hit the e key, even after repeated times. Trying to pull up the cellphone to check my map did however make the game crash at this point.

So, what it comes down to is the copies of the activity xtbls in the misc and da tables packs seem to be ignored, and instead it uses the ones in the str2s in sr3_city_0 (which is probably why putting the xtbls directly into the root doesn't change a thing). So is there a problem I'm doing with my repackaging, or does it not correctly rebuild them, or something?
 
I was about to write a whole long annoyance at how much hassle it is to override the files.. I've found part of the chain for activities now, it uses the sr3_city_missions.asm_pc file from the sr3_city_missions vpp pack, then the str2 for the suitable activity (they contain special stuff like the fireworks for Genki aka Running Man or some files for horde mode), uses the cmp_activity st2 file's contents in interface.vpp_pc to handle the drawing of before/after (cmp_activity.lua in cmp_activity.str2, MORE copies of the luas like cmp_common that file relies upon), the activty xtbl files in misc_tables (there's a few of them, they handle general setup for all activities of a given type) then the str2 packed files for each specific activity in the sr3_city_0.vpp_pc archive (the straight one contains meshes and graphics that might be needed, the modal contains the xtbl for that specific activity). Those xtbls in those str2s control that specific activity for that spot and level (such as _a_if_dt_01 being Insurance Fraud, Downtown, Level 1). It appears to ignore the copies in misc_tables and da_tables (why are they even there?).

For some reason it worked this time.. maybe it's just slower to load str2s that are replaced, maybe it was because I got lucky and the byte-difference was 1 which might be enough to still work, maybe it's just the computer god smiling on me. Either way, if you want to change activities, you need to repackage the modal str2 for that activity and slot that into the SR3 main directory. It works, as my 1:30 starting time for trail blazing showed.

The next step is going to be really ugly however as I still can't find where the game actually is creating missions from. Is there some actual lua code I'm missing that handles how it actually builds missions/activities/diversions/etc? Or is it actually all built into the exe as I worry and it just uses the lua/tables to give the details past that? Because if so I'd rather know now if it's impossible to add other activities before I start that step.


And on that matter, how do you determine header/data size of something once it's packed into an str2? Is it a constant header followed by the files in a given order, with say file 1 being a header of "base" and file 2 being "base + file1"? Is it arbitrary by how the compression works and thus would need to be given by the tools? It appears if I want to start loading files with activities I'd need to know how they're packed in the str2s for sr3_city_missions.asm_pc...
 
Back
Top