Page 1 of 1

Lua widget (or gadget) for meteor rain

Posted: 18 Mar 2010, 21:10
by Jools
I wonder if it's possible to make a meteor rain appear at random intervals in my map "Anteer Strait", which I ported from OTA. In there, it has random meteor storm events.

Not knowing any lua at all, I wonder i) first if lua is the way to do it, and ii) where to start.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 09:05
by Neddie
What impact (hur hur) do you want the asteroids to have? Upon play, of course.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 09:57
by Beherith
NOTA spacebugs has them iirc.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 09:58
by Gota
I suggest they be purely visual.
Try looking in Behe's meteor maps...
Try this one : http://www.springfiles.com/show_file.php?id=2328

If not in there try in these 2 :
http://www.springfiles.com/show_file.php?id=2344

http://www.springfiles.com/show_file.php?id=2351

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 10:05
by Beherith
I actually dont recommend using the space particle code from those maps for anything other than space particles. They are already a really hacked version of the snow gadget by trepan.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 10:08
by manolo_
Beherith wrote:I actually dont recommend using the space particle code from those maps for anything other than space particles. They are already a really hacked version of the snow gadget by trepan.
so hack of a hack = super optimazation ? :mrgreen:

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 12:30
by Jools
OTA has a meteor shower weapon with weapon id 225, (xta has this weapon as well, but I guess it's not present in other mods). In the weapon file, the following parameters are specified:

Code: Select all

[METEOR]
	{
	ID=225;
	name=Meteor;
	rendertype=1;
	meteor=1;

	model=asteroid6;

	weaponvelocity=300;
	areaofeffect=100;
	edgeeffectiveness=0.5;

	soundhit=xplomed2;
	soundwater=splshbig;

	explosiongaf=fx;
	explosionart=explode5;

	waterexplosiongaf=fx;
	waterexplosionart=h2oboom1;

	lavaexplosiongaf=fx;
	lavaexplosionart=lavasplashsm;

	[DAMAGE]
		{
		default=100;
		}
	}
I believe some players will be annoyed by meteors, so maybe it should be possible to disable in map options.

Cavedog team has released a map editor where you can configure these special effects for all maps, it includes meteor storm, hail shower and earthquake. The following parameters are editable:
* weapon: meteor/hail/quake
* radius
* duration
* density
* interval

Since these are configurable, it means the meteor effect can't be hardcoded to the engine, so there should be a file somewhere, I'm looking for it.

The meteors itself are 3do-objects (there are 6 different sizes), here is what one looks like:
Image

So what else... I just guess that these meteors should appear at random intervals, with maybe a configurable duration.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 13:15
by JohannesH
Dunno why anyone would want to play with a random factor like that

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 13:26
by manolo_
JohannesH wrote:Dunno why anyone would want to play with a random factor like that
if its en-/disable its fine

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 14:29
by Jools
Actually, I tried playing ota anteer and I didn't encounter any meteor- or hailstorms, so now I'm not so sure it was actually on this map.

One balance-reason for implementation could be that this map is a lot about spamming tidals, and meteors (if dealing damage) could counter that strategy a bit.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 15:04
by Pxtl
A bunch of the OTA maps had descriptions mentioning meteor impacts and earthquakes in-game (even Comet Catcher iirc), but I don't think any of them ever appeared.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 15:10
by Jools
I put one release candidate here, and may think about the meteors in a future version.

http://www.springfiles.com/show_file.php?id=2559

I didn't find the springfiles function of how to include starting positions, so I uploaded a screenshot from minimap with them.

Re: Lua widget (or gadget) for meteor rain

Posted: 19 Mar 2010, 15:13
by Jools
I remember that some maps had actually meteorite storms, and pintle told me this one had, but maybe it was that other large sea map, the one which has only sea and a lot of wrecks included for metal.

I don't ever recall seeing an earthquake in any map.