Quake3World.com Forums
     Level Editing & Modeling
        How to decompile QL map?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: How to decompile QL map?

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-17-2012 01:11 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Tried NetRadiant's q3map2, GTK Radiant's q3map2, the latest build, but no success it has overwritten the bsp files and written srf files (as the map is compiled), already used the -convert -format MAP option. It hasn't recognised this option, why? Tried to change it by -convert MAP option (which may be wrong - converts to ASE), but this produced the same...

What's wrong?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

surfaceparm nomarks
surfaceparm nomarks
Joined: 10 Aug 2009
Posts: 1017
PostPosted: 07-17-2012 03:13 AM           Profile Send private message  E-mail  Edit post Reply with quote


Maybe you need to add a -game switch; QL uses the RTCW .bsp version.



_________________
Portfolio
Twitter


Top
                 

Gibblet
Gibblet
Joined: 08 May 2010
Posts: 11
PostPosted: 07-17-2012 04:53 AM           Profile Send private message  E-mail  Edit post Reply with quote


q3map2.exe -game wolf -convert -format map "D:\devfolder\baseq3\maps\toxicity.bsp"

Should do it.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-17-2012 04:58 AM           Profile   Send private message  E-mail  Edit post Reply with quote


So the -game wolf may be used to compile working QL map? I'm confused now. QL bsp is version 47, while Q3 bsp version 46. So the RTCW bsp is v47? I'm a bit confused...

//EDIT:
Doesn't work... BSP's are again 1kB (corrupted)... So there may be another solution...
I know the q3map2 can decompile the bsp into map by -convert switch with subswitch -format with value MAP, but seem to have this function broken...

q3map2.exe -game wolf -convert -format MAP "D:\Program Files\Quake III Arena\radiant_ql\maps\longestyard.bsp" may decompile level Longest Yard, but it only writes .srf file and overwrites the .bsp file like in compilation, but with no input data which results in corrupted bsp file...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 384
PostPosted: 07-17-2012 08:37 AM           Profile Send private message  E-mail  Edit post Reply with quote


RtCW may have the same BSP number as QL but its lumps may be different.

The file header first needs changing to Q3's, then you can convert as normal. Hint: hex editer, figure it out yourself.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-17-2012 10:31 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Maybe I'll alert ydnar about the QL lump added in q3map2 (ID software used q3map2 to make the bsp's), If it's added in latest release and if not, if it's possible to add it in the next build...

The BSP version is probably the 7 in the beginning of file, so I have figured out changing the 7 to 6, but the lump will probably be the same. Will it work, when changing the number? I'm asking for preventing some unwanted issues...

ydnar is author of q3map2. ID software have used probably modified version, that adds the quakelive lump, or used unofficialy released version with that lump, that ydnar probably sent to ID software to make the maps with working ad banners... If I'll have some lucky, there probably is the chance to safely decompile the bsp's I need and maybe later to make the maps with working ad banners...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Warrior
Warrior
Joined: 01 Oct 2010
Posts: 97
PostPosted: 07-17-2012 11:15 AM           Profile Send private message  E-mail  Edit post Reply with quote


Get quakelivedec, convert the maps you want to look at, open the zips and decompile the map with q3map2. You will have to do the same with textures though or the map will not have any.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12493
PostPosted: 07-17-2012 12:28 PM           Profile Send private message  E-mail  Edit post Reply with quote


CZghost wrote:
Maybe I'll alert ydnar about the QL lump added in q3map2 (ID software used q3map2 to make the bsp's), If it's added in latest release and if not, if it's possible to add it in the next build... ydnar is author of q3map2. ID software have used probably modified version, that adds the quakelive lump, or used unofficialy released version with that lump, that ydnar probably sent to ID software to make the maps with working ad banners...


ydnar stopped working on Q3Map2 long since before Quake Live was under production and he isn't actively part of the future development of Q3Map2 at all. Neither ydnar nor id Software have much to do with Q3Map2 anymore, it's been taken under the umbrella of the GtkRadiant project - all of it being open source so future development is a matter of any developer doing branches and commits.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-18-2012 12:59 AM           Profile   Send private message  E-mail  Edit post Reply with quote


So the latest q3map2 build is in ZeroRadiant? Maybe I'll take the care for next releases of ZeroRadiant, for the bsp version and lump...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-18-2012 03:05 AM           Profile   Send private message  E-mail  Edit post Reply with quote


j3st3r wrote:
Get quakelivedec, convert the maps you want to look at, open the zips and decompile the map with q3map2. You will have to do the same with textures though or the map will not have any.

I already have qukelivedec, already converted the maps, already exctarcted into my devfolder, but don't need to look at textures the map have. Need to look at the advertisement boards...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-18-2012 03:26 AM           Profile   Send private message  E-mail  Edit post Reply with quote


themuffinman wrote:
RtCW may have the same BSP number as QL but its lumps may be different.

The file header first needs changing to Q3's, then you can convert as normal. Hint: hex editer, figure it out yourself.

I'm using ICY Hexplorer as my HexEditor. Where to find the file header? Is it the file beginning or some unparsed data in the pixeldata memory? How to locate it and change? My letter keyboard doesn't type letters, but random signs, do you know the signs what means the letter in Hexplorer? If not, where to find it?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Warrior
Warrior
Joined: 01 Oct 2010
Posts: 97
PostPosted: 07-18-2012 01:44 PM           Profile Send private message  E-mail  Edit post Reply with quote


What exactly are you trying to do?




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 01:58 AM           Profile   Send private message  E-mail  Edit post Reply with quote


As I said, look at the advertiement boards in the map... Need some resources to make a map for Quake Live online (online because of sending it to QL developer center)...

If you have some problems with it, tell my why...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Trainee
Trainee
Joined: 30 Jun 2010
Posts: 30
PostPosted: 07-19-2012 04:11 AM           Profile   Send private message  E-mail  Edit post Reply with quote


http://www.mralligator.com/q3/
The header is part of the file itself...




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 05:45 AM           Profile   Send private message  E-mail  Edit post Reply with quote


At the page I have read the Q3 version is 0x2e (which is hexadecimal interpretation of 46 - 2E)
Have found hexadecimal number of 2F (47), which is "/" character, changed it to 2E (46), interpreting character ".", it's right after IBSP. Is it right?

But the lumps will stay as the QL's. Will it work anyway?
in Q3's BSP, the latest visible character before "I LOVE MY Q3MAP2" string is 142 offset from file beginning (offset 0) - dynasty, while in QL's BSP is the offset 149 - longestyard... Characters with hex 00 are blank places, probably... If the lumps may be the same as the version allows, then I need safely reduce the lumps' size to Q3's. The question is how...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 06:33 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Does anybody know the hex code(s) for advertisement lump? If the decompile process crashes again, I need to remove advertisement lump to proceed...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 08:37 AM           Profile   Send private message  E-mail  Edit post Reply with quote


The header of longestyard.bsp from QL was in this form:
Code:
IBSP/   Lë% G)  Đ   0     ŕÔ  ŕ# Ľ+  ŕä   ?  ¤d ”/  8” D  |Ş Ŕ  śO -  ´| đç  <® HĘ    ”& Á  ”&     „x Ŕ" ̨    ̨ €B D› ˆ
  ¨Ő& €  I LOVE MY Q3MAP2 2.5.17 on Mon May 07 11:38:22 2012
) am
The slash character right after IBSP represent 2F number (hexadecimal number 47 - QL/RTCW bsp version)...

After changing it to Q3's version it's this:
Code:
IBSP.   Lë% G)  Đ   0     ŕÔ  ŕ# Ľ+  ŕä   ?  ¤d ”/  8” D  |Ş Ŕ  śO -  ´| đç  <® HĘ    ”& Á  ”&     „x Ŕ" ̨    ̨ €B D› ˆ
  ¨Ő& €  I LOVE MY Q3MAP2 2.5.17 on Mon May 07 11:38:22 2012
) am
The dot character right after IBSP represents 2E number (hexadecimal number 46 - Q3 bsp version)...

So the base for sucessful converting has been done. The question sounds: Will it work anyway with the QL lumps after the version?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12493
PostPosted: 07-19-2012 09:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


Just to clarify... Are you trying to decompile the advertisement boards in a Quake Live map and then loading them into a GtkRadiant Q3 game-pack or into Quake 3?

If so, it certainly won't work that way. Neither GtkRadiant's Quake 3 game-pack nor Quake 3 will recognize advertisement entities since they simply aren't part of the game. Advertisements in QL have a fair amount of hard-coded stuff that is exclusive to QL.

If you're trying to do something else then I apologize, but your English skills are pretty lacking and requires a certain amount of guesswork to figure out what you mean.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44021
PostPosted: 07-19-2012 09:27 AM           Profile   Send private message  E-mail  Edit post Reply with quote


CZGhost, maybe you should start with explaining what your goal is. What are you going to do with the maps after you decompiled them. If you want to know how the advertisement boards work then I'm sure someone can explain this.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 10:11 AM           Profile   Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
Just to clarify... Are you trying to decompile the advertisement boards in a Quake Live map and then loading them into a GtkRadiant Q3 game-pack or into Quake 3?

This is what I need... I need to load the board prefab into the map file, just for the Quake Live feel. I don't need to load working banner into Quake 3 since I know that won't work...
obsidian wrote:
If so, it certainly won't work that way. Neither GtkRadiant's Quake 3 game-pack nor Quake 3 will recognize advertisement entities since they simply aren't part of the game. Advertisements in QL have a fair amount of hard-coded stuff that is exclusive to QL.

q3map2 should decompile the map with all entities they're in the map, for right display is here prepared .ent file for the QL and TA entities they're part of QL... I know the bsp file, as changed the version won't work, the goal is to load the map in Radiant...
obsidian wrote:
If you're trying to do something else then I apologize, but your English skills are pretty lacking and requires a certain amount of guesswork to figure out what you mean.

Yes, my dictionary needs some more words and sestence samples to complete :)



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-19-2012 10:14 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Eraser wrote:
If you want to know how the advertisement boards work then I'm sure someone can explain this.

Yes, I want to know it. Any help may be aprociated. Who's the person? One of QL developers? Or someone that helps with QL developing?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12493
PostPosted: 07-19-2012 10:38 AM           Profile Send private message  E-mail  Edit post Reply with quote


I don't know the answer, but don't you think... maybe, it would have been a good idea to put this information in the very first post?



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Immortal
Immortal
Joined: 02 Jun 2006
Posts: 2475
PostPosted: 07-19-2012 08:42 PM           Profile Send private message  E-mail  Edit post Reply with quote


the ads will just be a texture on a surface? whats the issue here?




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44021
PostPosted: 07-19-2012 11:06 PM           Profile   Send private message  E-mail  Edit post Reply with quote


fKd wrote:
the ads will just be a texture on a surface? whats the issue here?


I have 0 knowledge of how they work, but I imagine it's some sort of entity or perhaps a specific shader that's applied to the brush or surface.
Quake Live needs to load the right advertisement in there, so a fixed texture won't work.




Top
                 

Insane Quaker
Insane Quaker
Joined: 16 Sep 2010
Posts: 391
PostPosted: 07-20-2012 12:02 AM           Profile Send private message  E-mail  Edit post Reply with quote


Eraser wrote:
fKd wrote:
the ads will just be a texture on a surface? whats the issue here?


I have 0 knowledge of how they work, but I imagine it's some sort of entity or perhaps a specific shader that's applied to the brush or surface.
Quake Live needs to load the right advertisement in there, so a fixed texture won't work.

They use a special entity called "advertisement", which is similar to a func_static but capable of streaming ad content from select providers. Each of them have a "cellId" spawnflag, viewable in-game with "r_debugads 1". It's not really as simple as slapping in a three-digit number for the cellId and calling it a day, however. Apparently, there's some behind-the-scenes stuff regarding how ads work, most likely embedded in the game's code itself, and therefore it is impossible to build a fully functional advertisement without access to the developer toolset. You could probably troll around though and make some easter eggs by putting "Hello World" for a cellId.



_________________
EmeraldProductions
http://emeraldproductions.weebly.com/index.html


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-20-2012 12:27 AM           Profile   Send private message  E-mail  Edit post Reply with quote


fKd wrote:
the ads will just be a texture on a surface? whats the issue here?

Have you played Quake Live? If so, then you know the advertisement boards are arragment in walls, at some stands and not just as a brush placed at the wall (some of the ad boards are placed directly at the wall, but have framing). Some of the billboards have framing, some of them are just a single brush with one surface textured with advertisement placed on stands or some hang, and not just flying around, or glued directly on the wall...

/*EDIT: Oh, also, have you seen ad boards in space arenas? They're floating in the air, but have more details, such as jets, towers and the framing... Ad texture is transparent, to fly through... */

So this is the reason I need help with decompiling the map, I need to load advertisement boards in Radiant (which I'll decompose the advertisement entity into worldpspawn)...

EmeraldTiger wrote:
They use a special entity called "advertisement", which is similar to a func_static but capable of streaming ad content from select providers. Each of them have a "cellId" spawnflag, viewable in-game with "r_debugads 1". It's not really as simple as slapping in a three-digit number for the cellId and calling it a day, however. Apparently, there's some behind-the-scenes stuff regarding how ads work, most likely embedded in the game's code itself, and therefore it is impossible to build a fully functional advertisement without access to the developer toolset. You could probably troll around though and make some easter eggs by putting "Hello World" for a cellId.

I just need to load advertisement shape, not build working ad banner, since I know that won't work with right compile prog...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-20-2012 02:48 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Have downloaded q3map2 v2.5.17, which was used to compile Quake Live maps, but haven't found any -game switch to compile with QL lumps... Looks like ID software have developed this version for themselves to compile the maps they have created...

It's possible the QL support is hidden somewhere, but cannot find it... Does anybody know the all new features q3map2 v2.5.17 contains? The download doesn't contain documentation for this...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 07-20-2012 03:04 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Have found some informations at excessive plus forums:
Quote:
Quakelive maps (IBSPv47) can be decompiled with q3map2.exe(v2.5.17) using .bat: "q3map2.exe -game quakelive -convert -format map <mapname.bsp>".

So, if it's true, then there's nothing to edit in BSP files, it just decompiles the bsp's as they are into raw map file to load it in radiant... When compiling quakelive map, use the same switch as in decompile, but what to do with the added lump, when there's no advertisement entity? Maybe I'll use it only for decompile...

// EDIT: Yes, the -game quakelive switch decompiles the map almost correctly (there are some textures parsing issues, texture alignments are lost and doesn't put in misc_model entities with desired models' pathnames)... I'll just test, how the quakelive advertisments work, just making the advertisement entity on a patch used to make the ad board (in usage with brushes) and putting in some cellId number... As the quake live shows error, when loading up the map, then the cellId value must be previously recorded in game's code... For a test while, I'll set up a value previously set in a source level, will try, if that will work. If not, then it's better to compile as Q3's bsp and for ID Software keep the source map with the prebaked Q3 bsp - IBSP. -- . = 2Eh (46) - to give it a try... They'll look at and compile it directly as QL bsp - IBSP/ -- / = 2Fh (47) - It may work, when they update the code...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Mercenary
Mercenary
Joined: 06 Nov 2011
Posts: 247
PostPosted: 08-02-2012 07:10 PM           Profile Send private message  E-mail  Edit post Reply with quote


Heh, I remember this... there are a few methods since QL isn't open source and we had to figure out our own ways of doing things.

Simply decompiling the map isn't really what you want, unless you do just want to mess with the map in Radiant. You'll need to add all the lights and re-do the textures if you want to compile the map again. That's where the BSP editing comes in, and there are at least two ways of doing it that I know of.



..But I'm not going to say what they are 8)




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 08-02-2012 11:52 PM           Profile   Send private message  E-mail  Edit post Reply with quote


@KI:
I just need to look at the map in Radiant.
Have exctracted some advertisement boards to usage. Now I know they have used patch with ad texture to make advertisement entity. The ad entity is only one patch, which advertisement entity makes non-solid.

The way to make solidity of some boards is caulked face of the brush ading the depth for the patch... Brushes around or behind the advertisement patch are just worldspawn, so they emmit the marks (except for caulked faces)...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 384
PostPosted: 08-03-2012 09:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


That -game quakelive switch seems to do the trick... never knew Net's q3map2 could do that, good find CZghost.

Looking through the 1.6.2 code it seems its q3map2 also has quakelive compile/decompile functionality, and the editor has QL pk3 support. Hell knows, I've been setting up ql.game file etc. and trying to get it loading the textures from the original pk3's but I can't. I modded the code some to try and fix where I thought it was missing stuff but I'm missing include files even though I've got Python and SVN installed so I can't build it... the fuck.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12493
PostPosted: 08-03-2012 05:54 PM           Profile Send private message  E-mail  Edit post Reply with quote


We're currently working on Quake Live support for GtkRadiant. It'll hopefully be running properly for the 1.6.3 release.

Here is the latest "nightly" build if you guys want to test QL support... Warning - experimental code ahead: We're using this build to test things internally, it isn't considered something for general public use. It may eat your map files, or crash your computer, or turn your pubes orange. I'm not sure if bspc.exe/q3map2.exe works with QL with this build, there have been a number of changes since this build was put together. I would advise keeping this build as a separate install and not using it for any production maps (or at the very least, make a backup).

https://s3.amazonaws.com/GtkRadiant/Gtk ... 120731.zip



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1900
PostPosted: 08-05-2012 01:40 AM           Profile   Send private message  E-mail  Edit post Reply with quote


@muffin: Right, it's GTK radiant 1.6.2 q3map2 version. Never triedto decompile quakelive map with Net's q3map2.
Have also realised the q3map2 v2.5.17 have also the GTK radiant 1.5 - Editor I'm using.

@obs: 1.6.2 radiant has the old textures button in the strip, which allows only first 100 directory groups? All other have to display only with shaderlist.txt only feature (disables all other dirs that haven't been provided by shaderlist.txt - shader filenames represents the dirs with all textures inside)... Maybe in 1.6.3 you can implement the 1.5.0 textures window, that includes texture dirs inside with all the directories provided in pk3's AND in shaderlist.txt file...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group