Page 1 of 1

Smoke Grenade!

Posted: Wed Aug 02, 2006 11:23 am
by busterkinkade
Here is a smoke grenade mod I have been doing with deadlydarkness, he did the fx and got the particle editor to work, I came up with the concept and did the coding required. Screenshot below:

Image

It lasts for between 30-40 seconds. It does not affect the ai who can still see through it (at least I think they can). I will post the fx data if anyone wants it.

RE: Smoke Grenade!

Posted: Wed Aug 02, 2006 11:27 am
by Teancum
Shazam! That is waaaay cool

And ya, the AI still see through it. I think in the luas there's something about DenseEnvironment() that affects how far they can see. Hope you find a workaround though as that is awesome!

RE: Smoke Grenade!

Posted: Wed Aug 02, 2006 11:31 am
by busterkinkade
Could I just add it to the grenade's lua, since there must be an explosion radius, does that mean it can have say, a 'negative visibilty' radius? Otherwise it would be great for some kind of player-only commando map, with specialty classes or something.

RE: Smoke Grenade!

Posted: Wed Aug 02, 2006 11:39 am
by MasterSkywalker
WOOT!! Coudl you please upload the fx files? It does suck the bots can still see throught the smoke, but this would come very handy in some online games.

Posted: Wed Aug 02, 2006 11:46 am
by busterkinkade
Ok, here it is. Create a .txt file with notepad/wordpad, copy the code in and save it as a .fx file.
Hidden/Spoiler:
[code]ParticleEmitter("Explosion")
{
MaxParticles(15.0000,15.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0010, 0.0010);
BurstCount(15.0000,15.0000);
MaxLodDist(50.0000);
MinLodDist(10.0000);
BoundingRadius(30.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Circle()
{
PositionX(-0.0500,0.0500);
PositionY(0.5000,0.6000);
PositionZ(-0.0500,0.0500);
}
Offset()
{
PositionX(0.0000,0.0000);
PositionY(0.0000,0.0000);
PositionZ(0.0000,0.0000);
}
PositionScale(0.0000,0.0000);
VelocityScale(1.0000,2.0000);
InheritVelocityFactor(0.0000,0.0000);
Size(0, 0.3600, 0.7200);
Red(0, 255.0000, 255.0000);
Green(0, 255.0000, 255.0000);
Blue(0, 255.0000, 255.0000);
Alpha(0, 255.0000, 255.0000);
StartRotation(0, 0.0000, 360.0000);
RotationVelocity(0, -100.0000, 100.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(40.0000);
Position()
{
LifeTime(10.0000)
}
Size(0)
{
LifeTime(35.0000)
}
Color(0)
{
LifeTime(30.0000)
Reach(255.0000,255.0000,255.0000,255.0000);
}
}
Geometry()
{
BlendMode("NORMAL");
Type("EMITTER");
Texture("explode3");
ParticleEmitter("Smoke")
{
MaxParticles(3.0000,3.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0750, 0.0750);
BurstCount(1.0000,1.0000);
MaxLodDist(1000.0000);
MinLodDist(800.0000);
BoundingRadius(30.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Circle()
{
PositionX(-0.3600,0.3600);
PositionY(-0.3600,0.3600);
PositionZ(-0.3600,0.3600);
}
Offset()
{
PositionX(0.0000,0.0000);
PositionY(0.0000,0.0000);
PositionZ(0.0000,0.0000);
}
PositionScale(0.0000,0.0000);
VelocityScale(0.1800,0.1800);
InheritVelocityFactor(0.2500,0.2500);
Size(0, 3.0000, 3.1000);
Hue(0, 0.0000, 0.0000);
Saturation(0, 0.0000, 0.0000);
Value(0, 20.0000, 100.0000);
Alpha(0, 0.0000, 64.0000);
StartRotation(0, 0.0000, 360.0000);
RotationVelocity(0, -90.0000, 90.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(35.0000);
Position()
{
LifeTime(30.0000)
}
Size(0)
{
LifeTime(1.0000)
Scale(2.5000);
Next()
{
LifeTime(2.0000)
Scale(2.5000);
}
}
Color(0)
{
LifeTime(30.0000)
Move(0.0000,0.0000,0.0000,128.0000);
Next()
{
LifeTime(0.7200)
Move(0.0000,0.0000,0.0000,-64.0000);
Next()
{
LifeTime(0.4000)
Move(0.0000,0.0000,0.0000,-192.0000);
}
}
}
}
Geometry()
{
BlendMode("NORMAL");
Type("PARTICLE");
Texture("com_sfx_smoke3");
ParticleEmitter("BlackSmoke")
{
MaxParticles(4.0000,4.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0250, 0.0250);
BurstCount(1.0000,1.0000);
MaxLodDist(50.0000);
MinLodDist(10.0000);
BoundingRadius(5.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Spread()
{
PositionX(-0.9450,0.9450);
PositionY(-0.9450,0.9450);
PositionZ(-0.9450,0.9450);
}
Offset()
{
PositionX(-0.0473,0.0473);
PositionY(-0.0473,0.0473);
PositionZ(-0.0473,0.0473);
}
PositionScale(0.0000,0.0000);
VelocityScale(0.9450,0.9450);
InheritVelocityFactor(0.2000,0.2000);
Size(0, 0.4725, 0.6615);
Hue(0, 12.0000, 20.0000);
Saturation(0, 5.0000, 10.0000);
Value(0, 200.0000, 220.0000);
Alpha(0, 0.0000, 0.0000);
StartRotation(0, -20.0000, 20.0000);
RotationVelocity(0, -20.0000, 20.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(1.2000);
Position()
{
LifeTime(1.2000)
Scale(0.0000);
}
Size(0)
{
LifeTime(1.6000)
Scale(6.0000);
}
Color(0)
{
LifeTime(0.0800)
Move(0.0000,0.0000,0.0000,255.0000);
Next()
{
LifeTime(1.1200)
Move(0.0000,0.0000,0.0000,-255.0000);
}
}
}
Geometry()
{
BlendMode("NORMAL");
Type("PARTICLE");
Texture("thicksmoke3");
}
}
}
ParticleEmitter("Flames")
{
MaxParticles(3.0000,3.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0750, 0.0750);
BurstCount(1.0000,1.0000);
MaxLodDist(1000.0000);
MinLodDist(800.0000);
BoundingRadius(30.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Circle()
{
PositionX(-0.3600,0.3600);
PositionY(-0.3600,0.3600);
PositionZ(-0.3600,0.3600);
}
Offset()
{
PositionX(-0.0360,0.0360);
PositionY(-0.0360,0.0360);
PositionZ(-0.0360,0.0360);
}
PositionScale(0.0000,0.0000);
VelocityScale(0.3600,0.3600);
InheritVelocityFactor(0.2500,0.2500);
Size(0, 0.0300, 0.0600);
Red(0, 255.0000, 255.0000);
Green(0, 204.0000, 233.0000);
Blue(0, 98.0000, 185.0000);
Alpha(0, 0.0000, 128.0000);
StartRotation(0, 0.0000, 255.0000);
RotationVelocity(0, -160.0000, 160.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(0.8000);
Position()
{
LifeTime(0.8000)
Scale(0.0000);
}
Size(0)
{
LifeTime(0.0800)
Scale(4.0000);
Next()
{
LifeTime(0.7200)
Scale(3.0000);
}
}
Color(0)
{
LifeTime(0.0800)
Move(0.0000,-40.0000,-50.0000,128.0000);
Next()
{
LifeTime(0.4000)
Move(128.0000,-40.0000,-50.0000,-128.0000);
Next()
{
LifeTime(0.3200)
Move(128.0000,-50.0000,-50.0000,-128.0000);
}
}
}
}
Geometry()
{
BlendMode("ADDITIVE");
Type("PARTICLE");
Texture("com_sfx_explosion1");
ParticleEmitter("BlackSmoke")
{
MaxParticles(3.0000,3.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0250, 0.0250);
BurstCount(1.0000,1.0000);
MaxLodDist(50.0000);
MinLodDist(10.0000);
BoundingRadius(5.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Spread()
{
PositionX(-0.9450,0.9450);
PositionY(-0.9450,0.9450);
PositionZ(-0.9450,0.9450);
}
Offset()
{
PositionX(-0.0473,0.0473);
PositionY(-0.0473,0.0473);
PositionZ(-0.0473,0.0473);
}
PositionScale(0.0000,0.0000);
VelocityScale(1.3500,1.3500);
InheritVelocityFactor(0.1000,0.1000);
Size(0, 0.1890, 0.3780);
Red(0, 254.0000, 255.0000);
Green(0, 172.0000, 179.0000);
Blue(0, 75.0000, 89.0000);
Alpha(0, 0.0000, 0.0000);
StartRotation(0, -20.0000, 20.0000);
RotationVelocity(0, -20.0000, 20.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(1.0000);
Position()
{
LifeTime(1.2000)
Scale(0.0000);
}
Size(0)
{
LifeTime(1.0000)
Scale(5.0000);
}
Color(0)
{
LifeTime(0.0080)
Move(0.0000,0.0000,0.0000,48.0000);
Next()
{
LifeTime(0.9920)
Move(0.0000,0.0000,0.0000,-64.0000);
}
}
}
Geometry()
{
BlendMode("ADDITIVE");
Type("PARTICLE");
Texture("thicksmoke3");
}
}
}
}
}
}
ParticleEmitter("Flare")
{
MaxParticles(2.0000,2.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.1000, 0.1000);
BurstCount(1.0000,1.0000);
MaxLodDist(50.0000);
MinLodDist(10.0000);
BoundingRadius(5.0);
SoundName("")
Size(1.0000, 1.0000);
Hue(255.0000, 255.0000);
Saturation(255.0000, 255.0000);
Value(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Spread()
{
PositionX(0.0000,0.0000);
PositionY(1.0000,1.0000);
PositionZ(0.0000,0.0000);
}
Offset()
{
PositionX(0.0000,0.0000);
PositionY(0.0000,0.0000);
PositionZ(0.0000,0.0000);
}
PositionScale(0.0000,0.0000);
VelocityScale(1.0000,1.0000);
InheritVelocityFactor(0.0000,0.0000);
Size(0, 0.1000, 0.2000);
Red(0, 255.0000, 255.0000);
Green(0, 240.0000, 240.0000);
Blue(0, 200.0000, 200.0000);
Alpha(0, 128.0000, 128.0000);
StartRotation(0, 0.1000, 0.3000);
RotationVelocity(0, 0.0000, 0.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(0.8000);
Position()
{
LifeTime(0.8000)
}
Size(0)
{
LifeTime(0.1000)
Scale(2.0000);
}
Color(0)
{
LifeTime(0.2000)
Move(0.0000,0.0000,0.0000,-128.0000);
}
}
Geometry()
{
BlendMode("ADDITIVE");
Type("PARTICLE");
Texture("com_sfx_flames1");
}
ParticleEmitter("Sparks")
{
MaxParticles(6.0000,6.0000);
StartDelay(0.0000,0.0000);
BurstDelay(0.0010, 0.0010);
BurstCount(2.0000,2.0000);
MaxLodDist(50.0000);
MinLodDist(10.0000);
BoundingRadius(5.0);
SoundName("")
Size(1.0000, 1.0000);
Red(255.0000, 255.0000);
Green(255.0000, 255.0000);
Blue(255.0000, 255.0000);
Alpha(255.0000, 255.0000);
Spawner()
{
Circle()
{
PositionX(-0.2000,0.2000);
PositionY(0.0000,0.2000);
PositionZ(-0.2000,0.2000);
}
Offset()
{
PositionX(0.0000,0.0000);
PositionY(0.0000,0.0000);
PositionZ(0.0000,0.0000);
}
PositionScale(0.2000,0.6000);
VelocityScale(0.4000,2.4000);
InheritVelocityFactor(0.0000,0.0000);
Size(0, 0.0050, 0.0100);
Red(0, 255.0000, 255.0000);
Green(0, 255.0000, 255.0000);
Blue(0, 255.0000, 255.0000);
Alpha(0, 255.0000, 255.0000);
StartRotation(0, 0.0000, 360.0000);
RotationVelocity(0, -100.0000, 100.0000);
FadeInTime(0.0000);
}
Transformer()
{
LifeTime(1.6000);
Position()
{
LifeTime(1.6000)
Accelerate(0.0000, -3.0000, 0.0000);
}
Size(0)
{
LifeTime(1.6000)
Scale(0.0000);
}
Color(0)
{
LifeTime(1.6000)
Move(0.0000,0.0000,0.0000,-255.0000);
}
}
Geometry()
{
BlendMode("ADDITIVE");
Type("SPARK");
SparkLength(0.0500);
Texture("com_sfx_laser_orange");
}
}
}
}[/code][/size]

Posted: Wed Aug 02, 2006 12:12 pm
by Moving_Target
Sweet i could use this in my mod!!! Ok i save it in a notepad doc but i can't save into FX formate. After you do that what else do you do? (I'm slow somethimes)
Thanks!!!

Posted: Wed Aug 02, 2006 12:21 pm
by DeadlyDarkness
Sure you can use it. When you save it in notepad, do save as and type con_whateveryoulike.fx (include the .fx) as the filename, then save. Theres also a way to modify the folder options to always display file extensions, very useful. Once you have done that, put the fx file in data_yourworld\common\effects. Then, specify the fx file under 'effect' in the com_weap_inf_thermaldetonator_exp.odf file (located in data_yourworld\common\odfs) Then, munge the map and test it. When a normal nade is thrown, it will explode and you can see the effect. (Note: everything there should work, if not, start a new thread and ask others for some help).

Posted: Wed Aug 02, 2006 1:17 pm
by The_Emperor
Nice, very nice.
Would it be possible to make it green, and have the same effect as neuro poison to everyone near? (poison granades, like in KotOR)
I doubt thats possible though :P

Posted: Wed Aug 02, 2006 1:19 pm
by Moving_Target
Anything is possible as long as you have enough money and time and know what you are doing (or the people who you hired)

Thanks Deadly Darkness!

Posted: Wed Aug 02, 2006 1:27 pm
by DeadlyDarkness
No problem :). Funnily enough, I was thinking about the poison grenade idea. I've just started it. My idea is to have a merc vs jedi map, where the jedi have their advantages (ie, the Force) and the mercs have classes like scout, munitions, etc, each with unique weapons. Like a stun grenade which works by pushing the enemy to the floor or one that makes the surrounding area extremely bright (a flash-bang grenade in effect).

Posted: Wed Aug 02, 2006 1:35 pm
by PR-0927
LOL, I had a smoke grenade once in a map, but as stated, the AI can see through it, so I removed it.

- Majin Revan

Posted: Sat Aug 05, 2006 1:17 pm
by busterkinkade
Sorry for the bump, but it would be very helpful if someone could explain to us how we could get a unit to dispense anything, not just autoturrets and health. Sorry for the blunt post.

Posted: Sat Aug 05, 2006 5:32 pm
by Alpha
You might want to start a new topic for that, it will get more attention that way. And I'm not sure, you'd have to look at the ODFs of the dispensable items.

Posted: Sat Aug 05, 2006 6:13 pm
by crazytieguy
Wow. Just get it so the AI can't see through it, and you have a really nice mod!

Posted: Sat Aug 05, 2006 6:38 pm
by Qdin
how about adding the DenseEnvironment() in the .odf?

Posted: Sun Aug 06, 2006 9:44 am
by Tohron
Maybe you could set it so that the area of the smoke effect is encompassed by an unhittable entity that's a friendly class - that might make it so that the AI dosn't shoot at it due to AI fear of hitting a friendly.

The mutally allied unhittable unit could be removed when the effect wears off.

Posted: Tue Aug 08, 2006 11:38 am
by $iniSTar
DeadlyDarkness wrote:Sure you can use it. When you save it in notepad, do save as and type con_whateveryoulike.fx (include the .fx) as the filename, then save. Theres also a way to modify the folder options to always display file extensions, very useful. Once you have done that, put the fx file in data_yourworld\common\effects. Then, specify the fx file under 'effect' in the com_weap_inf_thermaldetonator_exp.odf file (located in data_yourworld\common\odfs) Then, munge the map and test it. When a normal nade is thrown, it will explode and you can see the effect. (Note: everything there should work, if not, start a new thread and ask others for some help).

I cant find this file in the specified directory for my heroes map (trying to give Leia and Chewbacca some smoke nade defense.

NVM found it using file search actual path was MODTOOLS/data_mod id/sides/common/odf


EDIT
Ok I have done the mod to chewie and Jango's thermal detonator time bombs , when I first tried I got it wrong so when it exploded there was no flash or smoke . Then I reworked the file name to be like closer to the other FX exp file names only with the word smoke grenade in them( com_sfx_smokegrenade_exp) and now we have a larger than normal smoke effect on them. However , the duration of the smoke needs to be changed and I will be working on that aspect now . Any tips on how to prolong smoke duration would be greatly appreciated . Im also going to change the flash bang light too . Members of the Battle for Galaxy mod team will recall I also thought of adding smoke grenades to Battlefront 2 last march , but only as a theory , since im no coder . Just happy someone is showing me the way. The original concept was that along with Smoke the grenade would cause an EMP effect and cause the enemies radar to fail by blocking its range.