Smokescreen 'Nade
Moderator: Moderators
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Smokescreen 'Nade
I've been trying ot create a fair smokescreen grenade for my Clone Infiltrator. I created a pretty good smokescreen effect in P.E. and set it as the grenade's explosion effect. It all works well, and I'm definetly keeping it; but I thought I'd post here to see if there's anything - a bit of fancy odf code I hadn't thought of, for instance - that GT members would like to add.
For instance, I've seen an old topic about smokescreen grenades that said they wouldn't work in BF2. Well, they do. I'm looking at a pic of one now. But they do have problems, which might be what people mean when they say that they "don't work". For instance, there's the often-cited "targeting problem", where players can target right through the smoke and ai just ignore it.
A few possible solutions, you tell me which one would be easier for a person of my skill level to develop:
1. Have the explosion spew, along with smoke, lots of little, targetable pebbles or something. That way, the player could target all he wants and not be able to distinguish between a player and a pebble in any reasonable amount of time. The ai might continue to ignore it, though. Still it's something I thought I'd get out there. If it's possible, and if it's easier than the other solution I propose, then I'll try it out.
2. This one might be harder. I reason that there should be a line in the Bothan Spy's "invisibility" weapon that makes him impossible to target while the weapon is activated. I reason that it should be similarily possible to rip this line out and pu it into the smokescreen nade's odf. Right? But where could I find this magic line, if it exists? I know only a few basics of odf-work. I can fiddle with classlabels and parents and colors and effects and the like, but for some reason I can't find this line. It must be named something not obvious to the untrained eye. If it exists. Does it?
EDIT - On a possibly related note, I found two suspicious lines in the Bothan unit's odf's parent (lol, long string of words there. Reminds me of "Luke...I am your father's uncle's son's friend's etc.)
Anyway, these two lines are
ScanningRange = 30.0
TransmitRange = 300.0
A friend of mine suggested that Scanning Range controls the amount of area that the Bothan can see on the minimap. We have yet to come up for an explanation fo TransmitRange, though.
For instance, I've seen an old topic about smokescreen grenades that said they wouldn't work in BF2. Well, they do. I'm looking at a pic of one now. But they do have problems, which might be what people mean when they say that they "don't work". For instance, there's the often-cited "targeting problem", where players can target right through the smoke and ai just ignore it.
A few possible solutions, you tell me which one would be easier for a person of my skill level to develop:
1. Have the explosion spew, along with smoke, lots of little, targetable pebbles or something. That way, the player could target all he wants and not be able to distinguish between a player and a pebble in any reasonable amount of time. The ai might continue to ignore it, though. Still it's something I thought I'd get out there. If it's possible, and if it's easier than the other solution I propose, then I'll try it out.
2. This one might be harder. I reason that there should be a line in the Bothan Spy's "invisibility" weapon that makes him impossible to target while the weapon is activated. I reason that it should be similarily possible to rip this line out and pu it into the smokescreen nade's odf. Right? But where could I find this magic line, if it exists? I know only a few basics of odf-work. I can fiddle with classlabels and parents and colors and effects and the like, but for some reason I can't find this line. It must be named something not obvious to the untrained eye. If it exists. Does it?
EDIT - On a possibly related note, I found two suspicious lines in the Bothan unit's odf's parent (lol, long string of words there. Reminds me of "Luke...I am your father's uncle's son's friend's etc.)
Anyway, these two lines are
ScanningRange = 30.0
TransmitRange = 300.0
A friend of mine suggested that Scanning Range controls the amount of area that the Bothan can see on the minimap. We have yet to come up for an explanation fo TransmitRange, though.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Smokescreen 'Nade
No, they still don't. Particle effects don't mean anything, you can create a particle effect that looks like almost anything (which is part of what's fun about them). For something to "work" it has to have functionality, which a "smoke grenade" doesn't - humans can "q" target through it and AI see through it like it's not even there.Fiodis wrote:For instance, I've seen an old topic about smokescreen grenades that said they wouldn't work in BF2. Well, they do.
While I applaud creative thinking, to be blunt, idea 1 is impractical and idea 2 won't work. Tough luck, but the only way AI visibility is affected is with either AI vis regions or over the entire map through the .lua. And while one could make a cheap hack that might work (by searching for location and enabling/disabling vis regions via lua), it would still be impractical. Bottom line? Not going to happen well.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Smokescreen 'Nade
Ah well, thanks anyway. I'll still keep it; chances are most humans don't have to reflexes to hit "q" fast enough before they're shot.... Besides, it's a nice distraction grenade, if nothing else. I'll combine it with an invisibility weapon as a seperate weapon, so nade + invisibility after you toss the nade = somewhat what I intended.
That being said, can anyone shed some light on those odf lines?
EDIT - Also, can anyone explain how the Bothan's untargetability works? If it's not those mystery lines up there, then is it the ClassLabel = "Invisibility" or something line in the weapon's odf?
And...just a rouge thought. How does that "disguise kit" in Convo Pack Concord Dawn work? I assumed it had something to do with the Bothan's stealth weapon, but made so that upon firing an effect would be generated around you that resembled a stormtrooper. I'm probably wrong, though. Also, are you able to be targeted by the real stormtroopers while in that disguise? I never thought to check.
That being said, can anyone shed some light on those odf lines?
EDIT - Also, can anyone explain how the Bothan's untargetability works? If it's not those mystery lines up there, then is it the ClassLabel = "Invisibility" or something line in the weapon's odf?
And...just a rouge thought. How does that "disguise kit" in Convo Pack Concord Dawn work? I assumed it had something to do with the Bothan's stealth weapon, but made so that upon firing an effect would be generated around you that resembled a stormtrooper. I'm probably wrong, though. Also, are you able to be targeted by the real stormtroopers while in that disguise? I never thought to check.
-
RogueKnight
- Space Ranger
- Posts: 2512
- Joined: Sat Nov 22, 2008 1:50 pm
- Projects :: Life. Work.
- xbox live or psn: No gamertag set
- Location: Washington, US
Re: Smokescreen 'Nade
I can almost tell you for a fact that most people don't target with Q anyways, and most of the online players i know would dive for shelter when the nade was thrown.
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Smokescreen 'Nade
That could work. As Mav said it's impractical (dunno if he was thinking of my way of doing it or some other way, but mine's impractical anyway). But it's possible, but I can really think of only one use for it.Fiodis wrote:1. Have the explosion spew, along with smoke, lots of little, targetable pebbles or something. That way, the player could target all he wants and not be able to distinguish between a player and a pebble in any reasonable amount of time. The ai might continue to ignore it, though. Still it's something I thought I'd get out there. If it's possible, and if it's easier than the other solution I propose, then I'll try it out.
1) For some kind of weapons based multiplayer map. Kind of UT style thing. In normal BF it just isn't that useful.
It's not that it doesn't work, it's just it'll use up alot of lots of memory pools to get it working. The way to get it to work is to set it up like a cluster bomb, but set the ordnances to very small, slow, non-explosive mines that have health type 'soldier.' Problem is you use up a whole lot of different memory pools at once for a somewhat innefective weapon. If you want a defensive grenade, Portable Shield Generator works well.
Cluster Bomb/PSG tut (top one) on first post:
http://www.gametoast.com/forums/viewtop ... uster+bomb
PS. If you're interested in new/unconventional weapons (provided you haven't already), search for 'Weapons Pack' on SWBF Files.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Smokescreen 'Nade
I tried the PSG, but it wouldn't work; also the Droideka's shield turned large and walkthrough. Actually, I haven't looked for weapons packs; I'll look through those now.
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Smokescreen 'Nade
couldnt it possible to spawn a sphere when the grenade is thrown? with an invisible texture?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Smokescreen 'Nade
Fiodis wrote:1. Have the explosion spew, along with smoke, lots of little, targetable pebbles or something. That way, the player could target all he wants and not be able to distinguish between a player and a pebble in any reasonable amount of time. The ai might continue to ignore it, though. Still it's something I thought I'd get out there. If it's possible, and if it's easier than the other solution I propose, then I'll try it out.
On a different note, did anyone figure out what TransmitRange and ScanningRange do?
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Smokescreen 'Nade
I've never tested them, but somewhere I got the impression that ScanningRange was how far the unit could see on the mini-map and TransmitRange was how far the unit broad-casted itself on the mini-map. Of course, those ideas have nothing backing them up and could be completely wrong.Fiodis wrote:On a different note, did anyone figure out what TransmitRange and ScanningRange do?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Smokescreen 'Nade
Hmmm.....they might be wrong. Multiplying ScanningRange by a factor of 100 showed no obvious change.
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: Smokescreen 'Nade
could you possibly turn the grenade into an emmiter thats on a timer and that emits like a smoke effect ie the one in geonosis on the ruined technounion?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Smokescreen 'Nade
Actually, what I did was copied over that effect and set it as the grenade's explosion. Like I said in my first post, works beutifully except for the targetability. Still I'm keeping it for numerous reasons.
- vampire_lord
- Rebel Sergeant

- Posts: 216
- Joined: Thu Mar 20, 2008 7:02 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mexico City
- Contact:
Re: Smokescreen 'Nade
I think smoke grenade is great for multiplayer, even if you do a Q-lock-on is not that easy to just shot unless you are used to it; I am planning to add my own version to my mods eventually, they would make battles like Tantive 4 a little more interesting.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Smokescreen 'Nade
From psych0fred's notes:[RDH]Zerted wrote:I've never tested them, but somewhere I got the impression that ScanningRange was how far the unit could see on the mini-map and TransmitRange was how far the unit broad-casted itself on the mini-map. Of course, those ideas have nothing backing them up and could be completely wrong.Fiodis wrote:On a different note, did anyone figure out what TransmitRange and ScanningRange do?
Ok, I guess I had forgotten where I had heard that ~[RDH]Zerted.ScanningRange - range within which enemy units show up on the map display
TransmitRange - range within which friendly units receive scan data
