Linux version and mods

Forum for discussing the Torchlight single-player game.

Linux version and mods

Postby borsook » Wed Sep 19, 2012 12:27 pm

So far I cannot run any mods with the Linux version. Did anyone manage to do it?
borsook
 
Posts: 27
Joined: Fri Nov 06, 2009 7:51 am

Re: Linux version and mods

Postby Hyeron » Thu Sep 20, 2012 9:46 am

Been fiddling around a bit trying to achieve that too.

First the bad news: ~/.runicgames/Torchlight/Mods simply doesn't work. Either you leave the filenames alone and they have no effect, or you rename mod files and folders to uppercase and the game doesn't seem to understand what you're trying to do, the log shows it doesn't find the files anymore and you get sweet "missing texture" textures and other atrocities.

Then the good news: just unzip pak.zip, merge the files, zip pak.zip again, then launch the game. Tadaa! Mods active.

Then more bad news: even retexturing mods (SSSSkinsNarmor) don't fix the "missing heads". Any update will force you to unzip/merge/zip again. But oh well. At least it works.

Cheers.
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby borsook » Thu Sep 20, 2012 10:02 am

Hyeron wrote:Been fiddling around a bit trying to achieve that too.

First the bad news: ~/.runicgames/Torchlight/Mods simply doesn't work. Either you leave the filenames alone and they have no effect, or you rename mod files and folders to uppercase and the game doesn't seem to understand what you're trying to do, the log shows it doesn't find the files anymore and you get sweet "missing texture" textures and other atrocities.

Then the good news: just unzip pak.zip, merge the files, zip pak.zip again, then launch the game. Tadaa! Mods active.

Then more bad news: even retexturing mods (SSSSkinsNarmor) don't fix the "missing heads". Any update will force you to unzip/merge/zip again. But oh well. At least it works.

Cheers.

Thanks a lot! Is this the situation still present with today's build? Did you test it?
borsook
 
Posts: 27
Joined: Fri Nov 06, 2009 7:51 am

Re: Linux version and mods

Postby Hyeron » Thu Sep 20, 2012 10:17 am

All my tests were done on today's build, indeed. :)
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby borsook » Thu Sep 20, 2012 10:28 am

Hyeron wrote:All my tests were done on today's build, indeed. :)

That's too bad, I was hoping that it fixed something... Anyway thanks for all the info!
borsook
 
Posts: 27
Joined: Fri Nov 06, 2009 7:51 am

Re: Linux version and mods

Postby Hyeron » Thu Sep 20, 2012 10:56 am

Yeah, I hope it gets sorted out. That and those heads. :D

Anyway, the weird thing is: the log complains - or, rather, the game doesn't load anything - if the files and folders aren't in uppercase (in ~/.runicgames/Torchlight/Mods) then negates their existence when you rename everything (truncating the file extension by one letter, e.g. calling automapoverlay.dds AUTOMAPOVERLAY.DD), then if you further modify the files to stick with the conventions found in the log, it goes back to the start again: not using the files. Batsh*t insane. :mrgreen:

In the meantime, ugly workaround is ugly, but ugly workaround is functional. :lol:
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby jardasmid » Sat Sep 22, 2012 12:01 pm

Can you give step by step instructions, how did you make mods work? I tried packing the files into pak.zip, but no luck. Here is what I tried:

  • I extracted the mod into .runicgames/Torchlight/Mods and made the mod's directory uppercase (since the game writes uppercase name into mods.dat later on)
  • I ran the game, the game creates 3 files in Torchlight/Mods directory (mods.dat, mods.dat.adm, mods.dat.ADM) and 4 files in Torchlight directory (massfile.dat, massfile.dat.ADM, masterresourceunits.dat and masterresourceunits.dat.ADM)
  • I quit the game
  • Packed the media directory of the mod into pak.zip
  • Ran the game

No mods work. Then I tried again, but packed massfile.dat.ADM and masterresourceunits.dat.ADM into the archive too (masterresourceunits.dat.ADM renamed to uppercase and that replaced the two original files in the archive). This didn't work too.

Then I removed the mod from Mods directory and all the generated files. No luck again.

I also tried renaming everything to lowercase, uppercase, first letter uppercase. I also tried all possible symlinks and neither did work.

My last try was creating a file, creating vfat filesystem there and mounting it to .runicgames/Torchlight directory, that it would hopefully solve letter case issues, but nope, it didn't and mods don't work anyway.
jardasmid
 
Posts: 12
Joined: Wed Sep 19, 2012 9:57 am

Re: Linux version and mods

Postby frostschutz » Sat Sep 22, 2012 12:30 pm

What you can do is create a VFAT filesystem, mount that somewhere.

Install Torchlight there, and move your ~/.runicgames folder there too (symlink).

VFAT is case insensitive even under Linux. So that at least helps with Torchlight not finding files because they are spelled different (it looks for mods in all upper case etc.).

Unfortunately that alone does not seem to fix mods, at least not the one I tried with (Fackelschein German translation). Whatever is causing the filename uppre/lowrecase confusion, it'll have to be fixed by Runic I guess.
User avatar
frostschutz
 
Posts: 50
Joined: Thu Sep 29, 2011 1:50 pm

Re: Linux version and mods

Postby Hyeron » Sun Sep 23, 2012 8:39 am

I didn't change filenames. At all. On any mods. Thing is, you just unzip the pak and stuff everything "as is" in there. All mods are in a "media" folder, the very same as the pak file. Just merge everything, putting the media in media (not .../media/media, just /media/whateverthesubfoldersaresuchasUI), zip again, replace the original and it runs.

Or rather, runs MORE OR LESS.

After further testing this weekend it looks like only some mods get to work. SSS Textures, for example, or the TL2 pets. On the other hand, I had no luck with Merchant Pack or the classes mods. The game simply ignores them, even when they're merged correctly. Still trying to figure out why the hell that is (especially as TL2 pets modifies the GUI and adds meshes etc. the same way the classes do. It's one big WTF). Even stranger: it seems the mac version shares a part of this problem. Except their workaround doesn't work with us. :P

Image
^ Example. Scratched Metal HUD, SSS Textures, Darnified automap, TL2 Pets all worK :P
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby atlashugged » Sun Sep 23, 2012 9:02 am

Can someone explain the pak.zip to me? No matter what I do, torchlight won't create it on it's own, so I tried making one myself, but it's not recognizing it.
User avatar
atlashugged
 
Posts: 3
Joined: Sun Sep 23, 2012 8:41 am

Re: Linux version and mods

Postby Hyeron » Sun Sep 23, 2012 9:11 am

If you don't have the pak.zip, the game doesn't run. It's there. In your installation folder. Hopefully you didn't go and stuff it in the system directories. :lol:

e.g. On my computer, the game is installed in ~/games/Torchlight - the pak.zip is here: ~/games/Torchlight/pak.zip :P
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby atlashugged » Sun Sep 23, 2012 9:37 am

Hyeron wrote:If you don't have the pak.zip, the game doesn't run. It's there. In your installation folder. Hopefully you didn't go and stuff it in the system directories. :lol:

e.g. On my computer, the game is installed in ~/games/Torchlight - the pak.zip is here: ~/games/Torchlight/pak.zip :P


Ah. Unfortunately I installed it through the Ubuntu Store, which for some reason I don't fully understand likes to install things like this in a system directory (/opt/torchlight). I found the pak.zip there. The mod folder is in my home directory though (/home/.runicgames/Torchlight/Mods)
User avatar
atlashugged
 
Posts: 3
Joined: Sun Sep 23, 2012 8:41 am

Re: Linux version and mods

Postby Hyeron » Sun Sep 23, 2012 9:54 am

That's right. But unless for some unfathomable reason the mods work on Ubuntu, you'll have to mess with the INSTALL folder (/opt/torchlight). :P
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby atlashugged » Sun Sep 23, 2012 10:13 am

Thanks. Merged the zip, and now custom classes are showing up, with some random crashes, but it's an improvement! Oh, and missing heads now.
User avatar
atlashugged
 
Posts: 3
Joined: Sun Sep 23, 2012 8:41 am

Re: Linux version and mods

Postby Hyeron » Sun Sep 23, 2012 11:18 am

atlashugged wrote:Thanks. Merged the zip, and now custom classes are showing up, with some random crashes, but it's an improvement! Oh, and missing heads now.

Missing heads seem to be the number one issue for... well, almost everyone. Cheers. :D
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby Lysius » Sun Sep 23, 2012 11:54 am

I tried to get Enchents Never Wipe. This is a real simple mod. Just one dat file altered.
When just copying into the Mods directory, nothing happened.
When I renamed the top level directory of the Mod to "ENCHANTNEVERWIPE", the mod.dat got compiled into MOD.DAT.adm and a warning in the game told me that mods had changed, but the mod did not take effect.
When I also renamed "media" to "MEDIA" the game just crashed when starting.
I resorted to install Torchlight in Wine, install the mod there, start the game to get the GLOBALS.DAT compiled into GLOBALS.DAT.adm and integrate that into pak.zip. Now it seems to work. But that hack is really ugly.

Is there a way to generate the adm file without using wine?

EDIT: I'm having some problems properly decompressing and recompressing the pak.zip. When I do that, the town portal is no longer displayed in town. Anybody can imagine what can go wrong in the process?
User avatar
Lysius
 
Posts: 6
Joined: Sun Sep 23, 2012 12:25 am

Re: Linux version and mods

Postby Hyeron » Sun Sep 23, 2012 8:48 pm

Whoa, so it would only be a matter of having the adm files? Will have to try the classes mods again. :lol:
I haven't seen the Linux version generate the adm either though, I suppose I have to resort to Wine for that too. Guess that's another bug to send to Runic. :)
User avatar
Hyeron
 
Posts: 9
Joined: Thu Sep 20, 2012 9:41 am

Re: Linux version and mods

Postby Lysius » Mon Sep 24, 2012 11:08 pm

Still the same with Build 2012-09-24
User avatar
Lysius
 
Posts: 6
Joined: Sun Sep 23, 2012 12:25 am

Re: Linux version and mods

Postby jardasmid » Tue Sep 25, 2012 3:46 am

I am gonna test new torchlight build if it still crashes at one point for me. If it does, I will play till the end. If it doesn't, I will make modding tool I guess. I found dat->adm adm->dat tool here on forums somewhere. It does make assumptions that wchar_t is 2B, I am gonna fix that and use C++11's char16_t instead and make few adjustments. Then I need to find how to make LAYOUT.ADM.cmp files (guess compressed ADM file?). When that is done I will make modding tool that generates ADM and CMP files for mods in case-insensitive manner (which will be stored outside of normal Mods directory though), then it merges them to massfile.dat.adm and massresources.dat.adm together with original files from pak.zip (which will be backed up). That way, mods will hopefully work.
(I guess the important part is not ADM files for each DAT file, it's the massfile.dat.adm and massresources.dat.adm the game reads and those individual .dat.adm files just seem to be in the archive so the game can generate them again from them.)
But I am not promising it will be done now, if the game will work now, i will play it to end before I start modding and thus be in the need of modding tool ^^
jardasmid
 
Posts: 12
Joined: Wed Sep 19, 2012 9:57 am

Re: Linux version and mods

Postby jardasmid » Thu Sep 27, 2012 4:45 am

So I have some news about my modder thing. I have more or less working prototype and the mods I tested seem to work:
RespecMod, Enchantress class mod, Valkyrie2 class mod, Enhanced Mastery, TheHerosLegecy

It looks like those mods work even without creating the LAYOUT.CMP files, so I might not have to figure out this format, which seems great. My testing was not that thorough, so issues might appear later. Also I made my modder to name everything uppercase, but the game doesn't load textures unless "media" directory is lowercase, so I will have to tune the code to comply with this, for now I must manually rename it to lowercase after my modder creates the output directory. Generated MASSFILE.DAT.ADM and MASTERRESOURCEUNITS.DAT.ADM seems to contain the same entries as the original game data when I use only them, so I hope this works ok.

Before publishing it here, I will tune up the file-case things and I want it to create the zip archive on the fly, instread of copying everything to output directory and zipping it manually afterwards - it's slow. Then I need to test if the mods really work 100% even without LAYOUT.CMP files (or maybe I will let users test it), then probably release it to public. Then eventually I want it to read mods and original game data from zip archives, so no extracting-data-first would be needed.

I just hope this all is not in vain and that devs won't fix the mods issue too early LOL. And if they do, I will have some modding tools for linux at least (dat2adm, adm2dat ^^).

So if everything goes well, expect this around next weekend.

Edit:
Ok, here it comes: https://www.abclinuxu.cz/data/prilohy/0/8/192180-tlmodder-tar-4294917736421692473.bz2
See README for how to compile, use and stuff.

Edit:
New version with bugfixes and thread about tlmodder: http://forums.runicgames.com/viewtopic.php?f=20&t=42338
jardasmid
 
Posts: 12
Joined: Wed Sep 19, 2012 9:57 am


Return to Torchlight Win/Mac/Linux Discussion

Who is online

Users browsing this forum: No registered users and 2 guests