How to decompile QL map?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

How to decompile QL map?

Post by CZghost »

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?
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: How to decompile QL map?

Post by cityy »

Maybe you need to add a -game switch; QL uses the RTCW .bsp version.
www.ferdinandlist.de/leveldesign
akm
Posts: 11
Joined: Sat May 08, 2010 12:15 pm

Re: How to decompile QL map?

Post by akm »

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

Should do it.
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: How to decompile QL map?

Post by themuffinman »

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.
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
j3st3r
Posts: 97
Joined: Fri Oct 01, 2010 11:02 pm

Re: How to decompile QL map?

Post by j3st3r »

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.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to decompile QL map?

Post by obsidian »

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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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?
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
j3st3r
Posts: 97
Joined: Fri Oct 01, 2010 11:02 pm

Re: How to decompile QL map?

Post by j3st3r »

What exactly are you trying to do?
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
ailmanki
Posts: 30
Joined: Wed Jun 30, 2010 6:35 pm

Re: How to decompile QL map?

Post by ailmanki »

http://www.mralligator.com/q3/
The header is part of the file itself...
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

Does anybody know the hex code(s) for advertisement lump? If the decompile process crashes again, I need to remove advertisement lump to proceed...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

The header of longestyard.bsp from QL was in this form:

Code: Select all

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: Select all

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?
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to decompile QL map?

Post by obsidian »

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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: How to decompile QL map?

Post by Eraser »

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.
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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 :)
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to decompile QL map?

Post by CZghost »

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?
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to decompile QL map?

Post by obsidian »

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?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: How to decompile QL map?

Post by fKd »

the ads will just be a texture on a surface? whats the issue here?
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: How to decompile QL map?

Post by Eraser »

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.
EmeraldTiger
Posts: 392
Joined: Fri Sep 17, 2010 1:53 am

Re: How to decompile QL map?

Post by EmeraldTiger »

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.
[color=#00FF00][b]EmeraldProductions[/b][/color]
http://emeraldproductions.weebly.com/index.html
Post Reply