Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

Generate DAT files for items in torchlight 2

http://torchmodders.com/forums/tips-tools/(request)-item-unit-file-maker-script-624/?topicseen
<http://torchmodders.com/forums/tips-tools/(request)-item-unit-file-maker-script-624/?topicseen>

## BETA!!
## BETA

v0.9.2

Releases: https://github.com/RobJames-Texas/TL2_ItemDatMaker/releases
Releases: <https://github.com/RobJames-Texas/TL2_ItemDatMaker/releases>

Written in dot net core with Visual Studio 2017.

### Usage:
### Usage

#### Stand Alone versions:
#### Stand Alone versions

* Windows 7 and up 32/64bit **"TL2_ItemDatMaker.exe"**
* OSX 10.10 x64 and up **"TL2_ItemDatMaker"**
- Windows 7 and up 32/64bit **"TL2_ItemDatMaker.exe"**
- OSX 10.10 x64 and up **"TL2_ItemDatMaker"**

Either with the options below, *or* drag the mesh file in your mod folder over the executable and the application will ask for the rest of the options.
Either with the options below, _or_ drag the mesh file in your mod folder over the executable and the application will ask for the rest of the options.

#### options:
#### options

-m | --3dmodel Meshfile and full path. (required)
-r | --itemrarity Item Rarity: Normal, Magic (Blue), Unique or Legendary. (required)
Expand All @@ -32,6 +32,6 @@ Either with the options below, *or* drag the mesh file in your mod folder over t

Release notes:

* v0.9.2 -- Changed spaces to tabs in output DAT files. Updated nuget packages and unit tests. Updated to dot net core 2.1.
* v0.9.1 -- Corrected output file encoding. Removed extension from the string for the meshfile.
* v0.9.0 -- Initial release.
- v0.9.2 -- Changed spaces to tabs in output DAT files. Updated nuget packages and unit tests. Updated to dot net core 2.1.
- v0.9.1 -- Corrected output file encoding. Removed extension from the string for the meshfile.
- v0.9.0 -- Initial release.
4 changes: 2 additions & 2 deletions TL2_ItemDatMaker/Components/UnitType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ private UnitType(string type, string meshFolder, string unitFolder, string baseF

public static UnitType GetByMeshFolder(string meshFolder)
{
return UnitType.List().Where(u => u.MeshFolder == meshFolder.ToUpper()).FirstOrDefault();
return UnitType.List().Where(u => u.MeshFolder == meshFolder.ToUpperInvariant()).FirstOrDefault();
}

public static IEnumerable<UnitType> List()
{
return new UnitType[]
return new []
{
Axes,
Bows,
Expand Down
2 changes: 1 addition & 1 deletion TL2_ItemDatMaker/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
public static class Constants
{
public static string Tab = $@"{"\t"}";
public readonly static string Tab = $@"{"\t"}";
}
}
4 changes: 2 additions & 2 deletions TL2_ItemDatMaker/Models/PathInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public PathInfo(string fullPath)
throw new ArgumentException("Invalid File");
}

List<string> folders = Path.GetDirectoryName(fullPath).ToUpper().Split(Path.DirectorySeparatorChar).ToList();
List<string> folders = Path.GetDirectoryName(fullPath).ToUpperInvariant().Split(Path.DirectorySeparatorChar).ToList();
int index = folders.IndexOf("MEDIA");

Root = String.Join(Path.DirectorySeparatorChar.ToString(), folders.Take(index));
Expand All @@ -40,7 +40,7 @@ public PathInfo(string fullPath)
throw new ArgumentException("Invalid Item Type Path");
}

BaseDatPath = string.Join(Path.DirectorySeparatorChar.ToString(), new string[] { "MEDIA", "UNITS", "ITEMS" });
BaseDatPath = string.Join(Path.DirectorySeparatorChar.ToString(), new [] { "MEDIA", "UNITS", "ITEMS" });

}

Expand Down
2 changes: 1 addition & 1 deletion TL2_ItemDatMakerTests/PathInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PathInfoTests
[TestMethod]
public void ShouldFillInWithStaffPropertiesWhenPathIsGood()
{
// ".\MEDIA\MODELS\WEAPONS\_STAVES\staff_model_01.MESH";
// Example: ".\MEDIA\MODELS\WEAPONS\_STAVES\staff_model_01.MESH"
List<string> pathParts = new List<string>
{
".",
Expand Down