Inhabitants' images on system data screen

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

Moderators: winston, another_commander

Post Reply
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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");
		}
	}
}
Last edited by another_commander on Tue Mar 30, 2010 10:02 pm, edited 1 time in total.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Hehe, nice one (and a snippy cool example for regexps) .-)

btw: Is the planets position finalized?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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>
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
ramon
---- E L I T E ----
---- E L I T E ----
Posts: 346
Joined: Thu Jun 01, 2006 2:38 pm
Location: Tavistock
Contact:

Post 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?
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post 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?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
Last edited by another_commander on Thu Apr 01, 2010 8:22 am, edited 1 time in total.
User avatar
ramon
---- E L I T E ----
---- E L I T E ----
Posts: 346
Joined: Thu Jun 01, 2006 2:38 pm
Location: Tavistock
Contact:

Post 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?)
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Post 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.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Split from Screenshots thread.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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...)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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... ;-)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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:
Post Reply