lachjames

KotOR Level Editor - 0.0.1 Alpha Release

Recommended Posts

Hi everyone :)

I know a few of you have been asking about the status of the KotOR Level Editor (KLE) project. I'm happy to announce that it's finally ready for a (very early alpha) release.

I've made the KotOR Level Editor GitHub page public - please remember it's in early alpha. That said, hope some of you find it useful :)

Find the repo at https://github.com/lachjames/NorthernLights/

My goal is to post this to DeadlyStream in the near future, but for now you'll need to download and install it via GitHub.

If you'd like to try it out, please follow the instructions on the linked GitHub page's README. Feel free to DM me, reply to this post, add an issue, etc. if you have issues.

For those who are new to KLE, you can find an introductory video listing the features of KLE on YouTube (included below).

There is also a (work in progress) KLE guide, as well as a general KotOR/TSL modding guide, at https://github.com/lachjames/KotOR-Modding-Guide

Thanks everyone for your help - hopefully this is just a taste of what is to come regarding both KLE and the Northern Lights project in general - with the amount of support I've received so far from you all, there is no doubt in my mind that this is the case.

  • Like 7
  • Light Side Points 6

Share this post


Link to post
Share on other sites
4 hours ago, lachjames said:

If you'd like to try it out, please follow the instructions on the linked GitHub page's README. Feel free to DM me, reply to this post, add an issue, etc. if you have issues.

Glad to see KLE finally getting it's public release :) though I have been using it on and off for some time now it is an amazing project and I like many others eagerly await to see how it turns out in the near or far future :D at least now I have somewhere to point people to who ask me about KLE!

Note : For anyone interested, it is more than worth using in it's current state. It is a very capable level editor for KotOR 1 & 2.

Share this post


Link to post
Share on other sites

Speaking of Christmas come early 😃


Now, after one sets their directories in the tool are their any additional steps when it comes to opening a module in the level editor? Go to "Kotor", "Module Editor" and when I click on the "Load Module" and select .mod or .rim file it does nothing at all at the moment.

 

Opening a .mod or .rim file gives me this error message.

Spoiler

NullReferenceException: Object reference not set to an instance of an object
AuroraEngine.Resources..cctor () (at Assets/Scripts/ResourceLoader/ModelLoader.cs:11)
Rethrow as TypeInitializationException: The type initializer for 'AuroraEngine.Resources' threw an exception.
KModuleEditor.OnGUI () (at Assets/Editor/KLE/KModuleEditor.cs:46)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.OldOnGUI () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

 

Share this post


Link to post
Share on other sites
20 hours ago, N-DReW25 said:

Now, after one sets their directories in the tool are their any additional steps when it comes to opening a module in the level editor? Go to "Kotor", "Module Editor" and when I click on the "Load Module" and select .mod or .rim file it does nothing at all at the moment.

The "Module Editor" is for editing the contents of a module via a list.

you must click "Load KotOR" in the Instance Editor which should present you with a dropdown list of the available modules / levels.

Make sure to set the target game in the Aurora Preferences.

Note : it is also worth noting to make sure to set the Games Installation Directory so that it isn't Read-Only so that it can access the chitin.key file. ( if you get this error )

( also for Steam users make sure the saves folder for K2 is etc "cloudsaves\UserID" etc )

Also make sure that the "moduleout" folder already exists at it's location.

Edited by Thor110
Edit

Share this post


Link to post
Share on other sites
11 hours ago, Thor110 said:

you must click "Load KotOR" in the Instance Editor which should present you with a dropdown list of the available modules / levels.

Strange, clicking "Load KotOR" in the instance editor doesn't do anything.

 

I'm guessing it isn't detecting the 'chitin.key' file, for the directory does it mean "C:\Program Files (x86)\Steam\steamapps\common\swkotor" for example? Or does it want something else? 

 

Here is the new error message if it helps.

Spoiler

NullReferenceException: Object reference not set to an instance of an object
AuroraEngine.Resources..cctor () (at Assets/Scripts/ResourceLoader/ModelLoader.cs:11)
Rethrow as TypeInitializationException: The type initializer for 'AuroraEngine.Resources' threw an exception.
KLE.LoadGame () (at Assets/Editor/KLE/KLE.cs:77)
KLE.OnGUI () (at Assets/Editor/KLE/KLE.cs:43)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.OldOnGUI () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
 

 

Share this post


Link to post
Share on other sites
7 hours ago, N-DReW25 said:

Strange, clicking "Load KotOR" in the instance editor doesn't do anything.

 

I'm guessing it isn't detecting the 'chitin.key' file, for the directory does it mean "C:\Program Files (x86)\Steam\steamapps\common\swkotor" for example? Or does it want something else? 

 

Here is the new error message if it helps.

  Hide contents

NullReferenceException: Object reference not set to an instance of an object
AuroraEngine.Resources..cctor () (at Assets/Scripts/ResourceLoader/ModelLoader.cs:11)
Rethrow as TypeInitializationException: The type initializer for 'AuroraEngine.Resources' threw an exception.
KLE.LoadGame () (at Assets/Editor/KLE/KLE.cs:77)
KLE.OnGUI () (at Assets/Editor/KLE/KLE.cs:43)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.DockArea.OldOnGUI () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
 

 

An error will pop up stating so if the "chitin.key" is the issue.

The name of the "Module Editor" is mis-leading, which might be the main issue, something to note is that there are some errors that will display currently in the log no matter what.

Oh, I believe I forgot to mention that you need to open the KotOR Scene under the Projects tab / project browser. "Assets/Scenes" inside Unity's Project/Folder/File Browser.

Screenshot_5.thumb.png.d9eca15e94637a2a0d66e099916c5e71.png

From here, via the "Instance Editor" on the right, you should be able to load KotOR or TSL modules via a drop down that appears.

Screenshot_6.thumb.png.d7feed143c53bc14a348f17b32d231c6.png

The developer will appreciate the error logs I am sure and luckily messaged with me just as I was writing this response and reminded me of the KotOR Scene.

Edited by Thor110
Open the KotOR Scene ( you won't have to do this again in future ) : Images Added

Share this post


Link to post
Share on other sites

I've installed it and tried the Load Kotor, but now it says several of the .cs files have unexpected ends. I've checked the files in the specific rows, but there seems to be nothing wrong. Can anyone help?

Share this post


Link to post
Share on other sites
2 hours ago, Omega0101 said:

I've installed it and tried the Load Kotor, but now it says several of the .cs files have unexpected ends. I've checked the files in the specific rows, but there seems to be nothing wrong. Can anyone help?

If you could provide a screenshot or copy of the error log I am sure the developer will be able to look into it, or somebody else might be able to help.

Have you set up the Aurora Settings in the Unity Project Settings? K1 Location, K2 Location, K1 Save Location, K2 Save Location and moduleout save location. ( the moduleout location needs to actually exist ) so make sure you create a folder before pointing it to it, or after pointing it to a location create the folder. Also make sure to set TSL or KotOR as the target game.

Then clicking Load KotOR should provide a list of levels that can be loaded underneath that button within the "Instance Editor"

Oh, also have you opened the KotOR Unity Scene file?

Share this post


Link to post
Share on other sites
16 hours ago, Thor110 said:

If you could provide a screenshot or copy of the error log I am sure the developer will be able to look into it, or somebody else might be able to help.

Have you set up the Aurora Settings in the Unity Project Settings? K1 Location, K2 Location, K1 Save Location, K2 Save Location and moduleout save location. ( the moduleout location needs to actually exist ) so make sure you create a folder before pointing it to it, or after pointing it to a location create the folder. Also make sure to set TSL or KotOR as the target game.

Then clicking Load KotOR should provide a list of levels that can be loaded underneath that button within the "Instance Editor"

Oh, also have you opened the KotOR Unity Scene file?

I tried opening the KotOR program within the Assets\Scenes file, it said that it had to fall back to the CPU for Lightmapping as the GPU wasn't advanced enough, so I don't know if it worked. 

I previously had some issues getting the paths to the swkotor file right, but I did create the folders for the save locations and select working paths to the game files. After that was when the new error showed up. Here is a screenshot of the error message. I'm thankful for any help.

 

2020-12-29.png

Share this post


Link to post
Share on other sites
1 hour ago, Omega0101 said:

I tried opening the KotOR program within the Assets\Scenes file, it said that it had to fall back to the CPU for Lightmapping as the GPU wasn't advanced enough, so I don't know if it worked. 

Did you consider looking up the required specifications for Unity itself? https://docs.unity3d.com/2020.1/Documentation/Manual/system-requirements.html

Also does the moduleout folder exist? Besides setting up the five destinations and the target game, opening the scene and clcking Load KotOR that should be all that's needed to get it working.

That's all I can think of for now, if not hopefully the developer will be able to help when they get a chance.

Share this post


Link to post
Share on other sites
4 hours ago, Thor110 said:

Did you consider looking up the required specifications for Unity itself? https://docs.unity3d.com/2020.1/Documentation/Manual/system-requirements.html

Also does the moduleout folder exist? Besides setting up the five destinations and the target game, opening the scene and clcking Load KotOR that should be all that's needed to get it working.

That's all I can think of for now, if not hopefully the developer will be able to help when they get a chance.

Thanks for the link, I've checked the requirements and my laptop seems to be suitable, so I'm not sure what the GPU problem is. I've checked the moduleout folder and the path does work, so it's still a mystery what's happening. 

Thanks for your help, I'll wait and see what happens

  • Like 1

Share this post


Link to post
Share on other sites

I have come out of a long and deep slumber to log in and say this tool is very exciting to me personally and I would dearly love to see it mature into a solid tool for these games.

I intend on playing around with it over the next few days, and hopefully break it a few times. If it works near to what the video shows (which I imagine it should lol) this is a big development for people like me, that have done a lot of this the old-fashioned way enough to take the urge to ever do it again, straight out of them.

Please continue with keeping us up-to-date on development, @Thor110

Share this post


Link to post
Share on other sites
56 minutes ago, Qui-Gon Glenn said:

Please continue with keeping us up-to-date on development, @Thor110

wrong person :) @lachjames is the developer of this tool.

I have just been privvy to it's development for a while so I have weighed in where I can to help people get it running.

Share this post


Link to post
Share on other sites
Posted (edited)

I may have found the problem I was having earlier. When selecting the target path for Kotor, the editor was only able to find the swkotor chitin.ini if it was already inside the Northern Lights folder. Even if I start the path with C:\\ it just assumes I'm referring to something that's within the project folder, and won't look outside. Is there any way to fix this? Thanks.

Edited by Omega0101

Share this post


Link to post
Share on other sites
On 12/23/2020 at 1:33 AM, lachjames said:

If you'd like to try it out, please follow the instructions on the linked GitHub page's README. Feel free to DM me, reply to this post, add an issue, etc. if you have issues.

I'm having some issues installing it for k1.

I've tried the above methods as explained by Thor110, but was unable to use the Load Kotor function to load modules into the editor. 

I attempted to fix this by: creating a "textures" folder, create a tpa folder inside that placing the tpa erf, did the same for the gui, then created a vo folder in the main directory. This gave the appearance that something had loaded, showing a tab underneath that could be selected labeled "Load module, " with another  "Save GIT file" , however, I was unable to select this or type anything into it. 

Error: ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.