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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun May 31, 2020 5:28 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum
How do I add new trees?
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message

Joined: 20 Mar 2020

PostPosted: Fri Mar 20, 2020 4:34 pm    Post subject:  How do I add new trees? Reply with quote

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

Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Mar 21, 2020 10:22 am    Post subject: Reply with quote

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 Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum
Jump to:  
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.1117s ][ Queries: 10 (0.0036s) ][ Debug on ]