Planet Making Cheatsheet

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Joined
Mar 16, 2014
Messages
91
Location
Dark Rebellion RP
There are a few tutorials on how to make a planet, but here is a quick and simple one, mostly for my own reference. Client wise, there are four files that are critical to the creation of a planet.

Where <name>, replace with the name of the zone/planet you wish to make, i.e. corulag.trn. The game relies on the name to find the other files listed below, so they must match in order for the game to recognize them.

Environment: datatables/environment/<name>.iff
Determines regions, and the various data inside the region, like what sounds to play, what music, fog distance, sky gradient texture, env cube maps to use, etc. Self explanatory if you open the file in SIE. If not provided, lighting is harsh and sky is pink. A planet must have at least one region. You can have one region for the entire planet simply called "global"

Lighting: terrain/colorramp/<name>.tga
A TGA image that uses 8 rows of gradients divided into two parts, one half day, one half night. The color of the gradient is mixed with the alpha of the texture to determine the lighting color and intensity, or sometimes the alpha of the sun as it moves to the horizon, etc. It's on a case by case basis for each row. Each row represents the following:
  1. Ambient Light
  2. Diffuse Lighting
  3. Specular Lighting
  4. Fill (?)
  5. Bounce (?)
  6. Clear (?)
  7. Fog Color
  8. Shadow Color
Sky: terrain/environment/<name>.iff
Determines which celestial bodies are in the sky, such as sun and moon. There appears to be only support for maximum of two suns and two moons, but additional bodies can be added to the sky, they might not move with the time of day. TBD. A sun isn't required in order to have a directional light. For example, Yavin 4 has no sun, instead the Gas Giant Yavin takes the place of the sun in the sky. You can increase the number of stars here, but too many will look like the sky is noise.

Ground: terrain/<name>.trn

The ground itself, determined by layers and different filters and affectors. Can be edited in SIE and previewed in game for the result.

Entry: misc/planet_crc_string_table.iff
Add an entry for the terrain file name here, so if "corulag" was the definition, add it here for the CRC.

--

With all of the above files, a planet will fully operate on a server with no additional needed information. However, you might want a couple of more details

Datatables/ClientPoI
Adds Client Points of Interest

Datatables/ClientRegion
One might be necessary to prevent a crash, but uncertain. Defines a region that will act like a city. I.e. it will let you know when you enter and leave it.

Planet Name Localization
Name is defined at "string/en/planet_n.stf" Use the terrain file name as the key.

Waypoint Appearance
Associate an APT file for a planet to the name of the planet's zone at "datatables/player/waypoint_planets.iff"

Planetary Map
By default it will use Dathomir's map. You can add your own map by editing the UI file "ui_planet_map.inc" - I recommend searching the file for "ui_map_yavin4" and copying the entry around it to add your own planet's map.

--SERVER--

Bare minimum requirement for the server is an entry for the planet in the "planet_manager.lua" - defining nav areas, badge areas, planet objects, and most importantly weather. An entry in the "weather_manager.lua" will allow you to determine weather type, default and stability.

Did you crash while following this guide? Please let me know and I will investigate and update this guide to prevent potential crashes.
 
Top Bottom