katalash / dstools

Level editor for DS1/DS3/Bloodborne/Sekiro
136 stars 13 forks source link

Welcome to DSTools

DSTools is a Unity Editor plugin that aims to create an integrated modding solution for Dark Souls 1 (currently only Prepare to Die Edition is supported), Dark Souls 3, Bloodborne, and Sekiro. Currently the tools support editing existing maps for the games and allow you to move enemies and objects around, but aims to eventually allow the creation of completely new levels.

NOTICE: DSTools is effectively abandoned and no future updates are planned. DSTools is also left in a buggy state where various issues exist for various games. I'm leaving this up, but I don't plan to support issues with DSTools in the future. I am currently working on the successor to DSTools (currently called DS Map Studio) which is a standalone modding toolkit that aims to solve many of the issues of DSTools (and Unity).

Features

Installation and Basic Tutorial

  1. Be warned that a lot of disk space is needed. You'll probably want at least 25GB of storage for DS1 modding and 50GB+ for DS3/Sekiro. This is because all the archives need to be unpacked, unity needs to be installed, and there needs to be room for imported assets cached in Unity.
  2. Join the Souls modding discord (https://discord.gg/mT2JJjx). Trust us, Dark Souls modding is still difficult, and almost all active modders are in this community and are happy to answer questions.
  3. Unpack your game of choice that you are modding. Use UDSFM for DS1:PTDE and UXM for DS3.
  4. Install the latest version of Unity 2019.1 (free edition works and is what I used).
  5. Create a new project WITH the High-Definition RP (Preview) template. Other templates are not supported.
  6. In the new project go to Window->Package Manager and update High Definition RP to the latest version. Older versions cause massive stuttering with complex maps loaded.
  7. Go to Edit->Project settings and in the Editor section set the Asset Serialization Mode to Force Binary. This saves a massive amount of disk space and makes reading and writing assets much faster.
  8. Download the latest release from the releases section (should be a unity package). Import the package with Assets->Import Package.
  9. IF YOU ARE MODDING SEKIRO: DSTools requires an Oodle DLL to decompress Sekiro assets. This isn't distributed for legal reasons but the DLL can be found in the Sekiro game directory. Drag and drop the oocore6 dll file in the Sekiro directory into your Unity asset browser in the editor (any location should be fine) before attempting to import any assets.
  10. Open the tools with Window->Dark Souls Tools. Click on Set Game Root Directory and select the exe of your desired game.
  11. If modding DS1:PTDE, click on Import DS1 UDSFM Textures. This may take some time, and only needs to be done once.
  12. Click on Import Objs, and then Import Chrs. This imports all the models for enemies and objects. Both may take a long time, but only need to be done once per game.
  13. Finally you can try and import a map. Create a new scene or delete all the scene models in the default scene (leave all the volume and light stuff). By default, only the low resolution collision models are loaded because it's much faster and still allows you to see the level and place enemies. If you want to import the high resolution collision models (used for leg IK), you can check Load high resolution collision. If you want to import all the level geometry, check Load Map piece models. Note that importing level geometry takes a long time and requires a lot of space especially for DS3 maps. Note for DS3 if you want map textures, you have to import all the TPFBHD files with Import TPFBHD for the map you want to load BEFORE importing the map. these are located in the map/mXX directory (where mXX is your target map) in your game's root directory. You need to import all 4 files.
  14. Click import map and select a map. For initial testing, m18_01_00_00 is asylum in DS1, and m40_00_00_00 is Cemetary of Ash in DS3.
  15. Try moving an enemy to a new position by clicking on a basic hollow in the viewport and placing it somewhere else.
  16. Click Export Map. Backup files will automatically be created so don't worry about that. Start a new game and you should see your enemy moved.

Dark Souls Modding Crash Course

Once you move an enemy, you may be overwhelmed by the amount of objects and entities in an imported scene, and all the dark souls specific properties. Many things are still unknown, and you are encouraged to experiment around and figure out new things for the community, but here is a basic crash course on some of the things you may encounter.

Game directory structure:

Inside the unpacked game root directory, you will see the following structure for the game's files:

MSB basics

MSB (MapStudio Binary) is the file format for maps in the SoulsBorne games. The format has gone through significant changes throughout the games, but follows the same general structure. MSBs have four (more in DS3) different "sections", all of which are imported and editable in the editor:

You will also encounter parts, which make up the bulk of the map and is the most interesting. Some of the "parts" you may encounter are

There is a LOT I didn't cover here, so feel free to suggest things to add or ask more questions in our modding discord.

Tools and Resources

Here is a list of resources that may be helpful while modding:

FAQ

Q: Why did you use Unity for this?

A: My ambition for this tool is to eventually turn this into a complete solution for creating new levels from scratch. For a modern game like Dark Souls, this requires an end to end pipeline for importing meshes from a 3D program, placing them and enemies in the map, baking light maps, generating navimeshes, making collision, and baking and exporting all of them. Unity provides an extensible, scriptable editor and a lot of features that can help with baking light maps and doing navimeshes. It isn't perfect and it's pretty awkward to make support another game with an engine super different from Unity, but using it has allowed me to do everything I've done much faster than a from scratch solution.

Q: Why isn't Dark Souls II supported?

A: While Dark Souls II's engine is derived from DS1, they made significant changes that makes it quite different from the other games. DS3 in comparision still is similar to DS1 in many ways DS2 is not. DS2 also lacks documentation in the game files that other games had, making figuring out stuff much harder. Also supporting a game in this editor is a LOT of work, and I can't justify the effort to support DS2 enough when I have other things I'm working on (like enabling completely new custom DS1/DS3 maps).

Q: Why is Bloodborne supported then?

A: Bloodborne actually has a lot of documentation left in the game files and its engine is based off of Dark Souls 1. I also have a personal interest in Bloodborne modding, and it's similar to Dark Souls 3 that supporting it is much easier than supporting Dark Souls 2.

Q: Where are the tutorials?

A: I haven't had time to make any, as it's a lot of work and the editor is still undergoing rapid development. The editor is also not super user friendly right now, as so much work has gone into basic functionality. Tutorials are something I would like to do later, but I am busy with development and the editor is rapidly changing as I iterate through things. If you need help (and you probably will), don't be afraid to ask me or other experienced modders in the discord. If you have a good handle on the editor and would like to make tutorials (video or otherwise), it would be greatly appreciated and I will give a shoutout here.

Q: Can I contribute?

A: Absolutely. There's lots of things that can be done to help such as reverse engineering file formats, learning more about the MSB file format by experimenting with unknown fields, making mods to find pain points or bugs, or even writing more tools with C#. If you are proficient in C# and potentially have some Unity experience and want to contribute, ping me on Discord for some ideas of things to do and send me pull requests. I'm open for people with the right skillset to join the project as a core dev as well.

Q: How do I move a bonfire?

A: Bonfires have many hidden points that need to be moved in addition to the bonfire "character". There's a player entity and a spawn point region that needs to be moved as well. Use the inspector to search for these objects and move them to new locations as well.

Copyright:

All editor source code, except for the following exceptions, is Copyright (C) 2019 Katalash. All rights reserved.

DSTools uses Soulsformats by TKGP. Soulsformats is Copyright (C) 2019 TKGP.

DSTools uses MeowDSIO by Meowmaritus. MeowDSIO (and only MeowDSIO under the MeowDSIO directory) is released under the MIT Lisence.

Shoutouts and Credits:

DSTools was made possible by the dedicated members of the Dark Souls modding community including: