Go Back   AC3D Forums > Resources > AC3D Tutorials and How-To's
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 8th February 2008, 10:23 PM   #1
Sephiroth
Junior Member
Junior member
 
Join Date: May 2007
Posts: 7
Default .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
}
}
GTKRadiant Box:
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
}
}
Note that I took the AC3D box and changed the notex/NULL and the data following it to fit GTKRadiant's and it would not work. Having done that, I changed the coordinates in AC3D Box by rounding them off since they are a few decimal places in precision, and it worked. I assume this, by proccess of elimination, is the only problem, because I changed those other parts back to the way they were originally, and left the coordinates rounded and it worked, so notex/NULL or the data after it doesn't matter to GTKRadiant. I suppose my question is this: Is there a way to set preferences for export and import plugins for AC3D and format the way it exports files, so it rounds the coordinates off? Snapping to grid in AC3D doesn't work, as even when perfectly snapped to grid, they still produce coordinates of like 5.00000 and such. A few weeks ago, I snapped an entire map to grid, and it gave me some strange results like 5.00635! Any help greatly appreciated. Thanks.

~Tom
Sephiroth is offline   Reply With Quote
Old 9th February 2008, 12:58 AM   #2
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default 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.
lisa is offline   Reply With Quote
Old 9th February 2008, 06:29 AM   #3
Sephiroth
Junior Member
Junior member
 
Join Date: May 2007
Posts: 7
Default 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.
Sephiroth is offline   Reply With Quote
Old 10th February 2008, 03:56 AM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default 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?
Andy is offline   Reply With Quote
Old 10th February 2008, 04:02 AM   #5
Sephiroth
Junior Member
Junior member
 
Join Date: May 2007
Posts: 7
Default 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.
Sephiroth is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 06:24 AM.


AC3D Forum
(C) Inivis Limited 2020