Jump to content


Photo

[RELEASE] BAM Batcher


  • Please log in to reply
83 replies to this topic

#81 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 18 May 2021 - 06:16 PM

Hello!

 

I have unpacked a description BAM which is made of 4 frames. How can I repack it into a description BAM? Convert BMPs to description BAMs creates four different files rather than putting them together like Convert BMPs to inventory BAMs does using xxxxxxl.bmp and xxxxxxs.bmp as source.

 

Thanks!

BAM Batcher isn't capable of reassembling complex multi-frame/multi-sequence BAMs.  While 4-part description BAMs are certainly on the less complex end of that spectrum, I don't have much inclination to add additional features to BAM Batcher at this point.  For this task (and most others), I recommend using PS BAM instead.  It is also a command-line utility, but much more powerful.

 

Using PS BAM, you can extract description icon frames using a .BAT file like:

Spoiler

Replace "CPLAT01" with whatever your filename is.  Wildcards ("*") are supported.

 

Then recombine the frames using:

Spoiler

Pass it only the first frame of the sequence (again, wildcards are supported so that the first frame of multiple BAMs may be passed at once).  "%~dp0" is a special CMD option to insert the current working directory (including the trailing \) which I have used here for simplicity.  While all these options/parameters may look daunting at the first glance, most of these options are set to enable good compression of the resulting BAM or are set to the default value (do not use).  Of particular interest here is "--BAMProfile "DescriptionIcon" which sets the appropriate frame offsets for a description icon.  Feel free to ask questions in the PS BAM thread if you have questions.


"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

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#82 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 18 May 2021 - 08:29 PM

Worked like a charm!

 

Thank you, Sam. 

 

I must admit I would have had some problems creating the two .BAT files for the job if you didn't provide them yourself. All I did was to change the name of the file to modify and the directory for the PS BAM, making sure the .BAM file was in the same directory where the .BAT file is.



#83 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 19 May 2021 - 04:10 AM

I must admit I would have had some problems creating the two .BAT files for the job if you didn't provide them yourself.

FWIW, recombining the frames is as simple as

Spoiler

This provides the same result as the longer script, with the finer details of the compression taken care of for you and the unused/irrelevant options left at their default internal values.


"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

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#84 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 19 May 2021 - 11:05 PM

Thanks.

 

It will come in handy when and if I have a similar task again in the future.

 

Cheers!  :cheers: