Light Grenade

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Light Grenade

Post by FragMe! »

So once again I decide to foolishly attempt to make a functioning flashlight. I did manage to put it in as an animated add on and it looks cool enough but as for lighting things up it left much to be desired.

But while playing around with ODFs and things I came up with the Light Grenade. It throws just like a thermal but I reduced the gravity a lot so it floats for a while. It will rebound of off walls and the ground. It also has the added benifit of once it "expires" it blows up just like a normal thermal, (sorry other team 8) ). I made a quick mesh for it of a sphere within a sphere so you can see where it is. I will probably reduce the throwing velocity so it won't travel as far plus some other tweaks.

No more dark and scary places :P

The video shows first the flashlight add on then the Light Grenade in the enclosed space (I bounced them cause it is hard to aim in Freecam mode) and the explosions then finally lighting up a distant object.

Image
NullCommando
Jedi
Jedi
Posts: 1010
Joined: Sat Dec 01, 2007 12:29 pm
Games I'm Playing :: Destiny
xbox live or psn: NullCommando
Location: Earth

Re: Light Grenade

Post by NullCommando »

I'm liking the light addon! Though for a clone it would be better in the side of his helmet :P
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Light Grenade

Post by woner11 »

The whole thing looks really good. If it were me I would keep the distance, but maybe change the msh to look like some small box or something. So then you throw the box, it lights up the room and then explodes. Oh well, very good job. Will you be releasing it?

Off topic: What map was that?
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Light Grenade

Post by SBF_Dann_Boeing »

Y don't you have the flashlight actually fire those light nades?
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Light Grenade

Post by FragMe! »

I do have a version of the flashlight as a weapon so ya I could make it the ordinace for it or have them shoot out of a mortar launcher oh the possiblities are endless just a bit more ODF manipulation.
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: Light Grenade

Post by Grev »

That looks great! When might they be released? And can the light be added to vehicles?
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Light Grenade

Post by trainmaster611 »

Looks sweet Frag :P
User avatar
venort
Private
Posts: 42
Joined: Fri Feb 29, 2008 3:04 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: up a creek that rhymes with pit.

Re: Light Grenade

Post by venort »

nice.
off topic: that map would be good with default sides if you released it on star wars battlefront files.
User avatar
darth omm9
Private
Posts: 38
Joined: Sat Sep 29, 2007 4:39 am

Re: Light Grenade

Post by darth omm9 »

cool idea
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Light Grenade

Post by MandeRek »

Talking about light: Can i put a null into a mesh (so hp_light in a sphere for example) and attach the odf to that? I know that will work, since the tusken campfire does that, but my real question is, can light travel out of the mesh? Not that it can't go through the mesh to the outside? Because we need to see it ofcourse :P

Also, can we attach light odf's to everykind of odf? Like weapons, weaponordnance, vehicles, vehicleweapons, vehicleweaponordnances etc? Thanks in advance, and looks great btw! :D
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Light Grenade

Post by SilvaDalek »

The video won't load :(
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Light Grenade

Post by FragMe! »

@MandeRek
There is a document called Attached Effects. I think it either came with the Modtools docs or I got it from pyshcoFreds site but it explains how to attach effects using both odf and FX files. Now to the disappointing part yes you can attach, lets say a light, to a vehicle using either method and it works good it lights up the area the same way the grenade does but here is the bad part if the vehicle dies gets blown up or whatever the effect stays right where the vehicle died so after a while you have all these light effects all over the place. The reason why the light grenade works and vanishes is because all I basically did was change the glow parameter that was already present on the thermal and by changing gravity gave it a longer life. The thermal like other ordinace like mines don't "arm" until they make non moving contact with something in the case of the thermals that would be the ground. I also know from experience I have not been able to attach a light effect to a weapon such as a rifle, I have not played around with a light saber at all to see if it can be converted to a non-lethal light emiting type of thing, some would call a flashlight. For flashlight that is shown in the video the light cone is actually part of the model I just did a color at vertex and glow thing to it. That is also why it doesn't actually light anything.

As for which things you can attach to, weapons or vehicleweapons no, vehicles yes but the efffect stays, weaponordnance I cannot say for sure as I have not played too much with that except what I have tried.

@silva I just tried the link and it worked, it may be FF playing with your mind (and your computer) again

I have attached the Effects doc just in case it was not in the modtools docs
Attached Effects.zip
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Light Grenade

Post by SilvaDalek »

All of the sudden it works! That is awsome! ([Diet Coke] you filefront . . .)
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Light Grenade

Post by MandeRek »

Wow, thanks a lot FragMe! :)

Maybe one day we find out how to add light perfect, though i understand it has been tried a lot already: thanks for this doc! :D
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Light Grenade

Post by SBF_Dann_Boeing »

i got an idea. A beam laser would work perfectly for this. Just make the weapon fire an invisible beam laser, that will make light appear around the beam, while it looks like it's coming from that attached light you put on.
User avatar
TheDarkMask
Captain
Captain
Posts: 499
Joined: Sat Apr 07, 2007 4:26 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany-Bremen
Contact:

Re: Light Grenade

Post by TheDarkMask »

Totally AWESOME FragMe!
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Light Grenade

Post by FragMe! »

First of all I am not obssessed I just refuse to let anything get the better of me so...

Here is another video of the lightgrenade it has a glow to it now and on the second part of the video is...

A mostly working flashlight :runaway: Thanks to the hint by all things weapons, none other that Dann Boeing, I changed the ordanace to a beam type effect. It is a weapon, you have to turn it on "fire it" and it will last for 60 seconds. The added benefit is you can switch back to you primary weapon and the light stays. I will most likely redo the msh to something that fits a little better.
Here is the video
http://files.filefront.com/Flashlightwm ... einfo.html
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Light Grenade

Post by Maveritchell »

FragMe! wrote:First of all I am not obssessed I just refuse to let anything get the better of me so...

Here is another video of the lightgrenade it has a glow to it now and on the second part of the video is...

A mostly working flashlight :runaway: Thanks to the hint by all things weapons, none other that Dann Boeing, I changed the ordanace to a beam type effect. It is a weapon, you have to turn it on "fire it" and it will last for 60 seconds. The added benefit is you can switch back to you primary weapon and the light stays. I will most likely redo the msh to something that fits a little better.
Here is the video
http://files.filefront.com/Flashlightwm ... einfo.html
So wait, I'm not even sure what you're going for here. A beam still isn't a lightsource - it emits a soft glow that provides the appearance of light, but it's more like a light-colored "decal" than it is an actual light.

Also, I'm not sure why you're just not using explosions. You can tack them on to any kind of weapon and they've got real light built in (LightColor, LightRadius, LightDuration). You also basically have free rein over when you create an explosion if you work your .odfs right. (In fact, if you're really set on using a beam ordnance you can create a very short light duration since beams constantly generate impact explosions - but I don't necessarily think beams are the best idea.)

Like I said, I guess I'm confused. Are you looking for actual light or something that sort've fakes the appearance of a flashlight?
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Light Grenade

Post by trainmaster611 »

I know bolts make light (real light, not just glow). What about having an extremely short ordnance lifetime and with a large light radius with an extremely high firing rate. So you have bolts that come out of the rifle and terminate almost right at the originating point. And the constant flow of bolts keeps lights in the room.

I see several problems with this. First of all, the light is in a radius, so you can't focus the light in any direction. It acts as more of a lantern than a flashlight. Second, you would have to hold the trigger down as long as you want the light to run.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Light Grenade

Post by Maveritchell »

Bolt-type ordnances don't really create light, though. Again, they have a glow that's sort've like light - this is why I asked my original question. There are a lot of ways you could fake the appearance of a light, but if you want actual light you have to have some kind of setup in the .odf for emitting light.

Bullet-type ordnances, on the other hand, do support light and in fact can even have a light .odf attached to them.

All of this is in the .odf parameters guide, it's a good read and helps prevent confusion about what can and can't be done, and it definitely makes creating unique things a little easier.

For reference:

Code: Select all

    Ordnance Beam
                                        BeamWidth
                                        BeamTexture
                                        BeamColor rgba
                                        BeamGlowWidth
                                        BeamGlowTexture
                                        BeamGlowColor rgba
                                        PassThrough
                                        OrdnanceEffect
                                            red_blaster_bolt
                                            red_blaster_bolt_small
                                            green_blaster_bolt
                                            green_blaster_bolt_small
                                            blue_blaster_bolt
                                            blue_blaster_bolt_small
                                        ImpactEffect
    Ordnance Bullet
                                        GeometryName
                                        Velocity
                                        OrdnanceEffect
                                        ImpactEffectSoft
                                        ImpactEffectRigid
                                        ImpactEffectStatic
                                        ImpactEffectTerrain
                                        ImpactEffectWater
                                        ImpactEffectShieldSmall
                                        ImpactEffectShieldLarge
                                        ImpactDecalTerrain
                                        ImpactDecalStatic
                                        LightOdf
                                        LightColor rgba
                                        LightRadius
                                        EndLightColor rgba
                                        FadeLightColor
        Ordnance Laser
                                        LaserLength
                                        GlowLength
                                        BlurLength
                                        LaserWidth
                                        FadeOutTime
                                        LaserTexture
                                        LaserGlowColor
                                        EndLaserGlowColor rgba
                                        OrdnanceEffect
                                            red_blaster_bolt
                                            red_blaster_bolt_small
                                            green_blaster_bolt
                                            green_blaster_bolt_small
                                            blue_blaster_bolt
                                            blue_blaster_bolt_small                                        
Note that ordnance laser == ordnance bolt. And you will note that the following properties (common properties to all ordnance classes) don't have any specific light references:

Code: Select all

NextCharge
LifeSpan
DamageTransitionDelay
DamageTransitionPeriod
DamageFinalDamage
Explosion
ExplosionImpact
ExplosionName
ExplosionExpire
Damage
MaxDamage
HealthScale
ArmorScale
PersonScale
AnimalScale
DroidScale
VehicleScale
BuildingScale
ShieldScale
TrailEffect
ExplosionEffect
OrdnanceSound
CollisionSound
CollisionWaterSound
CollisionShieldSound
BonusAmplification
BonusColor - rgba
Here are the properties of explosions from which I was citing:

Code: Select all

    Explosion Properties
Damage
MaxDamage
HealthScale
ArmorScale
PersonScale
AnimalScale
DroidScale
VehicleScale
BuildingScale
ShieldScale
DamageRadiusInner
DamageRadiusOuter
DamageRadius
Shake
ShakeRadiusInner
ShakeRadiusOuter
ShakeRadius
ShakeLength
Push
PushRadiusInner
PushRadiusOuter
PushRadius
PushDeadOnly
HurtOwner
Effect
WaterEffect
ShieldEffect
Decal
SoundProperty
ChunkGeometryName
ChunkTerrainCollisions
ChunkTerrainEffect
ChunkTrailEffect
ChunkSmokeEffect
ChunkPhysics
    FULL
    LEAF
    STATIC
    SIMPLE
ChunkOmega float xyz
ChunkSpeed
ChunkGravity float xyz
NumChunks
ChunkStartDistance
ChunkInitialCollisionSound
ChunkScrapeCollisionSound
VisibleRadius
LightColor
LightRadius
LightDuration
Post Reply