PyGrp

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Fri Nov 06, 2009 2:27 pm

User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Fri Nov 06, 2009 6:37 pm

The transparent index is only related to the BMP's. In GRP's no index is transparent, there are just colors 0-255 and "blank". So index 0 in StarCraft is actually black. What happens is the GRP converter just reserves a certain index (which has generally been index 0) to represent the "blank" parts in the BMP when importing/exporting. So now being able to change the transparent index lets you choose any color in the palette for the background, instead of having to use a custom palette to change index 0's color. For custom palettes just put them in the Palettes folder, but you're right, PyMS doesn't support .act pallets ATM. I'll rectify that in the next version but you'll have to convert it to one of the formats accepted by for now. Thanks for the support!
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Sat Nov 07, 2009 12:15 am

[quote name='bajadulce' post='8031' date='Nov 6 2009, 05:57 PM']The index makes a little more sense now. I wanted to give this transparent index a try rather than add my custom green background unit palette, but couldn't seem to figure out how to change it. The button always appears to be "grayed" out, even when I select "new"?[/quote]
It's currently only changeable when no GRP is open. Once a GRP is open it would be too much work to convert the indexes (actually I thought of some things that i might be able to change to make it possible to modify the index while open). If you are opening a GRP just make sure no GRP is open, change the transparent index and open. Another limitation that I can probably overcome (as per the ideas i had above) is that if you have a GRP open with transparent index X, you can't import BMP's with transparent index Y. To get any old BMP's to use the correct transparent index you'll need to open a new GRP that has index Y as transparent, import them, save and close the GRP, then change the transparent index to X, open the GRP, and export the BMP's. Of course if you already have a GRP with those frames you can just use that.

[quote name='bajadulce' post='8031' date='Nov 6 2009, 05:57 PM']The move frame down, move frame up, delete is incredibly powerful tool as I now see what it does. This will save lots of trouble when dealing with screwed up .grps that have frames out of whack.

Having the frames indented by groups in the left fame window is a nice feature that helps with organization.[/quote]
Agreed.

[quote name='bajadulce' post='8031' date='Nov 6 2009, 05:57 PM']I notice there is a tool tip for the single bmp frameset checkbox, but the others like compressed/uncompressed could benefit from a quick explanation of what they do. The Green box is quite obvious, but the red outline wasn't at first. I see now it represents the perimeter of the furthest pixels. I imagine this is helpful in that it would signify any stray pixels where they shouldn't be. i.e. ppl that use black for a transparent background seem to suffer from this a lot! :)[/quote]
There is a tooltip for the "single bmp" option because I kinda overloaded that checkboxes use with another somewhat hidden option (click the check to use frameset output, click it again to get SFGRPConv output, and a third click will turn it off). Looking back i think its a bad idea on my part, i'll probably change it to just three radiobuttons in the next version.

[quote name='bajadulce' post='8031' date='Nov 6 2009, 05:57 PM']I compiled my first set of .bmps, but missed being able to just select one .bmp and then type in the # of corresponding .bmps. Instead, you have to highlight all of your desired .bmps. This is fine as most ppl know how to use shift-click and cntrl-click when selecting files. A lot of times my working grp folder has a lot of other crap in it tho. Do I have to be extra careful not to include other .bmps that aren't part of the numbered set? With SFGrpCon, it just weeded out what it wanted and didn't. The command line pyGrp prob does the same I'm sure.[/quote]
I used to do it where you would just select your first BMP and it would find all the similarly named bmps and import them all, but it required the names to be "<name> <n>.bmp", and people really wanted to just select all their bmps so i changed it. You're correct about the command line.

[quote name='bajadulce' post='8031' date='Nov 6 2009, 05:57 PM']What's a good way to convert my .act files to something pyPal or pyGrp uses? Can photoshop or paint save in any of these formats?[/quote]
They should be able to. If not I could always take a look at them.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Sat Nov 07, 2009 1:47 am

User avatar
ShadowFlare
Posts: 15
Joined: Tue Apr 15, 2008 7:23 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby ShadowFlare » Sat Nov 07, 2009 5:35 am

As far as palettes, there are 4 formats my converter supports, two which are supported internally by my grp library and two that the converter adds. The original two supported were .act palettes from Photoshop (also same format as .ppl from WarCraft 2) and the .wpe files from StarCraft. The other formats that the converter supports are RIFF (a binary format) and JASC (a text format), both of which use the .pal extension typically.

When opening a palette, my converter ignores the extension, only looking at the contents to figure out the format. First it checks for RIFF, which starts out with "RIFF" for the first four bytes, then a 4 byte value indicating the size of the file - 8 (excludes the RIFF tag and the size field), then the 4 byte text string "PAL ". There's some more to the format, but that's basically how the program checks for that format. If that was not a match then next it checks for the JASC palette format, which starts with the "JASC-PAL" tag. After this, the converter passes control to the function in my grp library for loading palettes. That code first checks for whether the file is exactly 1024 bytes (256 entries times 4) for the .wpe format that StarCraft uses. This format simply uses a flat array of RGB values stored as 4 bytes each. Lastly, if all other checks failed, it assumes it is a .act/.ppl palette, which is a flat array of RGB values stored as 3 bytes each. Since this is the final fallback format, it accepts any file size, so my converter will actually allow one with less than 256 colors, if this ever occurs.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 1 guest