SPON HoloMap v0.4.0
Copyright (C) 2007-2008 Bil Bas (bil dot bagpuss at gmail dot com / a.k.a. Spooner)
License: GNU Lesser General Public License, version 3
Latest version (and discussion) available at OFPEC or BIS forums
Overview
HoloMap creates a 3D holographic representation of the game world, showing friendly
(blue) and non-friendly (red) vehicles, as well as missiles fired, as blips. Alternatively,
using the @DBO_miniatures addon (included), show vehicles using scale models!
Requires that the SPON Core
be installed in the mission (v0.5.3 or higher).
Both SPON HoloMap and SPON Core are available in two versions:
One is a client-side addon and the other is mission-script-based, which does not require any
addons to be installed on client or server. Both require ArmA 1.14 or higher.
Features
- Creates a 3D holographic representation of the game world, showing
friendly (blue) and non-friendly (red) vehicles, as well as missiles
fired (white), as blips.
- Friendly and/or enemy infantry can be shown on the map if required,
assuming they have radios and GPS, rather than using radar to detect
them. This can be limited to just showing roup leaders, to reduce clutter.
- Automatically renders a 3D map of any island, including ground textures
(grass, urban, rock, sand, etc). Higher ground is given a lighter shade,
in order to improve terrain shape recognition.
- Each HoloMap projector is associated with a nearby or remote sensor
object (such as a radar tower or AWACS plane) and will show a HoloMap
centred on that sensor's position, at least until the sensor is destroyed.
- Any vehicle or object can be made into a jamming device, with a
specific range of effect. If a HoloMap projector or
sensor is inside a jamming zone, then the projector will not show
anything. A jamming zone is clearly marked on any HoloMap that is
outside the jamming zone, but it will hide all blips within the zone.
Jammer vehicles only cause interference when their engine is turned on,
but other jamming objects, such as towers, are always on until they are
destroyed.
- Any vehicle can be given a stealth factor, which reduces the range at
which it can be detected.
- 100% client-side scripts with no broadcasts, so absolutely no effect on
network traffic or server load.
- Optional: By installing Deanosbeano's DBO Miniatures addons, you will see
tiny representations of vehicles, including missile trails and burning
vehicle effects!
Installation (addon version)
- Install the XEH (Extended event handlers) addon by Solus & KillSwitch. (Included)
- Install the latest version of the SPON Core addon and, optionally, the Deanosbeano's DBO Miniatures addon (the latter is included in the distribution).
- Copy the "Addon Version/@SPON_HoloMap" directory into your ArmA directory.
- Add " -mod=@XEH;@SPON_Core;@SPON_HoloMap;@DBO_miniatures;" to your ArmA shortcut target (@DBO_miniatures can be left out if you just want simple "blips").
- If you want to force the SPON HoloMap addon to be loaded in order to play in your mission, just add a "SPON HoloMap: Require" gamelogic with the editor.
Installation (mission-script version)
- Ensure that you have the latest version of SPON Core installed in your
mission (see the README.txt within that package for full installation
instructions).
- Copy the "Scripts\SPON" directory into your mission folder.
- In your init.sqf file (or init.sqs), include the following line:
[] call compile preprocessFileLineNumbers "SPON\HoloMap\initHoloMap.sqf";
- If in doubt, check how it is done in the demo mission and copy that.
Configuration
Creating HoloMap Projectors
Use SPON_Holo_map function to place a HoloMap projector into the world. First
place a "Black Box" to act as the projector (class "Misc01", available to place
in the editor if using SIX EditorUpdate, which is not required to play
the mission!). You can use any object as the projector, of course, but this
is the recommended base object to use.
Parameters:
0: _projector - Projection object to create the HoloMap at [Position: [X, Y, Z]].
1: _sensorFunction - Function that returns the current sensor.
Sensor object acts as centre for detection of land and
vehicles [Code returning an Object].
2: _range - Distance from centre of map to the edge (so the width of the map
display will be _range * 2). Actual maximum range will be greater, since
display is square, not circular [Number: > 0]
3: _verticalMultiplier - Multiplier for all vertical heights. This should
generally be 1 (accurate scaling), but if you want to accentuate
the bumpiness of the terrain and vertical separation of flying
vehicles, then it should be a number higher than 1. If you want an
entirely "flat" map display, then this should be a very low number like
0.00000001. [Number > 0]
4: _side - Side which is shown as a blue blip (all others will be red). Use
sideLogic to make all blips unknown (red) [Side]
Returns: nil.
Examples:
Add this to your init.sqf (or init.sqs):
[holoMap, {radarTower}, 2000, 3, west] call SPON_Holo_map;
(HoloMap will show a static area 4000m in diameter and increase all vertical
distances by a factor of 3).
or
[holoMap, {radarTower}, 5000, 1, west] call SPON_Holo_map;
(HoloMap will show a static area 10000m in diameter and all vertical distances
will be exactly in scale).
or
[holoMap, {awacs}, 1000, 0.00000001, west] call SPON_Holo_map;
(HoloMap will show a moving area, 2000m in diameter which is artificially
flattened into being a 2D map).
Switching between sensors used by a single projector
Use "SPON\HoloMap\switchSensorAction.sqf" action to switch sensors on a projector.
Example:
[holoMapMobileHQ, {mobileHQ1}, 1000, 1, west] call SPON_Holo_map;
mobileHQPC addAction ["Switch to MHQ1", "SPON\HoloMap\switchSensorAction.sqf", [holoMapMobileHQ, {mobileHQ1}], 0, false, true];
mobileHQPC addAction ["Switch to MHQ2", "SPON\HoloMap\switchSensorAction.sqf", [holoMapMobileHQ, {mobileHQ2}], 0, false, true];
mobileHQPC addAction ["Switch to MHQ3", "SPON\HoloMap\switchSensorAction.sqf", [holoMapMobileHQ, {mobileHQ3}], 0, false, true];
Jamming
// SPON_Holo_setJammingRange
//
// Description:
// Make an object into a jamming device. If this is a vehicle, then jamming
// will be "on" all the time the engine is on. A static object, such as a
// radar tower, will always be jamming. Jamming completely disrupts all HoloMap
// projectors and sensors in range and hides all blips within that range.
//
// Parameters:
// 0: _jammer - Vehicle or static object to act as a jammer [Object]
// 1: _range - Range of interference [Number: > 0]
Stealth
// SPON_Holo_setStealth
//
// Description:
// Sets stealth factor of a vehicle.
//
// Parameters:
// 0: _vehicle - Vehicle to give stealth to [Vehicle]
// 1: _factor - Amount by which detection range is reduced. If 0, then no
// stealth at all(normal detection). If 0.4, then detected at 60% of normal
// range. If 1.0, then never detected. [Number: 0.0 <= value <= 1.0]
//
// Returns:
// _factor.
// SPON_Holo_getStealth
//
// Description:
// Gets the stealth factor of a vehicle.
//
// Parameters:
// 0: _vehicle - Vehicle to get stealth from [Vehicle]
//
// Returns:
// _factor [Number: 0.0 <= value <= 1.0]
Global Variables
A number of global variables can be modified to affect all HoloMaps (names shown
with initial values):
// Vehicles
SPON_Holo_useMiniatures = true; // Will use miniatures if available, else just use regular blips.
// Infantry.
SPON_Holo_showInfantry = true; // Show infantry on map.
SPON_Holo_showEnemyInfantry = false; // Show enemy, as well as friendly infantry (ignored unless SPON_Holo_showInfantry is true)
SPON_Holo_showNonGroupLeadersInfantry = false; // Shows all infantry, not just group leaders (ignored unless SPON_Holo_showInfantry is true)
// Terrain
SPON_Holo_showTerrain = true; // Render 3D terrain as well as blips.
SPON_Holo_showTextures = true; // Show ground textures on the terrain (urban, sand, grass) (Ignored unless SPON_Holo_showTerrain is true).
SPON_Holo_minHeight = 0; // Base height to render terrain. This is the effective height of the top of the projector box (set this higher than 0 for high altitude maps).
SPON_Holo_maxHeight = 800; // Height to show as maximum lightless (heights above this will all be the same shade, so hard to see the shape).
SPON_Holo_showSea = false; // Render the sea (costs FPS for little utility, so advised not to use it unless only one HoloMap is visible at a time).
Making your own miniatures
Miniature models should be configured as seagulls (see DBO_miniatures for example config).
Ideally, they should have a single LOD with a low polycount and not having geometry.
If your vehicle class has the string, "SPON_Holo_miniature" defined, then that class
will be used as the miniature. Without this string in the vehicle class,
a default miniature will be used.
Limitations and Known Issues
- (With DBO_miniatures) Only a small number of vehicle
miniatures will be shown (currently only the RHIB, Cobra, HMMWV, KA50 and
Harrier are implemented). All other vehicles will default to one of these models.
- (With DBO_miniatures) Vehicle miniatures will only be shown on a single HoloMap at a
time [Just make sure your displays are more than 10m apart if their
areas overlap or make sure that they don't overlap if you want
more than one].
- (With DBO_miniatures) The current version of vehicle miniatures uses a
unnecessarily high LOD, so if you have more than a few miniatures
visible at a time, then FPS will be very badly affected.
- All vehicles and missiles within range are shown on the map, regardless of
line-of-sight from the HoloMap sensor [Not sure I can do decent LOS
calculations for a large number of objects, especially when using
long-range sensors].
- FPS is affected most by the amount of terrain drawn on the HoloMap
(or HoloMaps). The best FPS will be for HoloMaps that show a lot of sea
[e.g. Ramadi range of 2000+ and Sahrani range of 10000+ are quite fast].
- Can't manually control jamming devices (other than to turn a vehicle's
engine on or off).
- Sensors actually detect in cubes, not spheres, so they have up to 1.41
times greater range in the corners! Jammers operate in a vertical cylinder
rather than a sphere
[Both simplifications are to make the map easier to understand, since neither are realistic].
- Sensors can detect objects directly behind a jammer [True
line-of-sight calculations for this special case are probably not worth the effort].
Compatibility
- SP: Yes.
- Teamswitch: Yes.
- MP: Yes.
- MP JIP: Yes.
Plans
- Deployable/Stowable HoloMap inside mobile HQ.
- Manually turn on/off jamming.
- Simple dialog to switch sensors (rather than action list).
- Size of target to affect detection (rather than just to affect size of
blip).
Design Aims
- Improve command and control by giving commanders a shared 3D
representation of the battlefield.
- Create a reasonably realistic radar system, in order to add new tactical
dimensions to the game.
- Avoid reliance on addons, in favour of scripting, as far as possible.
Addon and 100% mission-scripts versions available!
Credits
- BIG THANKS go out to Deanosbeano for resizing and configuring the miniature vehicles (@DBO_miniatures).
- BIS for the original models that were used to create the miniatures.
- Q for testing and feedback.
- Demo mission and addon pbo files created with cpbo by Keygetys.
- Thanks to Solus for allowing me to include the XEH addon in the release
(and, of course, for making the great addon in the first place!)
Change Log
v0.4.0
Added
- Ground textures shown on terrain (grass, urban, rock, sand, etc).
- Ranging rings shown on terrain.
- Infantry can now be detected if required.
- Any projector can be associated with any nearby or remote sensor (such
as a radar tower, mobile HQ or AWACS plane) and will show a HoloMap centred on that
sensor's position, at least until the sensor is destroyed.
- A projector's sensor can be switched in-game, for example using an
action.
- Any vehicle or object can be made into a jamming device, with a
specific range.
- Any vehicle can be given a stealth factor, which reduces the range at
which it can be detected.
Modified
- Demo mission moved to Sahrani, so as to better showcase the script.
- (With Miniatures) All vehicles now shown as a tiny model. However,
most will default to a generic vehicle type rather than being
representative (e.g. all land vehicles, regardless of side, size or type,
default to a humvee miniature!)
Removed
- No longer uses the Blue Box from DBO_miniatures.
Fixed
- Only those players who start within 10m of the HoloMap will EVER be able
to see anything on it (this allows for staff officers to see it, but not to
unnecessarily update it for the regular army soldiers).
- If a vehicle exists beyond the edge of the zone covered by the HoloMap,
it will still be represented on the map, though placed outside the
"projector area", floating in mid-air.
- There can only EVER be one HoloMap in the mission.
- FPS spike when redrawing terrain.
- HoloMap rendered regardless of player's proximity to the projector unit.
- The information displayed is appropriate to the observer, not to the
projector (thus, you can't look at an enemy projector and get
any different information from it than you could from your own).
v0.3.0
First public release.