DayZ
Not enough ratings
Mounts & Sights Setup
By Akol
Class names, types XML and spawnabletypes XML examples.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Setting up this mod is similar to setting up any other mod (files, keys, launch parameters, types, etc.). However, this guide will also provide some additional guidance from a design perspective.

If you just want to spawn the items to check them out, make sure to check the "Important Notice" section of this guide.

You can also go directly to the Files section to access class names and XML examples. You'll find the essential instructions as comments within those files. Don’t forget to back up your current files before making any changes.

If you plan to also have Advanced Weapon Scopes it is recommended to check the "AWS Compatibility (optional)" section as well.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3322252091
Types
It is suggested to configure the server to spawn the new scopes, the AK mount, and the Mosin mount via the types XML, while spawning the other mounts directly attached to the weapons through the spawnabletypes XML. This strategy creates a loot progression similar to what players are already accustomed to in mods like Advanced Weapon Scopes (AWS).

Using the spawnabletypes XML to spawn certain mounts directly onto their compatible weapons is relevant because:
  • It prevents the mounts from spawning separately in the world, potentially taking the spawn spot of another item.
  • Having to figure out which mount is compatible with which weapon and having to search for that mount could be too complex for the targeted server experience. Therefore, spawning mounts directly with the weapons spares players from that challenge.

A multitude of configurations can be valid, depending on the targeted server style. Nevertheless, the relevant XML files, set up according to the initial suggestion, are provided as a reference or starting point for a safe configuration.
Files

Hint: at the bottom of the spawnabletypes example file, you'll find an example for the special case of spawning mounts with sights.
Important Notice
When using admin tools to spawn items specifically from this mod:
  • Do not use the auto attachments feature. The option to disable this feature is usually in the same UI window that allows you to spawn items.
  • To spawn a mount, you should spawn the class that has the _NoAttachment suffix. Ex.: Akol_MosinMount_NoAttachment.
  • If you want to have a mount with attached sights: first spawn the mount, secondly spawn the sights separately and just then combine them.
Note that spawning items with admin tools is not related to spawning items through the server's vanilla Central Economy methods (such as types XML, spawnabletypes XML, etc).
Troubleshooting
Problem
Solution
Server won't load the mod.
Try renaming the mod's folder from "Mounts & Sights" to "Mounts And Sights". Remember to update the mod list launch parameter (-mods="...") accordingly. This is mandatory for servers running on Nitrado.
Mounts not working after spawning them with the admin tools.
Please read the "Important Notice" section above.
Mounts or sights disappearing after server restart.
Make sure to add the types to the types XML. The types are available in the "Files" section above.
AWS Compatibility (optional)
The compatibility mod is not required, but recommended if you plan to run Advanced Weapon Scopes (AWS) and Mounts & Sights (M&S) in the same server. It unlocks the possibility to combine the scopes from AWS with the mounts of M&S.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3322263460
Do not spawn the following AWS items:
AD_MosinMount AD_B13Mount
It is suggested to not spawn the following AWS items:
AD_XPS34 AD_XPS34_HHS AD_Pilad AD_PVS4 AD_MRS AD_OKP7

The files below do not include the AWS types themselves; they only include the types needed to make M&S compatible with AWS. Therefore, if you haven't set up AWS yet, you will need to do that as well.


Note that M&S item names start with "Akol", the AWS ones start with "AD", and the items that are a combination of M&S and AWS start with "Akol_AD".