tpw 2315 Posted September 6, 2013 (edited) 20130915: THIS MOD IS NOW PART OF TPW MODS AND IS NO LONGER SEPARATELY MAINTAINED. PLEASE USE THE TPW MODS THREAD TO REPORT BUGS AND REQUEST FEATURES. TL;DR - Simulated lightbulbs are spawned into habitable civilian houses around the player at night. Arma 3 and SP only. Download (always contains latest versions of all my mods): https://dl.dropboxusercontent.com/u/481663/TPW_MODS.zip Readme: TPW HOUSELIGHTS A3 - Ambient house lighting for Altis/Stratis Version: 1.00 Author: tpw Date: 20130906 Requires: Community Base Addons for Arma 3 Description ----------- Altis and Stratis may have power for working streetlights, but it looks like someone stole all of the lightbulbs from the houses along with all of the furniture. TPW HOUSELIGHTS A3 aims to remedy that theft by adding lighting to the habitable civilian houses (basically the white houses with intact doors and windows) on these islands. TPW HOUSELIGHTS A3 is a total rewrite of TPW HOUSELIGHTS for A2, requiring Arma 3 specific assets and scripting commands, and utilising the beautiful dynamic lighting system of Arma 3 to allow for much more realistic and believable ambient house lighting. In fitting with the futuristic and fully electrified islands of A3, there are no flickering lanterns or candles, only simulated lightbulbs that blend in with the existing lighting and help further the illusion of inhabitation (particularly if used in conjunction with TPW CIVS. Features -------- - Automatically spawn lights into houses within 50m of player at night - Lights only spawned into intact civilian houses (not sheds/shops/slums/stonehouses/damaged/unfinished/military etc) - Lights are spawned at ceiling height - Lights use dynamic lighting and flare to simulate lightbulbs in appearance and illumination - Lights are removed once a player moves > 50m from them Installation and configuration ------------------------------ Extract the @TPW_HOUSELIGHTS_A3 modfolder to your preferred mod location, and call it via command line or mod launcher. You'll need Community Base Addons A3 (CBA A3) for the addon to launch properly. Copy @TPW_HOUSELIGHTS_A3\userconfig\TPW_HOUSELIGHTS_A3\TPW_HOUSELIGHTS_A3.hpp to your userconfig\TPW_HOUSELIGHTS_A3\TPW_HOUSELIGHTS_A3.hpp. You may edit this file to taste: tpw_houselights_hint = 1; //Start hint. 0 = no hint tpw_houselights_sleep = 10; // Delay (sec) until houselights functions start The script version is in @TPW_HOUSELIGHTS_A3\scripts. Instructions for running it are in the header of the script. Please note that if you already have the addon version running, the script version will detect it and quit. Known issues ------------ - TPW HOUSELIGHTS A3 is written for SP, but will probably function OK in MP client. It won't run on a dedicated server. - I have spent a lot of time tweaking the light settings to simulate lightbulbs that don't bleed too badly through walls, and have thus imposed my will for the time being as to their appearance. There are no hpp configuration options for the lights, but you can of course try changing the script. - Using the default settings should spawn no more than 10-15 dynamic lights around the player, which should be within the engine's ability to cope with. You may however notice lights flickering or suddenly coming on, particularly if there are several nearby streetlights or vehicle headlights. Feedback -------- As always I welcome feedback. My mods only improve due to your input. However, input which consists of asking me why there is no proper MP or dedicated server version, without offering help in this department, improves nothing, especially my temper. For the record: I only play SP, have little interest in playing MP, little skill in coding MP, and no ability to test it. If you desperately want a fully functioning MP version of this or any of my other mods, and can't wait for me to make it happen, then you are welcome grab the code and knock yourself out. For the sake of my sanity, when you're reporting bugs and issues can you please tell me: - Arma3 version - Version of my mod - Script or addon version - Running on SP, MP or dedi Thanks ------ Bashka: class based house detection tips Changelog --------- 20130913: v1.01 - Total overhaul of house detection for lights, now much "lighter" (pun intended). - Introduced "all in one" startup hint for all TPW mods, you'll get the one hint showing all active mods. - Script versions will detect an already running addon and quit. 20130906: v1.00 - Initial release Disclaimer ---------- I totally refuse to accept responsibility for anything that might happen to your game/computer/life as a result of using my mod. If you accept this, then feel free to use and modify this code, on the proviso that you post back changes and improvements so that everyone can benefit from them, and acknowledge the original author (tpw) in any derivative works. My A3 mods: TPW CIVS: Ambient civs and traffic TPW FALL: Realistic infantry falling from height and bullet hits TPW LOS: AI Line of sight system for enhanced CQB TPW EBS: Engine based AI/player suppression TPW HOUSELIGHTS: Automatic house lighting for Altis/Stratis TPW BLEEDOUT: Realistic bleeding system TPW FOG: Foggy breath for Altis/Stratis Edited September 15, 2013 by tpw Share this post Link to post Share on other sites
twisted 128 Posted September 6, 2013 very nice. thanks! Share this post Link to post Share on other sites
magicpanda 19 Posted September 6, 2013 Nice job as always TPW! looks really nice in game. How do you call the script if you dont want to use the mod? I got it working with this, by fluke, which I copied from the CIVs startup script but I have only vague idea what the parameters are :D 0 = [1,0,1000,15,20] execVM "tpw_houselights_a3.sqf"; 0 = [Hint On/off, noidea ,distance from player , noidea ,number of lights] execVM "tpw_houselights_a3.sqf"; Share this post Link to post Share on other sites
nikiforos 450 Posted September 6, 2013 What is the performance hit using this mod? Share this post Link to post Share on other sites
kilrbe3 37 Posted September 6, 2013 Nice job as always TPW! looks really nice in game.How do you call the script if you dont want to use the mod? I got it working with this, by fluke, which I copied from the CIVs startup script but I have only vague idea what the parameters are :D 0 = [1,0,1000,15,20] execVM "tpw_houselights_a3.sqf"; 0 = [Hint On/off, noidea ,distance from player , noidea ,number of lights] execVM "tpw_houselights_a3.sqf"; Ah cheers for that, was looking for that in the script file, didn't see it :) Thanks TPW! I loved this mod for Takistan, made it so awesome! Now even better with A3 lighting :D Share this post Link to post Share on other sites
magicpanda 19 Posted September 6, 2013 I'm not sure what most of those Parameters mean in that execVM. Seemed to be working ok in my game though. Share this post Link to post Share on other sites
tpw 2315 Posted September 6, 2013 Sorry about that MagicPanda, I need to update the comments in the sqf for those who want to run the script 0 = [1,10] execVM "tpw_houselights_a3.sqf"; // 1 = startup hint, 10 = delay before houselights start @Nikiforos the performance hit is slight. There is a cost to the engine for every light, but there should only be a handful of dynamic houselights around the player at a given time. The script itself is very light. Using nearobjects for houses can be very slow on Altis, but when the radius for this is 50 it's very quick. Share this post Link to post Share on other sites
magicpanda 19 Posted September 7, 2013 Nice! Ambient Combat next? :p Share this post Link to post Share on other sites
Von Quest 1163 Posted September 7, 2013 LOVE your work, great stuff, top notch! ;) Share this post Link to post Share on other sites
Guest Posted September 10, 2013 (edited) Release frontpaged on the Armaholic homepage. TPW Houselights A3 [bETA] v1.00Community Base Addons A3 =================================================== We have also "connected" these pages to your account on Armaholic. This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Edited September 13, 2013 by Guest Share this post Link to post Share on other sites
Kushluk 21 Posted September 11, 2013 Hi tpw, I am a big fan of your work :) Just a helpful hint, you may want to switch out _nearhouses = nearestObjects [getPosATL (vehicle player),["[b][color=#ff0000]House[/color][/b]"],tpw_houselights_radius]; for _nearhouses = nearestObjects [getPosATL (vehicle player),["[b][color=#ff0000]House_F[/color][/b]"],tpw_houselights_radius]; In my testing, House_F filters a number of irrelevant entries that are picked up by House which should require less runs of this: _ishouse = ["_i_house", _housestring] call BIS_fnc_inString; // Inhabited house If you are interested, I have manually white-listed & blacklisted every House_F type object as enterable/not enterable. Share this post Link to post Share on other sites
tpw 2315 Posted September 11, 2013 Hi tpw,I am a big fan of your work :) Just a helpful hint, you may want to switch out _nearhouses = nearestObjects [getPosATL (vehicle player),["[b][color=#ff0000]House[/color][/b]"],tpw_houselights_radius]; for _nearhouses = nearestObjects [getPosATL (vehicle player),["[b][color=#ff0000]House_F[/color][/b]"],tpw_houselights_radius]; In my testing, House_F filters a number of irrelevant entries that are picked up by House which should require less runs of this: _ishouse = ["_i_house", _housestring] call BIS_fnc_inString; // Inhabited house If you are interested, I have manually white-listed & blacklisted every House_F type object as enterable/not enterable. Thanks so much for the tip Kushluk (and the kind words), I really appreciate it. I've implemented the House_F fix immediately, every little bit helps! I actually already spent some time creating a manual array of all intact (not just enterable, which many wrecked houses are) civilian houses for Altis, which could be used in place of scanning. Might still do in the future, but in the mean time at least this approach will work for any new maps that use A3 house assets. Share this post Link to post Share on other sites
tpw 2315 Posted September 13, 2013 TPW HOUSELIGHTS v1.01: https://dl.dropboxusercontent.com/u/481663/TPW_MODS.zip Changes: - Total overhaul of house detection for lights, now much "lighter" (pun intended). - Introduced "all in one" startup hint for all TPW mods, you'll get the one hint showing all active mods. - Script versions will detect an already running addon and quit. Share this post Link to post Share on other sites
Guest Posted September 13, 2013 (edited) New version frontpaged on the Armaholic homepage. TPW Houselights A3 v1.01Community Base Addons A3 =================================================== We have also "connected" these pages to your account on Armaholic. This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! [edit] Link fixed. Thanks for the headsup. Edited September 13, 2013 by Guest Share this post Link to post Share on other sites
griffz 1 Posted September 13, 2013 link dead on armaholic Share this post Link to post Share on other sites
kremator 1065 Posted September 14, 2013 Hey tpw, My daughter (of 9 years old) was asking if it was possible to actually turn on lights when inside a building - perhaps as an addaction? Is this possible mate? I only play in MP (even when on my own :) ) Share this post Link to post Share on other sites
tpw 2315 Posted September 14, 2013 Hey tpw,My daughter (of 9 years old) was asking if it was possible to actually turn on lights when inside a building - perhaps as an addaction? Is this possible mate? I only play in MP (even when on my own :) ) It's certainly doable, I will look into it. MP only? Thanks for you support of my SP only mods anyway :) Share this post Link to post Share on other sites
kremator 1065 Posted September 14, 2013 pah for SP !! I always test everything on MP only :) Share this post Link to post Share on other sites
tpw 2315 Posted September 15, 2013 20130915: THIS MOD IS NOW PART OF TPW MODS AND IS NO LONGER SEPARATELY MAINTAINED. PLEASE USE THE TPW MODS THREAD TO REPORT BUGS AND REQUEST FEATURES. Share this post Link to post Share on other sites