Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Moar Rocks 1.0

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

Moderators: winston, another_commander

Potential Debris
Dangerous
Dangerous
Posts: 75
Joined: Tue Apr 19, 2011 10:42 am
Location: UK

Re: Moar Rocks 1.0

Post by Potential Debris »

I too am guilty of boulder-barging. I have a mining laser on the left-mount but often I can't be bothered to rotate, line up, shoot, switch back to front view and then go chasing down all those pesky little splinters one by one. I find that splinters are often reluctant to be scooped, for some reason.
If you ram a boulder just right, just at the bottom of your viewscreen, you can split the boulder and instantly scoop three or four of the splinters, no chasing required. Just watch those shields! It's less fun when those collisions start scraping off your expensive ironhide armour, or take out a your fuel injectors!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Moar Rocks 1.0

Post by Cody »

spara wrote:
Cody wrote:
This seems to be working rather well - excellent!
Nice asteroid field.
Yes, very nice - but I should perhaps mention that this does increase the entity count considerably, so lower-powered machines may struggle a little if using Griff's asteroids/rocks. This was the case with the waves of asteroids at Lago in Coyote's Run, as I recall.
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
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: Moar Rocks 1.0

Post by Venator Dha »

I've been playing around with the script.js file to create more variation in rock type & number from asteroid to asteroid. An Asteroid can have
more asteroids, boulders & splinters,
more asteroids,
more boulders,
some cargo pods,
or nothing
generated around them.
I make no claims as to the quality of the code :D and any comments are welcome.
Changed

Code: Select all

this.systemWillPopulate = function (){
	var addition = 5;//number of asteroids added per asteroid
	system.setPopulator("moar_rocks", {
		callback: function(pos) {
			var asteroids = system.shipsWithPrimaryRole("asteroid");
			for (var i = 0; i < asteroids.length; i++) {
				var position = asteroids[i].position;
				system.addShips("asteroid", addition, position);
			};
		}.bind(this),
		location: "INNER_SYSTEM_OFFPLANE"
	});
}
to

Code: Select all

this.systemWillPopulate = function (){
	system.setPopulator("moar_rocks", {
		callback: function(pos) {
			var asteroids = system.shipsWithPrimaryRole("asteroid");
			for (var i = 0; i < asteroids.length; i++) {
				var split = Math.random()// random number between 0 & 1
				var position = asteroids[i].position;
				var rand_ast = Math.random() * 3;// random number between 0 & 3
				var addition = Math.floor(rand_ast) + 1;//random integer 1 to 3 number of asteroids
				var addition_b = (addition * 2) - 1;//number of boulders 1 to 5
				var addition_s = (addition * 4) - 3;//number of splinters 1 to 9
				if (split <.10){ //10% chance to add asteroids, boulders & splinters to an asteroid
					system.addShips("asteroid", addition, position);//1 to 3 number of asteroids added to asteroid
					system.addShips("boulder", addition_b, position);//1 to 5 number of boulders added to asteroid
					system.addShips("splinter", addition_s, position);//1 to 9 number of splinters added to asteroid
				} else if (split <.50){ //40% chance to add more asteroids to an asteroid
					system.addShips("asteroid", addition, position);//1 to 3 number of asteroids added to asteroid
				} else if (split <.75){ //25% chance to add boulders to an asteroid
					system.addShips("boulder", addition_b, position);//1 to 5 number of boulders added to asteroid
				} else if (split <.80){ //5% chance to add cargopods to an asteroid
					system.addShips("cargopod", addition_s, position);//1 to 9 number of cargopods added to asteroid
				}  //20% chance to add nothing
			};
		}.bind(this),
		location: "INNER_SYSTEM_OFFPLANE"
	});
}
Note: if [EliteWiki] Star-Jelly installed there is a high chance of them being destroyed.
Taurus Driving through the galaxy since... .
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Moar Rocks 1.0

Post by Cody »

Whilst swerving around 'roids on injectors, I've been pondering again: a very occasional 'wild' system that throws oodles of rocks at you would be cool!

Oh yeah... should this be available via the manager?
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
CWolf
---- E L I T E ----
---- E L I T E ----
Posts: 317
Joined: Mon Jul 03, 2006 12:33 pm
Location: Currently floating round Eninre

Re: Moar Rocks 1.0

Post by CWolf »

Ah Cody - beat me to it! This would be great ingame!
The act of talking b*ll*cks whilst waving one's arms about wildly is referred to as testiculation.

Image
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Moar Rocks 1.0

Post by spara »

It's embedded into [wiki]Asteroid Tweaks[/wiki].
User avatar
CWolf
---- E L I T E ----
---- E L I T E ----
Posts: 317
Joined: Mon Jul 03, 2006 12:33 pm
Location: Currently floating round Eninre

Re: Moar Rocks 1.0

Post by CWolf »

spara wrote:
It's embedded into [wiki]Asteroid Tweaks[/wiki].
Ah, thanks!
The act of talking b*ll*cks whilst waving one's arms about wildly is referred to as testiculation.

Image
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6568
Joined: Wed Feb 28, 2007 7:54 am

Re: Moar Rocks 1.0

Post by another_commander »

Cody wrote:
Whilst swerving around 'roids on injectors, I've been pondering again: a very occasional 'wild' system that throws oodles of rocks at you would be cool!
Would you like some ketchup with your asteroids, sir? ;-)
Image
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Moar Rocks 1.0

Post by Cody »

<chortles> Crikey! I bet that would hit performance if they were Griff 'roids.
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
CWolf
---- E L I T E ----
---- E L I T E ----
Posts: 317
Joined: Mon Jul 03, 2006 12:33 pm
Location: Currently floating round Eninre

Re: Moar Rocks 1.0

Post by CWolf »

That makes a really cool image! However if I did that my laptop would make a really uncool fire!
The act of talking b*ll*cks whilst waving one's arms about wildly is referred to as testiculation.

Image
Post Reply