Griff's normalmapped ship remakes

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

Moderators: winston, another_commander

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

Re: Griff's normalmapped ship remakes

Post by DaddyHoggy »

Svengali wrote:
DaddyHoggy wrote:
Could it be modded to work with OXPConfig? So that a player could keep nudging the variable up so that they got an acceptable amount of fab debris for an acceptable level of performance drop?
The current way of splitting the exploding wreckage handling from the main OXP is faster and easier though - I think it is a sensible solution. Good job, Griff .-)

And yes, it is absolutely possible to make it configurable.

A suggestion for the exploding wreckage. It could be a nice thing to spawn the wreckage only if the player is nearby.
:roll: OK, I meant - once Griff splits the wreckage out of the all-in-one OXP would it be good/useful/nice to have the wreckage configurable, so super-dooper machines can have tons and lesser machines can have "a bit"?

Checking for range to the player would be sensible too!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Griff's normalmapped ship remakes

Post by Svengali »

The check for distance is a simple one line addition to the scripts

Code: Select all

if(this.ship.position.distanceTo(player.ship.position) > 50000) return;
The range is not based on drawdistance and needs to be adjusted.

The configuration can be done pretty easy too and there are a few possible ways. But this is something Griff has to decide.
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

Re: Griff's normalmapped ship remakes

Post by Griff »

The distance check sounds like a great idea, where does it need to go in the scripts? I presume somewhere near the start, that's the full extent of my scripting capability :lol: Thargoid wrote these for me

"griff_spawn_wreckage.js" - spawns the bigger chunks of stuff

Code: Select all

this.name = "griff_spawn_wreckage"; 
this.author = "Thargoid"; 
this.copyright = "© 2008 the Oolite team."; 
this.description = "Spawn wreckage and sparks from dead ship"; 
this.version = "1.0"; 

this.shipDied = function() // event that occurs when the entity (ship) whose script this is dies
	{
	this.largeCount = (Math.ceil(Math.random() * 3)); // between 0-3 pieces of wreckage
	this.tinyCount =  (Math.ceil(Math.random() * 10) + 5); // between 5-10 tiny spark fragments
	this.sparkCount =  (Math.ceil(Math.random() * 20) + 10); // between 10-20 spin spark fragments
	this.ship.spawn("griffspark", this.tinyCount); // spawn the tiny spark fragments

	if(this.largeCount > 0) // if there is large wreckage
		{
		this.ship.spawn("griffwreckage", this.largeCount); // spawn the larger wreckage
		this.ship.spawn("spinspark", this.sparkCount); // spawn the spin sparks
		}

	}
griff_spawn_sparks.js - spawns the cloud of tiny glowing polygon 'bits'

Code: Select all

this.name = "griff_spawn_sparks"; 
this.author = "Thargoid"; 
this.copyright = "© 2008 the Oolite team."; 
this.description = "Break-up of griff wreckage into a tiny spark cluster"; 
this.version = "1.0"; 

this.shipDied = function()
	{
	this.tinysparkCount = (Math.ceil(Math.random() * 8) + 2); // between 2-10 tiny spark fragments
	this.ship.spawn("griffspark", this.tinysparkCount); // spawn the tiny spark fragments
	}
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Griff's normalmapped ship remakes

Post by Svengali »

Griff wrote:
The distance check sounds like a great idea, where does it need to go in the scripts? I presume somewhere near the start,...
Yes, in both scripts as first line in the handler.

Code: Select all

this.shipDied = function()
{
  if(this.ship.position.distanceTo(player.ship.position) > 50000) return;
  // other code
}
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Griff's normalmapped ship remakes

Post by Thargoid »

Svengali wrote:
Griff wrote:
The distance check sounds like a great idea, where does it need to go in the scripts? I presume somewhere near the start,...
Yes, in both scripts as first line in the handler.

Code: Select all

this.shipDied = function()
{
  if(!player.ship || !this.ship || this.ship.position.distanceTo(player.ship.position) > 50000) return;
  // other code
}
I would amend it very slightly to the above (just to save possibilities of log errors in a few specific cases).

The other option is just to tone down the numbers for lower spec machines, so things still get spawned but not so many of them.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Griff's normalmapped ship remakes

Post by Svengali »

Thargoid wrote:
I would amend it very slightly to the above (just to save possibilities of log errors in a few specific cases).
Good point. Checking for validity will avoid errors.
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

Re: Griff's normalmapped ship remakes

Post by Griff »

Thanks guys! :D I've added in the distance check code into the script and re-uploaded the OXP!
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

Seem to be getting log errors (Oolite 1.75.2 - windows 7):

0:34:06.251 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_diffuse.png".
10:34:06.253 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_normal.png".
10:34:06.257 [ai.load.failed.unknownAI]: Can't switch AI for <ShipEntity 0xbbc0438>{"Wreckage"} to "griff_wreckageAI.plist" - could not load file.
10:37:04.866 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_diffuse.png".
10:37:04.869 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_normal.png".
10:37:40.894 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_diffuse.png".
10:37:40.897 [files.notFound]: ----- WARNING: Could not find texture file "griff_wreckage_normal.png".
10:37:54.076 [gameController.exitApp]: .GNUstepDefaults synchronized.

Closing log at 2011-06-19 10:37:54 +0100.
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

Re: Griff's normalmapped ship remakes

Post by Griff »

Hmm, i'm not sure what's causing that, if you've got the newer bundle oxp (v1.2 which i uploaded the other day) is everything OK with your install of the griff_alloys_and_wreckage.oxp, all those missing files are now inside that and not the shippack bundle.

I've just noticed a bug in the all-in-1 bundle v1.2 upload, it's in the shipdata-overrrides.plist file in the config folder, it's removing the standard oolite alloys but doesn't replace them with anything anymore (since these items are now in their own oxp) i'll try and get a fixed version uploaded soon, but in the meantime you'll need to edit the shipdata-overrides.plist file in a text editor (on Microsoft Windows don't use notepad to edit the file but wordpad is OK to use) and take out the lines

Code: Select all

	"alloy" = 
	   { 
	   roles = "unused"; 
	   }; 

	"scarred-alloy" = 
	   { 
	   roles = "unused"; 
	   };
just delete them out and resave the file, then start Oolite with the shift key down to refresh the oxp cache, this will allow the default oolite alloys to be created again

edit: Ok, i've started uploading a fixed bundle oxp to Cmd. Cheyd deephorizons site, it's going to take a while for my slow internet connection to shift the file over, i've also got to fix the griff_alloys & wreckage oxp on my box.net site too
upload on hold for the moment while i sort out just how much of a blunder i've done!
Last edited by Griff on Sun Jun 19, 2011 10:55 am, edited 3 times in total.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

I loaded the Griff_alloys_and_wreckage.zip dated the 18th June from http://www.box.net/shared/rpkms25cc9

I noticed the folder "textures" does not contain the wreckage pngs - should it?
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

Re: Griff's normalmapped ship remakes

Post by Griff »

oops, yes! sorry i'll get everything sorted and fixed!
edit:
I'm busy re-uploading fixed versions of the oxp's but it's going to take about an hour, in the meantime the fixes are as follows if you want to sort them out yourself if you already have the files downloaded.
In griff_shipset_all_in_1.oxp (v1.2 - version number is in the .zip file name) remove the following lines from shipdata-overrides.plist...

Code: Select all

	"alloy" = 
	   { 
	   roles = "unused"; 
	   }; 

	"scarred-alloy" = 
	   { 
	   roles = "unused"; 
	   };
	   
	"wreckage-component" = 
	   { 
	   roles = "unused"; 
	   }; 
   
	"more-wreckage2" = 
	   { 
	   roles = "unused"; 
	   };   

	"more-wreckage3" = 
	   { 
	   roles = "unused"; 
	   }; 

	"more-wreckage4" = 
	   { 
	   roles = "unused"; 
	   }; 

	"more-wreckage5" = 
	   { 
	   roles = "unused"; 
	   };

..and paste them into the shipdata-overrides.plist of the griff_alloys_and_wreckage.oxp, next move two texture files griff_wreckage_diffuse.png & griff_wreckage_normal.png from the Textures folder in griff_shipset_all_in_1.oxp and put them in the Textures folder of griff_alloys_and_wreckage.oxp
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Griff's normalmapped ship remakes

Post by Lone_Wolf »

Griff, i just realised it's the textures that makes this oxp so big.

Maybe you could split the oxp ?

criteria could be : player-selectable ships, non-player ships, dockables, other ?
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Griff's normalmapped ship remakes

Post by Thargoid »

Wouldn't that rather defeat the "all-in-one" objective?
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Griff's normalmapped ship remakes

Post by Zireael »

Lone_Wolf wrote:
Griff, i just realised it's the textures that makes this oxp so big.

Maybe you could split the oxp ?

criteria could be : player-selectable ships, non-player ships, dockables, other ?
I quite agree. The weight of the oxp makes it less appealing to some people...
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

Re: Griff's normalmapped ship remakes

Post by Griff »

I'm not sure about splitting up the oxp, a lot of the textures are shared between NPC and player ships, plus all the ships are available as individual downloads on my box.net site, each one of those is about 2-4Mb to download so you could collect the set a bit at a time if the 90Mb bundle oxp hammers your internet connection a bit too much (like it does mine :lol: )
It might be worth me putting together a lower resolution texture version, scaling all the textures down 50% should make some real savings in memory use and download size
Post Reply