Page 1 of 1

Posted: Tue Mar 30, 2010 6:19 pm
by another_commander
This thread and particularly Lestradae's comment about using such pics in Oolite intrigued me. So, here is a screen that shows what can be done about it with the upcoming version 1.74 of the game.
Image

I am using the Backgrounds OXP here, as you may have noticed. The insect pic (thank you Mr. M. Swietek, lovely work) is an overlay and its appearance on the screen depends on the actual inhabitants description. If the description contains the string "insect", then the insect inhabitant's image appears below the planet in the F7 screen. You can do similar things for all the other species in the game, of course and end up with picures of inhabitants for all systems.

For anyone interested, the code to do the above is (remember, you need a trunk build to do it):

Code: Select all

this.guiScreenChanged = function(toGUI)
{
	if (toGUI == 'GUI_SCREEN_SYSTEM_DATA')
	{
		var pat = /insect/i;
		if (system.infoForSystem(galaxyNumber, player.ship.targetSystem).inhabitants.match(pat))
		{
			Oolite.setScreenOverlay("insectWithDew3.png");
		}
	}
}

Posted: Tue Mar 30, 2010 7:54 pm
by Svengali
Hehe, nice one (and a snippy cool example for regexps) .-)

btw: Is the planets position finalized?

Posted: Tue Mar 30, 2010 8:11 pm
by another_commander
Svengali wrote:
Hehe, nice one (and a snippy cool example for regexps) .-)

btw: Is the planets position finalized?
Yes, but you can always change it, as it is defined in descriptions.plist.

Posted: Tue Mar 30, 2010 9:06 pm
by DaddyHoggy
A thought - as well as picking up the inhabitant type - could it also check for colour? Then the RGB values of a standard default image could be altered to make the image more yellow, blue, green etc in hue on the fly?

<shrugs>

Posted: Wed Mar 31, 2010 8:30 am
by ramon
What are the pixel dimensions of the inhabitants picture?

Also, do you know which creatures need to be created? And can planets have their very own inhabitant picture, or will it only choose from a pool of generic ones?

..

Posted: Wed Mar 31, 2010 9:20 am
by Lestradae
I find that a very neat idea, the species pics. Now we need a volunteer for the according oxp ... didn't DeepSpace plan to integrate something like that into his take on an X-lite?

Posted: Wed Mar 31, 2010 9:40 am
by another_commander
ramon wrote:
What are the pixel dimensions of the inhabitants picture?

Also, do you know which creatures need to be created? And can planets have their very own inhabitant picture, or will it only choose from a pool of generic ones?
The dimensions of the picture can be adjusted to whatever you feel appropriate. In the shot above, it is a 250x250 120x120 approx. (forgot a last minute resize I did) image embedded near the lower right hand corner of a 1024x512 black background, with transparent color set to black.

As for the species that exist, they can be found in the 4th sub-array of the 'inhabitants' array inside descriptions.plist. To save the trouble of looking it up, they are "Rodent", "Frog", "Lizard", "Lobster", "Bird", "Humanoid", "Feline" and "Insect".

I think it is more practical to choose images from a small pool for each species rather than having one pic per planet.

Edit: Corrected image dimensions information.

Posted: Wed Mar 31, 2010 9:44 am
by ramon
another_commander wrote:
I think it is more practical to choose images from a small pool for each species rather than having one pic per planet.
Yep, I agree. But maybe a couple of planets could have special looking ones - Lave for instance. Or perhaps mission scripted ones, a bit like the Famous Planets oxp.

Or even perhaps, two or three variations of each species. (could male and female versions could still be generated randomly?)

Posted: Wed Mar 31, 2010 9:57 am
by Gimi
Would it be possible to make a community driven oxp where we could provide images and planet descriptions in a predefined format. This way the detail would increase and players who can't program can develop their own planet. sort of an infamous planets oxp.

Posted: Wed Mar 31, 2010 10:04 am
by another_commander
Split from Screenshots thread.

Posted: Wed Mar 31, 2010 12:38 pm
by DaddyHoggy
another_commander wrote:
Split from Screenshots thread.
That must take some doing now - given the length of the screenshot thread (if I remember how php moderator type stuff works...)

Posted: Wed Mar 31, 2010 12:51 pm
by another_commander
DaddyHoggy wrote:
another_commander wrote:
Split from Screenshots thread.
That must take some doing now - given the length of the screenshot thread (if I remember how php moderator type stuff works...)
Nah, when I am at work it's easy, it takes about two minutes to load the entire thread in one page. It's when I am at home that I count my quota bytes twice before attempting anything like it... ;-)

Posted: Wed Mar 31, 2010 8:56 pm
by DaddyHoggy
another_commander wrote:
DaddyHoggy wrote:
another_commander wrote:
Split from Screenshots thread.
That must take some doing now - given the length of the screenshot thread (if I remember how php moderator type stuff works...)
Nah, when I am at work it's easy, it takes about two minutes to load the entire thread in one page. It's when I am at home that I count my quota bytes twice before attempting anything like it... ;-)
Ah, in the old days it used to be called the Xerox subsidy, now it's a MiB/broadband one!

Posted: Thu Apr 01, 2010 11:11 am
by Griff
heh, this looks great! who's going to be the first to submit a pic of their mother-in-law as an alien for the oxp :lol: