Smoke colour changes in flight?
Smoke colour changes in flight?
Hey guys,
I just wondered if anyone had found a way to have multiple smoke colours that can change in flight?
I've been trawling through the code to figure out if there is a way, but it seems to be coded into the mission file which can't be changed in flight.
I was thinking of creating new smoke pod objects that replace weapons and can be triggered using normal wep release method, but am concerned about the timing and smoke staying on, and how Lomac handles weapons.
Thanks for your help guys.
I just wondered if anyone had found a way to have multiple smoke colours that can change in flight?
I've been trawling through the code to figure out if there is a way, but it seems to be coded into the mission file which can't be changed in flight.
I was thinking of creating new smoke pod objects that replace weapons and can be triggered using normal wep release method, but am concerned about the timing and smoke staying on, and how Lomac handles weapons.
Thanks for your help guys.
- Tailhook
- Virtual Thunderbird Alumnus
- Posts: 1052
- Joined: Tue Apr 04, 2006 3:17 pm
- Location: Baltimore, MD
Making a weapon in lomac a smoke pod wont work, I can tell you now. Pull the trigger and you will most likely see it drop away or have a mysterious flame fly out the back so you can watch it fly.
The flight dynamics of the weapons are hard-coded and you wont be able to do anything about that.
I would just model the weapon you want to be a smoke pod and just have it overwrite the existing model because the smoke colors will still be the same as they were before.
You can edit the smoke colors and make them what ever color you want but if only you editted the smoke file, you will see it the color you named it but everybody else will still see Blue, or the color you choose it to replace.

The flight dynamics of the weapons are hard-coded and you wont be able to do anything about that.
I would just model the weapon you want to be a smoke pod and just have it overwrite the existing model because the smoke colors will still be the same as they were before.
You can edit the smoke colors and make them what ever color you want but if only you editted the smoke file, you will see it the color you named it but everybody else will still see Blue, or the color you choose it to replace.
- Thumper
- Virtual Thunderbird Alumnus
- Posts: 833
- Joined: Thu Nov 03, 2005 10:00 am
- Location: Weslaco, TX
Viper, I think all that Ells is interested in is being able to change smoke color in flight. I dont think he was talking about modding smoke canisters to look like weapons or creating custom smoke colors.
If I understand correctly, Ells wants to be able to carry and toggle different colored smoke pods separately or recode the way the smoke works so it will change from red to white to blue to green etc., at given intervals.
If I understand correctly, Ells wants to be able to carry and toggle different colored smoke pods separately or recode the way the smoke works so it will change from red to white to blue to green etc., at given intervals.
Thanks for the reply Viper and Thumper is right, we'd like to be able to change the smoke whilst flying, I.e. white, then red then back to white, something like that.
I have a buddy that created a program to sit behind lomac with a key press trigger to change lines of code in a file. It would seem that the code for smoke selection is in the mission .mis file itself which can't be changed easily outside of lomac mission editor.
I know the lines that need changing, but it can't be done. Plus I didn't know if lomac loads the info to memory when the mission loads, or if it's read dynamically.
I'll keep digging.
The second option (or thought) was the new smoke pod model, so you're both correct hehe
Alex, I'll chat to you when you get up bud, see what your thoughts are.
P.S. I've heard a rumour that the Freece Tricolori guys figured out a way, does anyone have a contact over there I can talk to?
I have a buddy that created a program to sit behind lomac with a key press trigger to change lines of code in a file. It would seem that the code for smoke selection is in the mission .mis file itself which can't be changed easily outside of lomac mission editor.
I know the lines that need changing, but it can't be done. Plus I didn't know if lomac loads the info to memory when the mission loads, or if it's read dynamically.
I'll keep digging.
The second option (or thought) was the new smoke pod model, so you're both correct hehe
Alex, I'll chat to you when you get up bud, see what your thoughts are.
P.S. I've heard a rumour that the Freece Tricolori guys figured out a way, does anyone have a contact over there I can talk to?
- Burner
- Virtual Thunderbird Alumnus
- Posts: 1420
- Joined: Tue Mar 29, 2005 5:08 pm
- Location: New Orleans, LA
Possibly a .lua script running inside the file governing smoke colors for the different pods. This is handled in a config file outside the mission file. It's in the same place that determines pylon locations (this is how we get smoke to come out of our tails). Ever since 1.1, LOMAC has had the ability to run lua scripts in their lua configs (see lockon.ru for more info).
I'm not a script wizard, but I know you can import and export values which would be the ticket.
I'm not a script wizard, but I know you can import and export values which would be the ticket.
- Thumper
- Virtual Thunderbird Alumnus
- Posts: 833
- Joined: Thu Nov 03, 2005 10:00 am
- Location: Weslaco, TX
Just curious, Ells, have you made any progress on this or found any new info?
I have also been wondering if there is any way to get rid of the horrendous, frame-rate-killing smoke plume that occurs when you turn smoke on. I want to write a logical program statement for my throttle that shuts off smoke if AB is engaged and turns it back on once you come out of AB provided that the switch is still in the "on" position. Just another step towards realism regarding what we do. I don't want to do it if there is going to be an ugly gob of smoke though...lol.
I have also been wondering if there is any way to get rid of the horrendous, frame-rate-killing smoke plume that occurs when you turn smoke on. I want to write a logical program statement for my throttle that shuts off smoke if AB is engaged and turns it back on once you come out of AB provided that the switch is still in the "on" position. Just another step towards realism regarding what we do. I don't want to do it if there is going to be an ugly gob of smoke though...lol.
Hey bud, well I've made some pretty big leaps since my last post working on it some of the day yesterday until I hit a snag and was puzzled so played COD4 to clear my head lol.
I have 3 copies of the drawinfo.lua file called white.lua, red.lua and blue.lua (3 colors we use) and I've created Dos batch files that copy these over the drawinfo.lua file. I also have a hotkey program that runs the batch file when you hit the assigned key.
All was well, or so I thought until it didn't change a thing in game, even when changing the values by hand prior to starting the mission, so I was stumped for a while.
Then the light hit me this morning on the way to work, our mod file has drawinfo.lua in it and I reckon modman is overwriting my manual files.
I've created the install program to drop the files in the weapons folder and at the moment you need to install the hotkey app, but I'll build that into the install program when I get a chance.
To do list:
- Change our mod file and take out the drawinfo.lua file
- Test that changing the RGB values manually changes the smoke color in game no matter what color pod you select on loadout (all rgb colors in the lua file set the same).
- Whilst in flight, smoke on, pause, switch to desktop, run batch file, switch back to lockon, un-pause and see if the smoke color has changed. This is the key point right here. If lockon reads the file each time smoke is activated, we're good to go. If it reads it at mission load, we're screwed lol
- If it works, test the hotkey app to see if it jumps out of lockon to windows or runs in the background (I might need a different app if it does jump out)
- Test in game - smoke on, hotkey change smoke color, has it changed mid flight without pausing (ideal scenario)
- Record a video to show you guys that it works
- Add Hotkey app installation to Smoke system install app
- Get the RGB values changed using a C+ program in the background rather than batch files (see reason below) and have hotkeys assigned.
- Figure out a way to assign the commands to my Cougar (need your help when I get to this point)
Nice to do (Tidy up stuff)
- Restrict the payload loadout in the meinit.xml file to one smoke color ( doesn't matter what color as the batch files will change it).
- Add a graphic to the installer program
Problems encountered so far
- I have a feeling that using Dos batch files will switch the game back to windows when they run, so I need a nice C+ coder to be able to change the rgb values within the lua file when the hotkey is pressed.
- IF each mod has it's own drawinfo.lua, then the source color lua files will need to be made for each mod if any other info within drawinfo.lua is changed (which I sense it is). So basically you'll need my app altered for each mod out there. But they may be able to be set in a C+ program with radial select buttons which is ideal (so you set what colors you want with which hotkey).
I have 3 copies of the drawinfo.lua file called white.lua, red.lua and blue.lua (3 colors we use) and I've created Dos batch files that copy these over the drawinfo.lua file. I also have a hotkey program that runs the batch file when you hit the assigned key.
All was well, or so I thought until it didn't change a thing in game, even when changing the values by hand prior to starting the mission, so I was stumped for a while.
Then the light hit me this morning on the way to work, our mod file has drawinfo.lua in it and I reckon modman is overwriting my manual files.
I've created the install program to drop the files in the weapons folder and at the moment you need to install the hotkey app, but I'll build that into the install program when I get a chance.
To do list:
- Change our mod file and take out the drawinfo.lua file
- Test that changing the RGB values manually changes the smoke color in game no matter what color pod you select on loadout (all rgb colors in the lua file set the same).
- Whilst in flight, smoke on, pause, switch to desktop, run batch file, switch back to lockon, un-pause and see if the smoke color has changed. This is the key point right here. If lockon reads the file each time smoke is activated, we're good to go. If it reads it at mission load, we're screwed lol
- If it works, test the hotkey app to see if it jumps out of lockon to windows or runs in the background (I might need a different app if it does jump out)
- Test in game - smoke on, hotkey change smoke color, has it changed mid flight without pausing (ideal scenario)
- Record a video to show you guys that it works
- Add Hotkey app installation to Smoke system install app
- Get the RGB values changed using a C+ program in the background rather than batch files (see reason below) and have hotkeys assigned.
- Figure out a way to assign the commands to my Cougar (need your help when I get to this point)
Nice to do (Tidy up stuff)
- Restrict the payload loadout in the meinit.xml file to one smoke color ( doesn't matter what color as the batch files will change it).
- Add a graphic to the installer program
Problems encountered so far
- I have a feeling that using Dos batch files will switch the game back to windows when they run, so I need a nice C+ coder to be able to change the rgb values within the lua file when the hotkey is pressed.
- IF each mod has it's own drawinfo.lua, then the source color lua files will need to be made for each mod if any other info within drawinfo.lua is changed (which I sense it is). So basically you'll need my app altered for each mod out there. But they may be able to be set in a C+ program with radial select buttons which is ideal (so you set what colors you want with which hotkey).
Thought I'd seperate the posts so not to confuse the reading of them.
There is an alpha setting which sets the opacity of the smoke color, so maybe you can program something that changes the alpha setting from 0 (transparent) to the current setting (180) in say less then a second so you don't get the plume effect. so when you hit smoke on, it's transparent to normal for the first second, but in that second it's building up from 0 to full - think 30 fps, each frame has a value set from 0 to 180 (current setting).
You can probably also set it then when you power up, thicker (read not so transparent) smoke comes out (as in RL) and when you power back to normal throttle it's back to normal opacity.
Oooh you got ideas popping into my head now and the next project I'll work on if this one works lol
There is an alpha setting which sets the opacity of the smoke color, so maybe you can program something that changes the alpha setting from 0 (transparent) to the current setting (180) in say less then a second so you don't get the plume effect. so when you hit smoke on, it's transparent to normal for the first second, but in that second it's building up from 0 to full - think 30 fps, each frame has a value set from 0 to 180 (current setting).
You can probably also set it then when you power up, thicker (read not so transparent) smoke comes out (as in RL) and when you power back to normal throttle it's back to normal opacity.
Oooh you got ideas popping into my head now and the next project I'll work on if this one works lol
Ok tested my app tonight and these are the findings:
Hotkey app in windows - Ok
Hotkey changing smoke color RGB values in drawinfo.lua (windows) - OK
Hotkey app when in game - Failed
Smoke color change in flight (when pause and switch out to windows, use hotkey, switch back to lockon) - Failed
Smoke color change when back to mission screen, then back to flight - Failed
Smoke color change when back to main menu screen, load mission, flight -Failed
Smoke color change when exit game, open game, mission, flight - Ok
Summary - Lockon loads the values from the drawinfo.lua when the game loads and no other time.
Fix required - force Lockon to reload the drawinfo.lua values during flight
I'll talk to my contacts at TFC to see if they can ask the question.
I'll also post this in the ED forums when back from short vacation on Monday.
Thanks for all your help getting me this far guys.
Hotkey app in windows - Ok
Hotkey changing smoke color RGB values in drawinfo.lua (windows) - OK
Hotkey app when in game - Failed
Smoke color change in flight (when pause and switch out to windows, use hotkey, switch back to lockon) - Failed
Smoke color change when back to mission screen, then back to flight - Failed
Smoke color change when back to main menu screen, load mission, flight -Failed
Smoke color change when exit game, open game, mission, flight - Ok
Summary - Lockon loads the values from the drawinfo.lua when the game loads and no other time.
Fix required - force Lockon to reload the drawinfo.lua values during flight
I'll talk to my contacts at TFC to see if they can ask the question.
I'll also post this in the ED forums when back from short vacation on Monday.
Thanks for all your help getting me this far guys.
- Burner
- Virtual Thunderbird Alumnus
- Posts: 1420
- Joined: Tue Mar 29, 2005 5:08 pm
- Location: New Orleans, LA
Something else to consider as a last resort is a preset timer. LOMAC has a running frame counter and simultaneous timer, variable 't' usually, that as a last ditch could be pre-programmed to change variables based on a timeline. The timer function is inherent to the LOMAC engine; essentially not changing after the intial LOMAC load up. The crutch is that you have to fly a consistent show to set specific timer points where the colors change- kind of a fun challenge really 
