Fair Strides

WalkSwitch -- The Walkmesh Type Editor

Recommended Posts

Huzzah!

After about two weeks' work with MagnusII's analysis of the walkmesh format, I've made a simple tool that allows you to view the binary .wok files and edit the walktypes for individual faces. To quote the read-me:
 

 

 

INTRODUCTION:
================================================== =====
Walkmesh Switcher is a KotOR\TSL modding tool
designed to read, display, and edit binary
walkmesh files(in .wok format).

The program will count the number of faces in
the walkmesh, parse the coordinates, and then
draw each face according to the coloring of the
face's walk type.

DRAWING:
================================================== =====
After reading all of the faces in the walkmesh
and correlating the walk types with the faces,
the program will draw each of the faces with it's
appropriate color.

Due to the small size of the coordinates compared
to the size of the canvas, I have to scale each of
the coordinates by 10 before I draw them.

SELECTING:
================================================== =====
You can perform a walktype-change on multiple faces
at once.

To select just a single face, simply click
on that face.

To select multiple faces, hold Control and drag the
mouse across the faces that you want to change.

CHANGING:
================================================== =====
To change the walk type of a face, simply select a
face in the viewport and look to the selections on
the lefthand side of the window. The currently
selected face's walk type will already be active.
Simply click on a different color and the face will
be changed.

SAVING:
================================================== =====
When you're done changing the faces, simply click
one of the save buttons.

To overwrite the current walkmesh's file, simply
click "Save .wok...".

To save the walkmesh as a different file, simply
click "Save .wok as...".

BUGS:
================================================== =====
If you do have any problems, or want to see some
additional features, please report them to me in
this thread, or by PMing me on
DeadlyStream(as Fair Strides) or
LucasForums(Fair Strides 2).

 

 

Pictures:

 

WS_1_zpsfe9e3cf1.pngWS_2_zpsa4092b26.pngWS_3_zpsd91a86c4.pngWS_4_zps5157d39b.png

 



Download!

  • Like 1

Share this post


Link to post
Share on other sites

Stupid question for you Fair Strides, does this mean that the area on Telos station with the walkmesh issues can now be "fixed"?

Share this post


Link to post
Share on other sites

Stupid question for you Fair Strides, does this mean that the area on Telos station with the walkmesh issues can now be "fixed"?

 

That would depend on the walkmesh being there.

 

By that, I mean that this lets you edit the walktypes(dirt, nonwalk, metal) for the faces of the walkmesh. It cannot be used to add geometry to the walkmesh.

 

However, if you were to tell me which module it was, and which room/model if you could, I could take a look at expanding/fixing the walkmesh....

Share this post


Link to post
Share on other sites

Could you PM me with info on this, pictures if possible, since I still haven't learned a lot about it. I can probably open the walkmesh in 3DSMax and fix something if I have to. Though, then I'd have to connect each walkmesh model into one piece. It might pose a problem, but it'd need testing.

 

...

 

I suppose I could edit the .lyt and .vis to point to new models, since I can't take the walkmeshes out of the .bif... If you don't know why it'd be an issue, I'll explain it to you in PM.

Share this post


Link to post
Share on other sites

Downloading!

 

Great to see a new tool added for modding.

Share this post


Link to post
Share on other sites

Oops! I meant to release the source code!

 

I coded it in Perl, using tk102's coding libraries rather than making my own...

 

Ewww Perl!  :no

 

Kinda cool you did it with Perl, can see why you would with the existing code-base of sorts. But I kind of wish people would stop using Perl for tools :P . 

Share this post


Link to post
Share on other sites

Ewww Perl!  :no

 

Kinda cool you did it with Perl, can see why you would with the existing code-base of sorts. But I kind of wish people would stop using Perl for tools :P . 

Why? :) It was designed for text- and byte-file manipulation, and Tcl\Tk got a Perl port...

Share this post


Link to post
Share on other sites

Why? :D It was designed for text- and byte-file manipulation, and Tcl\Tk got a Perl port...

 

It's a scripting language used for Linux -- it's not really class / object based, why you end up with huge long scripts, and the syntax isn't very "familiar" to anything more common, like say PHP. Though I really shouldn't have to say more, it also isn't all that much used beyond Linux / Unix (or whatever) for admin purposes. And though it has various libraries and such available, it was never meant for anything graphical -- EDIT: when I say graphical, I mean UI elements and things like rendering data as an image like a 3D model.

 

If you go to a book store, and look in the computer programming section -- if they have one -- you will not find a single book on Perl; though, you will likely still find books on PHP and other "scripting" languages. 

 

In my eyes, Perl, is junk because it is a bit of a dead end only used within certain niches. Plus, if you're going to code a tool for a windows platform, you have an abundance of other far better options to use -- such as Visual C#.

Share this post


Link to post
Share on other sites

Which would require me learning them, which would slow me down more than I already am between programming, mods, and life.

 

Whether you do or don't is your business; my comment was aimed at community tool development in general, with an eye for future support for tools -- Perl based tools require people willing to learn Perl; I for one do not as I see no long-term value in doing so, especially when I know other more popular languages. Plus, if you're going to learn programming, I wouldn't start with Perl if you're working with Windows platforms -- you're going to have to move on from it if you want to be a programmer, regardless.

 

Anyway I'm not trying to pick on you or whatever, just saying that just because existing tools were created with Perl, doesn't mean you have to use Perl for new tool development. Some of those tools were created several years ago when to the developers, Perl, was a good option; now we have far better ones.

Share this post


Link to post
Share on other sites

What's the "door" walktype? Can it be used to set the parts of the walkmesh that are connected to another rooms?

 

I'm not actually sure, to be honest. I think it's for the Door's walkmesh file, the .dwk...

Share this post


Link to post
Share on other sites

And the program can't open the .dwk files... great. Just when I was thinking that I might be able to do the walkmesh-bounday-thing easily without KAurora's render view. Ah well, back to calculator.

 

But otherwise, nice job. I prefer Perl programs for cross-platform compatibility reasons, by the way... still can't run the newest version of KAurora.

Share this post


Link to post
Share on other sites

And the program can't open the .dwk files... great. Just when I was thinking that I might be able to do the walkmesh-bounday-thing easily without KAurora's render view. Ah well, back to calculator.

 

But otherwise, nice job. I prefer Perl programs for cross-platform compatibility reasons, by the way... still can't run the newest version of KAurora.

 

Not really sure the dwk would help with that, I'm afraid... It's to do with the perimeter edges, which wasn't the focus of WalkSwitch...

 

As to the last part, "Yay! Someone else likes Perl...:P"

Share this post


Link to post
Share on other sites

I... somwhat connected two things in that post that were not meant to be connected. The point with the dwk was more like "so there's a walktype specifically for a walkmesh that can't be opened with the program that gives the option for that walktype".

 

Well, I guess I can hand-calculate the values if needed be, I just need to know if the rooms the walkmesh is connected to are defined somewhere in the model, or does it just set that "this part is a connection to another room, check another file to see which one". Do you happen to have any advise on that?

Share this post


Link to post
Share on other sites

I... somwhat connected two things in that post that were not meant to be connected. The point with the dwk was more like "so there's a walktype specifically for a walkmesh that can't be opened with the program that gives the option for that walktype".

 

Well, I guess I can hand-calculate the values if needed be, I just need to know if the rooms the walkmesh is connected to are defined somewhere in the model, or does it just set that "this part is a connection to another room, check another file to see which one". Do you happen to have any advise on that?

Not yet, but I'll send a PM to Magnus2 tomorrow.

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.