Jump to content
The Dark Mod Forums

Quake 4 Map Support


Recommended Posts

I think if there is an easy fix to get Quake 4 and Prey maps opening in Dark Radiant again it would be beneficial to us. At the very least it would open the editor up to a wider audience who may end up making some plugins that could be useful to us as well. You never know...but if it's too much hassle at this time to get them working again, then it's surely something that could wait for awhile.

 

I brought it up with Greebo already because I often suggest Dark Radiant as an alternative on D3World...only this time my foot was in my mouth afterward. lol

Link to comment
Share on other sites

I think if there is an easy fix to get Quake 4 and Prey maps opening in Dark Radiant again it would be beneficial to us.

I briefly looked into this and it appears that the Quake 4 map format is different in two aspects:

 

- The version is 3 instead of 2

- The Surface Flags have been removed from the primitive defs.

 

Although I've recently moved the primitive parsers into the mapdoom3 module for more versatility, it's still not easily possible to implement these small changes just by changing a few lines in the configs. A few further restructurings in the mapdoom3 module (with respect to the .darkradiant info file parser) need to be done, before a mapquake4 plugin can be added without too much hacks. I expect that to be a few hours of work.

 

One can always hack the source to make these little changes and provide a patch, but most people don't want to compile from source.

Link to comment
Share on other sites

If you want a good beginning-level code-like task NH, you might help me and Tels track down whatever is breaking the ambient volume control. Generally speaking, bug hunting is a great way to get familiar with how the code works and fits together anyway.

 

For that matter, it's worth browsing the TDM bug-tracker or even just opening up source code files and browsing them to see how things are done (I often do this just for its own sake), and sometimes you can see where a bug is happening and how to fix it. (You should report it to the person that coded it or someone else before changing anything though, just in case.)

 

So you can do that, but I can PM you some leads on the ambient volume bug too if you're interested.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Ok, great. B)

 

Your PM folder is full, so I can't send a PM.

So I'll just quote it here.

 

I may have cracked this bug just in trying to describe the problem for you, not 100% sure but I found one big red flag which needs some testing and experimentation, and with hope fixes things. I can't really do that on this computer anyway, so there's still a lot you can help out with.

 

So... I typed out what I know in a Google Doc that you can read and go from there.

 

And here's the link:

 

https://docs.google.com/document/edit?id=1Hlldmpdwm5Je-ZgvoXvXoCx0rew97VtGvGF-b8AODpw&hl=en

[edit: use the link at the bottom of this post instead, but this link is still here for reference]

 

Let me know if you have any questions or whatever. Cheers.

 

So that this topic doesn't derail this thread, if you have anything to post, do it in this thread: http://forums.thedarkmod.com/topic/11283-damn-ambient-audio-slider/page__p__220465entry220465

 

Edit: Seems I really found a bug (if not *the* bug), and we need to fix it before trying anything else. So I'm going to amend the instructions I wrote before and have you (NH) just do the fix, since it's a relatively easy programming fix, just a few lines, but good for a beginner. The doc I wrote shows it, but I wanted to write a much shorter, more direct doc to just get straight to the fix: [hrmm Google Docs is down...].

 

Ok, Super abbreviated version is

(1) change the default for the "volume" spawnarg in the info_location.def file to "1" (it's currently "60" which is bad news).

(2) Open the tdm_location_settings.script in a programming editor like Notepad++, make a new draft copy. For lines 338-339, and again just before line 452, we need to fix and add some math so "fadeInVolume" (the mapper-set volume, set in a spawnarg) assume it's a number between "0-1" (0 is silence, 1 is .ogg's native volume, .5 is half-volume), it gets factored by "music_volume" (the slider volume, also a number between "0-1"), and then "fadeInVolume" ends up as a number between "-60 to 0" (where now -60 is silence, 0 is native volume, and -30 is half volume). In other words, we need to (1) combine the mapper-volume & slider-volume to a combined volume, then (2) convert the scale for that value from "0-1" scale to "-60-0" scale (where .5 = -30). So hypothetical conversions would look like:

(fadeInVolume) & (music_volume) => (fadeInVolume)

1 & 1 => 0

.25 & 1 => -15

1 & .5 => -30

.5 & .5 => -45

1 & 0 => -60

0 & 0 => -60

etc.

So it looks like some multiplication and subtraction involved. Use what's already written as a model. E.g., you'll see another place in the script where Tels converts the slider volume from 0-40-scale to 0-1-scale (lines 107, 337); here we want the reverse of this. Make a new draft with the fix, then upload it somewhere so we can look at it. My first doc I posted above goes into a lot more detail. And you can ask questions, of course. I think it's a good beginning sort of task.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

  • 3 months later...

I checked in some changes yesterday, DarkRadiant should be capable of dealing with Quake 4 maps from now on. There was quite a bit of refactoring necessary to make this possible in a reasonably clean way. DarkRadiant is now probing the map file and is able to determine the map format on its own, so in principle all maps should be importable into DR as long as a loading module is present (so far only D3 and Q4).

 

When saving maps, it is always using the map format as specified in the .game file. For D3 and TDM this is always the "doom3" map format (version 2), when selecting the quake4.game profile the map is saved in Q4 format (version 3).

Link to comment
Share on other sites

  • 2 months later...

thanks for sorting this greebs, I opened Strombine in this, but all the textures while viame as the original author intended in DR, in TDM the maps was black. _ assume because the textures are missing all the requires args in the material file for light and sound for that matter.

 

As Im still a nube when it comes to guts of mapping, why is I can view the map as it was intended in DR but not tdm..?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...