PDA

View Full Version : Map height



guiismiti
26th September 2015, 02:23
Hello,

I'm trying to edit Toujane - I need to triple its maximum height.
Do I need Radiant for this or can I find the dimension values and edit with notepad++ or a hex editor?

In case somebody doesn't know what I mean by maximum height - if you fly in a map and reach this height, you won't see enemies or hear your shots anymore. I need to increase this to increase the height that my gunship flies at (it's way too low in Toujane).


Thanks in advance!

serthy
26th September 2015, 13:20
I do not know how or if you can extend the skybox.
However, the stock maps use a texture called 'hint' (transparent greenish in tool iirc).
Iirc this texture tells the server, that upon this plane bullets doesn't need to be tracked anylonger.
Maybe this also prevents sounds been played. If its possible, you could hexedit this to another texture-type.
Obviously only after you checked the max-distances of the soundaliases, and if I'm even right with my theory...

kung foo man
26th September 2015, 17:50
My idea was to get the brush and just change the plane distances in the .d3dbsp, so I rewrote my old D3DBSP parser and added 10000 units to the 2 planes (up and bottom). The D3DBSP is loading fine (just zip it and rename to .iwd, .d3dbsp can't be loaded without being packed).

The brush ID of the top skybox is #4500 and plane #4 and #5 are the bottom/up planes (brush has 6 planes, the start index in brushSidesLump is 43568). Planes are just normal (vec3) + distance (float).

If anybody wants to test around with it, I attached the Visual Studio project as .zip

Since the top sky brush is now higher, the spectators can fly over it, as seen here:

938

The problem is, entities still disappear at the height of normal skybox. :D So that information is saved somewhere else... it would probably need a partial BSP rebuild, but I never learned the BSP tree stuff, so I can just guess.

This .iwd contains the mp_fix.d3dbsp, if somebody wants to test: http://killtube.org/downloads/cod2/toujane%20sky%20fix%20height/maps.iwd


Some debug data from parser, after applying the additional height:

file-offset for brush-lump: length=0x00000038, offset=0x0000003C
brush[4500] numSides= 6 texture=0 brushSideIndex=43568
brushide: 0 -15092 distance=-2240.00
brushide: 0 17806 distance=4544.00
brushide: 0 -15232 distance=-1024.00
brushide: 0 17860 distance=6272.00
brushide: 0 17664 distance=12048.00
brushide: 0 17668 distance=12112.00
] end.

guiismiti
26th September 2015, 18:53
Found the $4500 brush in the converted .map file. I had already looked at it, but didn't test anything, since I don't know how to recompile a .map file


( 4544 6272 2048 ) ( -2240 6272 2048 ) ( -2240 -1024 2048 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0
( -2240 -1024 2112 ) ( -2240 6272 2112 ) ( 4544 6272 2112 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0
( -2240 -1024 2112 ) ( 4544 -1024 2112 ) ( 4544 -1024 2048 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0
( 4544 -1024 2112 ) ( 4544 6272 2112 ) ( 4544 6272 2048 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0
( 4544 6272 2112 ) ( -2240 6272 2112 ) ( -2240 6272 2048 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0
( -2240 6272 2112 ) ( -2240 -1024 2112 ) ( -2240 -1024 2048 ) sky_toujane 128 128 0 0 0 0 lightmap_gray 16384 16384 0 0 0 0

kung foo man
26th September 2015, 19:10
Just install asset tools and use the map compiler ^^