Whitelisted Arsenal

From Savage Game Design Wiki
Revision as of 03:06, 7 May 2021 by Asaayu (talk | contribs)
Jump to navigation Jump to search

Whitelisted Arsenal Module

The whitelisted arsenal module allows the mission creator to limit and restrict the use of items, weapons, uniforms, vests, vehicles, etc based on a predefined whitelist.
The whitelist can be restricted by the units side and/or rank.

The following options are available in the modules 3Den interface,

  • Loadout Template - An array of loadout classes to be used/merged as the master loadout. Loadout classes are defined in the vn_whitelisted_arsenal_loadouts config class either in the config file or mission config file. (Current DLC options: vn_default, uns_default)
  • Rank Whitelist - On/Off toggle that will change how the loadouts limit based on the units rank.
  • Side Accessibility - Restricted/Unrestricted toggle that will change how the loadouts limit based on the units side.
  • Restrictions - (Equipment/Vehicles/Both/None) Drop down that allows the mission creator to select which type of items in the mission should be restricted.
    Equipment restricts items in the arsenal
    Vehicles restricts vehicles in the mission
    Both restricts vehicles and the arsenal
    None disables the module without having to remove it from the mission.

Arsenal whitelisting will restrict players access to randomly select items and will also let players know which of their loadouts contain incompatible items. These loadouts are still loadable but players will be shown a message that will contain information including the items that were not added to the player.
Vehicle whitelisting does not completely restrict players access to a vehicle it will only restrict their ability to get-in to any driver, pilot, co-pilot seat which can pilot/control the vehicle. Helpful if you don't want low-rank players from driving away in your HEMTT.

This module does not need to be synced to anything, but anything that the module is synced to will have an arsenal action added to it. (This does not happen if the module is disabled through the 'none' restriction)

Config file setup
Either in the configFile or missionConfigFile (description.ext) create a class called vn_whitelisted_arsenal_loadouts
Inside this class create another class, the name of this class is the name used in the modules setup.
Add a 'displayname' string child entry into this class with the name of your loadout
Add a 'weapons' array entry each item in this array should follow this format {CLASSNAME,{EAST, WEST, INDEPENDENT, CIVILIAN}} with E/W/I/C referring to the index of the players rank
E.G. 0 = PRIVATE, 1 = CORPORAL. Use -1 to disable the use of the item by any rank on that side.
Follow the above for 'magazines', 'items', 'backpacks', and 'vehicles' arrays.
It is important to remember that an item needs to be in its specific sub-array or else it won't be added to the whitelist correctly.

An example file can be found at 'modules_f_vietnam\cfgwhitelistedarsenal.hpp' feel free to copy that and modify it for your needs.

If you have any questions contact me @ Asaayu#7884 on Discord.