Joined: 16 Sep 2019 Location: North America, Earth, Solar System, Orion Arm, Milky Way, Local Group, Virgo Supercluster, Universe
Posted: Tue Aug 11, 2020 2:10 am Post subject:
Changing size of unit?
Subject description: Replaced light tank graphics with heavy tank. Got a mini-tank instead.
Hello,
So I've been trying to replace the Nod light tank in TD with the heavy tank from Red Alert. I managed to replace the graphics, but the unit now appears to be small still. I've checked the files under CONFIG.MEG and skimmed through the source code but I wasn't able to find any mention of unit sizing.
I noticed for the unit's .meta files, changing the size from 192x192 to 256x256 makes it much smaller, while changing the size down to 128x128 makes the unit the "correct" size but not offset right.
I'm wondering how one would change the size/scale of the heavy tank so that it is the same size as the medium tank.
I still am trying to work all of these out myself and the best success I've had so far is to keep on fudging with it until it looks kind of right. I've been getting good results with editing the meta files and either doing
so if the original unit is 128 x 128 then the meta for each frame would be
{"size":[128,128],"crop":[-64,-64,64,64]}
or sometimes I've found that:
{"size":[128,128],"crop":[0,0,128,128]} works as well, you'd think this would solve the problem as it's the most logical, but I've found it just offsets the unit.
I've also found that to make a larger unit, you can feed a larger unit's frame into a smaller unit say a 256 X 256 into a 128 X 128 unit by:
{"size":[128,128],"crop":[-128,-128,128,128]}
or
{"size":[128,128],"crop":[0,0,256,256]}
and for the gunboat, I've just made it gets even weirder
{"size":[272,101],"crop":[-128,-128,256,256]}
I actually hope they phase out the need for metafiles and just use the raw frames unless the savings of having to parse over afew pixels is substantial. But again not sure entirely.
So for your original question about changing the scale of the unit to match the mammoth tank you could gradually increase the crop variables whilst keeping the size values the same and you should be able to get to the size you want. But like I said this is all new to me too and I'm still trying to figure all this out as well. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum