Jump to content

Home

KAuroraEditor (current version: 0.2)


Recommended Posts

I've released the first version of the walkmesh utility program. You can find it here:

 

KAuroraEditor

 

Please understand this is an alpha and as such, it's bound to have problems [for example, I've already noticed that if you try and replace m27aa_01c (the room in the Manaan Sith Embassy, where you can't really go, which is only used to visualize the commander and the droids coming to get you once the "Sith receptionist" gives the alarm) the script breaks as it looks like the NPCs can't cross the room boundary... even if you can].

 

The README gives all the necessary info. I'm just going to point out that you will need .NET Framework 2.0 and the redistributable of DirectX SDK Update February 2005 (or later), both of which can be freely downloaded from Microsoft. If you lack both, install the framework first, as otherwise the SDK setup could skip the installation of some necessary libraries.

 

Another thing: to work on the exported ascii walkmeshes I used Gmax 1.2 with NWMax 0.7. It looks like there's some problem in the algorithm used by NWMax to generate the walkmesh's AABB tree; at the very least, it uses a huge amount of memory. To allow Gmax to work with some of the more complex ones, I had to comment out the AABB tree generation code (the utility doesn't need that info as it generates its own AABB tree, using the Kotor algorithm which is different from the one used in the scripts).

 

If you have problems while importing/exporting the meshes from Gmax, try the following:

 

- go into the scripts\NWmax\nw_ie_inc directory under Gmax

- locate the aurora_fn_export.ms file

- open it (it's a text file, so you can use notepad, wordpad etc.)

- locate the following function:

 

fn WriteAABBTree node verbose:false =
(
   -- From Waylands original script
   local facemids =#()
   local facelist = #()
   local aabbData = #()
   if ((mod node.mesh.numfaces 2) == 1) then
   (
       --MessageBox("Odd number of faces in AABB tree.  Expect problems.");
   )
   for i=1 to node.mesh.numfaces do
   (
       v3 = getface node.mesh i
       p1 = getvert node.mesh v3.x
       p2 = getvert node.mesh v3.y
       p3 = getvert node.mesh v3.z
       mid = (p1+p2+p3) / 3
       append faceMids mid
       append facelist i
   )

   if verbose then format "    aabb " to:g_strBuffer -- no newline here, NWN chokes if the data doesn't start on the same line
   BuildAABBTreeNode node faceMids facelist 0 aabbData verbose
   return aabbData
)

 

and change it to look like this:

 

fn WriteAABBTree node verbose:false =
(
   -- From Waylands original script
   local facemids =#()
   local facelist = #()
   local aabbData = #(" ")
   if ((mod node.mesh.numfaces 2) == 1) then
   (
       --MessageBox("Odd number of faces in AABB tree.  Expect problems.");
   )

   /*
   for i=1 to node.mesh.numfaces do
   (
       v3 = getface node.mesh i
       p1 = getvert node.mesh v3.x
       p2 = getvert node.mesh v3.y
       p3 = getvert node.mesh v3.z
       mid = (p1+p2+p3) / 3
       append faceMids mid
       append facelist i
   )
   */

   if verbose then format "    aabb " to:g_strBuffer -- no newline here, NWN chokes if the data doesn't start on the same line
   /* BuildAABBTreeNode node faceMids facelist 0 aabbData verbose */
   return aabbData
)

 

This will effectively comment out the creation of the whole AABB tree from the exported model.

 

I'll use this thread to keep track of any request or problems you might have.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

A very quick run down on what you need if you want to come up with an entirely new area:

 

- build the area geometry with NWMax. At the moment, you're limited to trimeshes only plus one walkmesh. You can add AuroraLights, they will be included in the .mdl and won't crash the game, but on first look they don't seem to work; further tests will be needed. Hint: to easily create the walkmesh, just clone the area editable mesh, add the AuroraWalkmesh modifier, and assign the material to the faces. Also take note that if your UV mapping ends up creating a number of tverts <> verts, the texture will look messed up in the game (until I write the code which duplicates the right verts to equalize the numbers again). A simple planar UV mapping should be rendered correctly

- link everything to the AuroraBase and export with the NWMax scripts

- import the ascii model in KAurora. The model and the walkmesh will be autoloaded in memory.

- if you're going to displace the room in the .lyt file [i.e. assign coordinates other than (0, 0, 0)], you need to hit the "refactor" option in the walkmesh menu and insert the displacement coordinates before exporting the .wok

- create the mdl, mdx and wok files and put them into the override directory

- fetch the .ARE, .GIT and MODULE.IFO files from some other area

- edit them to point to your new area (at a minimum, you should change the room list, the various fields pointing to the area name, and insert the value 16777215 into the SunDiffuse and SunAmbient fields. Now it is also a good time to delete all the various placeables, npcs etc. that you won't be needing)

- use KotorTool to create a .MOD including the above three files (plus any other you might need e.g. sounds, npcs etc.) and put it into the Modules directory

- copy the .LYT and .VIS file from another area and modify them. They're simple text files so Notepad will do. Figuring them out should be pretty easy: the .LYT file will need a list of rooms and their displacements, while the .VIS simply tells the game which rooms you can see from any other room. If you only have one room, you just need one line with the room name followed by a "0". After you're done, put the two files into the override

- fire up Kotor, warp to your area and marvel at your mad modelling skillz ;P

Link to comment
Share on other sites

  • 1 year later...

I am new to all this modding/editing I am trying to create a new look for Atris So that when she walks down the long ramp her legs are visible (shorter skirt) I used kotor tool, MDLops, NWMax, Gmax, anyway its the export where I am having a problem it is only saved as a GMax scene file how can I save it in the file format that I need to use in the game "help" please..

Link to comment
Share on other sites

For anyone wondering (as if... :p): I'm still alive, although I've not been working on the tool in the last several months.

Maybe I'll be able to restart in the next weeks, although I cannot promise anything as of yet. In any case, it will require a significant amount of time just to refamiliarize myself with all the model data formats.

Link to comment
Share on other sites

Sweet, a god of kotor modding has returned to the scene, and hes ready to return to the battlefield, so to speak.

 

Translation: Welcome back.

 

:p

 

your belgium is a lot better than mine, or you have a better translator. I couldn't understand one bit of what Q said. :¬:

Link to comment
Share on other sites

For anyone wondering (as if... :p): I'm still alive, although I've not been working on the tool in the last several months.

Maybe I'll be able to restart in the next weeks, although I cannot promise anything as of yet. In any case, it will require a significant amount of time just to refamiliarize myself with all the model data formats.

 

Help us MagnusII, you're our only hope! I'm so glad to see you are back, Your tool is amazing, and I am deeply in love with it. I cant wait to see what other beauties you have in store for us :).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...