Global Mobilization Furniture Module

From Bohemia Interactive Community
Jump to navigation Jump to search
gm module automaticfurnitrue.jpg

Overview

Global Mobilization introduces the “Automatic Furniture” Module in 3DEN. It allows you to automatically furnish houses in the given area, enabling exact control which houses shall be furnished, and also how “full” of furniture they should be.

Systems (F5) > Other > Systems (F5) > Environment > Automatic Furniture

With the initial release of the Module in GM’s 1.5 Update the module comes ready to support the following structures:

  • All GM Weferlingen buildings
  • All GM Weferlingen winter buildings
  • All Arma 3 Baseline Buildings (Altis and Stratis)
  • All Apex Buildings (Tanoa)
  • All Contact Buildings (Livonia)
  • All Malden Buildings
Arma 3
The module is not bound to any terrain. Custom user made terrains that use these assets will be automatically supported by the Automatic Furniture module.

Modding

The Automatic Furniture Module is extendable with custom assets. To do so, you will require two things:

  1. A list of furniture offsets saved per building
  2. A config addon that extends the module’s list of known assets

Furniture Offset List

The Furniture Offset List is the heart of the module. It describes where and with what orientation each furniture piece is located within a house.

Creating this list is quite labour intensive, but worth the investment.

How to create the list

  1. Start by creating a new empty mission on the Virtual Reality terrain.
  2. Place every house you wish to furnish, space them at least one house’s width apart from each other. More space is better.
  3. Place furniture inside every house
  4. Save the mission
  5. Create a new init.sqf file in that mission
  6. Paste the following contents into that init.sqf:
You will probably want to adjust the classname filter here, also depending on how your houses are set up you may need to adjust the placement vertical offset with some building specific coefficient

sleep 1; _work = []; { _ht = typeOf _x; _item = [_ht];_os = [];_hp = _x; _hd = getDir _x; _fs = nearestObjects [getPosATL _x, ["gm_furniturestatic_euro_80_base","gm_furniture_euro_80_base","gm_object_static_base"], sizeOf _ht, true]; { _c = typeOf _x; _p = _hp worldToModel getPosATL _x; _os pushBack [_c,_p,(getDir _x - _hd)] } forEach _fs; _item pushBack _os;_work pushBack _item; } forEach allmissionobjects "house_f"; copyToClipboard str _work; systemchat "Done";

  1. Preview the mission and wait for the “Done” message
  2. Your Clipboard (Ctrl + V) now contains the Furniture Offset List
  3. Create a new file and call it “yourmod_furniture.sqf”, paste the contents of your clipboard into there
  4. Create a new config addon (We’ll assume you have the basic addon skills to do so)
  5. Add this class to your config, and customize the names and paths to match your addon and generated list.
class gm_furnitureCoordinateLibrary // keep this classname unchanged
{
	class youraddon_yourBuildings
	{
		file = "\your\path\to\furnitureCoordinates.sqf";
	};
};
  1. Copy the offset list SQF file to your addon
  2. Pack the addon.
  3. The Automatic Furniture Module will now be able to deal with your assets.