Lua widget (or gadget) for meteor rain

Lua widget (or gadget) for meteor rain

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Lua widget (or gadget) for meteor rain

Post 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.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Lua widget (or gadget) for meteor rain

Post by Neddie »

What impact (hur hur) do you want the asteroids to have? Upon play, of course.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Lua widget (or gadget) for meteor rain

Post by Beherith »

NOTA spacebugs has them iirc.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Lua widget (or gadget) for meteor rain

Post 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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Lua widget (or gadget) for meteor rain

Post 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.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Lua widget (or gadget) for meteor rain

Post 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:
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Lua widget (or gadget) for meteor rain

Post 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.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Lua widget (or gadget) for meteor rain

Post by JohannesH »

Dunno why anyone would want to play with a random factor like that
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Lua widget (or gadget) for meteor rain

Post by manolo_ »

JohannesH wrote:Dunno why anyone would want to play with a random factor like that
if its en-/disable its fine
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Lua widget (or gadget) for meteor rain

Post 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.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Lua widget (or gadget) for meteor rain

Post 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.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Lua widget (or gadget) for meteor rain

Post 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.
Last edited by Jools on 19 Mar 2010, 15:41, edited 1 time in total.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Lua widget (or gadget) for meteor rain

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

Return to “Lua Scripts”