Additional Planets SR.oxp

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

madsborking
Above Average
Above Average
Posts: 19
Joined: Mon Jan 06, 2014 3:10 pm

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by madsborking »

Hi everyone

And thanks for all your great work making OOlite look ever better. And cheers to Redspear for what seems to me to be an excellent idea - lets get the best of all worlds :D

I have a question though, and some observations to relay also. Q first:

How did JazHaz do this?
JazHaz wrote:
I use DH (with its planet textures turned off, moon textures on) to provide extra planets and moons, in combination with Povray Planets for the main planet textures. Works well most of the time, although occasionally I get non-textured main planets (when a restart usually fixes it).
(I know he says a little later that he doesn't remember, but maybe someone else knows?)

For a while I actually thought I had it set up that way, but then I started playing around with System Redux and only then discovered that it probably hadn't been working (ever) after all - I'm not really sure...

Here's my observations then, on using either Povray, System Redux, Deep Horizons or some combination thereof:

System Redux; Offers the possibility to texture target planets (F7) via OXPconfig, but does warn that this procedure causes 'wholes' in save games!?
; does not list the number of planets/moons generated/(present) when you enter a new system - (as Deep Horizons does)
; does not work with Realistic Stars - (or works very poorly, in that ambient light and nebulae get hugely amplified - not so: "far reaches of deep space-like")
; the (partial) incompatibility with Realistic Stars (RS) means that there are no 'dark sides' to planets/moons! (After some testing it is clear, that it is RS that somehow recalibrates ambient light).
(Other than that, and except perhaps for moons being too close to planets, System Redux looks great on its own).

Povray Planets; Works, quite simply. It provides textures for target planets (F7).
; but, of course, there are no moons or extra planets
; and, without Deep Horizons, no possibility for Gas Giants
; does work with RS to produce 'dark sides' of planets/moons

Deep Horizons; Cannot texture target planets (F7) at all, except in combination with Povray, in which case Povray textures target planets, only to have the targeted planet look different once you arive there, on account of Deep Horizons overwriting the Povray textures... (This is what I would like to avoid!)
; does list the number of planets/moons generated/(present) when you enter a new system - (may seem a small thing, but I find it really usefull - especially in combination with Planet Compass and Stations_for_extra_Planets)
; does work with RS to produce 'dark sides' of planets/moons

Any thoughts?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Cody »

madsborking wrote:
... no possibility for Gas Giants...
Well, Povray Planets does have its own gas giants, but only as the main planet.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by spara »

Try this, if you want Povray to texture the main planets and DH-systems to provide moons and extra planets.

About the dark side. RS propably lowers the ambient light level so that the dark side of the planets is in deep shadow. More of a feature than incompatibility, IMHO. You might also want to try ZygoCinematicSky&Nebula's.oxp.

To get RS play nicely with ZygoCinematicSky&Nebula's.oxp (and Realistic Stars), I have commented out the universal part from planetinfo.plist (lines 78-85). I have also commented out the line 118

Code: Select all

//this.homePlanet(n);
from script.js to stop it from texturing the main planet. I use Povray for that.
madsborking
Above Average
Above Average
Posts: 19
Joined: Mon Jan 06, 2014 3:10 pm

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by madsborking »

Thanks spara

I'll give Zygo a try for sure.

About editing .js files...? (Sorry, its all new to me - the only programing-like thing I ever did was AMOS on the Amiga ages ago)

What do you mean by "comment out"? / it's somehow different from simply "delete" I gather?

Also, what program do you use to open .js files? (Notepad does it, but not with identifiable "lines". As far as I can tell it's all one long string and hard to work with...)

Finally, you wrote
To get RS play nicely with ZygoCinematicSky&Nebula's.oxp (and Realistic Stars), I have commented out the universal part from planetinfo.plist (lines 78-85). I have also commented out the line 118

Code: Select all

//this.homePlanet(n);
from script.js to stop it from texturing the main planet. I use Povray for that.[/quote]
I'm just not clear which oxp's file's I should edit... Realistic Stars or ZygoCinematicSky&Nebula's?

Thanks again :)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Cody »

madsborking wrote:
... what program do you use to open .js files?
Get Notepad++ (or use Wordpad) - Notepad is not good.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Diziet Sma »

Cody wrote:
madsborking wrote:
... what program do you use to open .js files?
Get Notepad++ (or use Wordpad) - Notepad is not good.
Notepad is worse than "not good".. it's evil.. it breaks Oolite files.

Edit: Weird.. whenever I try to download it from that sourceforge link, it keeps giving me the plugins.xml instead of the binary.. I recommend getting Notepad++ from the main website instead.
http://notepad-plus-plus.org/
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Diziet Sma »

madsborking wrote:
About editing .js files...? (Sorry, its all new to me - the only programing-like thing I ever did was AMOS on the Amiga ages ago)

What do you mean by "comment out"? / it's somehow different from simply "delete" I gather?
Do you remember the REM (meaning remark) command in AMOS BASIC, which instructed the interpreter and/or compiler to ignore the rest of the line? How you could use it to insert notes in your code to remind yourself of what a routine did? A comment is the same thing. It allows you to insert notes that are not executed as part of the code. To disable a section of code in AMOS, you could add a REM command at the beginning of the relevant lines. To "comment out" is the same process.

Naturally, in javascript and other modern non-BASIC languages, the REM command is not used. It varies from language to language, but common methods of denoting a comment are to use a pair of forward slashes // or bracketing the comment in mirrored /* pairs like so.. /* This is a comment */ This latter type has the advantage of being able to be used across multiple lines, with the first line beginning with /* and the final line ending with */ This last type of comment is used in C, C++ and OBJ-C programming, for instance.

Javascript uses the pair of forward slashes to denote comments. Here are a couple of screenshots of Notepad++ with the relevant section of Deep_Horizon_Systems.js as Spara linked to in his comment where he said
spara wrote:
Try this, if you want Povray to texture the main planets and DH-systems to provide moons and extra planets.
The first is the code as originally written. You can see several comments already put there by Cdr. Cheyd when he wrote the OXP. Notepad++ very kindly colours them in green to make them easier to see:

Image

Now we have the same code, with lines 231-250 commented out by me, as suggested in Spara's link. The entire section of code has been effectively turned into a comment, disabling it:

Image

Comments in plists gets a little more complicated, as there are two different styles of plists, the XML type, which Oolite is moving away from, and the NeXTSTEP/OpenSTEP type. You will probably encounter both once you start fiddling with OXPs.

The XML type, which you will mostly encounter in older OXPs, looks like this.. note the comments, (which are coloured in dark blue) and the way they are denoted, thus: <! comment >

Image

Next we have an example of the NeXTSTEP style of plist, using mirrored /* comments. It should be noted that paired forward slashes // (not shown in this example) at the beginning of each comment line will also work in this style of plist. The difference being that everything following the // on an individual line (a line can also contain code followed by a //) will be treated as a comment, whereas only the text between the mirrored /* will be treated as a comment, thus allowing comments within functional code, as can be seen below.

Image
madsborking wrote:
Finally, you wrote
To get RS play nicely with ZygoCinematicSky&Nebula's.oxp (and Realistic Stars), I have commented out the universal part from planetinfo.plist (lines 78-85). I have also commented out the line 118

Code: Select all

//this.homePlanet(n);
from script.js to stop it from texturing the main planet. I use Povray for that.
I'm just not clear which oxp's file's I should edit... Realistic Stars or ZygoCinematicSky&Nebula's?

Thanks again :)
I'll allow Spara to clarify that for you, as I haven't yet looked at the entire process..
Last edited by Diziet Sma on Mon Feb 03, 2014 10:30 am, edited 2 times in total.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by spara »

AMOS brings back warm memories :D . I spent ages creating sprite animations with AMAL sub language. Don't think I ever finished anything though. I was going to create a version of Wizard of Wor for Amiga. If I recall it right, I did manage to do controllable animated player characters and random labyrinths. And my version of Super Sprint had controllable cars and skid marks. Not so cool memory is that I only had a 14'' television to go with. No wonder I have to wear glasses. Thanks for the memory, madsborking :D .

And to the subject. Sorry about being so vague earlier. Too much of a habit of mine, I'm afraid :( . Dizzy has already explained the editing part, so I try to clarify the whole process.

1. PovRay textures for main planets
This is dead easy, just install PovRay.

2. Ambient light, background stars, sun and nebulas
ZygoCinematicSky&Nebula's.oxp does ambient light, background stars and nebulas. For more realistic sun distance and color, Distant Suns oxp is cool. Distant Suns also names the suns for ambiance.

Another option is to use Realistic Stars, but you'll miss the sun names. Test what suites your taste. And there are other options in the oxp list too, but I believe that Zygo + Distant Suns is the most popular.

3. Moons and extra planets
Here you basically have three choices as this oxp is still wip. The problem is that these oxps do more than just provide extra planets and moons. So to make them play nicely with the oxps above, they have to be tweaked a little.

a) Deep Horizons Systems
This one wants to texture the main planet. Dizzy already explained how to overcome that in the previous post.

It will also set the sun's corona and will clash with Distant Suns etc. Prevent by opening Deep_Horizon_Systems.js from Deep Horizon's Config folder and editing line 23 from

Code: Select all

this.Corona_Changes = true;  // This can either be true or false.
to

Code: Select all

this.Corona_Changes = false;  // This can either be true or false.
b) System Redux
This one wants to texture the main planet and sets the ambient light, stars and nebulas.
* Prevent from texturing the main planet: Open script.js from System Redux's Config folder. Comment out the line 118 saying this.homePlanet(n);
* Prevent from setting ambient light etc: Open planetinfo.plist from System Redux's Config folder. At the end you'll find:

Code: Select all

	"universal" = {
		sky_blur_alpha = "0.25";
		sky_blur_cluster_chance = "0.10";
		ambient_level = "1.25";
		sky_blur_scale = "25";
		sky_n_stars = "3000";
		sky_n_blurs = "1000";
	};
Comment (or delete) that one out.

c) System Demux
Haven't really played with this one. Probably the same kind of process as with System Redux as this seems to be somewhat based on that one.

Hope that helps :D .
madsborking
Above Average
Above Average
Posts: 19
Joined: Mon Jan 06, 2014 3:10 pm

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by madsborking »

Ahh... Sprites! :wink: Played around with that for some time too. Never finished anything either though... If i remember correctly my friend and I made a spaceship and did get it too blow up very nicely :D (Never got around to use it for anything though :roll: ).

And yes Dizzy, now that you mention it, I do remember the REM command :wink:

Thank you both, Dizzy and Spara, for taking the time. This really is the friendliest board this side of Reidquat :D

I've gotten Notepad++, downloaded the latest versions of Deep Horizons and System Redux (just to make sure) and did the editing here on my laptop. Tonight, on the big machine, we'll see if I did it right! (I'll get back to you on that).

Also eager to try ZygoCinematicSky&Nebula's. Found it via google search... Any idea why it, and Deep_Horizons Systems by the way, is not to be found on the OOlite OXP list? (http://wiki.alioth.net/index.php/OXP_List)

Oh, and one more quick question: Any of you tried the Additional Planets.oxp that this thread is really about?

Finally, by way of thanks, there is a Chinese proverb goes something like this:
When I was a child and thought in childish ways, a tree was just a tree, a rock just a rock, and water simply wet.
When I grew up and became learned, a tree was no longer just a tree, a rock not just a rock, and water wasn't simply wet.
But when I became old and wise, once again a tree was just a tree, a rock just a rock, and water was simply wet.

Thank you for making what seemed so complicated, seem so simply again :D
And it's just Mads for short
madsborking
Above Average
Above Average
Posts: 19
Joined: Mon Jan 06, 2014 3:10 pm

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by madsborking »

Cody wrote:
madsborking wrote:
... no possibility for Gas Giants...
Well, Povray Planets does have its own gas giants, but only as the main planet.
It does? :o

Oh, thinking 'bout it I know now why my surprise. I've been seeing Povray's planets on the F7 screen when charting a course, and some of them no doubt looked like Gas Giants, but Deep Horizon Systems has been continuously overwriting those main planets once I actually arrived there. Hence, I never got to see them up close and personal...

Hopefully, thanks to Dizzy's and Spara's advice, now I soon will :D
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Diziet Sma »

madsborking wrote:
Thank you both, Dizzy and Spara, for taking the time. This really is the friendliest board this side of Reidquat :D
You're most welcome, Mads.. as you may have guessed, we love helping people enjoy our favourite game! 8)
madsborking wrote:
Also eager to try ZygoCinematicSky&Nebula's. Found it via google search... Any idea why it, and Deep_Horizons Systems by the way, is not to be found on the OOlite OXP list?
:shock: Huh.. how about that? I have some wiki work to do shortly anyway.. I'll take care of that as well.

Re the google search.. have you tried using the Oolite BB Browser Search Plugin? At least 100% more (and more relevant) results than the phpBB search tool or double your money back..:wink: :lol:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
madsborking
Above Average
Above Average
Posts: 19
Joined: Mon Jan 06, 2014 3:10 pm

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by madsborking »

I kind of figured as much, with the effort you took :)

And by the way, IT WORKS!!! I'm seing Povray Planets, Deep Horizon moons and extra planets and a Zygo sky - WOW!

And no, I haven't tried the OOlite BB Browser Search Plugin, but I'll give it a go!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by another_commander »

madsborking wrote:
And by the way, IT WORKS!!! I'm seing Povray Planets, Deep Horizon moons and extra planets and a Zygo sky - WOW!
Screens please? ;-)
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by Diziet Sma »

madsborking wrote:
IT WORKS!!! I'm seing Povray Planets, Deep Horizon moons and extra planets and a Zygo sky - WOW!
Excellent! Welcome to the wonderful world of OXP tweaking!

Now.. a (hard-earned) suggestion..

OXPs have a habit of getting updated from time to time, and if one you've tweaked gets updated, guess what? if you want to take advantage of the new features and/or bugfixes in the update, you're going to have to apply those tweaks all over again. Keep a folder somewhere with a copy of all your tweaks. In mine, there's a folder for each OXP I've tweaked, with snippets of before-and-after code, and detailed notes on what I did, including line numbers in files and anything else I think I might need to know. It can sometimes involve a bit of detective work if the code you tweaked was amongst that which got changed or updated, but with the snippets and notes, you can usually figure out what to do differently.. (and don't forget to update the notes etc afterwards)

All this will save you much hassle down the track.. (don't ask me how I know!)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Extra Planet/Moon textures - now Additional Planets.oxp

Post by spara »

Diziet Sma wrote:
madsborking wrote:
IT WORKS!!! I'm seing Povray Planets, Deep Horizon moons and extra planets and a Zygo sky - WOW!
That's brilliant :D . Since getting these to play nicely together is a bit of a challenge, maybe something should be done about it? Maybe some guidance in wiki or more sensitive versions of some these oxps could help here. If no-one beats me to it, I'll give it a bit thought when I have finished Rescue Stations.
Post Reply