Page 2 of 2

Re: Moar Rocks 1.0

Posted: Mon Sep 08, 2014 7:54 am
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!

Re: Moar Rocks 1.0

Posted: Mon Sep 08, 2014 4:46 pm
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.

Re: Moar Rocks 1.0

Posted: Sun Sep 14, 2014 8:58 am
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.

Re: Moar Rocks 1.0

Posted: Fri Dec 25, 2015 6:43 pm
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?

Re: Moar Rocks 1.0

Posted: Fri Dec 25, 2015 8:03 pm
by CWolf
Ah Cody - beat me to it! This would be great ingame!

Re: Moar Rocks 1.0

Posted: Fri Dec 25, 2015 10:16 pm
by spara
It's embedded into [wiki]Asteroid Tweaks[/wiki].

Re: Moar Rocks 1.0

Posted: Fri Dec 25, 2015 10:45 pm
by CWolf
spara wrote:
It's embedded into [wiki]Asteroid Tweaks[/wiki].
Ah, thanks!

Re: Moar Rocks 1.0

Posted: Mon Dec 28, 2015 3:40 pm
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

Re: Moar Rocks 1.0

Posted: Mon Dec 28, 2015 3:46 pm
by Cody
<chortles> Crikey! I bet that would hit performance if they were Griff 'roids.

Re: Moar Rocks 1.0

Posted: Mon Dec 28, 2015 4:58 pm
by CWolf
That makes a really cool image! However if I did that my laptop would make a really uncool fire!