Questions on nebula and star textures

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

Moderators: winston, another_commander

User avatar
mh82
Average
Average
Posts: 12
Joined: Sun Nov 08, 2015 8:46 pm
Location: Germany

Re: Questions on nebula and star textures

Post by mh82 »

Whoa! I totally overlooked that one... Damn flu... :cry:
This seems to do exactly what I was looking for. I will play around with this a bit. I think the solution would be to run this while

Code: Select all

this.systemWillPopulate
is executed.

Thanks another_commander!!! :D :D :D
User avatar
Amah
---- E L I T E ----
---- E L I T E ----
Posts: 486
Joined: Tue Aug 28, 2012 8:05 pm
Location: aboard the Laenina Crowne - Yasen-N class space freighter
Contact:

Re: Questions on nebula and star textures

Post by Amah »

another_commander wrote:
I did a test on Lave using

Code: Select all

system.info.sky_n_stars = 500;
(default for me is 50000) and it worked.
50000? *sigh* I linger at 6000. 50000 and I get 12fps with no ships or any other objects around.
Amah
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

Re: Questions on nebula and star textures

Post by pagroove »

mh82 wrote:
@Wildeblood: Not exactly... Reading those values is not a problem. My question was more about setting things according to those readings especially for stars and nebulae. But I had a closer look a the scripting reference and there doesn't seem to be a possibility to do so. I think I'll have to do things by design. At least I'll try...

@pagroove: Sounds nice. I'll have a look at it. I'm using Logic Pro 9. That's because I still use some older plugins which don't offer 64bit support. At the moment I've put all audio related stuff on hold because I got an evil flu and my ears won't work right... I haven't tested my early versions against other OXPs. So I can't say if there will be conflicts. But I'm sure that there will be conflicts/multiple sounds/musics playing if they are used alongside each other. I use Scripts for all sounds that can't be set directly via customsounds.plist. So I think it won't be a good idea to do so. I will see if I can add a menu to switch those sounds on and off. By the way: my "cinematic ooniverse" will be a collection of OXPs and no gigantic bundle. So one can decide what he/she wants to add to the game. I'll have a look at BGS though...
Ok Sounds nice. Hope you get better soon.
More choice the better :D .
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
mh82
Average
Average
Posts: 12
Joined: Sun Nov 08, 2015 8:46 pm
Location: Germany

Re: Questions on nebula and star textures

Post by mh82 »

another_commander wrote:
mh82 wrote:
@Wildeblood:. But I had a closer look a the scripting reference and there doesn't seem to be a possibility to do so.
I am pretty sure you can set values via the system.info object and, according to the wiki, they are stored in the savefile. I did a test on Lave using

Code: Select all

system.info.sky_n_stars = 500;
(default for me is 50000) and it worked. The catch is, you need to jump out and back, as the game will have to regenerate the system in order for the changes to take effect.. In the same way, you can change many other sky properties apart from number of stars.
Tried this yesterday... ..but all I get is a log entry which tells me to exit/re-enter the system for the changes to take effect. :cry:
By the way: it seems like the color parameters of the planetlist.plist can't be altered by script. At least I got no error messages when I did my experiments BUT I didn't get different colors for stars and/or nebulae either...
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Questions on nebula and star textures

Post by Wildeblood »

mh82 wrote:
another_commander wrote:
mh82 wrote:
@Wildeblood:. But I had a closer look a the scripting reference and there doesn't seem to be a possibility to do so.
I am pretty sure you can set values via the system.info object and, according to the wiki, they are stored in the savefile. I did a test on Lave using

Code: Select all

system.info.sky_n_stars = 500;
(default for me is 50000) and it worked. The catch is, you need to jump out and back, as the game will have to regenerate the system in order for the changes to take effect.. In the same way, you can change many other sky properties apart from number of stars.
Tried this yesterday... ..but all I get is a log entry which tells me to exit/re-enter the system for the changes to take effect. :cry:
By the way: it seems like the color parameters of the planetlist.plist can't be altered by script. At least I got no error messages when I did my experiments BUT I didn't get different colors for stars and/or nebulae either...
It would probably help if you dropped the attitude, and read the replies to your queries.
"Would somebody stop that bloody music!"
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Re: Questions on nebula and star textures

Post by another_commander »

I don't think there is an attitude here, maybe just a slight misunderstanding.

@mh82: If you try to apply system changes on the systemWillPopulate handler, it is already too late: The system data has been generated before the populator kicks in. What you probably want to do is check which system the player is jumping to, then act on that; you need a suitable event handler though. Something that fires before any target system information has been created. Such a handler is shipWillEnterWitchspace, which fires just before actually executing the hyperspace jump.

The (very simple) example script below will set the number of stars to 500 if the player jumps to Diso and to 200000 if the player jumps to Leesti (note: it assumes the player to be at the starting galaxy). Hope it helps.

Code: Select all

this.shipWillEnterWitchspace = function()
{
	var targetSysID = player.ship.targetSystem;
	var targetSysInfo = System.infoForSystem(0, targetSysID);
	
	if (targetSysID == 147) // Diso
	{
		targetSysInfo.sky_n_stars = 500;
	}
	else if (targetSysID == 55) // Leesti
	{
		targetSysInfo.sky_n_stars = 200000;
	}
}
User avatar
mh82
Average
Average
Posts: 12
Joined: Sun Nov 08, 2015 8:46 pm
Location: Germany

Re: Questions on nebula and star textures

Post by mh82 »

Hello Wildeblood, hello another_commander,

it was probably a bit of both. I was very excited about the new approach to the problem but got the mechanisms of system generation and population wrong.
In other words: I tried to enter the room before opening the door... BAD IDEA!

@another_commander: again thanks for the pointer and especially for the example. I'll give this a shot and see what I end up with.

@Wildeblood: You are right about that attitude thing... I'll have to take a closer look on how things work internally in Oolite.

And at this point I have to state out that this is one of the most responsive and friendliest boards I've come across so far. Everyone here does a great job in helping other people with their ideas. All thumbs up!

Cheers!
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: Questions on nebula and star textures

Post by Cody »

mh82 wrote:
And at this point I have to state out that this is one of the most responsive and friendliest boards I've come across so far.
<grins> You should see us on a good day!
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!
Post Reply