Modding Zombie Uprising

A Gigantic Thank you to Clipper95 for figuring out and implementing the code (and)
A Gigantic Thank You to Reina3 for the Insight And The Tutorial. (Part 13)

Note: Part 14 was written entirely by Reina3, who also created the included ct file
(Tutorial used and file posted with author permission.)

If you would prefer to use an asi file check out Clipper95's mod:
-Part 1- Changing A Character

In Idolninja's optional Zombie Uprising At The Mall he gives you a choice of characters
to be your Zombie Killer. I chose the version that features Pierce and Shaundi but in my own
game I chose to change Pierce To Johnny Gat.

Here Is The Relevant Code From Idolninja's mod (zombie.xtbl):

<Zombie_Killer_One>npc_pierce</Zombie_Killer_One>
<Zombie_Killer_Two>npc_shaundi</Zombie_Killer_Two>

This was a simple change just replace npc_pierce with npc_gat

(Modded Code)

<Zombie_Killer_One>npc_gat</Zombie_Killer_One>
<Zombie_Killer_Two>npc_shaundi</Zombie_Killer_Two>
-Part 2- Adding A Cash Reward

Here is the original code:

<Level>

<Cash_Award>0</Cash_Award>

(modded code)

<Level>

<Cash_Award>10000</Cash_Award>
-Part 3- Changing The Amount Of Respect

Original Code:

<Props_Award>2000</Props_Award>

(modded Code)

<Props_Award>5000</Props_Award>
-Part 4- Swapping Weapon Pickups


(Original code) Note That We Are Working With Zombie.cts right now not zombie.xtbl and you can see
these changes are made under the Items heading


Code:
// -------
#Items
// -------

$Item:        "zombie_weapon01"
$Item type:    "ak47"
$Start nav:    "zombie_weapon01"
$Respawn Delay:    221199
$Ammo:    150
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon02"
$Item type:    "flamethrower"
$Start nav:    "zombie_weapon02"
$Ammo:    200
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon03"
$Item type:    "minigun"
$Start nav:    "zombie_weapon03"
$Ammo:    200
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_food01"
$Item type:    "the_fist"
$Start nav:    "zombie_food01"
$Group:            "zombie_item_group"

$Item:        "zombie_food02"
$Item type:    "the_fist"
$Start nav:    "zombie_food02"
$Respawn Delay:    63299
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04"
$Item type:    "chainsaw"
$Start nav:    "zombie_weapon04"
$Respawn Delay:    255000
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon06"
$Item type:    "sledgehammer"
$Start nav:    "zombie_weapon06"
$Respawn Delay:    97800
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon07"
$Item type:    "baseball_bat"
$Start nav:    "zombie_weapon07"
$Respawn Delay:    97800
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon05"
$Item type:    "tire_iron"
$Start nav:    "zombie_weapon05"
$Respawn Delay:    77300
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_$i000"
$Item type:    "pump_action_shotgun"
$Start nav:    "zombie_$i000"
$Respawn Delay:    136800
$Ammo:    16
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_food02 (0)"
$Item type:    "the_fist"
$Start nav:    "zombie_food02 (0)"
$Respawn Delay:    124500
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04 (0)"
$Item type:    "glock"
$Start nav:    "zombie_weapon04 (0)"
$Respawn Delay:    46100
$Ammo:    100
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04 (1)"
$Item type:    "tec9"
$Start nav:    "zombie_weapon04 (1)"
$Respawn Delay:    112800
$Ammo:    150
$Grenade Ammo:    0
$Group:            "zombie_item_group"


(modded code)


Code:
// -------
#Items
// -------

$Item:        "zombie_weapon01"
$Item type:    "ak47"
$Start nav:    "zombie_weapon01"
$Respawn Delay:    221199
$Ammo:    150
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon02"
$Item type:    "mcmanus2010"
$Start nav:    "zombie_weapon02"
$Respawn Delay:    221199
$Ammo:    20
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon03"
$Item type:    "minigun"
$Start nav:    "zombie_weapon03"
$Ammo:    200
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_food01"
$Item type:    "the_fist"
$Start nav:    "zombie_food01"
$Group:            "zombie_item_group"

$Item:        "zombie_food02"
$Item type:    "the_fist"
$Start nav:    "zombie_food02"
$Respawn Delay:    63299
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04"
$Item type:    "chainsaw"
$Start nav:    "zombie_weapon04"
$Respawn Delay:    255000
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon06"
$Item type:    "sledgehammer"
$Start nav:    "zombie_weapon06"
$Respawn Delay:    97800
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon07"
$Item type:    "baseball_bat"
$Start nav:    "zombie_weapon07"
$Respawn Delay:    97800
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon05"
$Item type:    "tire_iron"
$Start nav:    "zombie_weapon05"
$Respawn Delay:    77300
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_$i000"
$Item type:    "pump_action_shotgun"
$Start nav:    "zombie_$i000"
$Respawn Delay:    136800
$Ammo:    24
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_food02 (0)"
$Item type:    "the_fist"
$Start nav:    "zombie_food02 (0)"
$Respawn Delay:    124500
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04 (0)"
$Item type:    "glock"
$Start nav:    "zombie_weapon04 (0)"
$Respawn Delay:    46100
$Ammo:    100
$Grenade Ammo:    0
$Group:            "zombie_item_group"

$Item:        "zombie_weapon04 (1)"
$Item type:    "tec9"
$Start nav:    "zombie_weapon04 (1)"
$Respawn Delay:    112800
$Ammo:    150
$Grenade Ammo:    0
$Group:            "zombie_item_group"

I swapped the flamethrower for the McManus2010
And I changed the amount of ammo for the pump_action_shotgun.
-Part 5- Changing Zombie Weapon Drops

(We're back in zombie.xtbl now)


(Original Code)

Code:
<Droppable_Weapons>
                    <Weapon>
                        <Weapon_Specific>baseball_bat</Weapon_Specific>
                        <Weapon_Ammo>-1</Weapon_Ammo>
                        <Weight>0.1</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>machete</Weapon_Specific>
                        <Weapon_Ammo>-1</Weapon_Ammo>
                        <Weight>0.1</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>grenade</Weapon_Specific>
                        <Weapon_Ammo>1</Weapon_Ammo>
                        <Weight>0.2</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>tec9</Weapon_Specific>
                        <Weapon_Ammo>50</Weapon_Ammo>
                        <Weight>0.3</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>beretta</Weapon_Specific>
                        <Weapon_Ammo>20</Weapon_Ammo>
                        <Weight>0.3</Weight>
                        </Weapon>
                    </Droppable_Weapons>

(Modded Code)



Code:
<Droppable_Weapons>
                    <Weapon>
                        <Weapon_Specific>baseball_bat</Weapon_Specific>
                        <Weapon_Ammo>-1</Weapon_Ammo>
                        <Weight>0.1</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>pump_action_shotgun</Weapon_Specific>
                        <Weapon_Ammo>24</Weapon_Ammo>
                        <Weight>0.1</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>grenade</Weapon_Specific>
                        <Weapon_Ammo>1</Weapon_Ammo>
                        <Weight>0.2</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>tec9</Weapon_Specific>
                        <Weapon_Ammo>50</Weapon_Ammo>
                        <Weight>0.3</Weight>
                        </Weapon>
                    <Weapon>
                        <Weapon_Specific>beretta</Weapon_Specific>
                        <Weapon_Ammo>20</Weapon_Ammo>
                        <Weight>0.3</Weight>
                        </Weapon>
                    </Droppable_Weapons>


I swapped the machete for the pump_action_shotgun and changed the ammo from -1 (which I think means infinite)
to 24 for the shotgun. I tried leaving the ammo ammount at -1 but it did not make the shotgun ammo infinite
-Part 6- Changing Chances of Food Or Weapon Drop


Original code:

<Chance_To_Drop_Food>0.10</Chance_To_Drop_Food>
<Chance_To_Drop_Weapon>0.35</Chance_To_Drop_Weapon>

(modded code)

<Chance_To_Drop_Food>0.90</Chance_To_Drop_Food>
<Chance_To_Drop_Weapon>0.90</Chance_To_Drop_Weapon>
-Part 7- Changing Zombies To Ninjas (character swaps)
(Note: Thank you to SeaboundSaint for the NPC Editing Guide. That is how I learned to do this.)


The Zombies in my mod are controlled by the files:

npc_ZombMale_A.xtbl
npc_ZombMale_C.xtbl
npc_ZombFemB.xtbl

There are other zombie files in Common.vpp_pc but I don't use them.

Since I want to change my zombies to ninjas I will simply swap the
npc in the _pre files (i.e. For npc_ZombMale_A I would swap the character in npc_ZombMale_A_pre.xtbl)

the relevant files will be:
npc_ZombMale_A_pre.xtbl
npc_ZombMale_C_pre.xtbl
npc_ZombFemB_pre.xtbl

Here is npc_ZombMale_A_pre.xtbl used as an example:

(original code)

<Preset>
<Name>npc_ZombMale_A</Name>
<Character>npc_ZombMale_A</Character>

(modded code)

<Preset>
<Name>npc_ZombMale_A</Name>
<Character>npc_Ninja</Character>

All three _pre files will use npc_ninja as the character entry.
-Part 8- Swapping The Animations From Zombies To Brotherhood

In the npc_Zomb*_pre files there is a setting for animations

Here is the listing from ZombFemB_ore

<AnimSets>
<AnimSet>0.0<Filename>PML1_Zombie.xtbl</Filename>
<PercentChance>100</PercentChance>
</AnimSet>

what we want to change is the filename inside of the ,Filename></Filename> brackets
so that it reflects out choice of animations. In this case: to BRO_LIFE which controls the Brotherhood animations


(Original Code)

<AnimSets>
<AnimSet>0.0<Filename>PML1_Zombie.xtbl</Filename>
<PercentChance>100</PercentChance>
</AnimSet>


(Modded Code)

<AnimSets>
<AnimSet>0.0<Filename>BRO_LIFE</Filename>
<PercentChance>100</PercentChance>
</AnimSet>

That's it. Just compile your code and have fun.
Part 9 Changing A Zombie's spawn chance

In order to change the number of exploding
zombies or all you need to do
is change the spawn chances

Here is a random section of my zombies.xtbl file

Code:
<Zombie_Spawn_Level>
                        <Spawn_Cap>69</Spawn_Cap>
                        <Kills_To_Advance>20</Kills_To_Advance>
                        <Spawn_Chances>
                            <Normal>0.5</Normal>
                            <Big>0.3</Big>
                            <Fire>0</Fire>
                            <Explode>0</Explode>
                            </Spawn_Chances>
                        <Survivor_Respawns>2</Survivor_Respawns>
                        </Zombie_Spawn_Level>


All you need to do is change the numbers in the brackets. It is the
percentage of a chance that a particular type of zombie will appear.
You can change the big zombies and the fire zombies the same way.

Entering a 1 will guarantee that they spawn

(modded)

Code:
<Zombie_Spawn_Level>
                        <Spawn_Cap>69</Spawn_Cap>
                        <Kills_To_Advance>20</Kills_To_Advance>
                        <Spawn_Chances>
                            <Normal>1</Normal>
                            <Big>.5</Big>
                            <Fire>0.3</Fire>
                            <Explode>0</Explode>
                            </Spawn_Chances>
                        <Survivor_Respawns>2</Survivor_Respawns>
                        </Zombie_Spawn_Level>
Part 10 Changing The Number Of Zombies

All you have to do is change the number in
the kills to advance line.


Code:
<Zombie_Spawn_Level>
                        <Spawn_Cap>69</Spawn_Cap>
                        <Kills_To_Advance>20</Kills_To_Advance>
                        <Spawn_Chances>
                            <Normal>0.5</Normal>
                            <Big>0.3</Big>
                            <Fire>0</Fire>
                            <Explode>0</Explode>
                            </Spawn_Chances>
                        <Survivor_Respawns>2</Survivor_Respawns>
                        </Zombie_Spawn_Level>

(modded)

Code:
<Zombie_Spawn_Level>
                        <Spawn_Cap>69</Spawn_Cap>
                        <Kills_To_Advance>50</Kills_To_Advance>
                        <Spawn_Chances>
                            <Normal>0.5</Normal>
                            <Big>0.3</Big>
                            <Fire>0</Fire>
                            <Explode>0</Explode>
                            </Spawn_Chances>
                        <Survivor_Respawns>2</Survivor_Respawns>
                        </Zombie_Spawn_Level>

Note You will have to set thesenumbers for every level.
Part 11 Decreaing Zombie Health

Code:
<Level>
                <Cash_Award>0</Cash_Award>
                <Props_Award>2000</Props_Award>
                <Player_Start>zombie_player_start</Player_Start>
                <Start_Hour>12</Start_Hour>
                <Cash_Per_Zombie_Killed>0</Cash_Per_Zombie_Killed>
                <Zombie_Max_Hit_Points>300</Zombie_Max_Hit_Points>

(modded)

Code:
<Level>
                <Cash_Award>0</Cash_Award>
                <Props_Award>2000</Props_Award>
                <Player_Start>zombie_player_start</Player_Start>
                <Start_Hour>12</Start_Hour>
                <Cash_Per_Zombie_Killed>0</Cash_Per_Zombie_Killed>
                <Zombie_Max_Hit_Points>10</Zombie_Max_Hit_Points>
Part 12 Instant Zombie Kill
(Just For Fun)

All you have to do is set the zombie health to 10 and set all the zombies on fire.
Remember to do this for all levels.

Note: You will not gain any points this way

First set zombie health to 10. that way it won't take them long to die.

(modded)
<Level>
<Cash_Award>0</Cash_Award>
<Props_Award>2000</Props_Award>
<Player_Start>zombie_player_start</Player_Start>
<Start_Hour>12</Start_Hour>
<Cash_Per_Zombie_Killed>0</Cash_Per_Zombie_Killed>
<Zombie_Max_Hit_Points>10</Zombie_Max_Hit_Points>

Secondly set all the zombies to be on fire

(modded)
<Spawn_Cap>69</Spawn_Cap>
<Kills_To_Advance>20</Kills_To_Advance>
<Spawn_Chances>
<Normal>0</Normal>
<Big>0</Big>
<Fire>1</Fire>
<Explode>0</Explode>
</Spawn_Chances>
<Survivor_Respawns>2</Survivor_Respawns>
</Zombie_Spawn_Level>

There may be 1 or 2 regular zombies spawned but killing them is no big deal.
It'll probobly take longer to find them than to kill them.


Note: If you just wanted to set their health to 0 it wouldn't work.
If you set the zombie max hit points to 0 then your zombies will be frozen
in place and killing them won't make your zombie total decrease.
(Tutorial Originally by Reina3 with slight edits by myself)

2.png


1. Download and Install Cheat Engine Version 7.5 Windows 10/11; Version 6.2 Windows 7)
2. Start Saints Row 2 and let game reach main menu

4.png

3. Go back to Cheat Engine (CE) and click the Process Open button, scroll down and select SR2_pc.exe

Click Yes.png

4. Click on Memory View button and enter 0x005B9AC3, then press Ok.
5. Double click the highlighted je opcode and change it to jmp. Leave the space and address untouched. Press Ok.

Click Yes.png

6. After you have changed the code you will be asked to overwrite a piece of code with nops, Click Ok.
7. Go back into your game and start Zombie Uprising. If everything went well then you will playing as your boss character.
8. Once you are sure that everything is working then right click on the code that you just changed and select 'Add to code list'

This will add it to the Advanced Options window at the bottom of the Cheat Engine interface. Now you can save the .ct file and find this
code easier in the future.
This is a cheat table that has a checkbox to patch out Zombie Uprising preventing ou from using your character incase people don't want it attached to a mod.

To ensure it is free of malware, here is the contents of entire .ct file that you can copy and paste to create your own file:

Code:
XML:

<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Your Character in Zombie Uprising"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
sr2_pc.exe+1B9AC3:
jmp sr2_pc.exe+1B9BD3
nop

// jne sr2_pc.exe+1B9BD3
// ^ also works, and is 6 bytes long, but being jne there is probably some obscure bug
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
sr2_pc.exe+1B9AC3:
je sr2_pc.exe+1B9BD3
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>


1. open game and let it load the main menu
2. open Cheat Engine, select process sr2_pc.exe
3. press Memory Viewer, right click, "go to" address 0x005B9AC3, right click copy opcode
4. top bar, open Tools > Auto Assemble and paste the following

Code:
[ENABLE]
sr2_pc.exe+1B9AC3:
jmp sr2_pc.exe+1B9BD3
nop

[DISABLE]
sr2_pc.exe+1B9AC3:
je sr2_pc.exe+1B9BD3

4. top bar, File > Assign to current cheat table. this will make a checkbox appear to patch out the code using CheatEngine
5. remember to save your cheat engine file, as sr2_pc.ct (no .exe) so it will ask to auto-load when selecting the process again
6. tick the box whenever the game is launched and you want to play Zombie Uprising

Note: This Zombie Uprosing.zip file only covers parts 1-8

Be sure to keep your original Zomb* files so that you can restore them when you are
done playing with these.

Drop the edited file in the '1-MODDERS_-_PUT_YOUR_OWN_PERSONAL_MODS_HERE' directory located in
Gentlemen Of The Row/optional_mod_stuff and compile it. Drop your compiled files in your Saints Row 2
folder.

There is no reason that I can think of that this should mess with a save file, but
depending on what other mods you may have installed it might mess up your progress if you are
going for 100 percent. Since I'm not sure I thought to give this warning.
 

Attachments

Last edited:
Tutorial Updated. Reina3 wrote a tutorial on how to create a cheat table
with a checkbox allowing you to enable or disable the option to play Zombie
Uprising as your character.

I have posted the tutorial and cheat table with permission.
 
Back
Top