Question: How to add custom planet descriptions

General discussion for players of Oolite.

Moderators: another_commander, winston

Post Reply
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Question: How to add custom planet descriptions

Post by pagroove »

Do you only need to make a planetinfo.plist with the correct planet number? Because when I do this I still do not get custom descriptions. I tried to copy the planetinfo.plis from the Lave.oxp t to the config directory of my famous planets.oxp and then renamed the lave.oxp dir to lave.oxb (preventing it from loading.

I then expected by doing this that I got the extended description as in the planetscreen from the Lave.oxp because I had the correct planetinfo.plist file in my oxp config directory now. But this isn't working. What am I doing wrong?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

That's all I did to create "Aqualina" in my Aquatics OXP (if you want another comparison reference, although that's in Galaxy 3). That seemed to work from the quick visit I paid to G3 to check.

This is the code for my planetinfo.plist (give or take the additional comment on the planet ID that I just added ;) ) :

Code: Select all

{
		// Galaxy 3 planet formerly known as Ribiara, now renamed Aqualina
	"2 99" =    // <-------    for Lave, change this to "0 7"
	{
		"government" = 7;
		"economy" = 5;
		"techlevel" = 11;
		"population" = 16;
		"productivity" = 732283;
		"radius" = 3257;
		"name" = "Aqualina";
		"inhabitants" = "Humanoid amphibians";
		"description" = "Waterworld and home of the Aquarian Shipbuilding Corporation.";
		"percent_land" = 4;
		"land_hsb_color" = "0.1 1.0 1.0";
		"sea_hsb_color" = "0.6 1.0 1.0";
		"sky_rgb_colors" = "0.65 0.85 0.97 0.45 0.76 1.0";
		"sky_blur_cluster_chance" = 0.8;
		"sky_blur_alpha" = 0.1;
		"sky_blur_scale" = 8;
		"ambient_level" = 0.6;
		"station" = "dodec";
		"station_roll" = 0.2;
	};
}

To apply the code to Lave, just change the "2 99" to "0 7" (Ribiara is planet 99 in Galaxy 3, Lave is planet 7 in Galaxy 1, from the wiki planet lists). The galaxies code-wise are 0-7, not 1-8 (as I'm sure you know, but for general information to anyone who doesn't).

I just tried it and it works fine for me (after a shift-startup), Lave became Aqualina. The Lave.oxp plist maybe isn't working as it's somewhat more complicated, and is adding ships and such that maybe are no longer available if you only copied the planetinfo.plist. I suspect if you edit the Lave.oxp plist and remove the script actions key it should work.

Alternatively try using the above code instead (with the planet id number modification) and see what results you get.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Hey thnx, I will try it. If you need a texture for your aquaplanet then give me a shout 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Thanks for the offer, hope you get it working (let us know).

I'm going to revisit that OXP at some point (add a station to the planet and a mission or few to it). When I do I'll give you a shout and may take you up on the it.

I guess you've got enough to do at the moment with FP. Not sure when my re-visit is going to be, I've got a couple of new OXPs on the go and ideas for one or two more which keep distracting me.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

It's working

Image

For one planet though. If I add another it isn't working I don't know how to make new entry. do you have to close the description with the ;} symbol? and then start a new entry with { ?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Code: Select all

{ 
    "0 7" =    
   { 
      <<start of Lave's entry>>
      "name" = "Lave"; 
      <<rest of Lave's entry here>>
   }; 

    "0 147" =
    {
      <<start of Diso's entry>>
      "name" = "Diso";
      <<rest of Diso's entry here>>
    };
} 
Basically the short answer is "yes", something like the above for Lave and Diso (or whatever you want to ammend).

The overall code is between { and } (without ;), and each planet sub-entry is key's by it's planet number, with a dictionary set of values between { and }; . The curly braces are the equipvalent of <dict> and </dict>.

The entries within each planet's dictionary of keys (between the { and }; ) can be in any order, but I've kept the example in the same kind of format as the original code above for clarity. The format is much the same as for shipdata.plist, if that's any clearer.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Thanks for the instructions 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Post Reply