13k / dota2-tools-proton

Run Dota 2 Workshop Tools using Proton
MIT License
2 stars 1 forks source link

Tutorial on how to use #1

Open CrafterSvK opened 1 year ago

CrafterSvK commented 1 year ago

Hello, I've been checking your repo, but I really don't know how to use it, I compiled the binary, but the usage is little tricky, can you help me please?

13k commented 1 year ago

I was using for personal purposes, so I didn't write any instructions, sorry about that.

A disclaimer (that I also didn't write) is that this project doesn't actually run apps in the SDK suite, like the Hammer editor, asset manager, etc. It just runs the resourcecompiler.exe that the SDK uses to compile Source2 assets. For my personal workflows, it was enough, where creating/updating maps is a rare occurrence.

That being said, this project, as a standalone project, is not quite so useful if you only run Linux. It needs the Dota 2 Workshop Tools files that are only available on Windows (the Workshop Tools DLC includes not only SDK tools, like the compiler, but also a lot of assets and scripts that are needed to build custom games).

If you have a dota2 install for Windows, with workshop tools installed, then you can install Proton on the Linux steam library and use options --steam-path pointing to the Linux install (usually ~/.local/share/Steam) and --game-path pointing to the Windows install.

After that, it should be the same as manually compiling custom games on Windows: custom game files in game/dota_addons/<custom_game_name> and content/dota_addons/<custom_game_name>, within game-path, then using d2tp [options] compile <resourcecompiler args...>.

Needless to say, this requires familiarity with resourcecompiler's options and usage.

If you don't have Windows, then you might want to check dota2-tools instead, that will run a docker container with steamcmd and will download the workshop tools. That project complicates the setup even more, so being familiar with docker containers and volumes is required and also running docker containers with GPU support (because resourcecompiler uses, or at least initializes, Direct3D), which is not easy to setup.

It's also possible to avoid using docker if you install steamcmd natively, install dota2 for windows and then use d2tp pointing to that install path.

13k commented 1 year ago

With all above said, I'd say it's probably easier to setup a VM with Windows, install dota2+workshop tools and run the whole thing in it.

I wouldn't recommend the pure-Linux workflow, specially with docker. It's too convoluted, very hard to setup and loses the integrated setup that is running the SDK tools on Windows.

After spending too much time trying to simply install the Workshop Tools DLC with steamcmd, I almost gave up but had to see if it was possible to at least compile resources, which is.

I did not try to run Hammer or the Workshop Tools app (dota2cfg.exe) with Proton, but if it works, maybe then it's a viable option.