Author Topic: Feature request: Function for properly installing PVRZ-based MOS and BAMs  (Read 5957 times)

Offline Argent77

  • Planewalker
  • *****
  • Posts: 187
BG(2)EE introduced the new PVRZ file format and their associated format variants TIS, MOS and BAM. Unlike with the old and known file formats there is no way to specifically define the names of the associated PVRZ files.

The new TIS format variant requires the PVRZ filenames to consist of the first letter of the TIS filename followed by the four-digits area code (or whatever characters happen to be at those positions) and the optional 'N' character of night tilesets. This restriction can still be handled by the modder without additional help from WeiDU.

The new BAM and MOS files however use an even more restrictive rule to define filenames for the associated PVRZ files. Each MOS/BAM file references PVRZ files that have to be addressed by a decimal number. The resulting PVRZ filename is composed of a fixed prefix 'MOS' and a zero-padded decimal number of at least four digits (although 5 digits are supported as well), which limits the range to 0...99999.

The main problem is how to determine which decimal number is still unused in the user's game installation and update the MOS/BAM accordingly, as other mods or game updates might add PVRZ files on their own. Since you have to prepare the BAM/MOS files beforehand with fixed PVRZ index references, there is no (easy) way to update the files to match the current configuration of the user's game installation.

That's why I request a new WeiDU function that handles all this stuff internally. It should:
  • only work in games that support the new PVRZ-based file formats
  • work on BAM V2 or MOS V2 files only
  • copy a specified BAM or MOS file from source to target
  • detect how many PVRZ indices are required
  • detect the next (contiguous?) block of free PVRZ indices in the game's installation
  • copy and rename the associated PVRZ files from source to target
  • update the new PVRZ indices in the BAM or MOS file
  • (optionally) providing a way to add more than one search path for source PVRZ files (in case the modder wants to spread the files over different directories)

Since the game developers may provide more PVRZ files in future updates, it might be a good idea to use a minimum index for PVRZ files that is guaranteed not to be used officially.

The next official version of NearInfinity will definitely contain various conversion routines to create PVRZ-based TIS, MOS and BAM files, so it is likely that modders want to make use of it.

Any thoughts or suggestions?

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
I'll look into it when I have fewer things that needed to have been done a long time ago. The implementation of this feature can probably be expedited by the contribution of code, real or pseudo, if anyone's inclined.

Offline Sam.

  • The moose man
  • Planewalker
  • *****
  • Posts: 86
  • Gender: Male
    • Classic Adventures Homepage
The new TIS format variant requires the PVRZ filenames to consist of the first letter of the TIS filename followed by the four-digits area code (or whatever characters happen to be at those positions) and the optional 'N' character of night tilesets. This restriction can still be handled by the modder without additional help from WeiDU.
The situation has arisen that the modding prefix for the Balduran's Seatower mod areas ("BS") conflicts with the EET prefix for BG1 areas ("BG") when generating PVRZ files (using NI) for the areas.  As more and more mods become fully compatible with the EEs, I believe this issue will continue to surface.  It would be very helpful if the UPDATE_PVRZ_INDICES, INSTALL_PVRZ, and FIND_FREE_PVRZ_INDEX WeiDU functions also supported the TIS variant.  I'm taking a crack at modifying the functions to work with TIS files and their associated PVRZs, but my efforts will likely seem crude compared to what Argent77 (the original author of these functions) or another WeiFU ninja could produce.  Any chance for an "official" update here?
"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"
-- <CHARNAME> to Portalbendarwinden

Offline subtledoctor

  • Planewalker
  • *****
  • Posts: 131
The situation has arisen that the modding prefix for the Balduran's Seatower mod areas ("BS") conflicts with the EET prefix for BG1 areas ("BG")

The real one or the ripoff mod?  (Also since when do individual mods get their own prefixes?  Isn't one per modder enough?

BG(2)EE introduced the new PVRZ file format and their associated format variants TIS, MOS and BAM. ... The new TIS format variant requires the PVRZ filenames to consist of the first letter of the TIS filename followed by the four-digits area code (or whatever characters happen to be at those positions) and the optional 'N' character of night tilesets.
... Each MOS/BAM file references PVRZ files that have to be addressed by a decimal number. The resulting PVRZ filename is composed of a fixed prefix 'MOS' and a zero-padded decimal number of at least four digits (although 5 digits are supported as well), which limits the range to 0...99999.

I really like the new EE engine, the latest features added by Beamdog are great... but man, this thing really is just being held together with duct tape at this point.   :o

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
The situation has arisen that the modding prefix for the Balduran's Seatower mod areas ("BS") conflicts with the EET prefix for BG1 areas ("BG")

The real one or the ripoff mod?  (Also since when do individual mods get their own prefixes?  Isn't one per modder enough?
The real mod. And a 2-letter unique prefix doesn't help if the second letter gets cut out by the pvrz naming convention, which leads to the mentioned problems.

I really like the new EE engine, the latest features added by Beamdog are great... but man, this thing really is just being held together with duct tape at this point.   :o
Yes, the pvrz naming scheme wasn't the cleverest of ideas. (At least not if you respect the modder scene in any way.)
« Last Edit: February 14, 2020, 03:46:04 AM by jastey »

Offline subtledoctor

  • Planewalker
  • *****
  • Posts: 131
a 2-letter unique prefix doesn't help if the second letter gets cut out by the pvrz naming convention, which leads to the mentioned problems.

Ah - I misunderstood.  It's not the particular prefix used, it's that the scheme messed up any 2-letter prefix.

Yes, the pvrz naming scheme wasn't the cleverest of ideas. (At least not if you respect the modder scene in any way.)

It doesn't even strike me as disrespectful, it's just... it reminds me of something I might do.  And I am the rankest of rank amateurs.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: