1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Jan 21 patch undocumented modding features

Discussion in 'Announcements' started by [V] IdolNinja, Jan 26, 2014.

  1. [V] IdolNinja

    [V] IdolNinja Volition Staff

    There are a few new things in the latest patch that aren't in the patch notes:

    Modded files will now load from a ..\mods subfolder, if present. This is now the preferred method of installation since a player can keep all mods self-contained here so they don't interfere with the vanilla game files in the root.

    ..\mods\tables also works for animation tables just like the old method of ..\tables off the root.

    WARNING! Files in the root will still take load precedence! Make sure to warn users to delete all mods from the root so that they won't inadvertently overwrite the files in memory that are loading from ..\mods!

    --

    The following lua functions are exposed for modders to use:


    Change player height

    player_change_default_size([player], [size], x)

    Example to slightly increase the height for the host player.
    player_change_default_size(LOCAL_PLAYER, 1.1, false)

    Example to slightly decrease the height for the client player.
    player_change_default_size(REMOTE_PLAYER, 0.9, false)

    NOTE: 1.0 is default normal height:


    --
    Slew mode (free camera controlled by either mouse and wasd or the analog sticks on a controller)

    slew_mode([bool])

    Example to turn on slew:
    slew_mode(true)


    --


    NOTE: Not working correctly yet, but feel free to experiment!

    Start a mission

    mission_start([name, x]

    Example to start the first intro mission.
    mission_start("m00", true)

    See the following thread for mission naming/numbering:
    http://www.saintsrowmods.com/forum/threads/mission-names-and-numbering.3223/

    NOTE: Some missions work with some saves, and some don't. We're looking into why.


    --


    NOTE: Not working correctly yet, but feel free to experiment!

    NPC Morph for the player

    player_change_preset([player], [npc])

    Example to morph the host player into Professor Genki:
    player_change_preset(LOCAL_PLAYER, "GenkiGood")

    The following table entries are the list of characters you can use with this function:
    misc_tables.vpp_pc\character.xtbl

    NOTE: Currently using this with Sandbox+ crashes the game. In an early test debug build, I had a similar issue where I had to enable slew mode first, do the morph, then deactivate slew mode. That method doesn't seem to be currently working though. I have only tried it with a couple of npcs though, so feel free to try some out.


    --


    * Any parameters denoted by "x" are something I need to confirm with Mark Allender and Mike Wilson. This Thread will be updated once I know what the bools are for. We are also working to fix the last 2 new functions, and that will likely happen. Also, new build of Sandbox+ is coming shortly with these features.

    * Slew mode is pretty basic, but an actual machinma mode function is also planned for exposure that will allow a player to control the camera with one 360 controller, and the player movement with the other. It also will let you "tag" a moving object (npc, car, etc) and have the camera automatically follow it.
     
    Last edited: Jan 26, 2014
  2. xQd

    xQd Modding patch tester

    So that means I can create a txt file and save it as characters.xtbl,add there only my custom created character entries and just put the file inside \mods w/o any problems,right?
     
  3. [V] IdolNinja

    [V] IdolNinja Volition Staff

    No. It currently works the same way that loading files from the root does. What you are talking about is coming later as part of the sdk.
     
  4. xQd

    xQd Modding patch tester

    And where exactly should I put the "mods" subfolder in?I created one in my SRIV root folder and then moved all my modded files in \mods and it doesn't work.I removed the modded files from the root aswell.
     
  5. [V] IdolNinja

    [V] IdolNinja Volition Staff

    That's exactly where it should go, and is working fine for both me and Minimaul.
     
  6. xQd

    xQd Modding patch tester

    Alright I gotta say that for me this new feature with /mods subfolder doesn't work correctly.

    Turns out,only certain files from /mods subfolder are loaded by my game such as:explosions.xtbl,some files from texture mods.Files such as sr3_city.lua,notoriety and spawn_info xtbl files and much more don't get loaded.
     
  7. [V] IdolNinja

    [V] IdolNinja Volition Staff

    Both sr3_city.lua and the spawn tables are loading fine here from \mods
     
  8. xQd

    xQd Modding patch tester

    Hmm this can't be happening to me only.We need more feedback from other modders too.Until them I'm gonna try and do some things such as verifying game cache and shit like that.
     
  9. hoeward

    hoeward Modding patch tester

    I'll try that @xQd.
    EDIT: works for me.


    I also noticed that sneaky effect when changing my player size:
    [​IMG]
     
  10. Corrodias

    Corrodias Generally Awesome Staff Member

    sr3_city.lua and I think all the other mod files I was using load for me, but cheats.xtbl and tweak_table.xtbl don't load, either from mods\ or mods\tables\.