diff --git a/Novetus/NovetusCore/Classes/Downloader.cs b/Novetus/NovetusCore/Classes/Downloader.cs
index 32919bf..2627e4c 100644
--- a/Novetus/NovetusCore/Classes/Downloader.cs
+++ b/Novetus/NovetusCore/Classes/Downloader.cs
@@ -110,7 +110,7 @@ class Downloader
{
//wait a few seconds for the download to finish
//Thread.Sleep(2000);
- if (/*File.Exists(name)*/ read > 0)
+ if (File.Exists(name) && read > 0)
{
downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(read), 2) + " written (" + read + " bytes)! " + additionalText;
}
diff --git a/Novetus/NovetusCore/Classes/ROBLOXHelpers.cs b/Novetus/NovetusCore/Classes/ROBLOXHelpers.cs
index 21cc354..abb2872 100644
--- a/Novetus/NovetusCore/Classes/ROBLOXHelpers.cs
+++ b/Novetus/NovetusCore/Classes/ROBLOXHelpers.cs
@@ -27,9 +27,8 @@ public enum RobloxFileType
TShirt,
Shirt,
Pants,
- HeadNoCustomMesh,
- //for downloading script assets
- //Script
+ Script,
+ HeadNoCustomMesh
}
#endregion
diff --git a/Novetus/NovetusCore/Classes/RobloxXML.cs b/Novetus/NovetusCore/Classes/RobloxXML.cs
index 85c1a4e..0097665 100644
--- a/Novetus/NovetusCore/Classes/RobloxXML.cs
+++ b/Novetus/NovetusCore/Classes/RobloxXML.cs
@@ -1,5 +1,6 @@
#region Usings
using System;
+using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
@@ -135,7 +136,7 @@ public static class RobloxXML
return "";
}
- private static void DownloadFilesFromNode(string url, string path, string fileext, string id)
+ public static void DownloadFilesFromNode(string url, string path, string fileext, string id)
{
if (!string.IsNullOrWhiteSpace(id))
{
@@ -144,6 +145,10 @@ public static class RobloxXML
try
{
download.InitDownload(path, fileext, "", true);
+ if (download.getDownloadOutcome().Contains("Error"))
+ {
+ throw new IOException(download.getDownloadOutcome());
+ }
}
#if URI || LAUNCHER || CMD || BASICLAUNCHER
catch (Exception ex)
@@ -396,90 +401,6 @@ public static class RobloxXML
return "";
}
- //TODO: actually download the script assets instead of fixing the scripts lol. fixing the scripts won't work anyways because we don't support https natively.
- /*
- public static void DownloadScriptFromNodes(string filepath, string itemClassValue)
- {
- string oldfile = File.ReadAllText(filepath);
- string fixedfile = RemoveInvalidXmlChars(ReplaceHexadecimalSymbols(oldfile));
- XDocument doc = XDocument.Parse(fixedfile);
-
- try
- {
- var v = from nodes in doc.Descendants("Item")
- where nodes.Attribute("class").Value == itemClassValue
- select nodes;
-
- foreach (var item in v)
- {
- var v2 = from nodes in item.Descendants("Properties")
- select nodes;
-
- foreach (var item2 in v2)
- {
- var v3 = from nodes in doc.Descendants("ProtectedString")
- where nodes.Attribute("name").Value == "Source"
- select nodes;
-
- foreach (var item3 in v3)
- {
- string newurl = "assetdelivery.roblox.com/v1/asset/?id=";
- item3.Value.Replace("http://", "https://")
- .Replace("?version=1&id=", "?id=")
- .Replace("www.roblox.com/asset/?id=", newurl)
- .Replace("www.roblox.com/asset?id=", newurl)
- .Replace("assetgame.roblox.com/asset/?id=", newurl)
- .Replace("assetgame.roblox.com/asset?id=", newurl)
- .Replace("roblox.com/asset/?id=", newurl)
- .Replace("roblox.com/asset?id=", newurl);
- }
- }
- }
- }
- catch (Exception ex)
- {
- GlobalFuncs.LogExceptions(ex);
- MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset SDK - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- finally
- {
- doc.Save(filepath);
- }
- }
-
- public static void DownloadFromScript(string filepath)
- {
- string[] file = File.ReadAllLines(filepath);
-
- try
- {
- foreach (var line in file)
- {
- if (line.Contains("www.roblox.com/asset/?id=") || line.Contains("assetgame.roblox.com/asset/?id="))
- {
- string newurl = "assetdelivery.roblox.com/v1/asset/?id=";
- line.Replace("http://", "https://")
- .Replace("?version=1&id=", "?id=")
- .Replace("www.roblox.com/asset/?id=", newurl)
- .Replace("www.roblox.com/asset?id=", newurl)
- .Replace("assetgame.roblox.com/asset/?id=", newurl)
- .Replace("assetgame.roblox.com/asset?id=", newurl)
- .Replace("roblox.com/asset/?id=", newurl)
- .Replace("roblox.com/asset?id=", newurl);
- }
- }
- }
- catch (Exception ex)
- {
- GlobalFuncs.LogExceptions(ex);
- MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset SDK - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- finally
- {
- File.WriteAllLines(filepath, file);
- }
- }*/
-
public static string RemoveInvalidXmlChars(string content)
{
return new string(content.Where(ch => XmlConvert.IsXmlChar(ch)).ToArray());
diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs
index dc5bef0..051fb3f 100644
--- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs
+++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs
@@ -1190,6 +1190,10 @@ public class GlobalFuncs
string id = item.After(peram);
fullname = id + ".png";
}
+ else
+ {
+ return item;
+ }
Downloader download = new Downloader(item, fullname, "", GlobalPaths.AssetCacheDirTextures);
@@ -1224,6 +1228,12 @@ public class GlobalFuncs
if (item.Contains("http://") || item.Contains("https://"))
{
+ string peram = "id=";
+ if (!item.Contains(peram))
+ {
+ return item;
+ }
+
Downloader download = new Downloader(item, name + "Temp.rbxm", "", GlobalPaths.AssetCacheDirFonts);
try
@@ -2468,6 +2478,11 @@ public class GlobalFuncs
Directory.CreateDirectory(GlobalPaths.AssetCacheDirSounds);
}
+ if (!Directory.Exists(GlobalPaths.AssetCacheDirTextures))
+ {
+ Directory.CreateDirectory(GlobalPaths.AssetCacheDirTextures);
+ }
+
if (!Directory.Exists(GlobalPaths.AssetCacheDirTexturesGUI))
{
Directory.CreateDirectory(GlobalPaths.AssetCacheDirTexturesGUI);
@@ -2477,12 +2492,11 @@ public class GlobalFuncs
{
Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts);
}
-
- /*
- if (!Directory.Exists(GlobalPaths.AssetCacheDirScriptAssets))
+
+ if (!Directory.Exists(GlobalPaths.AssetCacheDirAssets))
{
- Directory.CreateDirectory(GlobalPaths.AssetCacheDirScriptAssets);
- }*/
+ Directory.CreateDirectory(GlobalPaths.AssetCacheDirAssets);
+ }
}
// Credit to Carrot for the original code. Rewote it to be smaller.
diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs
index 1f21498..7e783f6 100644
--- a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs
+++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs
@@ -69,7 +69,7 @@ public class GlobalPaths
public static string AssetCacheDirTextures = AssetCacheDir + DirTextures;
public static string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui";
public static string AssetCacheDirScripts = AssetCacheDir + DirScripts;
- //public static string AssetCacheDirScriptAssets = AssetCacheDir + "\\scriptassets";
+ public static string AssetCacheDirAssets = AssetCacheDir + "\\assets";
public static string AssetCacheGameDir = SharedDataGameDir + "assetcache/";
public static string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir;
@@ -78,7 +78,7 @@ public class GlobalPaths
public static string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir;
public static string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/";
public static string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir;
- //public static string AssetCacheScriptAssetsGameDir = AssetCacheGameDir + "scriptassets/";
+ public static string AssetCacheAssetsGameDir = AssetCacheGameDir + "assets/";
#endregion
#region Item Dirs
diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs
index 2a9db34..cd62838 100644
--- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs
+++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs
@@ -1053,6 +1053,7 @@ namespace NovetusLauncher
if (Directory.Exists(GlobalPaths.AssetCacheDir))
{
Directory.Delete(GlobalPaths.AssetCacheDir, true);
+ GlobalFuncs.CreateAssetCacheDirectories();
GlobalFuncs.ConsolePrint("Asset cache cleared!", 3, ConsoleBox);
MessageBox.Show("Asset cache cleared!", "Novetus - Asset Cache Cleared", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml
index 413baf5..ca6846e 100644
--- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml
+++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml
@@ -853,7 +853,7 @@
-
+
diff --git a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs
index a5c3e67..902e7e9 100644
--- a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs
+++ b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs
@@ -1,9 +1,11 @@
#region Usings
using System;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
@@ -357,9 +359,9 @@ public partial class AssetSDK : Form
case RobloxFileType.RBXL:
typeFilter = "Roblox Level (*.rbxl)|*.rbxl|Roblox Level (*.rbxlx)|*.rbxlx";
break;
- /*case RobloxFileType.Script:
+ case RobloxFileType.Script:
typeFilter = "Lua Script (*.lua)|*.lua";
- break;*/
+ break;
default:
typeFilter = "Roblox Model (*.rbxm)|*.rbxm";
break;
@@ -423,12 +425,9 @@ public partial class AssetSDK : Form
case 90:
progressString = "Downloading RBXL Linked LocalScripts...";
break;
- //case 95:
- //progressString = "Fixing RBXL Scripts...";
- //break;
- //case 97:
- //progressString = "Fixing RBXL LocalScripts...";
- //break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.RBXM:
@@ -473,12 +472,9 @@ public partial class AssetSDK : Form
case 90:
progressString = "Downloading RBXM Linked LocalScripts...";
break;
- //case 95:
- //progressString = "Fixing RBXM Scripts...";
- //break;
- //case 97:
- //progressString = "Fixing RBXM LocalScripts...";
- //break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.Hat:
@@ -496,6 +492,9 @@ public partial class AssetSDK : Form
case 75:
progressString = "Downloading Hat Linked LocalScripts...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.Head:
@@ -505,6 +504,9 @@ public partial class AssetSDK : Form
case 0:
progressString = "Downloading Head Meshes and Textures...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.Face:
@@ -514,6 +516,9 @@ public partial class AssetSDK : Form
case 0:
progressString = "Downloading Face Textures...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.TShirt:
@@ -523,6 +528,9 @@ public partial class AssetSDK : Form
case 0:
progressString = "Downloading T-Shirt Textures...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.Shirt:
@@ -532,6 +540,9 @@ public partial class AssetSDK : Form
case 0:
progressString = "Downloading Shirt Textures...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
}
break;
case RobloxFileType.Pants:
@@ -541,18 +552,20 @@ public partial class AssetSDK : Form
case 0:
progressString = "Downloading Pants Textures...";
break;
+ case 95:
+ progressString = "Downloading extra assets...";
+ break;
+ }
+ break;
+ case RobloxFileType.Script:
+ //script
+ switch (percent)
+ {
+ case 0:
+ progressString = "Fixing Script...";
+ break;
}
break;
- /*
- case RobloxFileType.Script:
- //script
- switch (percent)
- {
- case 0:
- progressString = "Fixing Script...";
- break;
- }
- break;*/
default:
progressString = "Idle";
break;
@@ -561,17 +574,177 @@ public partial class AssetSDK : Form
return progressString + " " + percent.ToString() + "%";
}
+ public static void DownloadFromScript(string filepath, string savefilepath, string inGameDir)
+ {
+ string[] file = File.ReadAllLines(filepath);
+
+ try
+ {
+ int index = 0;
+ foreach (var line in file)
+ {
+ ++index;
+
+ if (line.Contains("http://") || line.Contains("https://"))
+ {
+ //https://stackoverflow.com/questions/10576686/c-sharp-regex-pattern-to-extract-urls-from-given-string-not-full-html-urls-but
+ List links = new List();
+ var linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+ foreach (Match m in linkParser.Matches(line))
+ {
+ string link = m.Value;
+ links.Add(link);
+ }
+
+ foreach (string link in links)
+ {
+ string newurl = ((!link.Contains("http://") || !link.Contains("https://")) ? "https://" : "")
+ + "assetdelivery.roblox.com/v1/asset/?id=";
+ string urlReplaced = newurl.Contains("https://") ? link.Replace("http://", "").Replace("https://", "") : link.Replace("http://", "https://");
+ string urlFixed = urlReplaced.Replace("?version=1&id=", "?id=")
+ .Replace("www.roblox.com/asset/?id=", newurl)
+ .Replace("www.roblox.com/asset?id=", newurl)
+ .Replace("assetgame.roblox.com/asset/?id=", newurl)
+ .Replace("assetgame.roblox.com/asset?id=", newurl)
+ .Replace("roblox.com/asset/?id=", newurl)
+ .Replace("roblox.com/asset?id=", newurl)
+ .Replace("&", "&")
+ .Replace("amp;", "&")
+ .Replace("}", "")
+ .Replace("]", "")
+ .Replace("\"", "")
+ .Replace("'", "")
+ .Replace(""", "")
+ .Replace(""", "");
+
+ string peram = "id=";
+
+ if (urlFixed.Contains(peram))
+ {
+ string IDVal = urlFixed.After(peram);
+ string OriginalIDVal = link.After(peram);
+ RobloxXML.DownloadFilesFromNode(urlFixed, savefilepath, "", IDVal);
+ file[index - 1] = file[index - 1].Replace(link, inGameDir + OriginalIDVal);
+ }
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ GlobalFuncs.LogExceptions(ex);
+ MessageBox.Show("Error: Unable to fix the asset. " + ex.Message, "Novetus Asset SDK - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ finally
+ {
+ File.WriteAllLines(filepath, file);
+ }
+ }
+
+ public static void FixURLSInScript(string filepath, string url)
+ {
+ string[] file = File.ReadAllLines(filepath);
+
+ try
+ {
+ int index = 0;
+
+ foreach (var line in file)
+ {
+ ++index;
+
+ if ((line.Contains("http://") || line.Contains("https://")) && !line.Contains(url))
+ {
+ string oldurl = line;
+ string urlFixed = oldurl.Replace("http://", "")
+ .Replace("https://", "")
+ .Replace("?version=1&id=", "?id=")
+ .Replace("www.roblox.com/asset/?id=", url)
+ .Replace("www.roblox.com/asset?id=", url)
+ .Replace("assetgame.roblox.com/asset/?id=", url)
+ .Replace("assetgame.roblox.com/asset?id=", url)
+ .Replace("roblox.com/asset/?id=", url)
+ .Replace("roblox.com/asset?id=", url)
+ .Replace("&", "&")
+ .Replace("amp;", "&");
+
+ string peram = "id=";
+
+ if (urlFixed.Contains(peram))
+ {
+ file[index - 1] = urlFixed;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ GlobalFuncs.LogExceptions(ex);
+ MessageBox.Show("Error: Unable to fix the asset. " + ex.Message, "Novetus Asset SDK - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ finally
+ {
+ File.WriteAllLines(filepath, file);
+ }
+ }
+
+ public static void FixURLSOrDownloadFromScript(string filepath, string savefilepath, string inGameDir, bool useURLs, string url)
+ {
+ if (useURLs)
+ {
+ FixURLSInScript(filepath, url);
+ }
+ else
+ {
+ DownloadFromScript(filepath, savefilepath, inGameDir);
+ }
+ }
+
public void LocalizeAsset(RobloxFileType type, BackgroundWorker worker, string path, string itemname, string meshname, bool useURLs = false, string remoteurl = "")
{
string oldfile = File.ReadAllText(path);
- string fixedfile = RobloxXML.RemoveInvalidXmlChars(RobloxXML.ReplaceHexadecimalSymbols(oldfile)).Replace(" ", "\t").Replace("#9;", "\t");
XDocument doc = null;
- XmlReaderSettings xmlReaderSettings = new XmlReaderSettings { CheckCharacters = false };
- Stream filestream = GlobalFuncs.GenerateStreamFromString(fixedfile);
- using (XmlReader xmlReader = XmlReader.Create(filestream, xmlReaderSettings))
+
+ try
{
- xmlReader.MoveToContent();
- doc = XDocument.Load(xmlReader);
+ string fixedfile = RobloxXML.RemoveInvalidXmlChars(RobloxXML.ReplaceHexadecimalSymbols(oldfile)).Replace(" ", "\t").Replace("#9;", "\t");
+ XmlReaderSettings xmlReaderSettings = new XmlReaderSettings { CheckCharacters = false };
+ Stream filestream = GlobalFuncs.GenerateStreamFromString(fixedfile);
+ using (XmlReader xmlReader = XmlReader.Create(filestream, xmlReaderSettings))
+ {
+ xmlReader.MoveToContent();
+ doc = XDocument.Load(xmlReader);
+ }
+ }
+ catch (Exception ex)
+ {
+ GlobalFuncs.LogExceptions(ex);
+ //assume we're a script
+ if (type == RobloxFileType.Script)
+ {
+ if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
+ {
+ try
+ {
+ worker.ReportProgress(0);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".lua", " - BAK.lua"), false);
+ }
+ catch (Exception ex2)
+ {
+ GlobalFuncs.LogExceptions(ex2);
+ worker.ReportProgress(100);
+ return;
+ }
+ }
+ else
+ {
+ worker.ReportProgress(0);
+ }
+
+ FixURLSOrDownloadFromScript(path, GlobalPaths.AssetCacheDirAssets, GlobalPaths.AssetCacheAssetsGameDir, useURLs, url);
+ worker.ReportProgress(100);
+ }
+ return;
}
try
@@ -591,6 +764,7 @@ public partial class AssetSDK : Form
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -637,13 +811,7 @@ public partial class AssetSDK : Form
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.Script);
worker.ReportProgress(90);
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.LocalScript);
- //localize any scripts that are not handled
- /*
worker.ReportProgress(95);
- RobloxXML.DownloadScriptFromNodes(doc, "Script");
- worker.ReportProgress(97);
- RobloxXML.DownloadScriptFromNodes(doc, "LocalScript");*/
- worker.ReportProgress(100);
break;
case RobloxFileType.RBXM:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -651,12 +819,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -702,13 +871,7 @@ public partial class AssetSDK : Form
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.Script);
worker.ReportProgress(90);
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.LocalScript);
- //localize any scripts that are not handled
- /*
worker.ReportProgress(95);
- RobloxXML.DownloadScriptFromNodes(doc, "Script");
- worker.ReportProgress(97);
- RobloxXML.DownloadScriptFromNodes(doc, "LocalScript");*/
- worker.ReportProgress(100);
break;
case RobloxFileType.Hat:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -716,12 +879,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -738,7 +902,7 @@ public partial class AssetSDK : Form
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemHatScript);
worker.ReportProgress(75);
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemHatLocalScript);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
case RobloxFileType.Head:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -746,12 +910,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -761,7 +926,7 @@ public partial class AssetSDK : Form
//meshes
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemHeadFonts, itemname);
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemHeadFonts, 1, 1, 1, 1, itemname);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
case RobloxFileType.Face:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -769,12 +934,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -783,7 +949,7 @@ public partial class AssetSDK : Form
}
//decal
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemFaceTexture, itemname);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
case RobloxFileType.TShirt:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -791,12 +957,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -805,7 +972,7 @@ public partial class AssetSDK : Form
}
//texture
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemTShirtTexture, itemname);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
case RobloxFileType.Shirt:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -813,12 +980,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -827,7 +995,7 @@ public partial class AssetSDK : Form
}
//texture
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemShirtTexture, itemname);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
case RobloxFileType.Pants:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
@@ -835,12 +1003,13 @@ public partial class AssetSDK : Form
try
{
worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " BAK.rbxm"), false);
+ GlobalFuncs.FixedFileCopy(path, path.Replace(".rbxm", " - BAK.rbxm"), false);
}
catch (Exception ex)
{
GlobalFuncs.LogExceptions(ex);
worker.ReportProgress(100);
+ return;
}
}
else
@@ -849,30 +1018,8 @@ public partial class AssetSDK : Form
}
//texture
RobloxXML.DownloadOrFixURLS(doc, useURLs, remoteurl, RobloxDefs.ItemPantsTexture, itemname);
- worker.ReportProgress(100);
+ worker.ReportProgress(95);
break;
- /*case RobloxFileType.Script:
- if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
- {
- try
- {
- worker.ReportProgress(0);
- GlobalFuncs.FixedFileCopy(path, path.Replace(".lua", " BAK.lua"), false);
- }
- catch (Exception ex)
- {
- GlobalFuncs.LogExceptions(ex);
- worker.ReportProgress(100);
- }
- }
- else
- {
- worker.ReportProgress(0);
- }
-
- RobloxXML.DownloadFromScript(path);
- worker.ReportProgress(100);
- break;*/
default:
worker.ReportProgress(100);
break;
@@ -890,6 +1037,10 @@ public partial class AssetSDK : Form
{
doc.WriteTo(xmlReader);
}
+
+ //download any assets we missed.
+ FixURLSOrDownloadFromScript(path, GlobalPaths.AssetCacheDirAssets, GlobalPaths.AssetCacheAssetsGameDir, useURLs, url);
+ worker.ReportProgress(100);
}
}
@@ -904,7 +1055,9 @@ public partial class AssetSDK : Form
GlobalPaths.AssetCacheDirTextures = GlobalPaths.AssetCacheDir + GlobalPaths.DirTextures;
GlobalPaths.AssetCacheDirTexturesGUI = GlobalPaths.AssetCacheDirTextures + "\\gui";
GlobalPaths.AssetCacheDirScripts = GlobalPaths.AssetCacheDir + GlobalPaths.DirScripts;
- //GlobalPaths.AssetCacheDirScriptAssets = GlobalPaths.AssetCacheDir + "\\scriptassets";
+ GlobalPaths.AssetCacheDirAssets = GlobalPaths.AssetCacheDir + "\\assets";
+
+ GlobalFuncs.CreateAssetCacheDirectories();
GlobalPaths.AssetCacheGameDir = GlobalPaths.SharedDataGameDir;
GlobalPaths.AssetCacheFontsGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.FontsGameDir;
@@ -913,7 +1066,7 @@ public partial class AssetSDK : Form
GlobalPaths.AssetCacheTexturesGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.TexturesGameDir;
GlobalPaths.AssetCacheTexturesGUIGameDir = GlobalPaths.AssetCacheTexturesGameDir + "gui/";
GlobalPaths.AssetCacheScriptsGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.ScriptsGameDir;
- //GlobalPaths.AssetCacheScriptAssetsGameDir = GlobalPaths.AssetCacheGameDir + "scriptassets/";
+ GlobalPaths.AssetCacheAssetsGameDir = GlobalPaths.AssetCacheGameDir + "assets/";
}
else
{
@@ -924,7 +1077,7 @@ public partial class AssetSDK : Form
GlobalPaths.AssetCacheDirTextures = GlobalPaths.AssetCacheDir + GlobalPaths.DirTextures;
GlobalPaths.AssetCacheDirTexturesGUI = GlobalPaths.AssetCacheDirTextures + "\\gui";
GlobalPaths.AssetCacheDirScripts = GlobalPaths.AssetCacheDir + GlobalPaths.DirScripts;
- //GlobalPaths.AssetCacheDirScriptAssets = GlobalPaths.AssetCacheDir + "\\scriptassets";
+ GlobalPaths.AssetCacheDirAssets = GlobalPaths.AssetCacheDir + "\\assets";
GlobalPaths.AssetCacheGameDir = GlobalPaths.SharedDataGameDir + "assetcache/";
GlobalPaths.AssetCacheFontsGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.FontsGameDir;
@@ -933,7 +1086,7 @@ public partial class AssetSDK : Form
GlobalPaths.AssetCacheTexturesGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.TexturesGameDir;
GlobalPaths.AssetCacheTexturesGUIGameDir = GlobalPaths.AssetCacheTexturesGameDir + "gui/";
GlobalPaths.AssetCacheScriptsGameDir = GlobalPaths.AssetCacheGameDir + GlobalPaths.ScriptsGameDir;
- //GlobalPaths.AssetCacheScriptAssetsGameDir = GlobalPaths.AssetCacheGameDir + "scriptassets/";
+ GlobalPaths.AssetCacheAssetsGameDir = GlobalPaths.AssetCacheGameDir + "assets/";
}
}
diff --git a/changelog.txt b/changelog.txt
index 48ae7a1..4eba592 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,8 +1,9 @@
-1.3 v11.2021.2
+1.3 v12.2021.1
Changes from v11.2021.1:
New Features:
- The Asset SDK Asset Localizer is now known as the Asset Fixer!
- Added the ability to "fix" all asset URLs by changing them to a URL of your choice!
+- The Asset SDK's Asset Fixer now properly supports fixing the URLs inside of scripts.
- Added T-Shirt support to 2007E/2007E-Shaders.
- T-Shirts with Roblox Asset URLs/Redirects are not supported due to 2 issues with 2007e: Roblox Asset URLs/Redirects do not work properly in 2007E if it's a texture and using anything to get the current texture value for a ShirtGraphic or Decal returns a "bad cast" error.
- As a result, T-Shirts with Roblox Asset URLs/Redirects will not load in 2007e.
@@ -15,6 +16,8 @@ New Features:
- Icons loaded from a URL will show up for all players.
- Added the ability to assign a custom client EXE name in the Client SDK.
- Server hosters and map authors may now insert a "DisableCustomization" object into Lighting that will disable player customizations. DisableCustomization may also be removed to re-enable player customizations.
+- 2011M's GUI is now more accurate to when it released (Mid June 2011).
+ - You can re-enable the previous GUI by going into Novetus' settings.
Enhancements:
- The Bootstrapper now creates error logs of its own.
@@ -25,15 +28,14 @@ Enhancements:
- The server browser now displays versions in red if they're not the same exact version.
- The master server security warning will now show up once for every Novetus session.
- Novetus now bases your tripcode off of your computer's hardware information. (Powered by https://github.com/davcs86/csharp-uhwid)
-- 2011M's GUI is now more accurate to when it released (Mid June 2011).
- - You can re-enable the previous GUI by going into Novetus' settings.
- The Client SDK now has specific version numbers for each clientinfo version.
- Made the Client Description and Warning fields larger in the Client SDK.
- The Client Description field now resizes with the rest of the Client SDK window.
- 2006S and 2006S-Shaders now use "PlayerHopper" instead of "Backpack" for compatibility with 2006 levels.
- All customization items are now named properly in 2006S-2007M.
- Studio can now be launched alongside other game types and clients.
-- Universal clients are caegoriozed based on client optimizations.
+- Universal maps are now categorized based on client optimizations.
+- Clearing asset cache now properly clears the folder.
Fixes:
- Fixed the URL Override box in the Asset SDK not being functional.
diff --git a/scripts/launcher/info.ini b/scripts/launcher/info.ini
index fae1001..3aef092 100644
--- a/scripts/launcher/info.ini
+++ b/scripts/launcher/info.ini
@@ -6,6 +6,6 @@ UserAgentRegisterClient1=2007M
UserAgentRegisterClient2=2010L
ExtendedVersionNumber=True
ExtendedVersionEditChangelog=False
-ExtendedVersionTemplate=%version% v11.2021.%extended-revision%%lite%
-ExtendedVersionRevision=2
+ExtendedVersionTemplate=%version% v12.2021.%extended-revision%%lite%
+ExtendedVersionRevision=1
IsLite=False
\ No newline at end of file