Blood: rffdefineid for sounds

Post Reply
User avatar
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Blood: rffdefineid for sounds

Post by NightFright »

Can anyone tell me how rffdefineid exactly works in .def files?

I have figured out there is the rough destinction between SYSTEM (everything that goes into blood.rff) and SOUND (everything for sounds.rff). However, I only manage to get graphics stuff loading, not sounds.

Example:
rffdefineid "qav\AXEUP" "QAV" 0 "SYSTEM" --> Works
rffdefineid "raw\AX_SWIPE" "RAW" 1101 "SOUND" --> Does not work

How to exactly pull this off?

For the example given above, ax_swipe.raw (located in "raw" subdir), the RFS definition looks like this:

Code: Select all

resource "RAW\AX_SWIPE.RAW";
data "AX_SWIPE.SFX" as 1101: 100, 0x11025, 0x0, 1, -1, "ax_swipe";
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Blood: rffdefineid for sounds

Post by Graf Zahl »

RAW files are not loaded by ID, only by name. The ID needs to be on the SFX file.
User avatar
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: Blood: rffdefineid for sounds

Post by NightFright »

So it would have to be like this?
rffdefineid "raw\AX_SWIPE" "SFX" 1101 "SOUND"

Or it requires two entries like in the original?
rffdefineid "raw\AX_SWIPE" "RAW" "SOUND"
rffdefineid "AX_SWIPE" "SFX" 1101 "SOUND"
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Blood: rffdefineid for sounds

Post by Graf Zahl »

Only the SFX file needs the ID - the RAW file is loaded from the name that's stored in the SFX. But I'm not the expert here, you better ask the Blood modders about how to use it properly. These fields were invented by NBlood.
User avatar
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: Blood: rffdefineid for sounds

Post by NightFright »

The thing is, I've actually been told over at the Duke4 forums that NBlood does not support loading sounds this way at all, at least right now. So if you inherited this from there, does it work in Raze? I haven't seen it in working condition anywhere so far.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Blood: rffdefineid for sounds

Post by Graf Zahl »

I had to rewrite that code from the ground up because Raze does not use NBlood's resource management. rffdefineid doesn't do much - it only assigns a resource ID to the new entry. And the last parameter gets ignored in Raze because it does not separate sound resources from the rest like NBlood does.
User avatar
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: Blood: rffdefineid for sounds

Post by NightFright »

Makes sense, TBH I dunno what's the point in the disinction between the SOUND and SYSTEM tags. In the end it's always about assets that need to be loaded, regardless what it is. Regarding that, seems like Raze is ahead of NBlood right now.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Blood: rffdefineid for sounds

Post by Graf Zahl »

The difference is that Blood treats blood.rff and sounds.rff as separate file systems and this specifies in which one the entry gets linked.
NBlood preserves this quirk - Raze does not, it has a unified file system for everything. Which is fine because there's no collisions between them.
Post Reply

Return to “General”