Ultimate SR2 ISO Modding Guide

CRACKbomber Jan 5, 2013

  1. CRACKbomber

    CRACKbomber Resident Xbox Guru XPG Developer
    0/47

    Joined:
    Sep 12, 2011
    Messages:
    276
    Likes Received:
    235
    Trophy Points:
    25
    Gender:
    Male
    Location:
    Michigan
    Console:
    Xbox
    In this tutorial I will be showing you the process of extracting and packing Saint's Row 2's .vpp_xbox2 files, mainly the modding process of sr2_city.lua which is located in misc_tables_city.vpp_xbox2. NOTE: This does not work on Saint's Row 3 or 1.

    Prerequisites:
    • A brain and a computer not running DOS with the .Net Framework
    • Gibbed SR2 Tools
    • Legally Backed-up version of Saints Row 2
    • LUA programming experiance is needed if you plan on making your own mods
    • WX360 or X360 Backup Creator
    Extraction of VPP_Xbox2 Files
    1. Open your ISO into your Xbox ISO explorer of choice
    2. Browse to the folder packfiles\xbox2, this is where all your vpp files are located
    3. For this tutorial I am going to be modifying the misc_tables_city pack file

      [​IMG]
    4. Extract to the folder of your choosing, but for this tutorial I am going to be extracting to C:\SR2\
    5. Now extract Gibbed's tools to the same folder you extracted the VPP to, so for me it will be C:\SR2\

      [​IMG]
    6. Now open the command prompt

      [​IMG]
    7. Type the command cd [LOCATION OF TOOLS AND VPP ie C:\SR2]

      [​IMG]
    8. Now type unpack misc_tables_city.vpp_xbox2

      [​IMG]
    9. If everything went correctly you should have extracted the VPP archive and all it's contents

      [​IMG]

    Packing the VPP_Xbox2 files

    1. Go back to you command prompt and type pack -bc misc_tables_city
    [​IMG]

    This should yield misc_tables_city_PACKED.vpp_pc, just rename the extension to .vpp_xbox

    [​IMG]


    Editing sr2_city.lua]

    NOTE: If you do not know LUA or any scripting/programming language STOP HERE!

    Sr2_city.lua is the file that is first run in the game, it initializes the city and everything in it. To create our own function we must first create a new thread handle like so

    Your_Thread = INVALID_THREAD_HANDLE

    Then we must create a new thread in the sr2_city_main() function.

    Your_Thread = thread_new("OurFunctionThread")

    Now we can make our function that we will code

    function OurFunctionThread()



    while(1)​
    thread_yield() -- VERY IMPOTANT! If this is not here you will cause a crash andor a black ---- --screen, thead yielding for all loops are needed!​
    --Place all mods in here​
    end​
    end

    Now we must create the button enumeration list

    BTN_A = 0
    BTN_B = 1 --Cannot be use for some reason
    BTN_X = 2
    BTN_Y = 3
    BTN_LB = 4
    BTN_RB = 5
    BTN_LT = 6
    BTN_RT = 7
    BTN_RIGHT = 8
    BTN_UP = 9
    BTN_LEFT = 10
    BTN_DOWN = 11
    BTN_START = 12
    BTN_BACK = 13
    BTN_LS = 14
    BTN_RS = 15
    BTN_UNKNOWN = -1

    For the purpose of this tutorial I will be showing a quick demonstration of giving money and a weapon on button press.

    function OurFunctionThread()
    while(1)​

    if player_button_just_pressed(BTN_LB) then​
    cash_add(1000000,LOCAL_PLAYER)​
    inv_weapon_add_temporary(LOCAL_PLAYER, "chainsaw", 1, true, true)​
    end​
    thread_yield()​
    end​
    end

    This code adds 1000000$ and gives a chainsaw to the local player
    Other LUA Related Items
    Item and other useful related things

    ------------------------------------------------------------
    XBOX Button Numbers:
    A = 0
    B = 1
    X = 2
    Y = 3
    LB = 4
    RB = 5
    LT = 6
    RT = 7
    Right = 8
    UP = 9
    Left = 10
    Down = 11
    Start = 12
    Back = 13
    LS = 14
    RS = 15
    ------------------------------------------------------------
    Player Types:
    LOCAL_PLAYER
    REMOTE_PLAYER
    CLOSEST_PLAYER
    CLOSEST_TEAM1
    CLOSEST_TEAM2
    PLAYER_TAG_LIST = {
    "#PLAYER1#",
    "#PLAYER2#",
    "#PLAYER3#",
    "#PLAYER4#",
    "#PLAYER5#",
    "#PLAYER6#",
    "#PLAYER7#",
    "#PLAYER8#"
    }
    ------------------------------------------------------------
    Sync Types:
    SYNC_REMOTE
    SYNC_LOCAL
    SYNC_ALL
    ------------------------------------------------------------
    GameMode Names: (Called with get_game_play_mode())
    Braveheart
    Gangsta Brawl
    Team Gangsta Brawl
    Diversion
    Pushback
    Multiplayer Creation
    Multiplayer Customization
    Multiplayer Tutorial
    Multiplayer Game Results
    Pre-game lobby
    ------------------------------------------------------------
    Useful Functions:
    player_button_just_pressed(button#/Use the above enum)
    cash_add(amount,player)
    get_char_vehicle_name(player)
    inv_weapon_add_temporary(target,itemName,numToGive,infinteAmmo,forceSwitch)
    ------------------------------------------------------------
    Functions made by others:

    --Sends a message to all client screens NOTE: If not localized on client it will show a message saying unrecognized hash
    function MessageLobby(text)
    objective_text_clear(0)​
    mission_help_table(text, "", "", SYNC_ALL)​
    end

    --Sends a message to your screen
    function MessageSelf(text)
    objective_text_clear(0)​
    mission_help_table(text, "", "", SYNC_LOCAL)​
    end
    ------------------------------------------------------------
    Weapon Names:
    Thrown:
    grenade
    molotov
    pipe_bomb
    flashbang
    satchel
    satchel_barrel

    Pistols:
    glock
    beretta
    magnum
    desert eagle
    Holt_55

    SMGs:
    tec9
    SKR-9
    Gal43

    Shotguns:
    twelve_gauge
    pump_action_shotgun
    bean_bag_gun
    AS14
    XS-2
    pimpcane
    Rifles:
    ak47
    m16
    AR50
    AR200

    Ranged:
    minigun
    rpg_launcher
    flamethrower
    mcmanus2010
    rpg_annihilator
    AR50_launcher
    fireext
    AR200_ss03

    Melee:
    samurai_sword
    shock_paddles
    pepper_spray
    machete
    butterfly_knife
    pimp_slap
    sledgehammer
    stun_gun
    tire_iron
    nightstick
    knife
    baseball_bat
    chainsaw
    dual_swords

    Misc:
    video_camera
    pcp
    large_softdrink
    40oz
    Detonator
    giegerCounter
    pyroBox
    ------------------------------------------------------------
    Costume Names:
    Police Outfit
    Suit 1
    Sexy 1
    Street 1
    Crazy 1
    Repair
    Streaker
    Suit Purple Man
    Suit Purple Woman
    Fire Fighter 1
    Pimp 1
    Fire Suit
    Fire Fighter
    Prision
    Pirate
    Cat
    Evil Doctor
    Slasher 1
    Hippie
    Barbershop
    Construction
    Hazmat
    Clown
    Mime
    Japanese Streaker Male
    Japanese Streaker Female


    My sr2_city.lua file
     
    • Like Like x 5
  2. CRACKbomber

    CRACKbomber Resident Xbox Guru XPG Developer
    25/47

    Joined:
    Sep 12, 2011
    Messages:
    276
    Likes Received:
    235
    Trophy Points:
    25
    Gender:
    Male
    Location:
    Michigan
    Console:
    Xbox
    300 views, and no comments lolz thanks guys.
     
  3. sensi420

    sensi420 Contributor TeamXPG
    205/282

    Joined:
    May 20, 2012
    Messages:
    2,535
    Likes Received:
    5,093
    Trophy Points:
    205
    Location:
    In your kitchen drinking your MILK!!!
    Console:
    Xbox
    Nice Tutorial CRACKbomber
     
  4. K Ron Spliffs

    K Ron Spliffs Mr. GreenThumb
    45/47

    Joined:
    Apr 18, 2010
    Messages:
    605
    Likes Received:
    190
    Trophy Points:
    45
    Gender:
    Male
    Console:
    Xbox
    I would try this out, but I don't have SR2.
    I know you do good work though CRACKbomber.
    Will probably pick it up later.
     
  5. I3RUTALITY

    I3RUTALITY Newbie
    0/47

    Joined:
    Dec 9, 2012
    Messages:
    28
    Likes Received:
    2
    Trophy Points:
    0
    Console:
    Xbox
    Woah, i was just about to look into saints row modding today and then this comes out. You sir are a hero.
     
    • Like Like x 1
  6. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    Joined:
    Oct 31, 2011
    Messages:
    3,694
    Likes Received:
    3,124
    Trophy Points:
    0
    Gender:
    Male
    Location:
    In a Field of Green
    Console:
    Xbox
    Very nice work there CRACKbomber ;)

    just have to say I really dig the sharing of full modding methods/tutorials like this, mods and files can be shared but passing on knowledge is what makes the world go 'round , so big +rep and thanks for that!!
     
    • Like Like x 1
  7. I3RUTALITY

    I3RUTALITY Newbie
    0/47

    Joined:
    Dec 9, 2012
    Messages:
    28
    Likes Received:
    2
    Trophy Points:
    0
    Console:
    Xbox

    you packed a .vpp_pc not an xbox file, im guessing that doesnt matter right? Just replace it in wx360 after
     
  8. CRACKbomber

    CRACKbomber Resident Xbox Guru XPG Developer
    25/47

    Joined:
    Sep 12, 2011
    Messages:
    276
    Likes Received:
    235
    Trophy Points:
    25
    Gender:
    Male
    Location:
    Michigan
    Console:
    Xbox
    No... -bc creates big endian compressed data.
     
  9. go

    godzhand Newbie
    0/47

    Joined:
    Jan 6, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    ...
     
  10. CRACKbomber

    CRACKbomber Resident Xbox Guru XPG Developer
    25/47

    Joined:
    Sep 12, 2011
    Messages:
    276
    Likes Received:
    235
    Trophy Points:
    25
    Gender:
    Male
    Location:
    Michigan
    Console:
    Xbox
    I don't have Saint's Row 1, so I don't think I will be messing with it anytime soon.
     
  11. go

    godzhand Newbie
    0/47

    Joined:
    Jan 6, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    ....
     
  12. super geek no 1

    super geek no 1 SG-1 Always No.1
    35/47

    Joined:
    Oct 26, 2010
    Messages:
    537
    Likes Received:
    58
    Trophy Points:
    35
    Gender:
    Male
    Location:
    London
    Console:
    Xbox
    Dude thanks for the share will give it a test tonight and share my findings as to mp. +rep
     
  13. StuartB

    StuartB Lifetime Gold Lifetime Gold
    0/47

    Joined:
    Aug 13, 2011
    Messages:
    129
    Likes Received:
    8
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Scotland
    Console:
    Xbox
    This looks nice thanks for this, it looks abit like the way GTA IV scripts are coded so I might try this out.
    Is the lua file you provided modded?
     
  14. super geek no 1

    super geek no 1 SG-1 Always No.1
    35/47

    Joined:
    Oct 26, 2010
    Messages:
    537
    Likes Received:
    58
    Trophy Points:
    35
    Gender:
    Male
    Location:
    London
    Console:
    Xbox
    The file provided is modded
     
  15. CRACKbomber

    CRACKbomber Resident Xbox Guru XPG Developer
    25/47

    Joined:
    Sep 12, 2011
    Messages:
    276
    Likes Received:
    235
    Trophy Points:
    25
    Gender:
    Male
    Location:
    Michigan
    Console:
    Xbox
    Yes it is premodified with a multilevel menu example.
     
  16. go

    godzhand Newbie
    0/47

    Joined:
    Jan 6, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    just too bad we cant do this with saints row 1...:(
     
  17. super geek no 1

    super geek no 1 SG-1 Always No.1
    35/47

    Joined:
    Oct 26, 2010
    Messages:
    537
    Likes Received:
    58
    Trophy Points:
    35
    Gender:
    Male
    Location:
    London
    Console:
    Xbox
    My findings works perfectly on single player. Crack could you please make a config list for mods in the pre-modded file. Also mods don't work on Multiplayer. Could you please see if you can add the cash mod to MP Thank you very much.
     
  18. Ke

    Keyflamer Newbie
    0/47

    Joined:
    Jan 12, 2013
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    0
    Console:
    Xbox
    Hey can you please explain how to use and the controls for each menu in the game included in that example sr2_city.lua you included in this thread. I am trying it out on my x360key but I am confussed on how to use the mods.
     
  19. super geek no 1

    super geek no 1 SG-1 Always No.1
    35/47

    Joined:
    Oct 26, 2010
    Messages:
    537
    Likes Received:
    58
    Trophy Points:
    35
    Gender:
    Male
    Location:
    London
    Console:
    Xbox
    Please could you write out a button list for the pre-modded files provided and could you possible look at MP to see if the money bind would be able to be added. Thanks for you time
     
  20. keyring90

    keyring90 Newbie
    0/47

    Joined:
    May 8, 2011
    Messages:
    196
    Likes Received:
    60
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Snap City
    Console:
    Xbox
    Anyway to get god mode from this mod?
     

Share This Page

Close