Jump to content
tpw

TPW MODS: enhanced realism and immersion for Arma 3 SP.

Recommended Posts

Wow-that will be one of the most ambitious additions to TPW- very exciting :)

Share this post


Link to post
Share on other sites
3 hours ago, tpw said:

AMBIENT FURNITURE - REQUEST FOR HELP

 

furniture.jpg

 

Hi everyone. I've been hard at work on an ambient furniture script. Believe me when I say this is not trivial, but I have finally come up with a couple of WIP scripts:

 

tpw_furniture.sqf scans for the nearest building around the player, matches the building type to a building specific list of furniture and offsets, and then spawns the simulation disabled furniture into the house. Currently it only spawns furniture into a couple of small Tanoa house types (especially the green and pink house). 

  Hide contents

/*
HOUSE AMBIENT FURNITURE SCRIPT
tpw 20170104
*/

// FURNISH HOUSE
tpw_furnish_fnc_populate =
    {
    private ["_bld","_type","_items","_item","_offset","_angle","_bld","_pos"];
    _bld = _this select 0;
    _type = typeof _bld;
    
    // Assign appropriate furnishing template for house
    switch _type do
        {
        case "Land_House_Small_03_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[-3.04688,-1.09473,-1.32258],-177.826],["Land_ChairWood_F",[-4.02051,-1.66113,-1.32258],102.879],["Land_ChairWood_F",[-3.95264,-0.40918,-1.32258],72.8789],["Land_ChairWood_F",[-2.96143,0.394531,-1.32258],1.36459],["Land_ShelvesWooden_F",[-2.70898,3.6416,-1.32258],-180.168],["Land_ShelvesWooden_F",[-3.58252,5.09668,-1.32258],-89.0166],["Fridge_01_closed_F",[-6.14307,5.00391,-1.32258],0.283615],["Land_BarrelWater_F",[-5.05859,4.875,-1.32258],-12.9616],["Land_PlasticCase_01_small_F",[-2.63818,2.64941,-1.32258],-0.86998],["Land_Sacks_goods_F",[-5.83984,2.27734,-1.32258],146.318],["Land_Sack_F",[-5.77539,0.879883,-1.32258],-183.514],["Land_Sack_F",[-5.87988,-1.62305,-1.32258],-74.1766],["Land_Sacks_heap_F",[2.4209,-1.18457,-1.32258],79.303],["Land_CanisterPlastic_F",[2.64453,0.347656,-1.32258],2.86423],["Land_GasTank_01_blue_F",[2.66113,1.92578,-1.32258],2.86423],["Land_Basket_F",[0.0766602,-1.71875,-1.32258],-7.47496],["Land_Basket_F",[-1.5332,2.85645,-1.32258],-140.148],["Land_Metal_rack_Tall_F",[-1.91113,4.40332,-1.32258],91.9407],["Land_Metal_rack_Tall_F",[0.318359,4.99023,-1.32258],-1.69688]];
                };
            };
        case "Land_House_Small_04_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[-1.66309,-3.93457,-0.864875],-180.002],["Land_RattanChair_01_F",[-0.495117,-4.66602,-0.86476],-185.523],["Land_RattanChair_01_F",[-0.614258,-3.41992,-0.864752],-95.9327],["Land_RattanChair_01_F",[-1.5791,-2.18408,-0.86497],-10.4366],["Land_WoodenCounter_01_F",[3.91211,-2.41406,-0.86588],91.3104],["Land_ShelvesWooden_F",[0.543945,1.9248,-0.865171],-174.964],["Land_Sacks_goods_F",[0.27002,3.65137,-0.86414],-63.6292],["Land_Basket_F",[0.648438,0.700684,-0.865187],-115.737]];
                };
            };    
        case "Land_House_Small_06_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_TablePlastic_01_F",[-1.41699,-4.63379,-1.00068],-178.977],["Land_ChairPlastic_F",[0.0175781,-3.98975,-1.00068],-132.682],["Land_ChairPlastic_F",[-2.93457,-3.97656,-1.00068],-32.8382],["Land_ChairPlastic_F",[-1.40234,-3.51807,-1.00068],-84.6655],["Land_WoodenTable_large_F",[-2.25391,1.56348,-1.00068],-88.8574],["Land_WoodenCounter_01_F",[1.86621,-3.7085,-1.00068],91.8469],["Land_Metal_rack_F",[2.27832,0.189453,-1.00068],-90.243],["Land_Basket_F",[-4.02246,1.79492,-1.00068],45.8277],["Land_Sack_F",[-3.87305,0.850586,-1.00068],77.0597],["Land_Sack_F",[-4.0918,-0.185547,-1.00068],-177.337],["Land_PlasticCase_01_small_F",[-3.97559,-5.03857,-1.00068],-89.3508],["Land_CanisterFuel_F",[-3.97266,-4.03271,-1.00068],-53.4766]];
                };
            };
        };
    
    // Furnish house appropriately
    if (_bld getvariable "tpw_furnished" == 1) then
        {
        _bld setvariable ["tpw_furniture",_items];
        _bld setvariable ["tpw_furnished",2];
        _dir = getdir _bld;
            {
            _item = _x select 0;
            _offset = _x select 1 vectoradd [0,0,-0.1];
            _angle = _x select 2;
            _dir = getdir _bld;
            _pos = _bld modeltoworld _offset;
            _item = _item createvehiclelocal _pos;
            _item setposatl _pos;
            _item setdir (_dir - _angle);
            _item enablesimulation false;
            } foreach _items;        
        };
    };

// SCAN FOR NEAREST HOUSE TO FURNISH
while {true} do
    {
    _bld = nearestbuilding player;
    0 = [_bld] call tpw_furnish_fnc_populate;
    sleep 2;
    };

 

 

tpw_furniture_place.sqf this allows the player to select the appropriate furniture item in game, rotate it, and place it near/within the nearest house. Once the house has been fully furnished the array of furniture/offsets are pasted from the clipboard and used in tpw_furniture.sqf. It's not very flashy but it's 1000% faster than trying to do it in the editor.

  Reveal hidden contents

 

/*
FURNITURE PLACEMENT SCRIPT
tpw 20170104
*/

sleep 5;

hint "Furniture placement active";

 

// Items
tpw_furniture_items = ["Land_CampingChair_V2_F","Land_CampingTable_F","Land_CampingTable_small_F","Land_ChairPlastic_F","Land_CampingChair_V1_F","Land_TablePlastic_01_F","Land_RattanChair_01_F","Land_WoodenTable_large_F","Land_WoodenTable_small_F","Land_WoodenCounter_01_F","Land_ChairWood_F","Land_TableDesk_F","Land_OfficeCabinet_01_F","Land_OfficeChair_01_F","OfficeTable_01_new_F","OfficeTable_01_old_F","Land_CashDesk_F","Land_Icebox_F","Land_Metal_rack_F","Land_Metal_rack_Tall_F","Land_ShelvesMetal_F","Land_ShelvesWooden_F","Land_Pillow_camouflage_F","Land_Pillow_grey_F","Land_Pillow_old_F","Land_Sleeping_bag_F","Land_Sleeping_bag_blue_F","Land_Sleeping_bag_blue_folded_F","Land_Sleeping_bag_brown_F","Land_Sleeping_bag_folded_F","Land_Ground_sheet_F","Land_Ground_sheet_folded_blue_F","Land_Ground_sheet_folded_F","Land_Camera_01_F","Land_FlatTV_01_F","Land_FMradio_F","Land_Laptop_device_F","Land_Microwave_01_F","Fridge_01_closed_F","Land_Tablet_01_F","Land_BakedBeans_F","Land_Can_Dented_F","Land_Can_V2_F","Land_Can_V3_F","Land_Can_Rusty_F","Land_Can_V1_F","Land_Canteen_F","Land_CerealsBox_F","Land_Tableware_01_fork_F","Land_Tableware_01_knife_F","Land_Tableware_01_spoon_F","Land_FoodContainer_01_F","Land_Ketchup_01_F","Land_Mustard_01_F","Land_Tableware_01_stackOfNapkins_F","Land_BottlePlastic_V1_F","Land_Tableware_01_cup_F","Land_Tableware_01_tray_F","Land_PowderedMilk_F","Land_RiceBox_F","Land_TinContainer_F","Land_BottlePlastic_V2_F","Land_LuggageHeap_03_F","Land_LuggageHeap_01_F","Land_LuggageHeap_02_F","Land_Basket_F","Land_CratesShabby_F","Land_Sack_F","Land_Sacks_goods_F","Land_Sacks_heap_F","Land_BarrelWater_F","Land_PlasticCase_01_large_F","Land_PlasticCase_01_small_F","Land_Suitcase_F","Land_CanisterFuel_F","Land_CanisterPlastic_F","Land_GasCooker_F","Land_GasTank_01_blue_F"];

// vars
tpw_furniture_index = 0;
tpw_furniture_angle = 0;
tpw_furniture_itemcount = (count tpw_furniture_items) - 1;
tpw_furniture_lastchange = time;

// Initial ball
tpw_furniture_ball = "sign_sphere10cm_f" createvehiclelocal position player;
tpw_furniture_ball attachto [player,[0,2,0]];
tpw_furniture_item = "Land_HelipadEmpty_F" createvehiclelocal position player;
tpw_furniture_item attachto [player,[0,2,1]];

tpw_furniture_fnc_updateitem =
    {
    deletevehicle tpw_furniture_item;    
    tpw_furniture_item = (tpw_furniture_items select tpw_furniture_index) createvehiclelocal position player;
    tpw_furniture_item attachto [player,[0,2,1]];
    tpw_furniture_item setdir tpw_furniture_angle;    
    };
    
tpw_furniture_fnc_placeitem = 
    {
    tpw_furniture_bld = nearestbuilding player;
    tpw_furniture_dir = getdir tpw_furniture_bld;
    tpw_furniture_ballpos = tpw_furniture_bld worldtomodel getposatl tpw_furniture_ball;
    tpw_furniture_pos = tpw_furniture_bld modeltoworld tpw_furniture_ballpos;

    tpw_furniture_lastitem = (tpw_furniture_items select tpw_furniture_index) createvehiclelocal tpw_furniture_pos;
    tpw_furniture_lastitem setposatl tpw_furniture_pos;
    tpw_furniture_lastitem setdir (getdir tpw_furniture_item);
    tpw_furniture_lastitem enablesimulation false;
    
    hintsilent format ["%1,%2,%3,%4",typeof tpw_furniture_bld,tpw_furniture_items select tpw_furniture_index,tpw_furniture_ballpos,tpw_furniture_dir - getdir tpw_furniture_lastitem];
    _list = tpw_furniture_bld getvariable ["tpw_furniture",[]];
    _list pushback [tpw_furniture_items select tpw_furniture_index,tpw_furniture_ballpos,tpw_furniture_dir - getdir tpw_furniture_lastitem];
    tpw_furniture_bld setvariable ["tpw_furniture",_list];
    copytoclipboard format ["%1,%2",typeof tpw_furniture_bld,_list];
    };

tpw_furniture_fnc_deleteitem =
    {
    deletevehicle tpw_furniture_lastitem; 
    _list = tpw_furniture_bld getvariable "tpw_furniture";
    _list deleteat ((count _list) - 1);
    tpw_furniture_bld setvariable ["tpw_furniture",_list];
    };
    
(findDisplay 46) displayAddEventHandler ["keyDown", "_this call tpw_furniture_fnc_keys"];
tpw_furniture_fnc_keys = 
    {
    private["_ctrl","_alt","_key"];
    _ctrl = _this select 3;
    _alt = _this select 4;
    _key = _this select 1;
    if (_ctrl && _alt && time > tpw_furniture_lastchange) then 
        {

        switch _key do
            {
            case 200: // arrow up, scroll back through items
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_index = tpw_furniture_index - 1;
                if (tpw_furniture_index < 0) then
                    {
                    tpw_furniture_index = tpw_furniture_itemcount;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;    
                };
            case 208: // arrow down,  scroll down through items
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_index = tpw_furniture_index + 1;
                if (tpw_furniture_index > tpw_furniture_itemcount) then
                    {
                    tpw_furniture_index = 0;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;    
                };
            case 203: // arrow left, rotate left
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_angle = tpw_furniture_angle - 15;
                if (tpw_furniture_angle < 0) then
                    {
                    tpw_furniture_angle = 360 + tpw_furniture_angle;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;
                };
            case 205: // arrow right, rotate right
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_angle = tpw_furniture_angle + 15;
                if (tpw_furniture_angle > 360) then
                    {
                    tpw_furniture_angle = tpw_furniture_angle - 360;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;
                };                
                
            case 156: //numpad enter, place item
                {
                tpw_furniture_lastchange = time + 0.1;
                0 = [] call tpw_furniture_fnc_placeitem;
                };
                
            case 82: //    numpad 0, delete last item
                {
                tpw_furniture_lastchange = time + 0.1;
                0 = [] call tpw_furniture_fnc_deleteitem;
                };
            };
        };
    };

 

 

 

It turns out that writing the code was the easy part. Actually placing all the furniture in the dozens of building types on Tanoa and Altis (let alone 3rd party maps) is going to be a big job that I don't have the patience for. But I'm hoping that some of you might care to help me out by running tpw_furniture_place.sqf and PMing me the resultant output. The program is easy to use:

 

1 - It starts up with a yellow ball in front of the player. This represents the target for placement

2 - ctrl + alt + up/down arrows allow you to select the furniture item

3 - ctrl + alt + left/right arrows allow you to rotate the item

4 - ctrl + alt + keypad enter places the item at the target

5 - ctrl + alt + keypad 0 deletes the last placed object

6 - once you've furnished a house alt-tab back to your text editor and paste the clipboard, which should look something like this


Land_House_Small_04_F,[["Land_WoodenTable_large_F",[-1.66309,-3.93457,-0.864875],-180.002],["Land_RattanChair_01_F",[-0.495117,-4.66602,-0.86476],-185.523],["Land_RattanChair_01_F",[-0.614258,-3.41992,-0.864752],-95.9327],["Land_RattanChair_01_F",[-1.5791,-2.18408,-0.86497],-10.4366],["Land_WoodenCounter_01_F",[3.91211,-2.41406,-0.86588],91.3104],["Land_ShelvesWooden_F",[0.543945,1.9248,-0.865171],-174.964],["Land_Sacks_goods_F",[0.27002,3.65137,-0.86414],-63.6292],["Land_Basket_F",[0.648438,0.700684,-0.865187],-115.737]]   

7 - move to another house and start the process over. The clipboard will clear each time you move house.

 

Caveats:

1 - As you know, Arma3 only provides a pretty poor selection of furnishings. No beds, couches, rugs etc. But there's enough to at least provide the illusion of habitation

2 - Please resist the urge to fill houses chock a block with items, which will get in the way of AI and tank the framerate.

3 - My placement script only allows for placing items on the floor, not on other items. 

 

Please PM me if you're interested. Thanks in advance for any help. If none of you choose to help, I'll still release the mod eventually, it will just take longer and I won't listen to any bitching about the artistry of my work!

 

Does this mean its working? thnks for the hard work sir/madam!

  • Like 2

Share this post


Link to post
Share on other sites
1 minute ago, Caluu66x said:

Does this mean its working? thnks for the hard work sir/madam!

It works if you are prepared to run scripts manually, but at the moment the system is limited to a few house types on Tanoa, I am working on more, but it is slow going and hard work, which is why I have asked for help.

 

If you just want to wait for the mod version, it will be  a few days.

 

BTW, it's sir, not madam. You should be able to tell by the male walrus :)

  • Like 2

Share this post


Link to post
Share on other sites
Just now, tpw said:

It works if you are prepared to run scripts manually, but at the moment the system is limited to a few house types on Tanoa, I am working on more, but it is slow going and hard work, which is why I have asked for help.

 

If you just want to wait for the mod version, it will be  a few days.

 

BTW, it's sir, not madam. You should be able to tell by the male walrus :)

haha ok, i think i have the fireflies working manually with ur script in my mission folder with the init, but i shall wait, id love to help but im no good at the scripting and making of things lol

 

thanks again good SIR! haha :D

Share this post


Link to post
Share on other sites
22 minutes ago, tpw said:

It works if you are prepared to run scripts manually, but at the moment the system is limited to a few house types on Tanoa, I am working on more, but it is slow going and hard work, which is why I have asked for help.

 

If you just want to wait for the mod version, it will be  a few days.

 

BTW, it's sir, not madam. You should be able to tell by the male walrus :)

Well you are the guy who got puddles to happen in the rain-I have total faith in you :)

Share this post


Link to post
Share on other sites

AMBIENT FURNITURE WIP

 

The good thing about being out of work is that I get a few hours uninterrupted coding time. Here's the current fruit of my labour for Tanoa:

Spoiler

 

/*
HOUSE AMBIENT FURNITURE SCRIPT
tpw 20170104
*/

// FURNISH HOUSE
tpw_furnish_fnc_populate =
    {
    private ["_bld","_type","_items","_item","_offset","_angle","_bld","_pos"];
    _bld = _this select 0;
    _type = typeof _bld;
    
    // Assign appropriate furnishing template for house
    switch _type do
        {
        case "Land_House_Small_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_TablePlastic_01_F",[-4.39307,1.2832,-0.699362],88.2366],["Land_ChairPlastic_F",[-5.41113,1.27539,-0.699363],4.16151],["Land_ChairPlastic_F",[-3.12256,0.893555,-0.699363],176.193],["Land_ChairPlastic_F",[-4.40723,3.01758,-0.699363],251.962],["Land_ChairPlastic_F",[-4.42139,-0.375977,-0.699363],79.3795],["Land_WoodenTable_large_F",[-4.95117,-3.03711,-0.699362],90.9798],["Land_WoodenCounter_01_F",[0.318848,2.27832,-0.699363],90.7001],["Land_WoodenTable_small_F",[1.84277,3.00781,-0.699362],181.198],["Land_ShelvesWooden_F",[1.47559,-1.9873,-0.699363],1.68573],["Land_Metal_rack_Tall_F",[6.17578,2.85449,-0.699363],-90.9498],["Land_ChairWood_F",[2.92529,3.0498,-0.699362],-9.95035],["Land_ChairWood_F",[1.91602,1.67285,-0.699362],144.447],["Fridge_01_closed_F",[5.9502,-3.23047,-0.699363],178.229],["Land_Basket_F",[1.72754,-3.37402,-0.699362],132.784],["Land_Sack_F",[5.79102,-1.53223,-0.699362],-54.0081],["Land_Sack_F",[5.9165,0.0205078,-0.699362],-4.26343],["Land_CratesShabby_F",[5.82422,1.44629,-0.699363],0.10672],["Land_PlasticCase_01_large_F",[0.361816,-1.42383,-0.699363],-0.384552]];
                };
            };    
        case "Land_House_Small_02_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_PlasticCase_01_large_F",[-3.80566,0.600586,-0.714201],270.116],["Land_BarrelWater_F",[-4.06494,1.47998,-0.714201],212.719],["Land_BarrelWater_F",[-3.91357,4.53906,-0.714201],206.741],["Land_Sacks_heap_F",[-3.75098,5.45117,-0.714201],173.155],["Fridge_01_closed_F",[-0.367188,0.784668,-0.714201],178.862],["Land_Microwave_01_F",[0.33252,0.619141,-0.714201],191.194],["Land_ShelvesWooden_F",[-4.18115,3.19238,-0.714201],-0.175385],["Land_WoodenCounter_01_F",[-3.90479,-3.41016,-0.714201],268.449],["Land_WoodenTable_small_F",[-0.106934,-5.19629,-0.714201],179.695],["Land_RattanChair_01_F",[-1.24609,-5.4043,-0.714201],104.568],["Land_CampingChair_V1_F",[-0.227539,-3.08984,-0.714201],16.8977],["Land_ChairPlastic_F",[-1.15967,-4.07422,-0.714201],344.842]];
                };
            };            
        case "Land_House_Small_03_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[-3.04688,-1.09473,-1.32258],-177.826],["Land_ChairWood_F",[-4.02051,-1.66113,-1.32258],102.879],["Land_ChairWood_F",[-3.95264,-0.40918,-1.32258],72.8789],["Land_ChairWood_F",[-2.96143,0.394531,-1.32258],1.36459],["Land_ShelvesWooden_F",[-2.70898,3.6416,-1.32258],-180.168],["Land_ShelvesWooden_F",[-3.58252,5.09668,-1.32258],-89.0166],["Fridge_01_closed_F",[-6.14307,5.00391,-1.32258],0.283615],["Land_BarrelWater_F",[-5.05859,4.875,-1.32258],-12.9616],["Land_PlasticCase_01_small_F",[-2.63818,2.64941,-1.32258],-0.86998],["Land_Sacks_goods_F",[-5.83984,2.27734,-1.32258],146.318],["Land_Sack_F",[-5.77539,0.879883,-1.32258],-183.514],["Land_Sack_F",[-5.87988,-1.62305,-1.32258],-74.1766],["Land_Sacks_heap_F",[2.4209,-1.18457,-1.32258],79.303],["Land_CanisterPlastic_F",[2.64453,0.347656,-1.32258],2.86423],["Land_GasTank_01_blue_F",[2.66113,1.92578,-1.32258],2.86423],["Land_Basket_F",[0.0766602,-1.71875,-1.32258],-7.47496],["Land_Basket_F",[-1.5332,2.85645,-1.32258],-140.148],["Land_Metal_rack_Tall_F",[-1.91113,4.40332,-1.32258],91.9407],["Land_Metal_rack_Tall_F",[0.318359,4.99023,-1.32258],-1.69688]];
                };
            };
        case "Land_House_Small_04_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[-1.66309,-3.93457,-0.864875],-180.002],["Land_RattanChair_01_F",[-0.495117,-4.66602,-0.86476],-185.523],["Land_RattanChair_01_F",[-0.614258,-3.41992,-0.864752],-95.9327],["Land_RattanChair_01_F",[-1.5791,-2.18408,-0.86497],-10.4366],["Land_WoodenCounter_01_F",[3.91211,-2.41406,-0.86588],91.3104],["Land_ShelvesWooden_F",[0.543945,1.9248,-0.865171],-174.964],["Land_Sacks_goods_F",[0.27002,3.65137,-0.86414],-63.6292],["Land_Basket_F",[0.648438,0.700684,-0.865187],-115.737]];
                };
            };    
        case "Land_House_Small_06_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_TablePlastic_01_F",[-1.41699,-4.63379,-1.00068],-178.977],["Land_ChairPlastic_F",[0.0175781,-3.98975,-1.00068],-132.682],["Land_ChairPlastic_F",[-2.93457,-3.97656,-1.00068],-32.8382],["Land_ChairPlastic_F",[-1.40234,-3.51807,-1.00068],-84.6655],["Land_WoodenTable_large_F",[-2.25391,1.56348,-1.00068],-88.8574],["Land_WoodenCounter_01_F",[1.86621,-3.7085,-1.00068],91.8469],["Land_Metal_rack_F",[2.27832,0.189453,-1.00068],-90.243],["Land_Basket_F",[-4.02246,1.79492,-1.00068],45.8277],["Land_Sack_F",[-3.87305,0.850586,-1.00068],77.0597],["Land_Sack_F",[-4.0918,-0.185547,-1.00068],-177.337],["Land_PlasticCase_01_small_F",[-3.97559,-5.03857,-1.00068],-89.3508],["Land_CanisterFuel_F",[-3.97266,-4.03271,-1.00068],-53.4766]];
                };
            };
        case "Land_House_Big_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[2.51563,1.57227,-1.01143],-180.482],["Land_ChairWood_F",[1.22559,1.70557,-1.01143],93.6551],["Land_ChairWood_F",[2.63184,2.96729,-1.01143],10.7773],["Land_ChairWood_F",[3.37012,1.15137,-1.01143],-79.5892],["Land_WoodenCounter_01_F",[7.20313,2.05859,-1.01143],87.9852],["Land_ShelvesWooden_F",[4.16992,5.7085,-1.01143],-92.8692],["Fridge_01_closed_F",[0.169922,5.68506,-1.01143],1.6033],["Land_Basket_F",[7.26465,-1.00049,-1.01143],-172.424],["Land_CratesShabby_F",[5.89941,-0.901855,-1.01143],-0.59993],["Land_Sack_F",[5.00977,-1.01514,-1.01143],-40.0437],["Land_BarrelWater_F",[7.30469,3.63818,-1.01143],77.9324],["Land_PlasticCase_01_large_F",[0.0273438,2.56982,-1.01143],-182.23]];
                };
            };            
        case "Land_House_Big_02_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_PlasticCase_01_large_F",[-5.98486,8.17578,-1.44058],180.522],["Land_CanisterFuel_F",[-6.03906,9.34473,-1.44053],136.607],["Land_ShelvesMetal_F",[-3.99219,9.05273,-1.44107],88.2645],["Land_Metal_rack_F",[-4.9082,0.816406,-1.44189],-88.5925],["OfficeTable_01_new_F",[-8.08594,3.51758,-1.4409],-5.07813],["Land_OfficeChair_01_F",[-8.14063,2.46973,-1.44077],-114.886],["Land_OfficeCabinet_01_F",[-9.00439,-0.982422,-1.44071],180.356],["Land_OfficeCabinet_01_F",[-0.245117,1.78418,-1.44048],89.8227],["Land_ChairWood_F",[3.25244,3.43164,-1.44094],6.48524],["Land_ChairWood_F",[4.23975,3.52734,-1.44171],-40.5042],["Land_GasTank_01_blue_F",[-1.80469,8.89453,-1.44106],-1.05878],["Land_CanisterPlastic_F",[-1.02783,9.1543,-1.44078],18.5195]];
                };
            };            
        case "Land_House_Big_03_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_BarrelWater_F",[2.34912,-5.07373,-3.17353],-206.69],["Land_PlasticCase_01_large_F",[2.0957,-3.8335,-3.17353],-179.769],["Land_CanisterFuel_F",[2.41699,-2.58105,-3.17353],-197.168],["Land_CanisterFuel_F",[2.44434,-1.86084,-3.17353],-167.169],["Land_Metal_rack_Tall_F",[3.46826,-0.779785,-3.17353],2.39783],["Land_Metal_rack_Tall_F",[4.4751,-0.949707,-3.17353],-0.0993805],["Land_TablePlastic_01_F",[9.42432,0.535156,-3.17353],-181.059],["Land_ChairPlastic_F",[9.42041,1.60742,-3.17353],-123.364],["Land_ChairPlastic_F",[7.72559,0.975098,-3.17353],-9.52327],["Land_ShelvesWooden_F",[1.60938,3.69238,-3.17353],-90.8741],["Land_OfficeCabinet_01_F",[3.71582,3.78906,-0.0890994],-2.41085],["Land_RattanChair_01_F",[3.49951,-2.45996,-0.0890989],-230.299],["Land_RattanChair_01_F",[5.23145,-2.48486,-0.0890989],-185.076],["Land_Sleeping_bag_folded_F",[7.32861,3.19482,-0.0890989],-308.796],["Land_Ground_sheet_folded_blue_F",[7.83594,2.91748,-0.0890994],39.2727],["Land_LuggageHeap_02_F",[6.19922,3.49609,-0.0890989],-288.367],["Land_LuggageHeap_03_F",[7.05762,-2.4668,-0.0890994],-141.923]];
                };
            };            
        case "Land_House_Big_04_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_Sleeping_bag_blue_F",[-5.67578,3.2915,0.301346],1.78235],["Land_Pillow_old_F",[-5.51465,4.83984,0.302036],27.523],["Land_ShelvesWooden_F",[-2.45117,5.20264,0.301067],-91.9971],["Land_Sleeping_bag_blue_folded_F",[-5.65039,5.24902,0.301777],-11.0885],["Land_Sleeping_bag_F",[3.95215,4.27979,0.303612],179.422],["Land_Pillow_grey_F",[4.00977,3.03955,0.302792],204.04],["Land_Pillow_grey_F",[3.92871,2.64697,0.303185],192.524],["Land_Sleeping_bag_folded_F",[4.23535,2.05908,0.303478],183.55],["Land_Ground_sheet_folded_blue_F",[2.24512,4.5376,0.302521],212.019],["Land_CampingChair_V1_F",[2.73438,2.56836,0.303806],173.04],["Land_CampingChair_V1_F",[3.13574,3.7959,0.302563],-74.2686],["Land_CampingTable_small_F",[-2.37109,2.02344,0.304775],176.863],["Land_TablePlastic_01_F",[3.61816,-2.25684,-2.94675],-94.3656],["Land_ChairPlastic_F",[2.48047,-1.13037,-2.94786],-61.4986],["Land_ChairPlastic_F",[2.13477,-2.30713,-2.94786],-16.4986],["Land_ChairPlastic_F",[2.44922,-3.58545,-2.94786],43.5013],["Land_WoodenTable_large_F",[-3.94727,-4.12549,-2.94534],-89.8305],["Land_WoodenCounter_01_F",[-0.922852,-0.937988,-2.94878],183.926]];
                };
            };
        case "Land_Slum_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_WoodenTable_large_F",[5.16748,0.111328,0.670929],-0.11588],["Land_WoodenCounter_01_F",[1.82422,2.00293,0.669987],-180.655],["Land_ChairWood_F",[4.75977,-1.7666,0.670929],-219.372],["Land_ChairWood_F",[4.27051,-0.113281,0.670929],-265.684],["Land_CampingChair_V1_F",[5.18213,1.84082,0.670895],-312.999],["Land_Basket_F",[3.20801,-1.6582,0.670658],-12.1951],["Land_Basket_F",[2.38818,-1.66504,0.670658],-327.195],["Land_CratesShabby_F",[-0.575195,0.363281,0.668991],-93.0426]];
                };
            };    
        case "Land_Slum_02_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_Basket_F",[-2.24756,4.38965,0.18475],194.435],["Land_CratesShabby_F",[-0.36084,4.52344,0.18454],182.289],["Land_Sack_F",[0.816406,4.2041,0.184204],161.705],["Land_Sack_F",[1.7666,4.26563,0.183887],92.0912],["Land_Sacks_goods_F",[1.93262,1.24023,0.183758],59.8842],["Land_BarrelWater_F",[-1.23413,4.33203,0.184875],187.171],["Land_Sacks_heap_F",[-2.12378,-3.71875,0.185604],-83.6961],["Land_WoodenTable_large_F",[1.89355,-3.18945,0.184761],2.58131],["Land_RattanChair_01_F",[0.328125,-2.64746,0.184475],19.4736]];
                };
            };
        case "Land_Slum_03_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_TablePlastic_01_F",[-2.72852,5.0791,-0.648022],-89.7099],["Land_ChairPlastic_F",[-1.53516,5.33008,-0.648022],-178.257],["Land_ChairPlastic_F",[-4.05469,5.4873,-0.648018],-40.9423],["Land_ShelvesWooden_F",[0.0556641,3.10107,-0.648018],-181.728],["Land_ShelvesWooden_F",[0.93457,3.46484,-0.648018],0.227974],["Land_WoodenCounter_01_F",[5.0625,4.6123,-0.648018],-91.0826],["Land_WoodenCounter_01_F",[5.21387,1.49121,-0.648022],89.7324],["Land_ChairWood_F",[1.37012,2.55762,-0.648022],53.3668],["Land_Metal_rack_F",[-4.97949,1.00342,-0.648018],91.9733],["Fridge_01_closed_F",[-4.80371,-0.822266,-0.648018],90.3232],["Land_Basket_F",[-0.386719,1.2207,-0.648014],-71.3866],["Land_Basket_F",[0.227539,-1.51172,-0.648018],-105.558],["Land_Sack_F",[-1.11328,-1.46484,-0.648018],-117.807],["Land_CanisterPlastic_F",[-4.8623,0.0283203,-0.648018],-223.503]];
                };
            };
        case "Land_Shop_Town_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_Icebox_F",[-4.02148,-2.92139,-3.24347],92.0958],["Land_Icebox_F",[-4.01514,-0.605957,-3.24347],91.9758],["Land_CashDesk_F",[-3.63477,1.08691,-3.2425],1.15862],["Land_Metal_rack_F",[-0.268555,1.41748,-3.2439],-88.9577],["Land_Metal_rack_F",[-0.209473,0.241211,-3.2439],-88.9535],["Land_ShelvesMetal_F",[1.79053,-2.99609,-3.24393],-90.3454],["Land_ShelvesMetal_F",[-1.69922,-1.50049,-3.24249],2.89784],["Land_TableDesk_F",[-3.65967,3.18359,-3.24315],1.18808],["Land_OfficeChair_01_F",[-3.87695,3.93604,-3.24315],1.18808],["Land_OfficeCabinet_01_F",[-4.13379,5.90625,-3.2425],-6.17105],["Land_OfficeCabinet_01_F",[-4.12402,5.80615,-3.2425],-6.57448]];
                };
            };    
        case "Land_Shop_Town_03_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = [["Land_CashDesk_F",[-4.51416,-0.11377,-3.35822],88.245],["Land_CashDesk_F",[-5.7417,-2.50293,-3.35822],2.76701],["Land_ShelvesMetal_F",[-4.13916,-3.99219,-3.35822],-90.0966],["Land_ShelvesMetal_F",[1.99072,-2.77979,-3.35822],-91.7501],["Land_Metal_rack_Tall_F",[1.14795,0.425293,-3.35822],-181.658],["Land_Metal_rack_Tall_F",[1.99951,0.310547,-3.35822],-181.658],["Land_Metal_rack_Tall_F",[3.08252,-0.0102539,-3.35822],-181.658],["Land_Metal_rack_Tall_F",[3.34668,0.628418,-3.35822],-180.214],["Land_WoodenTable_large_F",[3.18701,7.49609,-3.35822],-92.3368],["Land_RattanChair_01_F",[4.92383,7.3877,-3.35822],-125.48],["Land_RattanChair_01_F",[3.53467,6.17627,-3.35822],-170.404],["Land_RattanChair_01_F",[1.50439,7.26758,-3.35822],128.518],["Land_TableDesk_F",[-5.30029,5.56934,-3.35822],1.22641],["Land_OfficeChair_01_F",[-5.50342,6.6001,-3.35822],8.76091],["Land_OfficeCabinet_01_F",[-5.7002,7.90625,-3.35822],-2.53249],["OfficeTable_01_old_F",[6.34082,5.22998,-3.35822],-93.0884],["OfficeTable_01_new_F",[3.23145,1.646,-3.35822],-184.151],["Land_Metal_rack_F",[0.870605,5.06982,-3.35822],-178.752],["Land_Icebox_F",[-2.07568,5.62793,-3.35822],-178.809],["Land_Icebox_F",[-0.550293,-5.00488,-3.35822],89.9525],["Land_Icebox_F",[-0.522461,-2.87158,-3.35822],90.7582]];
                };
            };        
        case "Land_Addon_04_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_WoodenTable_large_F",[-3.38135,-5.85889,0.33478],-181.111],["Land_RattanChair_01_F",[-1.97217,-4.83008,0.334781],-102.221],["Land_RattanChair_01_F",[-3.24219,-4.17725,0.334781],-12.221],["Land_RattanChair_01_F",[-2.04248,-6.18262,0.334781],-70.9686],["Land_Metal_rack_F",[-1.40381,-1.71387,0.33478],-0.606853],["Land_Metal_rack_F",[-0.146973,-3.12207,0.33478],-91.441],["Land_ShelvesWooden_F",[-0.491211,-0.6875,0.334781],-271.279],["Land_ShelvesWooden_F",[-2.59473,-0.38623,0.33478],-269.897],["Land_TableDesk_F",[-0.905762,2.48145,0.33478],-184.208],["Land_OfficeChair_01_F",[-1.00391,1.58105,0.334781],-180.406],["Land_OfficeCabinet_01_F",[-3.23145,2.68457,0.33478],0.135162],["Fridge_01_closed_F",[3.08838,-6.56494,0.33478],-180.871],["Land_LuggageHeap_01_F",[3.38721,-1.77637,0.33478],-73.5685],["Land_Sack_F",[3.28857,-2.854,0.33478],-113.351],["Land_Sack_F",[3.44336,-0.586426,0.33478],-38.3514]];
                };        
            };
        case "Land_Shed_02_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_WoodenCounter_01_F",[-0.00976563,1.8501,-0.842734],-177.057],["Land_CratesShabby_F",[-1.3418,-0.608398,-0.842641],-90.3033],["Land_Sack_F",[-1.20801,0.197266,-0.844222],-90.3033],["Land_Sacks_goods_F",[1.09668,0.0151367,-0.84166],93.0307],["Land_BarrelWater_F",[-0.342773,0.876953,-0.840778],169.975]];
                };        
            };
        case "Land_Shed_05_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_BarrelWater_F",[2.3125,0.800049,-0.889773],109.25],["Land_BarrelWater_F",[1.51172,0.887695,-0.889514],128.637],["Land_BarrelWater_F",[2.22656,-0.11377,-0.889867],100.362],["Land_Sacks_heap_F",[1.88867,-2.00049,-0.889935],-3.34731],["Land_Sacks_goods_F",[-0.396484,-1.62842,-0.889215],-13.3177],["Land_Sack_F",[-2.1875,-1.99268,-0.889215],16.6823],["Land_Sack_F",[-2.22559,-0.733398,-0.889215],61.6823],["Land_CratesShabby_F",[-2.09863,0.696289,-0.888219],-6.40511]];
                };        
            };                
        case "Land_House_Native_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_WoodenTable_large_F",[0.0751953,-2.52881,-3.10103],269.414],["Land_WoodenTable_large_F",[1.85938,2.69238,-3.10103],91.0994],["Land_WoodenCounter_01_F",[-2.38672,2.80322,-3.10103],181.892],["Land_ShelvesWooden_F",[4.54688,-2.36328,-3.10103],1.38248],["Land_Basket_F",[-4.11133,-2.5498,-3.10104],271.682],["Land_Basket_F",[-4.18555,-1.62793,-3.10104],215.249],["Land_Basket_F",[-4.15918,2.49072,-3.10103],129.287],["Land_Basket_F",[-3.19238,-2.20068,-3.10104],175.117],["Land_Sack_F",[3.98926,2.81201,-3.10103],85.6202],["Land_Sack_F",[4.28418,1.74951,-3.10103],91.3261]]    ;
                };        
            };                        
            
        case "Land_House_Native_02_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_Sack_F",[-3.24023,-1.93457,-2.41429],-100.074],["Land_Sack_F",[-3.48877,-0.839844,-2.41426],-55.0739],["Land_Sack_F",[-2.48633,-2.27539,-2.41417],-28.9239],["Land_Sacks_goods_F",[-3.24463,1.97168,-2.41522],171.087],["Land_BarrelWater_F",[-3.35498,0.00195313,-2.41447],236.356],["Land_BarrelWater_F",[-3.36182,0.755859,-2.41472],214.608],["Land_PlasticCase_01_small_F",[2.17871,-2.04199,-2.41458],-1.12192],["Land_PlasticCase_01_large_F",[2.01074,2.2832,-2.41551],89.1053],["Land_Sacks_heap_F",[-2.15967,-0.821289,-2.41423],-93.3029],["Land_ShelvesWooden_F",[0.0366211,-2.35352,-2.41423],-90.927],["Land_ShelvesWooden_F",[0.385742,2.13867,-2.41515],-92.6277]]    ;
                };        
            };
        case "Land_Temple_Native_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_WoodenTable_large_F",[-0.677246,1.06348,-6.03026],-93.4569],["Land_WoodenTable_large_F",[2.14404,4.15039,-6.03032],-89.1357],["Land_ChairWood_F",[-0.0981445,2.31152,-6.03183],-327.626],["Land_ChairWood_F",[0.677734,3.97559,-6.0314],-22.2716],["Land_ChairWood_F",[-2.41064,4.08398,-6.03172],-350.186],["Land_PlasticCase_01_large_F",[3.31055,0.351563,-6.02989],-0.0747254],["Land_PlasticCase_01_large_F",[-0.475586,4.74121,-6.03105],-269.639],["Land_BarrelWater_F",[-3.13477,-0.28418,-6.03091],-104.991]];
                };        
            };                
                        
        case "Land_GarageShelter_01_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_GasTank_01_blue_F",[3,3.36523,-1.25335],-1.62805],["Land_GasTank_01_blue_F",[3.74707,3.41357,-1.25335],-110.703],["Land_CanisterPlastic_F",[4.40186,3.12451,-1.25335],92.5223],["Land_CanisterFuel_F",[4.37354,1.35156,-1.25335],182.435],["Land_CanisterFuel_F",[4.17676,0.217773,-1.25335],12.169],["Land_PlasticCase_01_small_F",[-3.58887,3.38428,-1.25334],90.1638],["Land_PlasticCase_01_large_F",[-2.2583,3.2334,-1.25334],90.1638],["Land_BarrelWater_F",[-4.08887,-1.05713,-1.25334],160.904],["Land_BarrelWater_F",[-4.01514,-0.212891,-1.25334],160.606],["Land_BarrelWater_F",[-3.50928,-0.770508,-1.25334],197.629],["Land_Sacks_heap_F",[-0.942383,-1.95947,-1.25335],-86.1983],["Land_Sacks_goods_F",[-3.62988,1.28564,-1.25335],165.204],["Land_ShelvesMetal_F",[-0.811035,0.334473,-1.25335],1.38748]];
                };        
            };                    
        case "Land_FuelStation_02_workshop_F":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items =[["Land_Icebox_F",[0.836914,1.66797,-1.25639],-269.88],["Land_CashDesk_F",[4.02637,5.42383,-1.25439],-3.15121],["Land_Metal_rack_F",[4.57813,3.23926,-1.25583],-92.1851],["Land_Metal_rack_F",[4.53906,1.61719,-1.25578],-90.1576],["Land_Metal_rack_F",[4.53906,0.0371094,-1.25577],-90.1576],["Land_ShelvesMetal_F",[2.86035,0.87207,-1.25439],-0.543427]];
                };        
            };    
        /*        
        case "":
            {
            if (_bld getvariable ["tpw_furnished",0] == 0) then
                {
                _bld setvariable ["tpw_furnished",1];
                _items = ;
                };
            };
        */        
        };
    
    // Furnish house appropriately
    if (_bld getvariable "tpw_furnished" == 1) then
        {
        _bld setvariable ["tpw_furniture",_items];
        _bld setvariable ["tpw_furnished",2];
        _dir = getdir _bld;
            {
            _item = _x select 0;
            _offset = _x select 1 vectoradd [0,0,-0.1];
            _angle = _x select 2;
            _dir = getdir _bld;
            _pos = _bld modeltoworld _offset;
            _item = _item createvehiclelocal [0,0,0];
            _item setposatl _pos;
            _item setdir (_dir - _angle);
            _item enablesimulation false;
            sleep 0.2;
            } foreach _items;        
        };
    };

// SCAN FOR NEAREST HOUSE TO FURNISH
tpw_furniture_lastpos = [0,0,0];
while {true} do
    {
    if (player == vehicle player && player  distance tpw_furniture_lastpos > 25) then
        {
        _blds = player nearObjects ["House",50];
            {
            0 = [_x] spawn tpw_furnish_fnc_populate;
            } foreach _blds;
        tpw_furniture_lastpos = position player;
        };    
    sleep 5;
    };

 

I've pretty much slapped together furnishing templates for most of the big, small, slum and native houses and sheds, as well as most shops and a few miscellaneous buildings. Not every single one though. The system works well and has minimal FPS hit under most circumstances. As far as I'm concerned it really does add a bit of ambience to Tanoa despite the limited repertoire of vanilla furniture available. It does piss me off that a hack coder like me has to put this together in a few afternoons, when BI should have included it years ago...

 

 If you'd like to test it out then I welcome feedback, except for the previously mentioned shitcanning of my placement skillz!

 

I repeat my invitation to anyone who'd like to help out preparing furniture placement templates for Tanoa and Altis. Please PM me if you're interested.

 

 

 

8 minutes ago, scooterperpetual said:

Just want to say I recently tried out this mod along with a host of other mods and it is amazing on desert maps. I was running a development build of ACE with the new night vision, Alive and this along with some gear mods and going from building to building on Takistan was unreal. Had a dog run up and infront of me during a patrol and I seriously got freaked out by it but it just ran off and kept to itself.

 

Just wanted to say great work and this mod is one of those that truly make ArmA the amazing, immersive game that it is. Thanks!

 

Also the furniture module looks great!

Thanks you very kindly indeed!

  • Like 4

Share this post


Link to post
Share on other sites

If I was not entering my busiest schedule, I would sit down and arrange furnishing all day! I will try to do some in my spare time.

 

I suspect it would be easiest if there as test mission VR that had all the buildings to run this? Will check if I can drop into EDEN and see what can be done.

Share this post


Link to post
Share on other sites

Hi,

 

I don't know if this was asked before, if so, excuse me.

I'm planning to use (parts of) this mod on a dedicated MP server with other mods. Will this work if I put this on the server only instead of distributing it to every client?

 

Thank you!

Share this post


Link to post
Share on other sites

The MOD version is not MP  compatible but I believe some scripts are. So you would need to test it and it should be OK to include the scripts in your mission.

Share this post


Link to post
Share on other sites

TPW MODS 20170105: https://dl.dropboxusercontent.com/u/481663/TPW_MODS_20170105.zip

 

Changes:

  • [HPP UPDATE REQUIRED]
  • [CORE 1.29, FOG 1.45] Xcam_Taunus added to region and climate lists. 
  • [FURNITURE 1.00] *NEW* Ambient furniture in enterable Tanoan houses and buildings. Stratis/Altis coming soon.


What the hell, might as well release TPW FURNITURE as a mod so I can get more feedback! I've created templates for all buildings, further optimised the code and added a few features. Furniture won't spawn in houses already containing player/AI units, and furniture despawns once houses are distant from player. This should help prevent AI pathing issues in houses, and further improves performance. I'm pretty happy with this as a v1.0 release, and it certainly adds to the immersion on Tanoa.

 

TPW FURNITURE README

 

I'm starting work on Altis/Stratis houses, expect a release some time soon.

 

  • Like 8

Share this post


Link to post
Share on other sites

@ TPW... WOW! Fantastic... Would you also advise a script so we can assist with adding user made building packs as well just as JBAD, EM, Open Chernarus and others? We can submit the data to you for periodic updates.

Share this post


Link to post
Share on other sites

:don11:

Wow awesome work TPW.  The furniture thing, I am not sure if it's a game changer but IMHO, heck yes it is!

Share this post


Link to post
Share on other sites
On 04/01/2017 at 2:02 AM, tpw said:

 


Land_House_Small_04_F,[["Land_WoodenTable_large_F",[-1.66309,-3.93457,-0.864875],-180.002],["Land_RattanChair_01_F",[-0.495117,-4.66602,-0.86476],-185.523],["Land_RattanChair_01_F",[-0.614258,-3.41992,-0.864752],-95.9327],["Land_RattanChair_01_F",[-1.5791,-2.18408,-0.86497],-10.4366],["Land_WoodenCounter_01_F",[3.91211,-2.41406,-0.86588],91.3104],["Land_ShelvesWooden_F",[0.543945,1.9248,-0.865171],-174.964],["Land_Sacks_goods_F",[0.27002,3.65137,-0.86414],-63.6292],["Land_Basket_F",[0.648438,0.700684,-0.865187],-115.737]]   

 

3 - My placement script only allows for placing items on the floor, not on other items. 

 

Please PM me if you're interested. Thanks in advance for any help. If none of you choose to help, I'll still release the mod eventually, it will just take longer and I won't listen to any bitching about the artistry of my work!

 

 

PM sent. 

 

Re point 3: Serena very recently published    a script for placing objects upon other objects. Tried it very briefly, seems to work just fine. Maybe she would be happy if that was used for this general furnishing development?

Ciao

 

Orc

 

PS sorry for the extraneous quote at the top. This excuse for a forum upgrade wouldn't let me edit it out.

O

Share this post


Link to post
Share on other sites
On 04/01/2017 at 5:48 AM, tpw said:

BTW, it's sir, not madam. You should be able to tell by the male walrus :)

Obviously. Female walruses (walri?) have long hair and lipsstick.

Share this post


Link to post
Share on other sites

Greetings tpw, well you have certainly kicked off the New Year in style....tpw_furniture is a most awesome addition as I know it's been on your to-do list for a very long time. This first iteration is working really well, haven't noticed any performance hit to speak off so hats off to you Sir!  Hats Off Salute animated emoticon

 

During a test run on Tanoa the only "bug" i noticed was a floating chair, coordinates are in the pic.....

http://imgur.com/mvik38n

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the feedback everyone. And thanks to Orcinus, Evil Organ and Valken for the kind offers of help. I've PMed you guys with my updated placement script which allows objects to be placed on top of others. At the moment, you can place Arma3 vanilla furniture and items in any houses on any maps. I'm not really keen on using mod furniture at this stage, unless someone wants to donate some to incorporate directly into TPW MODS itself.

 

EO I've fixed that floating chair, well spotted! 

 

 

Share this post


Link to post
Share on other sites

This is exctly what i was looking for, the furniture feature, so if i would like some placed static MG in some military bases, i can add  those to the array ? and maybe check if its an mG and place it with simulation?? i think this would be awesome to militarize some bases along Altis. MGs in cargo towers, Choppers on Landingspots, Airplanes in hangars, you know what i mean.

 

anyways ill start decorating altis as soon as i get home from work, would i be possible to get access to the new version of the placement script ? so i can build nice desks with stuff of them? :)

 

 (especially togehter with EOS), would it be possible? iam thinking maybe a simulation on/off swith per item och a seperate array for similated items, i dont know.

Share this post


Link to post
Share on other sites

i found a desk thats at an odd angle, not sure how to put a screenshot in here to show u, but its placed in the town of doodstil in one of the buildings that has 4 desks and chairs, like a long building with the blue doors.

Share this post


Link to post
Share on other sites

FURNITURE PLACEMENT SCRIPT

 

For anyone who is interested in creating their own furniture compositions on Tanoa/Altis/Stratis etc, here's the latest version of the script:

 

Spoiler

 

/*
FURNITURE PLACEMENT SCRIPT
tpw 20170106
*/

 

sleep 10;
hint "Furniture placement active";

 

// Items

tpw_furniture_items = ["Land_CampingChair_V2_F","Land_CampingTable_F","Land_CampingTable_small_F","Land_ChairPlastic_F","Land_CampingChair_V1_F","Land_TablePlastic_01_F","Land_RattanChair_01_F","Land_WoodenTable_large_F","Land_WoodenTable_small_F","Land_WoodenCounter_01_F","Land_ChairWood_F","Land_TableDesk_F","Land_OfficeCabinet_01_F","Land_OfficeChair_01_F","OfficeTable_01_new_F","OfficeTable_01_old_F","Land_CashDesk_F","Land_Icebox_F","Land_Metal_rack_F","Land_Metal_rack_Tall_F","Land_ShelvesMetal_F","Land_ShelvesWooden_F","Land_Pillow_camouflage_F","Land_Pillow_grey_F","Land_Pillow_old_F","Land_Sleeping_bag_F","Land_Sleeping_bag_blue_F","Land_Sleeping_bag_blue_folded_F","Land_Sleeping_bag_brown_F","Land_Sleeping_bag_folded_F","Land_Ground_sheet_F","Land_Ground_sheet_folded_blue_F","Land_Ground_sheet_folded_F","Land_Camera_01_F","Land_FlatTV_01_F","Land_FMradio_F","Land_Laptop_device_F","Land_Microwave_01_F","Fridge_01_closed_F","Land_Tablet_01_F","Land_BakedBeans_F","Land_Can_Dented_F","Land_Can_V2_F","Land_Can_V3_F","Land_Can_Rusty_F","Land_Can_V1_F","Land_Canteen_F","Land_CerealsBox_F","Land_Tableware_01_fork_F","Land_Tableware_01_knife_F","Land_Tableware_01_spoon_F","Land_FoodContainer_01_F","Land_Ketchup_01_F","Land_Mustard_01_F","Land_Tableware_01_stackOfNapkins_F","Land_BottlePlastic_V1_F","Land_Tableware_01_cup_F","Land_Tableware_01_tray_F","Land_PowderedMilk_F","Land_RiceBox_F","Land_TinContainer_F","Land_BottlePlastic_V2_F","Land_LuggageHeap_03_F","Land_LuggageHeap_01_F","Land_LuggageHeap_02_F","Land_Basket_F","Land_CratesShabby_F","Land_Sack_F","Land_Sacks_goods_F","Land_Sacks_heap_F","Land_BarrelWater_F","Land_PlasticCase_01_large_F","Land_PlasticCase_01_small_F","Land_Suitcase_F","Land_CanisterFuel_F","Land_CanisterPlastic_F","Land_GasCooker_F","Land_GasTank_01_blue_F"];


// vars
tpw_furniture_index = 0;
tpw_furniture_angle = 0;
tpw_furniture_itemcount = (count tpw_furniture_items) - 1;
tpw_furniture_lastchange = time;
tpw_furniture_height = 0;

 

// Initial invisible item
tpw_furniture_item = "Land_HelipadEmpty_F" createvehiclelocal position player;
tpw_furniture_item attachto [player,[0,2,tpw_furniture_height]];

 

// Update item display
tpw_furniture_fnc_updateitem =
    {
    deletevehicle tpw_furniture_item;    
    tpw_furniture_item = (tpw_furniture_items select tpw_furniture_index) createvehiclelocal position player;
    tpw_furniture_item attachto [player,[0,2,tpw_furniture_height]];
    tpw_furniture_item setdir tpw_furniture_angle;    
    };

 

// Place item in building, write co-ordinates
tpw_furniture_fnc_placeitem = 
    {
    tpw_furniture_bld = nearestbuilding player;
    tpw_furniture_dir = getdir tpw_furniture_bld;
    tpw_furniture_itempos = tpw_furniture_bld worldtomodel getposatl tpw_furniture_item;
    tpw_furniture_pos = tpw_furniture_bld modeltoworld tpw_furniture_itempos;

    tpw_furniture_lastitem = (tpw_furniture_items select tpw_furniture_index) createvehiclelocal tpw_furniture_pos;
    tpw_furniture_lastitem setposatl tpw_furniture_pos;
    tpw_furniture_lastitem setdir (getdir tpw_furniture_item);
    //sleep 1; // allow item time to settle
    tpw_furniture_lastitem enablesimulation false;
    
    hintsilent format ["%1,%2,%3,%4",typeof tpw_furniture_bld,tpw_furniture_items select tpw_furniture_index,tpw_furniture_itempos,tpw_furniture_dir - getdir tpw_furniture_lastitem];
    _list = tpw_furniture_bld getvariable ["tpw_furniture",[]];
    _list pushback [tpw_furniture_items select tpw_furniture_index,tpw_furniture_itempos,tpw_furniture_dir - getdir tpw_furniture_lastitem];
    tpw_furniture_bld setvariable ["tpw_furniture",_list];
    
    // Write to clipboard in format that can be pasted into tpw_furniture.sqf
    copytoclipboard format ["%1 %2",typeof tpw_furniture_bld,_list];
    };

 

// Delete last placed item    
tpw_furniture_fnc_deleteitem =
    {
    deletevehicle tpw_furniture_lastitem; 
    _list = tpw_furniture_bld getvariable "tpw_furniture";
    _list deleteat ((count _list) - 1);
    tpw_furniture_bld setvariable ["tpw_furniture",_list];
    };
    
// Key detector    
(findDisplay 46) displayAddEventHandler ["keyDown", "_this call tpw_furniture_fnc_keys"];
tpw_furniture_fnc_keys = 
    {
    private["_ctrl","_alt","_key"];
    _ctrl = _this select 3;
    _alt = _this select 4;
    _key = _this select 1;
    if (_ctrl && _alt && time > tpw_furniture_lastchange) then 
        {

        switch _key do
            {
            case 200: // arrow up, scroll back through items
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_index = tpw_furniture_index - 1;
                if (tpw_furniture_index < 0) then
                    {
                    tpw_furniture_index = tpw_furniture_itemcount;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;    
                };
            case 208: // arrow down,  scroll down through items
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_index = tpw_furniture_index + 1;
                if (tpw_furniture_index > tpw_furniture_itemcount) then
                    {
                    tpw_furniture_index = 0;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;    
                };
            case 203: // arrow left, rotate left
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_angle = tpw_furniture_angle - 15;
                if (tpw_furniture_angle < 0) then
                    {
                    tpw_furniture_angle = 360 + tpw_furniture_angle;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;
                };
            case 205: // arrow right, rotate right
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_angle = tpw_furniture_angle + 15;
                if (tpw_furniture_angle > 360) then
                    {
                    tpw_furniture_angle = tpw_furniture_angle - 360;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;
                };        

            case 201: // pageup, increase item height
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_height = tpw_furniture_height + 0.05;
                0 = [] call tpw_furniture_fnc_updateitem;
                };
                
            case 209: // pagedown, decrease item height
                {
                tpw_furniture_lastchange = time + 0.1;
                tpw_furniture_height = tpw_furniture_height - 0.05;
                if (tpw_furniture_height < 0) then
                    {
                    tpw_furniture_height = 0;
                    };
                0 = [] call tpw_furniture_fnc_updateitem;
                };                
                
            case 156: //numpad enter, place item
                {
                tpw_furniture_lastchange = time + 0.1;
                0 = [] spawn tpw_furniture_fnc_placeitem;
                };
                
            case 82: //    numpad 0, delete last item
                {
                tpw_furniture_lastchange = time + 0.1;
                0 = [] call tpw_furniture_fnc_deleteitem;
                };
            };
        };
    };

 

 

It's very easy to use. Run the script from your player init in Eden and play the scenario. In game, give it 10 seconds after running the script to initialise. Then:

 

  • ctrl-alt up/down arrows to select the item
  • ctrl-alt left/right arrows to rotate it
  • ctrl-alt pageup/pagedown to raise or lower the item
  • ctrl-alt numpad enter to add the item
  • ctrl-alt numpad 0 to delete the last added item

Once you're happy with the composition for a given building, alt-tab and paste the clipboard into a text editor. It'll look something like this:

 

Land_Temple_Native_01_F [["Land_WoodenTable_large_F",[-0.677246,1.06348,-6.03026],-93.4569],["Land_WoodenTable_large_F",[2.14404,4.15039,-6.03032],-89.1357],["Land_ChairWood_F",[-0.0981445,2.31152,-6.03183],-327.626],["Land_ChairWood_F",[0.677734,3.97559,-6.0314],-22.2716],["Land_ChairWood_F",[-2.41064,4.08398,-6.03172],-350.186],["Land_PlasticCase_01_large_F",[3.31055,0.351563,-6.02989],-0.0747254],["Land_PlasticCase_01_large_F",[-0.475586,4.74121,-6.03105],-269.639],["Land_BarrelWater_F",[-3.13477,-0.28418,-6.03091],-104.991]] 

 

PM that to me and I'll incorporate it into the code.

 

You can move to another building and repeat the process. If you go back to the original building, you can continue on from where you left off.

 

If TPW FURNITURE is already running then you can add stuff to the existing furnishing for each building. If it's not running, then you can create templates from scratch.

 

I look forward to your PMs!

  • Like 2

Share this post


Link to post
Share on other sites

Hi, tpw. It is gratifying to see that someone has paid attention to the interior of buildings. Your approach is good in terms of performance and ease of implementation. There is a problem of repetition, but it can be solved by selecting one of several different compositions for each of house types. And it will work fine in most cases.

 

I am pondering the idea of a truly random objects placement, based on size, types of houses and size of rooms within them. At now it is just idea and do not know whether it comes to practical implementation.

 

As orcinus said, here  a script allowing player during mission progress to carry and stack interior objects, put weapons and items on their surfaces. Script does not matter added object with editor or created dynamically during mission -  only necessary to have the object in front of player.

 

Cheers 

  • Like 1

Share this post


Link to post
Share on other sites
16 minutes ago, serena said:

Hi, tpw. It is gratifying to see that someone has paid attention to the interior of buildings. Your approach is good in terms of performance and ease of implementation. There is a problem of repetition, but it can be solved by selecting one of several different compositions for each of house types. And it will work fine in most cases.

 

I am pondering the idea of a truly random objects placement, based on size, types of houses and size of rooms within them. At now it is just idea and do not know whether it comes to practical implementation.

 

As orcinus said, here  a script allowing player during mission progress to carry and stack interior objects, put weapons and items on their surfaces. Script does not matter added object in the editor or created dynamically during mission -  only necessary to have the object in front of player.

 

Cheers 

Thanks muchly for the input Serena, I appreciate it. With regards to your comments:

 

Repetition: you have a point, but then again it's a problem with every other furnished building in Arma. It'll be trivial to add randomised templates once I have more than 1 for a given building.

 

Random placement: Believe me I tried all sorts of things before settling on the template implementation! The randomised approach makes it very difficult to correctly rotate and line up spawned items within buildings in a way that looks believable and doesn't impede AI. But YMMV :)

 

Your placement script: very cool indeed!

 

 

3 hours ago, hansson0728 said:

This is exctly what i was looking for, the furniture feature, so if i would like some placed static MG in some military bases, i can add  those to the array ? and maybe check if its an mG and place it with simulation?? i think this would be awesome to militarize some bases along Altis. MGs in cargo towers, Choppers on Landingspots, Airplanes in hangars, you know what i mean.

 

anyways ill start decorating altis as soon as i get home from work, would i be possible to get access to the new version of the placement script ? so i can build nice desks with stuff of them? :)

 

 (especially togehter with EOS), would it be possible? iam thinking maybe a simulation on/off swith per item och a seperate array for similated items, i dont know.

Mate you can put whatever classnames you want into the tpw_furniture_items array and use them in your compositions. It sounds like you're after a more military version of the system rather than the civ version, which would obviously have some different requirements (longer spawn distances etc). I hadn't really thought that idea through, but it wouldn't be hard to implement and would definitely liven things up around bases.  Cheers for that.

 

 

2 hours ago, Caluu66x said:

i found a desk thats at an odd angle, not sure how to put a screenshot in here to show u, but its placed in the town of doodstil in one of the buildings that has 4 desks and chairs, like a long building with the blue doors.

If you encounter a dodgy item, can you please hit esc and run in the console

hint str (typeof (nearestbuilding player)) 

That'll give you the building type which you can report to me. Thanks!

 

Share this post


Link to post
Share on other sites
7 hours ago, tpw said:

Repetition: you have a point, but then again it's a problem with every other furnished building in Arma. It'll be trivial to add randomised templates once I have more than 1 for a given building.

 

I'm a newbie, so i do apologize for jumping into the discussion, but that may cause an odd issue.

 

From what i understood, and please correct me if i'm wrong, the script loads in the template when you get close to the building, and then unloads it when you get away from it. Am i wrong?

 

Assuming i'm correct, that random template would cause you to load a template, get away from the building, coming back to it and risk finding a totally different furniture  set the second time around. That could be odd.

 

That might be solved though, if you can identify the building object with an unique id (i don't know the data so i can't be sure one exists, but as a programmer i'd guess it does). You could create a list to associate an uId to a random generated template.

 

Once again, i'm just a newbie, so please forgive if my comment doesn't make much sense. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×