Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 28th Aug 2021 at 4:46 PM Last edited by Onebeld : 26th Feb 2022 at 1:27 PM. Reason: New version
[Alpha] Regul - modular package editor
Attention: This is an ABSOLUTELY new tool for mod development and it is in preview version. There is a possibility that your package files may be corrupted. Use it at your own risk and back up your files!



List of changes in v0.2.0:


Hi all! After a few months I am ready to release the first preview version of the package creation and editing software. Even though this is a preview version, you can do a lot: you can view almost all the resources, but you can't edit most of them. The source code for this program is available on GitHub.

Why do we need another editor?
First of all, this program and its module (about this later) is a kind of "improved" s3pe. It still uses the same s3pi library from Peter L Jones, but is modified to support cross-platform. It can also open a file with >100,000 resources in a few seconds, when S3PE opens quite long.

Functions

Tabs
I believe that every editor should edit multiple files, because it can be handy. This program supports this, but with modules it can edit more than just one type of file (e.g. more text files).

Modules
That's what I worked on the most. You can create a module once and you can run it on any version of this program in both .NET Framework and .NET 5 (in the future 6). For this I took another library and modified it (I think this feature appeared for the first time in this program, I have not seen several versions of the same program to run the same module). You can play with the modules by simply removing them from the Modules folder and see what happens (spoiler: the program won't crash). Instructions on how to create them can be found here.

Cross-platform
Thanks to AvaloniaUI and .NET 5 (in the future 6), the program can run not only on Windows, but also on macOS and Linux (although the game is not officially supported there, as far as I remember). Again, I think this is the first editor in the The Sims franchise that can run on multiple operating systems correctly (usually some did with Mono). For now, I'll only be releasing versions on Windows, since that's where most players play. Who knows, maybe I'll release a preservation cleaner on macOS someday.

How to install?
First of all, you need to have .NET Framework 4.6.1 and a version of Windows 7 or higher. Download the archive and unzip it in a convenient place, run the file Regul.exe and try it!

There is still a lot of work to be done, most of the features are not yet available. I will be glad if you find most of the bugs and let me know.
In the future, I hope that this program will be a single platform for creating mods for all games of The Sims series (thanks to modules). Most likely, I may not put this program in MTS, for the reason that see the previous sentence.

P.s. By the way, when I tested the DDS viewer, I did not expect to be able to view some files that S3PE could not open, example below.
Screenshots
Attached files:
File Type: zip  Regul_v0.2.0-alpha_net461.zip (12.78 MB, 47 downloads)
Advertisement
Lab Assistant
#2 Old 11th Oct 2021 at 11:26 PM
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Ryzen\Downloads\Sims3\UTILITIES\Regul_0.1.0-alpha_net461\Modules\Onebeld\DDS\SixLabors.ImageSharp.Drawing.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Ryzen\Downloads\Sims3\UTILITIES\Regul_0.1.0-alpha_net461\Modules\Onebeld\DDS\SixLabors.ImageSharp.Drawing.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Onebeld.Plugins.Loader.ManagedLoadContext.LoadAssemblyFromFilePath(String path)
at Regul.Base.ViewModels.Windows.MainViewModel.InitializeModules()

Rest of the modules seem to throw the same exception
Lab Assistant
Original Poster
#3 Old 5th Jan 2022 at 9:28 AM
Quote: Originally posted by SonyaYU


Hi! Sorry it took me so long to reply. For some reason I didn't get a notification for a new post in this thread.
I will look into this error and try to fix it.
Lab Assistant
#4 Old 6th Jan 2022 at 4:07 AM
Quote: Originally posted by Onebeld
Hi! Sorry it took me so long to reply. For some reason I didn't get a notification for a new post in this thread.
I will look into this error and try to fix it.


Me neither, I even forgot it was me who wrote the post until I went back and saw my own username.
Lab Assistant
Original Poster
#5 Old 26th Feb 2022 at 1:11 PM Last edited by Onebeld : 26th Feb 2022 at 1:18 PM. Reason: Forgot to post the file :)
Default Regul v0.2.0
I apologize right away for taking a very long time with this release. There was a lot to do, but I finally got it done.

List of changes:

The S3PE module has only the advanced search added

As always, it includes all the modules I made

If the program cannot load modules (as it was with SonyaYU ), add the line <loadFromRemoteSources enabled="true"/> to the Regul.exe.config file between the runtime tags

In the future, I also plan to revive two projects as modules for Regul
Attached files:
File Type: zip  Regul_v0.2.0-alpha_net461.zip (12.78 MB, 15 downloads)
Test Subject
#6 Old 22nd May 2022 at 1:25 PM
Hi! I believe I'm doing something wrong. The program crashes anytime I try and edit a package. Here is the log:

[22.05.2022 06:06:13.451] | Info | A new program session has been successfully created!
[22.05.2022 06:08:21.615] | Fatal | [System.RuntimeTypeHandle.CreateInstance()] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=1.2.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at AvaloniaEdit.Editing.TextArea..ctor(TextView textView)
at AvaloniaEdit.Editing.TextArea..ctor()
at AvaloniaEdit.TextEditor..ctor()
at Regul.S3PE.Windows.Editors.STBLEditor.!XamlIlPopulate(IServiceProvider , STBLEditor )
at Regul.S3PE.Windows.Editors.STBLEditor.!XamlIlPopulateTrampoline(STBLEditor )
at Regul.S3PE.Windows.Editors.STBLEditor..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Regul.Base.WindowsManager.CreateModalWindow[T](PleasantWindow host, Object[] args)
at Regul.S3PE.S3PEViewModel.<EditSTBLResource>d__136.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0()
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.DesktopApplicationExtensions.Run(Application app, Window mainWindow)
at Regul.Program.AppMain(Application app, String[] args)
at Avalonia.Controls.AppBuilderBase`1.Start(AppMainDelegate main, String[] args)
at Regul.Program.Main(String[] args)

Made sure I had the right .nets installed and googled the issue, I found this! It's waaaaaay above my comprehension. (I do have JetBrains and **very very very very basic** coding knowledge)

https://www.nuget.org/packages/Syst...tions.Immutable

I will say, I am so impressed by how clean this looks and how quickly this loads in comparison to S3PE.
Lab Assistant
Original Poster
#7 Old 23rd May 2022 at 10:28 AM
Quote: Originally posted by Koorime
Hi! I believe I'm doing something wrong. The program crashes anytime I try and edit a package. Here is the log:

[22.05.2022 06:06:13.451] | Info | A new program session has been successfully created!
[22.05.2022 06:08:21.615] | Fatal | [System.RuntimeTypeHandle.CreateInstance()] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=1.2.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at AvaloniaEdit.Editing.TextArea..ctor(TextView textView)
at AvaloniaEdit.Editing.TextArea..ctor()
at AvaloniaEdit.TextEditor..ctor()
at Regul.S3PE.Windows.Editors.STBLEditor.!XamlIlPopulate(IServiceProvider , STBLEditor )
at Regul.S3PE.Windows.Editors.STBLEditor.!XamlIlPopulateTrampoline(STBLEditor )
at Regul.S3PE.Windows.Editors.STBLEditor..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Regul.Base.WindowsManager.CreateModalWindow[T](PleasantWindow host, Object[] args)
at Regul.S3PE.S3PEViewModel.<EditSTBLResource>d__136.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0()
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.DesktopApplicationExtensions.Run(Application app, Window mainWindow)
at Regul.Program.AppMain(Application app, String[] args)
at Avalonia.Controls.AppBuilderBase`1.Start(AppMainDelegate main, String[] args)
at Regul.Program.Main(String[] args)

Made sure I had the right .nets installed and googled the issue, I found this! It's waaaaaay above my comprehension. (I do have JetBrains and **very very very very basic** coding knowledge)

https://www.nuget.org/packages/Syst...tions.Immutable

I will say, I am so impressed by how clean this looks and how quickly this loads in comparison to S3PE.


Hi! I am aware of this problem. I accidentally deleted this important file while cleaning up unnecessary junk. I'm glad to read your feedback! I'm busy for now, as I have exams to take, so I won't be able to fix this problem quickly. In the future, I plan to update the interface (to Fluent, like on Windows 11, but works in other OSes as well)
Test Subject
#8 Old 3rd Jun 2022 at 8:59 PM
Quote: Originally posted by Onebeld
Hi! I am aware of this problem. I accidentally deleted this important file while cleaning up unnecessary junk. I'm glad to read your feedback! I'm busy for now, as I have exams to take, so I won't be able to fix this problem quickly. In the future, I plan to update the interface (to Fluent, like on Windows 11, but works in other OSes as well)


Awesome. I am very excited!! Good luck with your exams!
Test Subject
#9 Old 31st May 2024 at 9:56 AM
Sorry to necromance this, but is this project abandoned?
Lab Assistant
#10 Old 1st Jun 2024 at 8:54 PM
Quote: Originally posted by Koorime
Sorry to necromance this, but is this project abandoned?

There's big message on the GitHub page of this tool saying "The development of the project has been discontinued". So it's abandoned.
Back to top