Skip to content

DEV Map Editing And Porting

Saveliy Tronza edited this page Apr 2, 2021 · 6 revisions

How To Port Or Modify Maps For Vindicta

1 Setup

Check here how to add new maps: https://github.com/Sparker95/Vindicta/wiki/DEV-Setup#adding-new-maps

2 Setting Up Location Sectors Modules

Location sectors are locations, like: Cities, outposts, bases, airfields, and roadblocks. You should create some of all of those to make a good Vindicta map. Roadblocks are procedurally created or player-created, they are not placed in the editor. The outline of a location sector is the area in which a player's Undercover UI will show the message "Military Area".

Look at existing maps, like Altis, to see how location sectors are set up.

NOTE: Location sectors are part of the Vindicta addon, so you need to have it loaded to be able to place and edit them in the editor.


What the location sector edit window looks like for a city.

Ignore all settings except for:

  • Name: Name that will be displayed on the map GUI. Cities do not display a name as it is already drawn on the map by default, but you should still add it for debugging purposes.
  • Type: City, Airport, Outpost, Base

Roadblocks should not be used in location sector modules.

3 Player Spawn Point

The template mission.sqm has one invisible spawn point. Locate it in the editor in the entity list on the left. This spawn point should be placed somewhere far away. It is used for our custom respawn screen.

NOTE: You can temporarily make the spawn point marker visible by double clicking it in the entity list to turn up the alpha value. You should set the alpha back to 0 after you're done, so that it does not show in the final mission.

4 Allowed Areas

Allowed areas are invisible markers that create an area that allows players to pass close to an outpost without being overt. They essentially "subtract" from the location sector's area when there is no other solution.

To work, the center of an allowed area (1: circled in blue) needs to be inside the location sector's area (2: outlined in red). The name of the marker must match pattern allowedarea*, where * means any string (allowedarea_1, allowedarea_airport_main_123, ...). We use them when a location sector's shape can not be changed to not encompass a nearby road, if that road should not be part of the outpost/base/airfield.

Use them whenever the default shapes of a location sector do not allow you to create an "incognito" area for players to pass through. For example, if a road should reasonably be "public" and not part of a military base or outpost.

5 Placing Spawn Points

Spawning of some objects can be customized to provide more consistent or realistic behaviour.
This is done by placing certain object types on the map to mark positions.
These objects must be within the location border. Those outside will be ignored and will just appear in game as objects.

Ammo Boxes

Huron Cargo Container (B_Slingload_01_Cargo_F) (circled in red below) marks spawn points for ammo boxes.
image

Ground Vehicles

HEMTT Transport (B_Truck_01_transport_F) marks spawn points for ground vehicles.
image

Helicopters

Helipads mark spawn points for helicopters. Stick to the non-specialized ones in general.
Helipads that are part of the base map will be used automatically, so additional ones may not be necessary.
You should probably aim to have 4 or so for a main airfield, and 1-3 for auxiliary ones.
Valid helipads are Land_HelipadCircle_F, Land_HelipadCivil_F, Land_HelipadEmpty_F, Land_HelipadRescue_F, Land_HelipadSquare_F.
image

Boats in cities

Motorboat (C_Boat_Civil_01_F) marks spawn positions for civilian boats. This works only in cities now. NOTE that you should rather specify boat spawn positions for pier objects. That's how it is implemented for most of the maps.

Static Weapons

Static Weapons will spawn in certain predefined building positions, however it may be desirable to specify positions on the ground as well.
The XM312 (B_HMG_01_F) and XM312 (High) (B_HMG_01_high_F) mark spawn points for static weapons.
image

6 Placing Custom Patrol Routes

  1. Place a AAF Rifleman (I_Soldier_F) inside a location area
    image
  2. Disable special state on them like so (NOTE: Show Model must be ticked unlike in the screenshot):
    image
    Specifically you are disabling simulation so they don't move when the mission starts, before they are processed.
  3. Give them a patrol route using move waypoints:
    image

Notes:

  • Make sure each patrol route unit is in a separate group (they should be in their own group with no other units).
  • The starting unit must be within the location area, however the patrol waypoints need not be. Avoid waypoints that go too far from the location though it could cause the patrolling units to spawn in late when players approach the location. As a guide, stay within 250m from the location border edge.

7 Placing Ambient Actions

AI will perform ambient actions at locations when the are idle, or relaxing. When they switch to defensive postures they will not do them at all.

Shooting Range

For automatic shooting range, place any of these targets down, with 35m of space in front of it:
image

TargetP_Inf_F
TargetP_Inf_Acc2_F
TargetP_Inf_Acc1_F
TargetP_Inf2_F
TargetP_Inf2_Acc2_F
TargetP_Inf2_Acc1_F
TargetP_Inf3_F
TargetP_Inf3_Acc2_F
TargetP_Inf3_Acc1_F
TargetP_Inf4_F
TargetP_Inf4_Acc2_F
TargetP_Inf4_Acc1_F
TargetP_HVT1_F
TargetP_HVT2_F
Target_F
Land_Target_Oval_F

Alternatively, to make any object into a shooting range target, add this to the init field:
this setVariable ['vin_target_range', [-30,0]];
The numbers represent the position to shoot from, as distance and direction relative to the target model. You can determine these by looking at the translate widget while in local transform mode:
image
The green arrow points in positive distance, at 0 direction. So in the case of the image above an appropriate shooting position is either negative distance and 0 direction, or positive distance and 180 direction. Put another way: if you set the vin_target_range to [1, 0], the green arrow would point towards the shooter, if you used [-1,0] the green arrow points in the direction the shooter is shooting.

Ambient Animations

These define locations with associated ambient animations that soldiers can perform while they are in idle or relaxing state. Objects can be pre-registered with a set of markers and ambient animations so that it is enough to just place the object, and nothing more.
The current list (as of 5/4/2020) is:

Campfire_burning_F
FirePlace_burning_F
Land_Airport_Tower_F
Land_ArmChair_01_F
Land_Bench_01_F
Land_Bench_02_F
Land_Bench_03_F
Land_Bench_04_F
Land_Bench_05_F
Land_Campfire_F
Land_CampingChair_V1_F
Land_CampingChair_V2_F
Land_CampingChair_V2_white_F
Land_CampingChair_V2_white_F
Land_Cargo_HQ_V1_F
Land_Cargo_HQ_V2_F
Land_Cargo_HQ_V3_F
Land_Cargo_Patrol_V1_F
Land_Cargo_Patrol_V2_F
Land_Cargo_Patrol_V3_F
Land_Cargo_Tower_V1_F
Land_Cargo_Tower_V2_F
Land_Cargo_Tower_V3_F
Land_ChairPlastic_F
Land_ChairWood_F
Land_Dome_Big_F
Land_FieldToilet_F
Land_FirePlace_F
Land_GymBench_01_F
Land_Hangar_F
Land_HBarrierWall_corner_F
Land_HBarrierWall4_F
Land_HBarrierWall6_F
Land_i_Barracks_V1_F
Land_i_Barracks_V2_F
Land_Medevac_HQ_V1_F
Land_MedicalTent_01_aaf_generic_closed_F
Land_MedicalTent_01_aaf_generic_open_F
Land_MedicalTent_01_digital_closed_F
Land_MilOffices_V1_F
Land_OfficeChair_01_F
Land_PicnicTable_01_F
Land_Radar_F
Land_Radar_Small_F
Land_RattanChair_01_F
Land_Sink_F
Land_Sleeping_bag_blue_F
Land_Sleeping_bag_brown_F
Land_Sleeping_bag_F
Land_Sun_chair_F
Land_Sun_chair_green_F
Land_TBox_F
Land_TentA_F
Land_TentDome_F
Land_TentHangar_V1_F
Land_ToiletBox_F
Land_u_Barracks_V2_F
Land_WoodenTable_02_large_F

image

To define specific soldier positions and animations you can do this: WARNING: this is a WIP feature and doesn't work right now. Ambient animations defined by objects mentioned above work however.

  1. Enable 3den Enhanced mod (warning: this can bloat the sqm size significantly, it isn't confirmed if the animations remain after you remove the mod and resave)
  2. Place an AAF Autorifleman (I_soldier_AR_F) inside a location area
  3. Disable special states (NOTE: Show Model must be ticked unlike in the screenshot):
    image
    Specifically you are disabling simulation so they don't move when the mission starts, before they are processed.
  4. Set Animation under Object: States:
    image
    Any idle unit can now go to this position and play the specified animation.
    image

8 Adding Police Stations

TODO

Some maps have buildings that do not already have spawn points for ammo boxes. These are required for police stations. You can not place Huron Cargo Containers here, because police stations are generated automatically in buildings defined in templates.

This code can be used to get cylindrical coordinates for ammo box spawnpoints:

// Code to get the coordinates in cylindrical form
_b = gBuilding;
_o = cursorObject;
_bPos = getPosATL _b;
_oPos = getPosATL _o;
_dirRel = (_bPos getDir _oPos) - (direction _b);
_zRel = _oPos#2 - _bPos#2;
_distRel = _bPos distance2D _oPos;
[_distRel, _dirRel, _zRel]

9 Important Notes

  • Save the scenario as text not binary. Git doesn't handle binary objects as well as text.
  • Make sure vehicles can quickly reach roads. Place them so that a 3 year-old without hands would be able to drive the vehicle to the road without looking. The AI will otherwise get stuck.
  • Do not block roads if you place objects like H-Barriers, walls or cargo posts. It is best to leave a good border around roads as well.
  • Spawn points for static weapons are created automatically on large military cargo towers and military cargo posts.
  • Place at least two Huron Cargo Containers per outpost, base, or airport; preferably more.
  • Right now you should have at least one airport per map, as the enemy can only get reinforcements through airports.

10 Additional Notes

  • The Altis map's allowedareas are all named "Syrta Checkpoint". Ignore that. The name field is unused.