Loading and saving mods: Integrated?

XanderXander Posts: 410
edited September 2009 in General Modding
When you export a modified version of the game, is it all packed in one file or a folder with other sub folders for the assets? Further, will the game make it simple to load mods (with say, a mod browser)? Lastly, can you "lock" a mod so that other users can't modify it themselves?


Thanks!
hereo.png
«1

Comments

  • Sorry for the long delay in responding here. :oops:

    Ok so, this is how it works. We have a mod directory. In that directory is a file that lists the mods you want to load. It also lists them in a specific order. The order is very important. Then whenever the game asks for a file or a group of files it does a waterfall for that given file starting with the mods specified in the mod file. Meaning if I wanted to say modify the warrior's config file I would place it in my specific mod, relative to the original files location in the game. Meaning....

    Original file located at: media/units/players/warrior/warrior.dat
    Mod File located at: mods/marshmod/media/units/players/warrior/warrior.dat

    Now this is the important part about the order of mod's and what I mean by a waterfall when choosing files. So now if you add say a whole slew of mods and the game internally attempts to load the warrior.dat file, the game would check the first mod, if the file is there, loads it and it's done. However if the file isn't there, it goes to the next mod and looks for it. If it's not there it will eventually just load the original warror.dat.

    In a lot of cases it just loads all the files in a directory. When this happens it still does the waterfall effect per file, but also will load any additional files you might of added to that directory. For example this is how we add units in the game. You simply create the unit file( via the editor) place it in a directory and in theory it will load in the game.

    As for people modifying your mods. Yeah they will be able to.

    Also, this might change a bit by release. We are going to attempt to have all mods in a zip. So you simply pass along a zip to people, they put it in the mod directory and they are done - now that's fingers crossed kind of stuff though. :D
  • AttackGorillaAttackGorilla Posts: 1,656
    Nevermind, I get it. I missed the part about being able to load multiple mods stacked at once (that is awesome).

    originally wrote:
    Wait. So if I have 2 mods and the one I am loading doesn't have its own warrior model but the other one does, then it will load the second mod by default rather than the original warrior model from the original game? Why wouldn't it immediately return to the home directory after searching the mod folder you selected?
  • WebbstreWebbstre Posts: 7,231 ✭✭✭
    What happens if two mods have modified warrior mod files? Does one of them get canceled out?
    Administrator/Former Owner of Runic Games Fansite. Be sure to visit RGF for all your Torchlight series needs![/color] Don't forget to check out ModDrop as a one stop solution for installing and sharing mods easily!
  • MystiqueMystique Posts: 462
    From what I understand with the waterfall effect, it would load the first and ignore the 2nd. Just what I get from reading that. I think it sounds pretty cool... also guessing that if you have 3 different mods in that you can load just 1 and completely ignore the other 2?
    Charmed & Dangerous
    Varrah.gif
  • XanderXander Posts: 410
    Bebop wrote:
    Sorry for the long delay in responding here. :oops:

    Ok so, this is how it works. We have a mod directory. In that directory is a file that lists the mods you want to load. It also lists them in a specific order. The order is very important. Then whenever the game asks for a file or a group of files it does a waterfall for that given file starting with the mods specified in the mod file. Meaning if I wanted to say modify the warrior's config file I would place it in my specific mod, relative to the original files location in the game. Meaning....

    Original file located at: media/units/players/warrior/warrior.dat
    Mod File located at: mods/marshmod/media/units/players/warrior/warrior.dat

    Now this is the important part about the order of mod's and what I mean by a waterfall when choosing files. So now if you add say a whole slew of mods and the game internally attempts to load the warrior.dat file, the game would check the first mod, if the file is there, loads it and it's done. However if the file isn't there, it goes to the next mod and looks for it. If it's not there it will eventually just load the original warror.dat.

    In a lot of cases it just loads all the files in a directory. When this happens it still does the waterfall effect per file, but also will load any additional files you might of added to that directory. For example this is how we add units in the game. You simply create the unit file( via the editor) place it in a directory and in theory it will load in the game.

    As for people modifying your mods. Yeah they will be able to.

    Also, this might change a bit by release. We are going to attempt to have all mods in a zip. So you simply pass along a zip to people, they put it in the mod directory and they are done - now that's fingers crossed kind of stuff though. :D

    Oh, no problem for the delay, I'm glad you dug up the topic to begin with. Basically, I was asking because it hadn't been addressed and seemed like a potentially enlightening question, especially when looking at how differently other games with mod tools organize and enable mods (such as Oblivion, Neverwinter Nights, or even UT2004). As Fate's modding was primarily done with swapping original files and editing original settings, I'm glad to see some progress on this front. I'm also glad you've stated that last portion, because the easier to install, the better. If they were functional inside a .zip (any plans for .rar? I know that's stretching it.) and unpacked at launch, the fansites wouldn't have to worry about people being in the dark about extracting everything to the right place.

    Would a mod-loader, at least in concept, be hard to design for the folks at runic (I.E. Something to enable and disable separate mods without unloading them from within the Torchlight folder manually)? I assume, this would make it easier to error-testing with other mods, because in my experience with games like Oblivion, after a few mods are loaded you'll be lucky if that all work peachy together. Of course, I assume Oblivion is more complex than Torchlight, with more things to worry about being incompatible. There is also the possibility that you've already enabled something similar within the editor for testing purposes.

    Further, as Webbstre pointed out, what if two mods contain the same warrior.dat file? Which one would it selectively load?

    On another note: This is getting me pumped, because I imagine modding-packs that include many new character classes. Imagine a mod adding upwards of 20 to 30 classes, each individually created by some one or a team. it would be quite amazing to see that kind of variety, especially with good fan site support. Granted it would probably take quite some time to get this significant, and item design would be an issue, but the idea is very titillating to say the least. Quality control might be an issue too.
    hereo.png
  • As I understand it, if two mods both affected the same file then the mod listed first would work and the other one would get skipped, at least for that file. As you said, mod packs are a solution to that, it would be pretty easy for someone to merge the changes from both mods into one bigger mod.
  • XanderXander Posts: 410
    Volbard wrote:
    As I understand it, if two mods both affected the same file then the mod listed first would work and the other one would get skipped, at least for that file. As you said, mod packs are a solution to that, it would be pretty easy for someone to merge the changes from both mods into one bigger mod.

    Hmm, I'm skeptical at this method for some instances, but I now understand why the way mods are listed is very important.
    hereo.png
  • GeneGene Posts: 98
    *scratches chin*
    This topic makes me a very happy panda! :D
  • Mystique wrote:
    From what I understand with the waterfall effect, it would load the first and ignore the 2nd. Just what I get from reading that. I think it sounds pretty cool... also guessing that if you have 3 different mods in that you can load just 1 and completely ignore the other 2?

    Close. If you had three mods and they all modified different files it would load all three. If say all three of those mods modified the warrior config, it would only load one. It would choose which one by the mod config file ( which lists the mods in a given order ).
  • Xander wrote:
    Volbard wrote:
    Hmm, I'm skeptical at this method for some instances, but I now understand why the way mods are listed is very important.

    What makes you skeptical?
  • XanderXander Posts: 410
    Bebop wrote:
    Xander wrote:
    Volbard wrote:
    Hmm, I'm skeptical at this method for some instances, but I now understand why the way mods are listed is very important.

    What makes you skeptical?

    I am thinking that picking and choosing between which mods you want by priority might be a hassle because two mods might alter the same core files and if they alter more than a few, it'd be harder to decide which mod you want to load first because you might like X feature of one mod's change to vanilla files, and X other mod's change to another vanilla file, but it would end up loading whatever is first. I know you could technically go in and delete the other's, so it's not that big of a deal. I'm primarily skeptical until I see it in action and utilize it, I'm sure it's the best way to avoid numerous errors.

    Also, I was wondering, if files are named the same in the same location in different mod folders, say a texture resource, will it utilize the first one only and skip over the similarly named one in a different mod, meaning the same first texture is put on different models regardless of the desire to use two separate textures?

    so Mod 1 has
    /data/texture1.bmp

    and Mod 2 has
    /data/texture1.bmp

    If Mod 1 is listed first, and the texture1.bmp is a texture for a shoe, but Mod 2 uses a texture of the same name for say... a helmet, will the shoe's texture be placed on the helmet?


    Granted it'd be pretty poor management to list it that way. I might be a bit below the curve on my understanding of how it works.
    hereo.png
  • MystiqueMystique Posts: 462
    Bebop wrote:
    Mystique wrote:
    From what I understand with the waterfall effect, it would load the first and ignore the 2nd. Just what I get from reading that. I think it sounds pretty cool... also guessing that if you have 3 different mods in that you can load just 1 and completely ignore the other 2?

    Close. If you had three mods and they all modified different files it would load all three. If say all three of those mods modified the warrior config, it would only load one. It would choose which one by the mod config file ( which lists the mods in a given order ).

    Ahh ok, will have to see it in action I suppose :P When I played Diablo 2, I played around 2 or 3 different mods and kept them separate. If I had 3 mods installed, but only wanted to load 1, I would just change that in the config file?
    Charmed & Dangerous
    Varrah.gif
  • TrappskiTrappski Posts: 214
    Xander wrote:
    Would a mod-loader, at least in concept, be hard to design for the folks at runic (I.E. Something to enable and disable separate mods without unloading them from within the Torchlight folder manually)?
    If it's just handling a bunch of folders or perhaps just a config-file it would atleast be pretty easy to create an external third-part mod-chooser.
    Reading here I'm already in the thoughs of making one myself if it seems like it wouldn't be too much hassle. But I need to now how stuff works more exactly first anyway.
    You are likely to be eaten by a grue!
    Proud member of the Runic Games Fansite Staff!
    trappski.png
  • jamesLjamesL Posts: 3,568
    Trappski wrote:
    Xander wrote:
    Would a mod-loader, at least in concept, be hard to design for the folks at runic (I.E. Something to enable and disable separate mods without unloading them from within the Torchlight folder manually)?
    If it's just handling a bunch of folders or perhaps just a config-file it would atleast be pretty easy to create an external third-part mod-chooser.
    Reading here I'm already in the thoughs of making one myself if it seems like it wouldn't be too much hassle. But I need to now how stuff works more exactly first anyway.

    yes, some things should be left to the community
    I don't have a sig
  • hawknhawkn Posts: 8,348
    Remember fate mod mannager? that worked pretty well, but i think fate's mods worked different. (i had to manualy apply waaaaaay too many mods for that game)
    ...I most certainly am not the meanest person on these forums, I defer that position to hawkn. ~ AMB2010
    I7OBI.png
    Runic Games Fansite My Deviant
  • Xander wrote:
    If Mod 1 is listed first, and the texture1.bmp is a texture for a shoe, but Mod 2 uses a texture of the same name for say... a helmet, will the shoe's texture be placed on the helmet?


    Granted it'd be pretty poor management to list it that way. I might be a bit below the curve on my understanding of how it works.

    Actually even without the mods the texture would be placed on the helmet. All resources are placed in unique folders to fix that case. With that said your original concern is going to happen.
  • Trappski wrote:
    If it's just handling a bunch of folders or perhaps just a config-file it would atleast be pretty easy to create an external third-part mod-chooser.
    Reading here I'm already in the thoughs of making one myself if it seems like it wouldn't be too much hassle. But I need to now how stuff works more exactly first anyway.

    Indeed! I hope you do. You could easily make a splash screen that shows which mods you have installed. Make them enabled or disabled and then launch the game.

    AND here is an example of the mods.dat file.
    mods/mods.dat  //file
    [MODS]
    [MOD]
    <INTEGER>PRIORITY:0
    <STRING>DIRECTORY:WarriorMod
    [/MOD]
    [MOD]
    <INTEGER>PRIORITY:1
    <STRING>DIRECTORY:Boss1Mod
    [/MOD]
    [MOD]
    <INTEGER>PRIORITY:-1
    <STRING>DIRECTORY:LevelCurves
    [/MOD]
    [/MODS]
    

    Priority 0 will be the first mod loaded
    Priority -1 makes the mod invalid( won't load )
    Directory is just the folder name

    Also in each mod folder is a mod.dat file. Which has the name of the mod and the author as well as any details the author wanted to add.
    mods/WarriorMod/mod.dat  //file
    [MOD]
    <STRING>NAME:My first mod
    <STRING>AUTHOR:Marsh Lefler
    <STRING>NOTES:This mod does some crazy amazing things
    [/MOD]
    

    Hope somebody uses this. ;)
  • jamesLjamesL Posts: 3,568
    totally awesome ^^^
    this is the kind of detailed information we've been waiting on
    I think we all can now see better how all this is going to work
    thank you so much
    I don't have a sig
  • TrappskiTrappski Posts: 214
    Bebop wrote:
    Trappski wrote:
    If it's just handling a bunch of folders or perhaps just a config-file it would atleast be pretty easy to create an external third-part mod-chooser.
    Reading here I'm already in the thoughs of making one myself if it seems like it wouldn't be too much hassle. But I need to now how stuff works more exactly first anyway.

    Indeed! I hope you do. You could easily make a splash screen that shows which mods you have installed. Make them enabled or disabled and then launch the game.

    AND here is an example of the mods.dat file.
    mods/mods.dat  //file
    [MODS]
    [MOD]
    <INTEGER>PRIORITY:0
    <STRING>DIRECTORY:WarriorMod
    [/MOD]
    [MOD]
    <INTEGER>PRIORITY:1
    <STRING>DIRECTORY:Boss1Mod
    [/MOD]
    [MOD]
    <INTEGER>PRIORITY:-1
    <STRING>DIRECTORY:LevelCurves
    [/MOD]
    [/MODS]
    

    Priority 0 will be the first mod loaded
    Priority -1 makes the mod invalid( won't load )
    Directory is just the folder name

    Also in each mod is a mod.dat file. Which has the name of the mod and the author as well as any details the author wanted to add.
    mods/WarriorMod/mod.dat  //file
    [MOD]
    <STRING>NAME:My first mod
    <STRING>AUTHOR:Marsh Lefler
    <STRING>NOTES:This mod does some crazy amazing things
    [/MOD]
    

    Hope somebody uses this. ;)
    Sweet... This is some great stuff.
    So how exactly does the Priority work?
    I See a -1 in there. would that be a completely disabled mod?
    You are likely to be eaten by a grue!
    Proud member of the Runic Games Fansite Staff!
    trappski.png
  • Trappski wrote:
    I See a -1 in there. would that be a completely disabled mod?

    Yep.
  • XanderXander Posts: 410
    Bebop wrote:
    Trappski wrote:
    I See a -1 in there. would that be a completely disabled mod?

    Yep.

    Wow, easy-peasie
    Writing a manager would be simple!
    hereo.png
  • TrappskiTrappski Posts: 214
    Xander wrote:
    Bebop wrote:
    Trappski wrote:
    I See a -1 in there. would that be a completely disabled mod?

    Yep.

    Wow, easy-peasie
    Writing a manager would be simple!
    Yeah.
    I'm definately gonna work on a mod-handler. :D
    You are likely to be eaten by a grue!
    Proud member of the Runic Games Fansite Staff!
    trappski.png
  • TrappskiTrappski Posts: 214
    Oh yeah... Another quick question about the dat-files.
    Are the variable-types in the file or are they just there for clarification?
    You are likely to be eaten by a grue!
    Proud member of the Runic Games Fansite Staff!
    trappski.png
  • MystiqueMystique Posts: 462
    Bebop wrote:
    Trappski wrote:
    I See a -1 in there. would that be a completely disabled mod?

    Yep.

    That definitely gets rid of some of my concern, thanks! :D
    Charmed & Dangerous
    Varrah.gif
  • Trappski wrote:
    Oh yeah... Another quick question about the dat-files.
    Are the variable-types in the file or are they just there for clarification?

    It is needed. The editor takes care of this for you in almost all cases - except for the mod file.
  • jamesLjamesL Posts: 3,568
    wait,
    if priority is an integer and it can have a value of -1, then that means its a signed int, which means we can't have more than 32767 mods !
    I don't have a sig
  • TrappskiTrappski Posts: 214
    jamesL wrote:
    wait,
    if priority is an integer and it can have a value of -1, then that means its a signed int, which means we can't have more than 32767 mods !
    You do mean that we can have "only" 2147483647 mods right? 16-bit integers as default was a long time ago on standard computers.
    You are likely to be eaten by a grue!
    Proud member of the Runic Games Fansite Staff!
    trappski.png
  • jamesLjamesL Posts: 3,568
    ah, well that's ok them
    I just didn't want to get stuck with that 32767 limitation
    I mean, after all, only 32767 mods ? how lame is that ? :D

    and yes, it has been a LONG time since I've done any C or C++ programming. Borland 3.1 anybody ?
    I've only done Access, Excel, SQL Server, ASP classic and ksh for the last (too many) years; oh, and Autosys (bet no one here has ever heard of that)
    I don't have a sig
  • hawknhawkn Posts: 8,348
    that means there will be a bottom to the dungeons! i bet i can get there first, without cheating! sorry, all this brings back memories of fate...
    ...I most certainly am not the meanest person on these forums, I defer that position to hawkn. ~ AMB2010
    I7OBI.png
    Runic Games Fansite My Deviant
  • XanderXander Posts: 410
    hawkn wrote:
    that means there will be a bottom to the dungeons! i bet i can get there first, without cheating! sorry, all this brings back memories of fate...

    Don't you go trying, I hear a nasty level 100 Travis Baldree is down there!

    Although, I hear if you beat him on **** you unlock the Baldree-mode, which does.... well let me show you in this screenshot:
    baldreemode.jpg

    You should see it on the Vanquisher! :shock:
    hereo.png
«1
Sign In or Register to comment.