Peoples General DAT Tool
© Luis Guzmán
This is a windows program to maintenance SSI Peoples General DAT and S16 files.
I made this program to help on handling PeG DAT files and S126 files, but be aware this tool does not includes any graphic editor, as there are many good ones all over around..
This tool includes all features you can find on Progi's Dat Tool 3.1.1 - though not limited to use a DAT file called MODGEN - and on Fred Chlanda PeG Util plus some others only found here.
To install, just copy the executable file wherever you like, no additional files are required to run.
Once you run first time and define folders and files, they will be remembered, but no files are loaded automatic, you must load using recent files menu.
As with all my other ˇutilities, settings are stored and retrieved form windows registry so no configuration files are used..
All options can be accessed through a menu option and most of them also using the toolbar; place mouse upon a button and a short tooltip will pop up with a short explanation.
There are four tools inside this utility::
This tool lets you scan your s16 files in the folder you define and insert, append or remove single icons from any s16 file. You can also extract icons as bitmap files (surely to use as starting point to make other icons or to repaint and later reinsert) , Program will start here
Here you should load a Dat file (no need to be named modgen.dat ) to work with. Then you can scan all the s16 files it contents.
You can insert, append, replace or remove any single s16 file without unpacking/repacking the whole Dat file, You can also extract any single s16 file to disk or unpack all of them. Of course you can create new Dat files by repacking all s16 files in a folder.
There is no SAVE, nor SAVE AS options as any action you can use, will update the file on disk though a back up copies will be saved (but be aware each change will update that copy). Last six files opened are saved as recent files, for quick re-loading.
This tool allows creating s16 files from bitmaps. A list with bitmap files in the folder you define will be shown to help you to pick the proper ones.
Normal method would be to doble-clicking on each bitmap having a single icon to add to the s16 file. You can reorder or remove any at any time before proceding. There are also an express mode to make 9 clones of a bitmap into a s16 file (later you can replace with the properly faced one).
Shp to S16 converter.
As you can expect, this tool allows to convert PG2 Shp files into PeG-S16. Compression will be selected automatic for each icon based on smaller size as possible. You can preview both the Shp file and the converted S16 even before converting.
Conversion can be done on a single Shp base or selecting several Shp files to batch convert.
When converting Bitmaps into S16 files you should remember this:
Only Bitmaps 8 bits (256 palette colors), 24 bits or 32 bits can be used.
Bitmap's width and height will become icon total width and height
For bitmaps 24 or 32 bits, all pixels with a color RGB(220,220,248) will be taken as transparent and so skipped or converted into PeG transparent color RGB(248,0,248).
For bitmap 8 bits (256 palette colors), index
#159 - RGB(248,228,216) will be taken as
transparent as I understand it was saved from a PG2 icon..
This is the start window and as I said before, this view lets you scan your s16 files in the folder
to make any changes you need.
You will see this toolbar:
1 2 3 4 5 6 7 8 9 10 11
An a list of all S16 files within your folder and for
the one selected, all the icons contained and its stats as size, offset, ...
Either you select to see as single icon or a collage starting on selected icon, there is always one selected and stat refers to that icon.
More common options to change appearance as available both on toolbar and as buttons. But main actions are only available using buttons.
This will insert a new icon using the picture stored in a BMP file you will be prompted to select.
The new icon will be listed before the icon which is highlighted when you hit the option.
This will append a new icon using the picture stored in a BMP file you will be prompted to select.
The new icon will be listed as the last icon.
This will remove the selected icon from the S16 file. To do: hightlight the one you want to remove and double-click on it.
In order to use a Bitmap to convert into an icon it should be:
8 bits (256 palette colors) or 24 bits / 32 bits
Bitmap's width and height will become icon total width and height
For bitmaps 24 or 32 bits, all pixels with a color RGB(220,220,248) will
be taken as transparent and so skipped or converted into PeG transparent color
For 8 bits bitmap, index 159 - RGB(248,228,216) will be taken as transparent as I understand it was saved from a PG2 icon..
This view will be blank until you load a Dat file.
Once you have loaded a DAT
file you will get a list of S16 files within it on
left hand side.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
You have many options to select how to draw the pictures and some buttons to scroll icons within a S16 file I think it is intuitive enough as to need further instructions, just try a little to get used of it. At any time if any icon is bigger that picture box, icon will be resized to fit into, so check size and position reading the info upon picture box. Even if viewing as a collage, there is one selected icon whose data is shown.
As usually a Dat file has
many items, there are a filter feature to isolate the items you are interested.
First choice is to isolate all icons having 9 icons or not having 9 icons and then set a further condition based on icon name:
If you want to filter for icons starting with some letter, simple type those letters on "With" textbox and press DO button
But if you want to filter for icons having some text (so at any position) type a dollar $ before the letters and then press DO button
Unpack to a folder
Will extract all S16 files into the folder you select.
Will extract selected S16 file into the folder you have loaded the DAT file or the folder you have selected to see S16 files
.Save as BMP
Will save as a Bitmap 24 bits what you are seeing - I mean the icon or the collage
Replace selected S16
Will replace a S16 file with a same named S16 (on same or different folder). Replacement do not need to be same size, only same name.
Remove selected S16
This option will remove any S16 from the DAT file.
Add S16 file
This option will add a new S16 file. It takes care of sorting so no need of index files, nor repacking to add new S16 files into a DAT file.
This last 3 options will update DAT file on disk, so no need to change name or whatever. A back up copy will be saved each time the tool modifies DAT file on disk, it will be numbered to avoid over-witting any valid data.
I think this options cover
anything you could need to tweak your DAT file anyway you can need, but if you
found there is something missing, do not hesitate to tell me.
This option will pop up a new
window showing all bitmaps availables in a folder for creating new S16 files.
You can select a different folder at any time and last one selected will be remembered next time you use this option, and all bitmaps within that folder will be shown.
There are only two options
Create a S16 with 9 clones of bitmap
This is a quick espress mode to create S16 files to test on game, before finishing them up You .can select multiple files and all selected will be created when you press Make S16 Button. Each S16 file created will have same name as tha bitmap, you will not be prompted to select names.
Create S16 with all bitmaps added to S16 icon list.
You should append each single bitmap to the S16 icon list, by double-clicking on it. Icons will always be appended (added at list tail) but you can rearrange order using left-side buttons or remove any from list by double-clicking on it.
Once you feel confortable with your list, click on Make S16 Button to create the S16 file. Ypu will be prompted for a file name.
Bitmap size and type (resolution) is shown as well as Pixel (0,0) color to allow checking it has the proper values.
This option allows converting PG2 Shp
files into PeG-S16 files.
It also will pop up a new window showing all PG2-Shp files within the folder you select.You can select a different folder at any time and last one selected will be remembered next time you use this option. You need to define also a folder to store converted PeG-S16 files.
By default only files not converted yet will be included (I mean files with a common file name will be excluded) but you can turn it to see all files.
A collage will be drawn for selected Shp file but you can see how it would be onverted by checking ON a switch, then background will turn into a grey one instead of the blue default.+
You can convert a single Shp or many - all Shp you
select will be converted when you click on
Make S16 Button