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 Thu Mar 28, 2024 1:06 pm
All times are UTC + 0
How do I add new trees?
Moderators: Global Moderators, Tiberian Sun 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
P.Rex
Civilian


Joined: 20 Mar 2020

PostPosted: Fri Mar 20, 2020 4:34 pm    Post subject:  How do I add new trees? Reply with quote  Mark this post and the followings unread

Hi everyone, new guy here.

I'm just getting started with modding Tiberian Sun and wanted to start with something small. A while ago I made some 3D models of trees which I used in mods for other games, and now I'd like to put them into TS so I can use them for decorating in the map editor (Temperate maps, specifically).

I know how to render 2D sprites, but not how to put them into the right format and add them to the game. I've seen some tutorials around here but nothing about creating new trees specifically. Would anyone kindly give me a few pointers?

Example of my work (originally used in the Carnivores 2 mod "Carnivores+"):


Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Mar 21, 2020 10:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Trees (internally called TerrainTypes) use the same shape format (SHP) as most other sprites in the game, albeit confusingly with the same extension as the background terrain tiles (.tem for temperate, .sno for arctic theater). A regular tree should have 4 frames: one normal frame, one damaged frame, and one shadow frame for each (yes, shadows are on separate frames).

Once you've rendered the tree into 2D images, you can use Image Shaper or SHP Builder to convert them into a tree shape.

Some tips when making a tree shape:
- the base of the tree should be centered on the canvas, or offset a little depending on which OccupationBit you want to use.
- all trees (with the exception of Tiberium trees) use theater color palettes (isotem.pal for temperate and isosno.pal for arctic)
- as mentioned before, trees use theater-specific graphics, but it's not necessary to include both if your tree should only appear on either theater. For example, the Tiberium "trees" in Firestorm (FONA01-15) have no arctic graphics.

Once the shape is ready, use XCC Mixer to add it into an (e)cache .mix file.

Finally is the coding part. Like most objects in the game, the tree settings are defined in rules.ini (or firestrm.ini), and their graphics are defined in art(fs).ini. You can search both files for TREE01 to see how the trees are coded. In short, add a new entry in the rules file's [TerrainTypes] list, and add a new section for your tree in both the rules and art files. If you're uncertain on what the various flags do, ModEnc is generally a good place to check, though it may sometimes contain outdated information.

It's also worth checking this Beginner's tutorial.

_________________


Back to top
View user's profile Send private message
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
You cannot post new topics in this forum
You cannot 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.1472s ][ Queries: 11 (0.0077s) ][ Debug on ]