SR2 Notoriety spawns and roadblocks

Hello

I've asked a long time ago if it was possible in Saints Row 2 to edit the notoriety spawn and the police roadblocks, but according to IdolNinja, no modder has succeeded in succesfully editing either the spawns or the roadblocks.

So now I finally can ask Volition themselves: why does changing the xtbl for the spawns and roadblocks have no effect in game?
 
What are you wanting to change? What tables specifically are you changing? As far as I'm aware, the majority of the roadblock system in SR2 is hard coded. :/

For SR3, the roadblock system was completely overhauled (by yours truely :p) and is much more data driven.
 
What are you wanting to change? What tables specifically are you changing? As far as I'm aware, the majority of the roadblock system in SR2 is hard coded. :/

For SR3, the roadblock system was completely overhauled (by yours truely :p) and is much more data driven.


Well that the point :D I haven't changed anything yet, since I asked it before but IdolNinja said it was not possible so I didn't even start with it :p

Well, I would just like in Saints Row The Third edit the roadblocks (if its hard coded, then thats the way it is, though I'm pretty sure there also was a roadblock_layouts.xtbl in saints row 2 which in case of it being hardcoded, probably was useless)
but most importantly edit the police spawns.

I was thinking of making the police bike also show up while on foot/in a car. About 20% chance of one showing up and 80% chance on a cop car at level 2. Then the SWAT peacekeeper vans would show up at level 3 (about 20 percent chance of one of those showing up and 70 percent chance of a cop car and 10% chance on a police bike) and then at level 4 making the SWAT bear APC spawn (15% SWAT bear chance, 15% SWAT peacekeeper chance and 70% chance of cop car spawning.)

But if it is not possible then there is nothing we can do about it ;)

Btw, I found the thread, here it was:
http://www.saintsrowmods.com/forum/threads/saints-row-2-notoriety.1597/
 
There is no roadblock_layout.xtbl in SR2. The vehicles and NPCs that the roadblocks use for various notoriety levels are hard coded by vehicle/NPC name.

If you were really serious about doing a replacement on some SR2 roadblock vehicle, you would have to do a vehicle name swap in the vehicle tables. I can get you more information if you'd like, but it's going to be a decent amount of work.
 
There is no roadblock_layout.xtbl in SR2. The vehicles and NPCs that the roadblocks use for various notoriety levels are hard coded by vehicle/NPC name.

If you were really serious about doing a replacement on some SR2 roadblock vehicle, you would have to do a vehicle name swap in the vehicle tables. I can get you more information if you'd like, but it's going to be a decent amount of work.


Well even if we do that, will we be able to change the type of enemies standing near the vehicles? If I would be able the change the vehicles at level 3 to normal five-o cop cars it would be weird to still have swat guys standing near them now wouldn't it be :p

And some more info about this is always welcome.
 
And some more info about this is always welcome.

On SR2, the roadblocks were completely driven by code with various logic to determine which of the following "roadblock resource" groups to spawn from. The entries for the 4 different resource groups is as follows:

// I've modified this for readibility, this is not the actual data format in memory
static roadblock_resource Roadblock_resource_infos[NUM_ROADBLOCK_RESOURCE_TYPES] = {
{ "Police Swat", "Swat Car" }, // RRT_SWAT_VAN
{ "Police Swat", "Swat APC Police" }, // RRT_POLICE_APC
{ "Ultor Masako", "Swat APC Ultor" } // RRT_ULTOR_APC
{ "Camera Man", "News Van"} // RRT_ACTIVITY_NEWS_VAN
};

The news van was used exclusively during the escort activity. The SWAT van was used at police notoriety 3. At notoriety 4 or higher, either the police or Ultor APC is used depending on whether the roadblock spawns in an Ultor territory. In order to get regular cop cars at notoriety level 3 you will to to replace "Swat Car" (4) with "Police Car" (1) and "Police Swat" (11) with "Police Officer" (10) for the first entry in the array above. I imagine this would be tricky to pull off, but here's all the relevant data formats:

The actual format of each roadblock_resource is as it would appear in memory:
enum32 desired_human_idx;
enum32 desired_vehicle_idx;
enum32 stream_priority_idx;
bool resources_requested;
bool resources_desired;

The list of enumerated humans:
"Young Male"
"Young Female"
"Old Male"
"Old Female"
"Business Male"
"Business Female"
"Poor Male"
"Poor Female"
"Rich Male"
"Rich Female"
"Police Officer"
"Police Swat"
"Ultor Goon"
"Ultor Masako"
"Ronin Female Biker"
"Ronin Male Biker"
"Placeholder Saint"
"Camera Man"

The list of enumerated vehicles:
"Truck"
"Police Car"
"Police Helicopter"
"Attack Helicopter"
"Swat Car"
"Swat APC Police"
"Swat APC Ultor"
"Armored Truck"
"News Van"
"Taxi"
"Ambulance"
"Garbage Truck"
"Train Car"
"Delivery Gyro"
"Delivery Freckled Bitches"
"Delivery Lik A Chick"
"Pimp"
"Ship It"
"Firetruck"
"Hazmat"
"Gang Wagon"

The rest of the parameters in roadblock_resource are for internal use, and should remain unmodified.
 
On SR2, the roadblocks were completely driven by code with various logic to determine which of the following "roadblock resource" groups to spawn from. The entries for the 4 different resource groups is as follows:

// I've modified this for readibility, this is not the actual data format in memory
static roadblock_resource Roadblock_resource_infos[NUM_ROADBLOCK_RESOURCE_TYPES] = {
{ "Police Swat", "Swat Car" }, // RRT_SWAT_VAN
{ "Police Swat", "Swat APC Police" }, // RRT_POLICE_APC
{ "Ultor Masako", "Swat APC Ultor" } // RRT_ULTOR_APC
{ "Camera Man", "News Van"} // RRT_ACTIVITY_NEWS_VAN
};

The news van was used exclusively during the escort activity. The SWAT van was used at police notoriety 3. At notoriety 4 or higher, either the police or Ultor APC is used depending on whether the roadblock spawns in an Ultor territory. In order to get regular cop cars at notoriety level 3 you will to to replace "Swat Car" (4) with "Police Car" (1) and "Police Swat" (11) with "Police Officer" (10) for the first entry in the array above. I imagine this would be tricky to pull off, but here's all the relevant data formats:

The actual format of each roadblock_resource is as it would appear in memory:
enum32 desired_human_idx;
enum32 desired_vehicle_idx;
enum32 stream_priority_idx;
bool resources_requested;
bool resources_desired;

The list of enumerated humans:
"Young Male"
"Young Female"
"Old Male"
"Old Female"
"Business Male"
"Business Female"
"Poor Male"
"Poor Female"
"Rich Male"
"Rich Female"
"Police Officer"
"Police Swat"
"Ultor Goon"
"Ultor Masako"
"Ronin Female Biker"
"Ronin Male Biker"
"Placeholder Saint"
"Camera Man"

The list of enumerated vehicles:
"Truck"
"Police Car"
"Police Helicopter"
"Attack Helicopter"
"Swat Car"
"Swat APC Police"
"Swat APC Ultor"
"Armored Truck"
"News Van"
"Taxi"
"Ambulance"
"Garbage Truck"
"Train Car"
"Delivery Gyro"
"Delivery Freckled Bitches"
"Delivery Lik A Chick"
"Pimp"
"Ship It"
"Firetruck"
"Hazmat"
"Gang Wagon"

The rest of the parameters in roadblock_resource are for internal use, and should remain unmodified.


I understand this but where can I find where I have to do this?
In order to get regular cop cars at notoriety level 3 you will to to replace "Swat Car" (4) with "Police Car" (1) and "Police Swat" (11) with "Police Officer" (10) for the first entry in the array above.

Btw, in the notoriety_spawn.xtbl I also found this, a code which seems to have to do with the police raodblocks.

Code:
    <Table>
        <Name>police_roadblock</Name>
        <level_info>
            <level_info>
                <level>3</level>
                <min_spawn_time>12</min_spawn_time>
                <max_spawn_time>25</max_spawn_time>
                <max_vehicle_occupants>3</max_vehicle_occupants>
                <max_vehicles>2</max_vehicles>
                <npc_cap>5</npc_cap>
                </level_info>
            <level_info>
                <level>4</level>
                <min_spawn_time>10</min_spawn_time>
                <max_spawn_time>20</max_spawn_time>
                <max_vehicle_occupants>3</max_vehicle_occupants>
                <max_vehicles>2</max_vehicles>
                <npc_cap>5</npc_cap>
                </level_info>
            <level_info>
                <level>5</level>
                <min_spawn_time>10</min_spawn_time>
                <max_spawn_time>20</max_spawn_time>
                <max_vehicle_occupants>3</max_vehicle_occupants>
                <max_vehicles>2</max_vehicles>
                <npc_cap>5</npc_cap>
                </level_info>
            </level_info>
        <resource_info>
            <resource_info>
                <level>3</level>
                <chance>1.0</chance>
                <tag_name>riot</tag_name>
                <npc_name>npc_swat</npc_name>
                <vehicle_name>van_2dr_riot01</vehicle_name>
                </resource_info>
            <resource_info>
                <level>4</level>
                <chance>1.0</chance>
                <tag_name>riot</tag_name>
                <npc_name>npc_swat</npc_name>
                <vehicle_name>sp_apc01</vehicle_name>
                </resource_info>
            <resource_info>
                <level>5</level>
                <chance>1.0</chance>
                <tag_name>riot</tag_name>
                <npc_name>npc_swat</npc_name>
                <vehicle_name>sp_apc01</vehicle_name>
                </resource_info>
            </resource_info>
        <weapon_info>
            <weapon_info>
                <level>3</level>
                <chance>0.7</chance>
                <tag_name>riot</tag_name>
                <weapon_class>shotgun</weapon_class>
                <weapon>pump_action_shotgun</weapon>
                <throw_weapon_chance>0.0</throw_weapon_chance>
                </weapon_info>
            <weapon_info>
                <level>3</level>
                <chance>0.3</chance>
                <tag_name>riot</tag_name>
                <weapon_class>rifle</weapon_class>
                <weapon>m16</weapon>
                <throw_weapon_chance>0.0</throw_weapon_chance>
                </weapon_info>
            <weapon_info>
                <level>4</level>
                <chance>0.6</chance>
                <tag_name>riot</tag_name>
                <weapon_class>shotgun</weapon_class>
                <weapon>pump_action_shotgun</weapon>
                <throw_weapon_chance>0.0</throw_weapon_chance>
                </weapon_info>
            <weapon_info>
                <level>4</level>
                <chance>0.4</chance>
                <tag_name>riot</tag_name>
                <weapon_class>rifle</weapon_class>
                <weapon>m16</weapon>
                <throw_weapon_chance>0.0</throw_weapon_chance>
                </weapon_info>
            <weapon_info>
                <level>5</level>
                <chance>1</chance>
                <tag_name>riot</tag_name>
                <weapon_class>rifle</weapon_class>
                <weapon>m16</weapon>
                <throw_weapon_chance>0.0</throw_weapon_chance>
                </weapon_info>
            </weapon_info>
        <_Editor>
            <Category>Entries</Category>
            </_Editor>
        <spawn_flags>
            <Flag>Spawn on Land</Flag>
            </spawn_flags>
        </Table>
 
I'm not sure exactly. :p
I can get you more information if you'd like, but it's going to be a decent amount of work.

This is all hard coded in the executable, so it will be a tough mod. You would need to modify the exec binary to change the indexes for the vehicle/character stored in the Roadblock_resource_infos.

NOTE: I'm not sure if there's any precedent for modding the exe for SR2 or if that's even inline with the rules and guidelines of this site. I know SR3 is integrated with Steam and legit copies don't support modded binaries, but I'm really not up to speed with how this all works with to SR2.
 
I'm not sure exactly. :p


This is all hard coded in the executable, so it will be a tough mod. You would need to modify the exec binary to change the indexes for the vehicle/character stored in the Roadblock_resource_infos.

NOTE: I'm not sure if there's any precedent for modding the exe for SR2 or if that's even inline with the rules and guidelines of this site. I know SR3 is integrated with Steam and legit copies don't support modded binaries, but I'm really not up to speed with how this all works with to SR2.


pff, well, I'll just let it be then, don't want to fuck up my game and what you just said is almost Chinese to me, so its better to leave it the way it is :p
 
I'm not sure exactly. :p


This is all hard coded in the executable, so it will be a tough mod. You would need to modify the exec binary to change the indexes for the vehicle/character stored in the Roadblock_resource_infos.

NOTE: I'm not sure if there's any precedent for modding the exe for SR2 or if that's even inline with the rules and guidelines of this site. I know SR3 is integrated with Steam and legit copies don't support modded binaries, but I'm really not up to speed with how this all works with to SR2.

It is believed that sr2 has much less strict limitations on modding the exe, but in my experience it has not responded well to it.
 
Back
Top