News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Working with BFG .resources/.crc packages

Started by Radegast, May 20, 2014, 05:15:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Radegast

Is there a tutorial somewhere on the net about how to correctly pack .resources and generate corresponding .crc files? Are there any standalone utilities for doing that?

It would be great if there was a short guide on making a simple BFG mod, but if there was such a thing I bet it was lost with with doom3world.org shutdown.

Sir Blackington

Funny u should mention that. Literally the very last set of posts that I made with nx-117 was about mapping in radiant and porting it over to BFG. Aaand then doom3world went down.... Good news is its very much doable, bad news is I can't remember how to and what I remember about it wasn't exactly quick and easy. If u find out, let me know, or hopefully friar can dig that up

Sir Blackington

Sorry, I wasn't paying attention, and forgot, I don't think at any point I ended up packing the maps into those formats, they just ran without bring in .crc and .resources but things had to be generated. If someone can.correct me (cough motorsep cough) or better yet find my posts regarding map making for BFG in radiant right before d3w went down, please post

trebor

Well the resources system was introduced in Rage to meet the Blu-ray latency requirements for streaming.
TBH, I think the new virtual filesystem really sucks.

This has to be looked up into the sourcecode:

1) You work on your game without any resources files

2) You play it with fs_buildResources 1. This creates files that contain a list of all referenced assets from base/ and base/generated/

3) Cook your resources files with the buildGame command that uses the .preload and .manifest files from 2)

Usually you have one .resources file for each map and all those resources contain duplicated content. The content that is shared among the resources files resides in _common.resources.


However I changed the filesystem in RBDOOM-3-BFG.

You can simply run custom content in a mod with +set fs_game <modname> +set fs_resourceLoadPriority 0.

It is not necessary cook a map but the filesystem looks through all .resources files when looking for a single file.



Sir Blackington

Thanks treb, would love to try it out but it seems linux and amd propriatary drivers don't mix well and is making getting rbdoom3 that much more difficult. So if make ur map using radiant, put the .map in the /base, make the assets in watever and put them in the appropriate subdirectory /base/generated, start BFG, console fs_buildresources 1, run map from console? So you can't just toss all the different assets in the generated and hope the game sorts them accordingly? You have to put custom textures in the textures subdirectory?

Radegast

If you run rbdoom3bfg with the +set fs_resourceLoadPriority 0 parameter then your unpacked files are loaded before the ones in .resources

I couldn't test mapping yet, because DarkRadiant has issues with my NVIDIA card, but here's the answer to my original question. I followed Treb's instructions and it's quite simple to make modifications in RBDOOM-3-BFG.

In the doom console type: exec extract_resources

This unpacks all resources into the basedev directory where you can edit them.

Finally, start the game with these arguments:

RBDoom3BFG +set fs_game basedev +set fs_resourceLoadPriority 0

Sir Blackington

Cool, thanks for the clarification. It all sounds simple enough, but I'm sure ill manage a way to make a mess of it. I'd try it out but I'm having trouble making rbdoom for some reason.

Radegast

I decided I'll give modding BFG another try, so I unpacked all the .resources files using Robert's extract_resources.cfg script and realised there is one important thing missing besides sounds - textures. In which .resources files are they stored in and why aren't they extracted?

_common.preload def             generated       maps            models          newpdas         renderprogs     skins
af              fx              guis            materials       newfonts        particles       script          sound


As you can see there is not textures directory among the extracted files in /basedev.

trebor

Quote from: Radegast on February 15, 2015, 03:48:19 AM
I decided I'll give modding BFG another try, so I unpacked all the .resources files using Robert's extract_resources.cfg script and realised there is one important thing missing besides sounds - textures. In which .resources files are they stored in and why aren't they extracted?

_common.preload def             generated       maps            models          newpdas         renderprogs     skins
af              fx              guis            materials       newfonts        particles       script          sound


As you can see there is not textures directory among the extracted files in /basedev.

It is indeed a problem. The BFG didn't ship with any texture sources images. All images are already compressed into the DXT .bimage format for fast loading times and those are put to generated/images/ .

motorsep

Quote from: Radegast on February 15, 2015, 03:48:19 AM
I decided I'll give modding BFG another try, so I unpacked all the .resources files using Robert's extract_resources.cfg script and realised there is one important thing missing besides sounds - textures. In which .resources files are they stored in and why aren't they extracted?

_common.preload def             generated       maps            models          newpdas         renderprogs     skins
af              fx              guis            materials       newfonts        particles       script          sound


As you can see there is not textures directory among the extracted files in /basedev.

Is there any reason you need TGA textures? 99.9% of the textures are straight from Doom 3 (except normal maps for characters).

Radegast

DarkRadiant won't work with these textures out of the box. I tried converting them back to tga using crunch and opening them in Gimp with DDS plugin, but it always fails due to "unrecognized file format". Oh well, I'll just to find some similar textures at opengameart.org or someplace else.

motorsep

Quote from: Radegast on February 16, 2015, 05:43:34 AM
DarkRadiant won't work with these textures out of the box. I tried converting them back to tga using crunch and opening them in Gimp with DDS plugin, but it always fails due to "unrecognized file format". Oh well, I'll just to find some similar textures at opengameart.org or someplace else.

What I am saying is your can copy Doom 3's textures/ folder and map with that. Or better yet, make a map for vanilla Doom 3 using Doom 3 materials, and your map will run with BFG out of the box.

romulus_ut3

#12
Motorsep, sorry for the n00bish query but suppose there's a existing DOOM 3 mod that uses .dds files which aren't even read by BFG Edition, so what will I have to do in order to get it to work for BFG Edition?

motorsep

Quote from: romulus_ut3 on February 18, 2015, 10:54:43 PM
Motorsep, sorry for the n00bish query but suppose there's a existing DOOM 3 mod that uses .dds files which aren't even read by BFG Edition, so what will I have to do in order to get it work for BFG Edition?

You'll have to convert them back to TGA. BFG supports TGA only.

romulus_ut3

So if I just convert the .dds files to TGA, BFG Edition will read from the .dds folders? :D