Jump to content

Botroute file format .wnt


Recommended Posts

After Botroutes kept popping up across various threads around here, I started to wonder wether I couldn't incorporate a simple botroute creation system into my level editing plugin for 3ds max - but to do that I'll need to understand the format first.

 

this is what a single line from a .wnt file looks like:

0 0 0.000000 (1150.149414 -1739.572754 664.125000) { } 268.939824

What I can guess about these numbers from the handful of botfiles I opened so far is this:

Pointnumber ?A ?B (Point.X Point.Y Point.Z) {?} ?C

In regards to ?A I can say that it seems to be some sort of flag with atleast 0, 16384 (2^14), 32768 (2^15) and 4194304 (2^22) as possible values.

?B seems to be 0 at all times

{?} is empty most of the time but sometimes holds a list of pointnumbers sepperated by spaces, which makes me guess that it's some sort of connected Points list?

 

and I have absolutely no clue what ?C is supposed to be, most of the time its value is 32, but it differs wildly and I can't really make out a system behind these numbers from the saved botroute files.

 

Is there any documentation on this format? PErhaps in the form of comments in the game code responsible for writing these files?

Link to comment

Botroutes were the first thing I learned to do with this game, and it's quite easy. I'm not sure if the amount of effort and time you'll put in this is worth it.

once I know what the format works like it will be as easy as to just paint a long line through your level in editor. Imagine the Pen tool from Photoshop or Gimp in 3d. My exporter will then simply generate evenly spaced waypoints along that drawn line. This allows you to simply move the control points on the line or edit the line whenever you plan to change the layout of your map slightly. In fact - this could also be used to generate botroutes for maps that have allready been compiled - a friend of mine has been working on a bsp importer for 3ds max. So you could just import a .bsp file into 3ds max and add a botroute by drawing a spline through the level

Link to comment

once I know what the format works like it will be as easy as to just paint a long line through your level in editor. Imagine the Pen tool from Photoshop or Gimp in 3d. My exporter will then simply generate evenly spaced waypoints along that drawn line. This allows you to simply move the control points on the line or edit the line whenever you plan to change the layout of your map slightly. In fact - this could also be used to generate botroutes for maps that have allready been compiled - a friend of mine has been working on a bsp importer for 3ds max. So you could just import a .bsp file into 3ds max and add a botroute by drawing a spline through the level

 

That sounds good, but are you aware that any map can have bot routes added, even if it's compiled?

Link to comment

That sounds good, but are you aware that any map can have bot routes added, even if it's compiled?

Of course, but I'm not to keen on running around a map while spamming a few hotkeys over and over to generate my botroutes. Drawing them or perhaps even generating them automatically would be preferred by far.

Jeff and Droidy365 like this
Link to comment

I fully agree with this idea, practicality + speed is always a good combo. The old method has practicality..... but not the speed maaaan! Time is precious afterall, haha! If this is achieved it would save alot of time. My only question is this... just to clarify, would this idea also be useful for maps already built? Aka maps that we don't have the source file to? lol! Cause majority of the maps I download don't have botroutes and this idea would certainly be helpful! But if this is only intended during the initial creation of a map then..... uh oh spaghetti o's!!!!

Link to comment

I fully agree with this idea, practicality + speed is always a good combo. The old method has practicality..... but not the speed maaaan! Time is precious afterall, haha! If this is achieved it would save alot of time. My only question is this... just to clarify, would this idea also be useful for maps already built? Aka maps that we don't have the source file to? lol! Cause majority of the maps I download don't have botroutes and this idea would certainly be helpful! But if this is only intended during the initial creation of a map then..... uh oh spaghetti o's!!!!

Should be useful for old maps, you can import compiled map .bsp files into 3ds max, either via noesis or the bsp importer a friend of mine has been developing.

Link to comment

Oh I see, I actually didn't know that! That's pretty cool, are there any known side-effects/bugs that can result from that or is it all good?

Huh? You can not edit the .bsp at all. You just import the map geometry into 3ds max and that's it. No Bugs I know of.

Link to comment
  • 3 weeks later...
  • 2 weeks later...

@@AshuraDX I don't have time to go through the code right now to see exactly what it does, but this is the function that saves the .wnt file:

 

https://github.com/JACoders/OpenJK/blob/master/codemp/game/ai_wpnav.c#L2384

 

And for loading (maybe one is easier to read than the other):

 

https://github.com/JACoders/OpenJK/blob/master/codemp/game/ai_wpnav.c#L2019

 

Flags are here:

 

https://github.com/JACoders/OpenJK/blob/master/codemp/game/ai_main.h#L41-L57

And looks like the data between the { } should be points that bots can force jump to (or something related to force jump).

Smoo and AshuraDX like this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...