Jump to content

Graphic issues with created bam-files for items. Advice would be welcome


Recommended Posts

On 9/4/2020 at 3:35 AM, Sam. said:

Whichever directory you run your BAT from is your working directory.  Any file not also in this directory will need an explicit path specified.  It can simplify your BAT file somewhat to have everything in the same directory, but putting ImageMagick, PS BAM, your BAT file, and the images in the same directory can clutter things up.  It's a personal preference.

Excuse me, and i can't understand about directory of files. in this process took part several key files. Have i located them correctly? I understand that it may be a personal preference, but is it correct according to code above?

D:\AutoHotkey Scripts\Alexander12 BAM

ac95865f830c.png


Log.txt - is empty file. Yes?

b59352de3ffb.png


And BAT-file can be located anywhere? In desktop, disc D, disc C - it doesn't matter? Or it should be located in this folder too? D:\AutoHotkey Scripts\Alexander12 BAM

And BAT's location has no connection with the code (what was written in text file)?

And Ps-Bam and magic.exe:

cba6320fc397.png

4bdd9f180175.png

 

Edited by Alexander12
Link to comment
Guest Morgoth

Hello.
I would like to understand how to create a BAM file that I may thereafter inject into my game. The reason is that I am trying to edit an item. I want to replace its picture in DLTCEP with a custom picture from outside the game. I may be able to do it without creating a custom BAM file, but I do not know how. I don't know what tool to use to even make one.

I did some snooping around the internet to find out how to "create a BAM file" and found SAMtools... but apparently that is a Linux tool and I am using Windows. So if there is a sage out there with some deep insight into how to create a BAM file or edit one in game using a pic from outside the game, please let me know at your earliest convenience. Thank you!

Link to comment
1 hour ago, Guest Morgoth said:

Hello.
I would like to understand how to create a BAM file that I may thereafter inject into my game. The reason is that I am trying to edit an item. I want to replace its picture in DLTCEP with a custom picture from outside the game. I may be able to do it without creating a custom BAM file, but I do not know how. I don't know what tool to use to even make one.

I did some snooping around the internet to find out how to "create a BAM file" and found SAMtools... but apparently that is a Linux tool and I am using Windows. So if there is a sage out there with some deep insight into how to create a BAM file or edit one in game using a pic from outside the game, please let me know at your earliest convenience. Thank you!

PS BAM is written in the AutoHotkey programming language, which is Windows only.  I'd say you start with finding or making an image of the item you want.  Preferably with a clean background, and preferably one that is already about the right size (the large frame is no larger than 64x64 pixels.

Link to comment

@Alexander12

I'm going to try again to show you how PS BAM is supposed to work.

  1. Download this and run it.  It is a self-extracting archive of everything you need.  Select a location that is an empty folder, and let it extract the contents of the archive.
  2. DO NOT DELETE ANYTHING!  DO NOT MOVE ANYTHING!  Everything you need will be extracted into a folder called "AllTogether" at whatever location you specified.
  3. Inside "AllTogether" you will find "!AllTogether.bat".  Run it.
  4. Your new BAMs should be created and saved into a folder called "YourNewBAMsAreHere"
  5. At this point, take a look at "!AllTogether.bat" to see how it works, and how the relative paths are set up.  The only special thing to note is "%~dp0".  This inserts the current path to your BAT file (including the trailing \).

See if that clears things up.

Link to comment

I think I wrote one of these before

 

to make a .bam the inventory icon for an item:

 

you need 2 images you can use for the 2 frames (I always bmp)

bamworkshop2

 

Frame0 is the larger image that is seen when you drag the item around

frame1 is the smaller resting image.

 

1. Open bws2

     the right you will see 2 windows the top is where the sequences are

     the bottom is where the frames are.

2. Lower window Right-click on FRAME0

a. Delete Frame

3. Top left under colors click CONVERT TO UNPALETED (this is important)

3. Lower window Right-click IMPORT FRAME INTO SEQUENCE

4. Select your first image (larger)

5. On the right, upper window Right-click NEW SEQUENCE

6 Left-click SEQUENCE1 (this is important)

7. Lower window Right-click IMPORT FRAME INTO SEQUENCE (yes, again)

8. Select your second image (smaller)

9. Top left under colors click CONVERT TO PALETED (back to)

10. In the tools section on left select FILL/COLOR DUMP

     The default colors are the left-click non-functioning shadow color and right-click transparency

     also in the pallet the first 2 colors are there.

11. Right-click all the areas the you want transparent.

12. Select Sequence0 and repeat step 11

     You can view your frames by hitting the fourth button above the frames window (you have to select the other sequence then back again 

      to view changes.

13.Save your bam (no more than 8 characters)

 

14. Add your bam to the item in DLTCEP and click center bam save your item. Enjoy.

 

Description bams only have 1 seq. And 1 frame.

 

Mod you might want to add this to the tutorials section

Edited by Sir-Kill
Link to comment

@Sam.

 

I don't want to start a new topic...

Is there a way compress .bam using PS BAM to reduce its size?

After compression in NI it drops from 176KB to 60KB etc. (for .bam -> from 65KB .png )

No luck with PS BAM.

This do nothing:

--CompressionProfile "Max"  

There not even making Log.txt

"PS BAM_x64.exe" "E:\Media\Gry\PS-BAM\Nowy folder\*.png" --ExportWithTransparency 1 --CompressionProfile="Max"  --LogFile "E:\Media\Gry\PS-BAM\Log.txt" --Save "BAM" "E:\Media\Gry\PS-BAM to compress\*.bam”

Ok now i know, should be: 

"PS BAM_x64.exe" --CompressionProfile="Max" "E:\Media\Gry\PS-BAM\Nowy folder\*.png" ...

 

Edited by szef
Link to comment

@szef

Are you trying to convert PNGs into compressed BAMs or are you trying to further compress existing BAMs?

Edit:  What I'm confused by is what

1 hour ago, szef said:
"E:\Media\Gry\PS-BAM\Nowy folder\*.png"

stuck in there is supposed to be doing.  If you're trying to further compress existing BAMs, I'd suggest something like the following:

"PS BAM_x64.exe" --Save "BAM" --CompressionProfile "Recommended" --LogFile "E:\Media\Gry\PS-BAM\Log.txt" --OutPath "E:\Media\Gry\PS-BAM compressed" "E:\Media\Gry\PS-BAM to compress\*.bam"

 

Edited by Sam.
Link to comment
8 minutes ago, szef said:

I'am trying (it's already done ;)) to convert PNGs into compressed BAMs.  PNGs are in 'Nowy folder', and BAMs converting into 'compressed'.

Then I'd suggest this:

"PS BAM_x64.exe" --Save "BAM" --CompressionProfile "Recommended" --LogFile "E:\Media\Gry\PS-BAM\Log.txt" --OutPath "E:\Media\Gry\PS-BAM\Nowy folder\compressed" "E:\Media\Gry\PS-BAM\Nowy folder\*.png"

However, unless you want each PNG to be converted into a separate BAM, "*.png" isn't going to do what you want.  You need to point PS BAM to the 1st frame of each BAM, and the images should be named so that PS BAM can detect which PNGs belong to the same BAM and know which sequence to put them in.  To give further advice I'll need more info.

Link to comment

I see. Yes i want PNGs convert into separate BAMs with the same name as PNGs. However, it should only be one frame and cycle.

The idea is for PSTEE to read these BAMs as portraits in the second (new) bestiary.

It looks like this: bam lua "getBestiaryImage2()" 

 

From what I can see everything is working now :).

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...