Sign in to follow this  
  • entry
    1
  • comments
    7
  • views
    2,724

A New Module Designer/Builder

Cortisol

4,780 views

So, I've wanted to implement this idea for a while now, but only just recently actually started to do it. A module builder of sorts, that creates semi-unique areas by letting the user piece together areas that already exist in game to create their own layouts. This will allow everyone, including those without the slightest modding experience do design a layout of an area and export it to the game in a matter minutes. There is still a lot of work to be done but the basics of placing rooms, snapping them together and exporting the corresponding MDL/MDX/LYT is implemented.

Here is an example of the program in  its current state in action:

A.png

B.png

C.png

Ultimately the goal would be to have most existing interior areas in both KotOR and TSL to be implemented into this. A list of areas include:

  • Sith Base
  • Black Vulkar and Hidden Bek bases
  • Undercity Sewers
  • Devik's Estate
  • Sandral Estate/Khoonda
  • Dantooine Academy and its Sublevels
  • Korriban Academy/Tombs
  • Endar Spire/Harbinger
  • Leviathan
  • Peragus
  • Telos Residential Area
  • Telos Military Base
  • Telos Academy
  • Nar Shadaa
  • Iziz Palace
  • Trayus Academy
  • Hrakert Station

And of course there is always the possibly of custom user-made content. The main issue is that settings up the rooms for use does take time, so depending on interest I might not do all of them. Currently I have been using the Sith Base as you can see from the screenshots above. The biggest issue is none of the rooms in the game follow a specific size convention, so in most cases, if you try set up a module that has a circuit, It probably won't align properly.

Features that I plan on implementing include:

  • Exporting with doors. Have each door frame have a door and doors which don't go anywhere should be unselectable.
  • Exporting a minimap. This would include settings up the appropriate values in an .ifo file so there is zero setup required.
  • Export as a MOD file, so no setup required to get them to run in game.
  • Export textures/lightmaps with a custom prefix to allow user's to easily retexture areas that won't interfere with other existing modules.
  • Export any area as K1 or TSL models.
  • Allow the user to set up rooms to transitions to other modules.
  • Some kind of intuitive and simple UI that allows players to configure the VIS file.
  • More as I go a long.

This development of course has not gone smoothly, here is a list of frustrations I noted down if you an be bothered to read them:

  • Both the MDL and WOK files contain the walkmesh data, which seems redundant. The MDL walkmesh handles grass and camera-blocking whereas the WOK walkmesh handles actual movement and pathfinding. AFIAK both share identical geometry. I imagine this is because of certain precomputed values stored in it that change when the model shifts?
  • The WOK ignores the position of the room in the LYT. Changing the coordinates in the LYT will shift the MDL but not the WOK. So this means the vertices in the WOK need to be manually shifted. Because of this, bounding boxes on the AABB need to be moved and face normals need to be updated. Some values which im not even sure what they are may need to be changed as well (place distances/most significant plane)?
  • The LYT lacks any rotation property for room entries.
  • The orientation property in the node header for MDLs doesn't do anything, even when controllers aren't present, so I'm not sure why this exists. Maybe a remnant from NWN format or the console version?
  • The root node in MDL doesn't come with any controllers at all, I should probably check if MDLEdit is capable of this if the ascii file is modified correctly. My work around to this is to child a dummy node onto the root and have that node parent everything else. I use this node to rotate the entire model.
  • Rooms either come with a full doorframe, or none at all, meaning I have to edit each room to have half-doorframes to make them universally compatible with all the other rooms of the same door type. More of an inconvenience than anything else really.
  • In order two connect rooms, the geometric edge on both rooms as to 'point' to the other room's index in the LYT file. This means I have to use a combination of KAurora and MDLEdit to figure out the index of the edge that my program has to edit on export. Its an very tiresome task.
  • There is some bug in KotORBlender that if I export an MDL then delete one of the objects, then export it again an error occurs because the object is missing. Sigh. Of course its missing, I deleted it. A quick work around is just to copy all the model into a new .blend file and export that instead.

This tool is not intended to be a full fledged module editor but mainly for building an area which can be edited using some other tool.  That said it will be incorporated with my All-in-one toolset (WIP) but I will most release a stand alone as well. I'm also open to name suggestions if anyone.

I do also want to try create a terrain editor as well. This hypothetical tool (exteriors) would compliment the one I just talked about (interiors). I'd imagine it would have some kind of "cliffs" ability that would mimic the walls that shape modules the same of what you see on the surfaces Dantooine/Dxun/Telos. You would further be able to detail the landscape with objects such as trees/rocks. It would be technical challenge, but I'm definitely going to take a stab at it.

For now, that about covers it all.

  • Like 4
  • Light Side Points 1


7 Comments


Recommended Comments

Could always use new tools looks like an awesome undertaking kotor blender stop working correctly for me so i used neverblender. I'd call it Kotorius Designer

Share this comment


Link to comment

This will be very useful in module building in the future. While I can guess this won't let me place placeables or NPCs inside the module by simply dragging and dropping them where I want but would it be possible to use this tool to reskin the rooms/modules to be unique (Reskinning a new module with the Ahto City room/module to use the textures of the rusty Taris sewer whilst leaving Ahto and Taris alone)

  • Thanks 1

Share this comment


Link to comment
1 hour ago, N-DReW25 said:

This will be very useful in module building in the future. While I can guess this won't let me place placeables or NPCs inside the module by simply dragging and dropping them where I want but would it be possible to use this tool to reskin the rooms/modules to be unique (Reskinning a new module with the Ahto City room/module to use the textures of the rusty Taris sewer whilst leaving Ahto and Taris alone)

No placing of placeables or NPCs just simply creating area files for it BUT don't worry ill be developing something separate designed for editing modules with options to modify every aspect of it (placeables/doors/nps/dialog/cameras/ect) with 3D + 2D views included. :)

  • Light Side Points 1

Share this comment


Link to comment

This is amazing :D I look forward to trying it out sometime, I actually had a similar idea but to make some new maps manually out of other pieces but as I am not very good with modelling I scrapped the idea in the end. 3D & 2D views :o this will make arranging a level so much less time consuming!

Share this comment


Link to comment
Quote

The MDL walkmesh handles grass and camera-blocking whereas the WOK walkmesh handles actual movement and pathfinding. AFIAK both share identical geometry. I imagine this is because of certain precomputed values stored in it that change when the model shifts?

They may have different geometry – we had one example from Manaan where one vertex had different coords in the WOK, but this was lost on recompilation because MDLedit took the MDL AABB data by default (operating from the same assumption that they're always the same). As a result, the PC would get stuck trying to walk over that part of the walkmesh. It's possible that this was a manual fix only to the WOK, while the AABB node retained the original value.

But yes, generally, they're the same. According to ndix UR, this is probably a remnant of a client–server setup.

 

Quote

The root node in MDL doesn't come with any controllers at all, I should probably check if MDLEdit is capable of this if the ascii file is modified correctly.

Nope, the "root node" is not a node in the same sense as its children, it doesn't have the same structure in the file format. The structure it has does not support controllers.

  • Thanks 1

Share this comment


Link to comment

Hopefully there would be a way to properly implement normal mapping on modules i never got any other way to work.

Share this comment


Link to comment

It's nice to see someone is making progress in this area.  I was looking into this just before I stopped development on KotorTool.  Great Job! Keep it up!

  • Thanks 1

Share this comment


Link to comment
Guest
Add a comment...

×   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.