Author: phronk
Author Website:

Requirements: No addons required

Version: 0.6

Short description: This is a script which dynamically spawns furniture in random houses when a player enters the town it's associated with. The furniture despawns when the player(s) in that town leave.

Date: 2018-03-07 13:14


Comments: (3)
Rating:



 



Phronk's Furniture

by
phronk


Description:
This is a script which dynamically spawns furniture in random houses when a player enters the town it's associated with. The furniture despawns when the player(s) in that town leave. Easy to setup!


Features:
No mods required!
No DLCs required!
Compatible with all maps which use buildings from Altis, Malden, and Stratis
Compatible with single-player, client-hosted, and dedicated servers
Nearly no performance impact
Spawns furniture in random houses within town, when player enters it
Furniture layouts are built with AI pathing / buildingPositons in mind
Despawns the furniture when there are no players within that town
Includes an easy to configure script file


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Known issues:
Bug free!


Future plans:
Fix all known bugs
Include support for Tanoa buildings
Include support for CUP buildings
Create up to 5 possible furniture layouts for each individual unique building


Credits & Thanks:
Phronk: Script Creator
Bohemia Interactive: Furniture models, textures, configs, and BIS_fnc

TESTERS
Chaser [ATCAG]
Sjakal


Changelog:
0.6
Size: 180 KB
Added: New furniture layout for Land_i_Addon_03_V1_F
Added: New furniture layout for Land_Slum_House01_F
Added: New furniture layout for Land_Slum_House02_F
Added: New furniture layout for Land_Slum_House03_F
Added: New furniture layout for Land_Shed_02_F
Added: New furniture layout for Land_House_Big_01_F
Added: New setting in 'CFG.sqf' to toggle "Optimization Mode"
Added: Playable unit to player's group in demo mission for MP testing
Tweaked: Invisible helipads on each building have a PF variable set on them
Tweaked: Enabled simulation for invisible helipads on each building
Fixed: Furniture wouldn't rotate on dedicated servers
Fixed: Only 2 of the 6 supported Tanoa houses would actually spawn furniture
Fixed: Invisible helipads not spawned by furniture script could get deleted
Fixed: Sofa objects were mixed up in Land_i_House_Small_02_V1_F
Fixed: Missing bucket object script error, in h1_4.sqf
Fixed: Tanoa furniture script h1_1 incorrectly defined _H variable
Fixed: Some floating furniture
Optimized: Reduced sleep delays to .2 seconds, down from 1 second
Optimized: Removed _blanket variable which selectRandom'd array
Removed: N/A

v0.5
ADDITIONS:

• Added: Furniture layout for 6 unique Tanoa houses
• Added: New furniture layout for Land_i_House_Small_02_V1_F
• Added: New furniture layout for Land_i_Addon_02_V1_F

• Added: New setting to blacklist specific locations, in the CFG.sqf

• Added: New setting to blacklist specific building classnames, in the CFG.sqf

• Added: New unhide function which unhides furniture within 150m of player

• Added: Code now repositions/resizes some map specific locations (WIP)



ADJUSTMENTS:

• Tweaked: Increased furniture spawn chance setting to 75%, up from 50%

• Tweaked: Added more furniture to a couple houses which still felt too empty

• Tweaked: Slightly moved some furniture to be less intrusive in a couple houses

• Tweaked: Wooden table in Land_i_Stone_HouseBig_V1_F is now larger

• Tweaked: Replaced getPosATL with getPosASL in some instances



FIXES:
• Fixed: Blacklist markers system

• Fixed: Fireplaces wouldn't despawn upon trigger deactivation

• Fixed: Some triggers/markers which spawned in water didn't behave correctly



OPTIMIZATIONS:

• Optimized: Furniture is hidden globally after spawning

• Optimized: Furniture is revealed to client when he is within 150m of furniture

• Optimized: Replaced some forEach commands with count

• Optimized: Renamed _tempH variable to _H, in spawn.sqf

• Optimized: Renamed _house variable to _B, in spawn.sqf

• Optimized: Renamed _house variable to _H, in furniture scripts

• Optimized: Code no longer pointlessly checks for location types

• Optimized: Removed useless _housePos variable from garage layout script



REMOVALS:

• Removed: Useless array of location types

• Removed: Redundant _townType check / variable

0.4
Size: 124 KB

ADDITIONS:
• Added: New setting to adjust % chance for furniture to spawn per house
• Added: Electronics store furniture layout for one of the Altis shops
• Added: Script now supports all A3 location types
• Added: Script now supports all A2 location types
• Added: MissionEventHandler to delete furniture in ruined houses

ADJUSTMENTS:
• Changed: Rewrote location finder code:
+ Trigger/marker size scales with town size
+ Trigger/marker angle taken into account
• Changed: Trigger deactivation deletes objects attached to invisible helipads
• Changed: Color of debug markers to ColorCiv, from ColorWest
• Tweaked: Merged Arma 2 location types with Arma 3 location types
• Tweaked: Increased trigger's max elevation activation to 99m, up from 0m
• Tweaked: Disabled simulation of invisible helipads on houses, instead of deleted
• Tweaked: Reduced damage check of buildings to 0.6, down from 0.9

FIXES:
• Fixed: Overlapping triggers could cause furniture to spawn more than once
• Fixed: Blacklisted markers system
• Fixed: All buildings in trigger would spawn an invisible helipad
• Fixed: Trigger deactivation should no longer delete loot
• Fixed: Locations with 0 PF supported houses in them no longer spawn a trigger
• Fixed: A specific house type did not have its functions initialized
• Fixed: Undefined variable reference for bucket object caused a script error
• Fixed: Undefined variable reference for radio object caused a script error
• Fixed: Undefined variable reference for table object caused a script error
• Fixed: Tanoa flag paths were defined incorrectly
• Fixed: Reduced sleep delays to help fix the delayed object rotation issues
• Fixed: Removed most sleep delays to help fix the delayed object rotation issues

OPTIMIZATIONS:
• Optimized: Script initialization (Thanks to Metalman10)
• Optimized: All instances of the createVehicle[] command now use "can_collide"
• Optimized: Invisible helipads are created only on buildings with furniture
• Optimized: Trigger calls code for PF supported houses only
• Optimized: Trigger deactivation deletes a couple specific objects
• Optimized: Triggers are only created in locations with PF supported houses
• Optimized: Blacklist marker code
• Optimized: Replaced BIS_fnc_inTrigger, with inArea
• Optimized: Significantly reduced script delays
• Optimized: Naming of furniture trigger markers
• Optimized: HelipadEmpty is created on the house's position, instead of setPos
• Optimized: Replaced a couple forEach commands, with count
• Optimized: Removed some unneeded occurrences of the setDir command

v0.3
Fixed: Objects in blacklisted markers are no longer deleted upon trigger deactivation
Fixed: Incorrect classname reference caused an invisible sack
Fixed: Incorrect classname reference caused an invisible flag
Fixed: Incorrect classname reference caused an invisible plastic table

v0.2
Fixed: Incorrect classname reference caused an invisible desk
Optimized: Blacklist code is more efficient
Optimized: If PF_Blacklist = [] or [""], the script will skip blacklist code

v0.1


Forum topic:
- BI forums


Steam Workshop:
- Subscribe




Enable javascript to be able to download from Armaholic please!



Tags: Script,   Roleplay,   Ambient,   Spawn,   Furniture