Staredit Network > Forums > Modding Discussion > Topic: Animosity
Apr 18 2018, 1:55 pm
By: Neiv  

Apr 18 2018, 1:55 pm Neiv Post #1

Animosity is a converter for SCR graphics. It can convert .anim, mainsd.anim and .dds.grp files to/from PNGs.

Currently it should work (tell me if it doesn't), but since there are 3 different files, hd, hd2 and sd for each grp/anim, it is a bit cumbersome to use. Maybe someday it can automatically downscale the sprites when importing the HD sprite.

There are no progress indicators, when working with very large sprites the program may just freeze for a moment when encoding or decoding the textures.

I believe that SCR still uses the .grp files for SD sprite dimensions (Since they are just 0/0 in mainsd.anim), so at the end of day you still need to use GRP tool as well >:l
Afaik also the mouse clickability area is defined by GRP pixels, even in HD mode.
Screen visibility is also controlled by something.. Not sure what.

I believe that HD2 sprite is 2x the resolution of a SD sprite, and HD is 4x SD resolution.
Also, the width/height values for HD2 sprites have to be twice as large as the frame dimensions (That is, a 40x60 frames in HD get centered when dimensions are set to 40x60, but the Hd2 sprite should be downscaled to 20x30 pixels with dimensions still 40x60)

HD2 sprites should just be 50% downscaled HD sprites, as there is some sort of dependecy between two if best quality sprites are enabled. Maybe they could just be considered manual mipmaps. Because of that they have to be imported simultaneously to work properly.

Thanks to Farty for documenting the file formats.

Edit Apr 19th: Fixed some bugs
Edit Apr 20th: Fixed a crash
Edit Apr 25th: Fixed HD-HD2 relation
Edit May 4th: Fixed .dds.grp scaling
Edit June 5th: Fixed dds decoding for textures with dimensions not divisible by 4
Edit July 3rd: Added multiple instance support and fixed some more bugs
Edit Mar 11th 2020 Fixed black bars on DXT1 sprites


Post has been edited 14 time(s), last time on Apr 15 2020, 10:18 pm by Neiv.


Apr 18 2018, 4:49 pm Corbo Post #2


This is great. This is very much indeed very great.

Thank you.

fuck you all

Apr 21 2018, 12:47 am O)FaRTy1billion[MM] Post #3

👻 👾 👽 💪

Is it confirmed that it uses the GRP for the dimensions? I couldn't figure out how it determined the frame sizes is why I stopped playing with it. XD

TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img][/img] times!

Apr 21 2018, 9:56 am Neiv Post #4

Switching the grp in images.dat changes sprite centering in SD mode without actually changing graphics. Seems that BW also reads the frame-specific coordinates from grp even though they are also set in mainsd.anim.


May 29 2018, 5:48 am jun3hong Post #5

The download site is blocked now.


May 29 2018, 7:43 am Neiv Post #6

Oh, my bad. The link is now fixed.


Jun 4 2018, 10:48 am jun3hong Post #7

Some frames look broken. I uploaded some screenshots. Well...can be fixed?

bandicam 2018-06-04 19-47-42-120.jpg
Hits: 9 Size: 28.54kb
bandicam 2018-06-04 19-48-28-708.jpg
Hits: 4 Size: 39.04kb


Jun 4 2018, 4:48 pm Neiv Post #8

Which file is that?

Does it only look like that after editing it, or is it like that with the default file which was extracted?

What are they supposed to look like?


Jun 5 2018, 9:01 am jun3hong Post #9

It's HD2's cmdbtns. It has a same problem with SD's one. Once I opened it with default, it looked like that.
But there's no problem with the original HD's cmdbtns.

For example, I uploaded screenshots fot cmdbtns' number frame.
In the original HD, there's no problem. But in the HD2, it looks broken.
When I export it, Animosity exports with broken frames like that.
When I import them again and run wuth samase to test it, it looks broken in-game too.
Not every frames are broken. Only a few frames do. I also uploaded screenshots for in-game.

bandicam 2018-06-05 17-45-30-474.jpg
Hits: 3 Size: 29.92kb
bandicam 2018-06-05 17-45-51-475.jpg
Hits: 1 Size: 32.73kb
bandicam 2018-06-05 17-58-46-833.jpg
Hits: 2 Size: 489.56kb
bandicam 2018-06-05 17-58-52-626.jpg
Hits: 4 Size: 466.09kb


Jun 5 2018, 1:00 pm Neiv Post #10

Okay, I fixed the problem and updated the download.

Thanks for letting me know of the bug =)


Aug 18 2018, 1:33 am TheBigDingus Post #11

Hello, I don't seem to be able to load a grp.
I exported it from PyGRP, but its not listed as an acceptable file. Am I doing something wrong?

Aug 18 2018, 11:07 am Neiv Post #12

No, the program is just bad and only accepts pngs for its frames.

I hope to improve the situation eventually, but as of now you'd have to use some other tool to convert the paletted bmps from PyGRP to a full-color png :/

You'll currently also have to export the anim frames you want to replace once to get the .json file which contains necessary information for importing other frames.


May 16 2019, 12:53 am Neiv Post #13

I felt like updating this. Two new features.

- Can up/downscale images on importing, so sprites from one quality level can be used for the other two.
- Can export/import to/from a single image (per layer).


Jan 26 2020, 4:01 pm Neiv Post #14

Another update. Some of these changes were actually done months ago but I forgot to release them here.

- Added support for creating a GRP containing the info SCR needs when importing SD frames. (That means that they aren't 1.16.1-usable GRPs, they just contain info on which pixels are transparent and frame sizes)
- Fixed a bug which would cause frames jump around unpredictably when importing up/downscaled images.
- Removed garbage DXT encoding code and just used a high-quality library; imported frames look a lot better now in many cases.


Apr 15 2020, 10:21 pm Neiv Post #15

Updated to fix a bug with sprites being aligned to a multiple of 4 pixels, and added a new feature for editing anim\main.lit

main.lit controls the lights that sprites can emit when real-time lighting is enabled. Each frame can have a single light source specified to it.


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:00 pm]
NudeRaider -- You are undead, why wouldn't you and your creations (GPTP) exist as (in) graves? I don't get why this needs fixing.
[01:58 pm]
UndeadStar -- I don't know in how many people imagination me and/or my GPTP existed as graves, but this will finally be fixed now that I've made the online code available
[10:26 am]
NudeRaider -- I can't say but it sounds plausible. You'd still have the problem with the palette.
[10:25 am]
Oh_Man -- it's not like the pixels themselves are inherit to one tileset or another.
[10:24 am]
Oh_Man -- Couldn't you redefine all the tiles from the other tilesets to be read as part of just one tileset instead of multiple perhaps
[10:16 am]
NudeRaider -- *make new tiles
[10:15 am]
NudeRaider -- The map structure only ever recognizes one tileset at a time. So you'd have to define your own map format then make an .exe that can load such files. I don't think it's ever been done; it sounds like a lot of work. What's commonly done with modding is creating a new tileset. Then you decide which tiles go in there. You can also make new ones. You will probably also have to create a new palette as the different tilesets share only part of their colors. Finally entering speculation territory you could maybe use EUDs to dynamically change the graphics of certain tiles. Not sure if it's possible, but if it is, you better make a topic for it.
[04:11 am]
O)FaRTy1billion[MM] -- no, that's not a thing you can do without modding the game
[03:56 am]
youarenotworthy -- I forget, did starforge ever allow you to mix tilesets?
[03:44 am]
O)FaRTy1billion[MM] -- use scmd or NudeRaider
NudeRaider shouted: You are right, however, in that the Remastered *graphics* are just a skin are interchangeable, even midgame. Skinability being another new functionality. Anyways, for tools that rely on the original mpqs you will have to obtain a legacy version of sc.
Please log in to shout.

Members Online: Wing Zero, Roy, Dem0n, IlyaSnopchenko