Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Nov 08, 2024 6:08 am
All times are UTC + 0
Changing size of unit?
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
RaiderAlpha
Civilian


Joined: 16 Sep 2019
Location: North America, Earth, Solar System, Orion Arm, Milky Way, Local Group, Virgo Supercluster, Universe

PostPosted: 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.
Reply with quote  Mark this post and the followings unread

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.



MiniHeavies.png
 Description:
Medium tanks and the mini-heavy tanks
 Filesize:  713.33 KB
 Viewed:  2383 Time(s)

MiniHeavies.png



Back to top
View user's profile Send private message
Mortecha
Commander


Joined: 30 Nov 2006
Location: Brisbane, Australia

PostPosted: Tue Aug 11, 2020 4:15 am    Post subject: Reply with quote  Mark this post and the followings unread

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

{"size":[sizeOfUnitBeingReplaced,sizeOfUnitBeingReplaced],"crop":[-sizeOfUnitBeingReplaced/2,-sizeOfUnitBeingReplaced/2,sizeOfUnitBeingReplaced/2,sizeOfUnitBeingReplaced/2]}

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.

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1835s ][ Queries: 14 (0.0119s) ][ Debug on ]