Author Topic: Working with BFG .resources/.crc packages  (Read 12876 times)

0 Members and 1 Guest are viewing this topic.

Radegast

  • Newbie
  • *
  • Posts: 27
  • Karma: +3/-1
  • Alpha Labs scientist
    • View Profile
    • ET: Legacy
Working with BFG .resources/.crc packages
« on: May 20, 2014, 05:15:53 PM »
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

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +2/-0
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #1 on: May 21, 2014, 08:34:40 AM »
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

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +2/-0
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #2 on: May 21, 2014, 08:39:42 AM »
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

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +14/-7
  • Boomstick Veteran
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #3 on: May 22, 2014, 05:11:13 AM »
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

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +2/-0
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #4 on: May 26, 2014, 07:31:52 AM »
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

  • Newbie
  • *
  • Posts: 27
  • Karma: +3/-1
  • Alpha Labs scientist
    • View Profile
    • ET: Legacy
Re: Working with BFG .resources/.crc packages
« Reply #5 on: May 28, 2014, 06:05:47 PM »
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:

Code: [Select]
RBDoom3BFG +set fs_game basedev +set fs_resourceLoadPriority 0

Sir Blackington

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +2/-0
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #6 on: May 31, 2014, 07:49:29 AM »
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

  • Newbie
  • *
  • Posts: 27
  • Karma: +3/-1
  • Alpha Labs scientist
    • View Profile
    • ET: Legacy
Re: Working with BFG .resources/.crc packages
« Reply #7 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?

Code: [Select]
_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

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +14/-7
  • Boomstick Veteran
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #8 on: February 15, 2015, 04:58:26 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?

Code: [Select]
_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

  • Hero Member
  • *****
  • Posts: 989
  • Karma: +74/-131
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Working with BFG .resources/.crc packages
« Reply #9 on: February 15, 2015, 08:47:10 PM »
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?

Code: [Select]
_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

  • Newbie
  • *
  • Posts: 27
  • Karma: +3/-1
  • Alpha Labs scientist
    • View Profile
    • ET: Legacy
Re: Working with BFG .resources/.crc packages
« Reply #10 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.

motorsep

  • Hero Member
  • *****
  • Posts: 989
  • Karma: +74/-131
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Working with BFG .resources/.crc packages
« Reply #11 on: February 16, 2015, 09:01:58 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

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +1/-2
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #12 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 to work for BFG Edition?
« Last Edit: February 22, 2015, 12:36:10 AM by romulus_ut3 »

motorsep

  • Hero Member
  • *****
  • Posts: 989
  • Karma: +74/-131
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Working with BFG .resources/.crc packages
« Reply #13 on: February 19, 2015, 08:58:59 AM »
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

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +1/-2
  • Doom Newbie
    • View Profile
Re: Working with BFG .resources/.crc packages
« Reply #14 on: February 22, 2015, 12:37:50 AM »
So if I just convert the .dds files to TGA, BFG Edition will read from the .dds folders? :D