8th February 2008, 10:23 PM | #1 |
Junior Member
Junior member
Join Date: May 2007
Posts: 7
|
.MAP Export Problem...
Alright, I made a game that I can only export maps to using GTKRadiant. GTKRadiant CAN import .MAP files, and AC3D CAN export to .MAP. I HATE GTKRadiant's interface and would much rather use AC3D to make my maps, only GTKRadiant doesn't seem to accept the MAP files AC3D exports. I diagnosed this problem a bit and found the following differiences in AC3D's and GTKRadiant's perceptions of .MAP files.
AC3D Box: Code:
{ "classname" "worldspawn" // brush box { ( -1.000000 -1.000000 -1.000000 ) ( 1.000000 1.000000 -1.000000 ) ( -1.000000 1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 1.000000 -1.000000 ) ( -1.000000 -1.000000 -1.000000 ) ( 1.000000 -1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 -1.000000 1.000000 ) ( -1.000000 1.000000 1.000000 ) ( 1.000000 1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( -1.000000 1.000000 1.000000 ) ( 1.000000 -1.000000 1.000000 ) ( -1.000000 -1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( -1.000000 1.000000 1.000000 ) ( 1.000000 1.000000 -1.000000 ) ( 1.000000 1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 1.000000 -1.000000 ) ( -1.000000 1.000000 1.000000 ) ( -1.000000 1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 ( -1.000000 -1.000000 -1.000000 ) ( 1.000000 -1.000000 1.000000 ) ( 1.000000 -1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 -1.000000 1.000000 ) ( -1.000000 -1.000000 -1.000000 ) ( -1.000000 -1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( -1.000000 -1.000000 -1.000000 ) ( -1.000000 1.000000 1.000000 ) ( -1.000000 -1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( -1.000000 1.000000 1.000000 ) ( -1.000000 -1.000000 -1.000000 ) ( -1.000000 1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 1.000000 -1.000000 ) ( 1.000000 -1.000000 1.000000 ) ( 1.000000 1.000000 1.000000 ) notex 0 0 0 1.0 1.0 ( 1.000000 -1.000000 1.000000 ) ( 1.000000 1.000000 -1.000000 ) ( 1.000000 -1.000000 -1.000000 ) notex 0 0 0 1.0 1.0 } } Code:
// entity 0 { "classname" "worldspawn" // brush 0 { ( 64 64 64 ) ( 64 -64 64 ) ( -64 64 64 ) NULL 0 0 0 0.5 0.5 0 0 0 ( 64 64 64 ) ( -64 64 64 ) ( 64 64 -64 ) NULL 0 0 0 0.5 0.5 0 0 0 ( 64 64 64 ) ( 64 64 -64 ) ( 64 -64 64 ) NULL 0 0 0 0.5 0.5 0 0 0 ( -64 -64 -64 ) ( 64 -64 -64 ) ( -64 64 -64 ) NULL 0 0 0 0.5 0.5 0 0 0 ( -64 -64 -64 ) ( -64 -64 64 ) ( 64 -64 -64 ) NULL 0 0 0 0.5 0.5 0 0 0 ( -64 -64 -64 ) ( -64 64 -64 ) ( -64 -64 64 ) NULL 0 0 0 0.5 0.5 0 0 0 } } ~Tom |
9th February 2008, 12:58 AM | #2 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: .MAP Export Problem...
Most of the exporters are implemented as plug-ins... it would be up to each plug-in author to implement such a thing, and for most plug-ins it probably wouldn't make sense.
I don't know about the MAP exporter, whether it's built-in or a plug-in. You said you were writing a game... if you have any programming experience plug-ins are pretty easy to write if you wanted to implement your own exporter. (Maybe you could bypass GTKRadiant that way?) I'd be happy to give you a few pointers if it helps. |
9th February 2008, 06:29 AM | #3 |
Junior Member
Junior member
Join Date: May 2007
Posts: 7
|
Re: .MAP Export Problem...
I'm sure the actual .txt file can be modded with a carefilly written c++ script that searches strings for a certain syntax and deletes everything past the whole numbers, but i'm not sure exactly how that would be done. I'd rather not mess with my own exporters and plugins, but find a way to reformat the MAPs AC3D exports. It's ok if what needs to be done isn't in AC3D, because I can just run it through a seperate program after exporting in AC3D's format as stated above.
|
10th February 2008, 03:56 AM | #4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: .MAP Export Problem...
If the values should be integers then it's an easy change. If you do a text-editor search/replace using ".0000000"/"" (to remove the decimal parts)-does the file load?
|
10th February 2008, 04:02 AM | #5 |
Junior Member
Junior member
Join Date: May 2007
Posts: 7
|
Re: .MAP Export Problem...
Actually, I used the replace tool on notepad just recently in a very complicated way to (successfully) remove everything after the decimal (even if its like .4362372). Don't ask how because I'll waste like an hour typing a tutorial XD. This worked, but it still won't load...I got it to work with a simple box as shown above a month or so ago, but my much larger map won't work, and now, for some reason, the simple box wont work either. I have one more theory. Notice how there are 12 lines of the AC3D one, and 6 lines of the GTKRadiant one, but they were both only a single cube with 8 vertices? What makes that happen when they should both be the exact same thing?
EDIT: Oh, and the reason I would want to try to text-format with C++ is that the method used with notepad-replace takes about 30 minutes if you work at like 3 clicks per second...Kind of long. Last edited by Sephiroth; 10th February 2008 at 04:08 AM. |
|
|