Adding AK-107 to attachment system, loot, trader

This adds 6 AK-107 versions to the dayz attachment system. There is no SD version at the moment.

The RPK-74 magazine could only be used with the AK-74 SD. This was unintentional. All AK-74 versions support the RPK-74 magazine now.

The RPK-74 and the AK-74 magazine description needed a few adjustments.
This commit is contained in:
A Man
2019-10-23 09:25:20 +02:00
parent ba8ff32cd7
commit 82485ea0c6
9 changed files with 278 additions and 6 deletions

View File

@@ -74,6 +74,7 @@ assaultrifles[] = {
{Loot_WEAPON, 0.1, AKS_GOLD},
{Loot_WEAPON, 0.5, AKM_DZ}, //AK_47_M
{Loot_WEAPON, 0.5, AK74_DZ}, //AK_74
{Loot_WEAPON, 0.5, AK107_DZ}, //AK_107
{Loot_WEAPON, 0.3, FNFAL_DZ}, //FN_FAL
{Loot_WEAPON, 0.1, FN_FAL_ANPVS4_DZE}, //FNFAL_ANPVS4_DZ is NV only _DZE is toggleable
{Loot_WEAPON, 0.5, G36A_Camo_DZ}, //G36A_camo

View File

@@ -769,6 +769,36 @@ class Category_485 {
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {1,"ItemGoldBar10oz"};
};
class AK107_DZ {
type = "trade_weapons";
buy[] = {2,"ItemGoldBar"};
sell[] = {1,"ItemGoldBar"};
};
class AK107_Kobra_DZ {
type = "trade_weapons";
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {3,"ItemGoldBar"};
};
class AK107_PSO1_DZ {
type = "trade_weapons";
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {5,"ItemGoldBar"};
};
class AK107_GL_DZ {
type = "trade_weapons";
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {3,"ItemGoldBar"};
};
class AK107_GL_Kobra_DZ {
type = "trade_weapons";
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {5,"ItemGoldBar"};
};
class AK107_GL_PSO1_DZ {
type = "trade_weapons";
buy[] = {-1,"ItemGoldBar"}; // Sell only
sell[] = {7,"ItemGoldBar"};
};
class FNFAL_DZ {
type = "trade_weapons";
buy[] = {8,"ItemGoldBar"};

View File

@@ -29,6 +29,8 @@ class CfgWeapons
#include "Weapon\Sniper\M4SPR.hpp"
#include "Weapon\Sniper\VSSVintorez.hpp"
//Ak107
#include "Weapon\Assault\AK107.hpp"
//each include is preceded by its required external references.

View File

@@ -5,13 +5,14 @@ class AK74_Kobra_DZ : AK_74
model = "z\addons\dayz_communityweapons\ak74\ak74_kobra.p3d";
picture = "\z\addons\dayz_communityweapons\ak74\data\w_ak74_kobra_ca.paa";
displayName = $STR_DZ_WPN_AK74_KOBRA_NAME;
/* //Allow default A2 mags
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
*/
class Attachments
{
Attachment_GP25 = "AK74_GL_Kobra_DZ";

View File

@@ -7,7 +7,8 @@ class AKS74U_Kobra_DZ : AKS_74_U
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments
@@ -34,7 +35,8 @@ class AKS74U_Kobra_SD_DZ : AKS_74_UN_kobra
magazines[] =
{
30Rnd_545x39_AKSD,
30Rnd_545x39_AK //Allow both SD and non-SD
30Rnd_545x39_AK, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class ItemActions

View File

@@ -0,0 +1,157 @@
class AK_107_kobra;
class AK107_Kobra_DZ : AK_107_kobra
{
displayName = $STR_DZ_WPN_AK107_KOBRA_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments
{
Attachment_GP25 = "AK107_GL_Kobra_DZ";
};
class ItemActions
{
class RemoveKobra
{
text = $STR_DZ_ATT_KOBRA_RMVE;
script = "; ['Attachment_Kobra',_id,'AK107_DZ'] call player_removeAttachment";
};
};
};
class AK_107_CP;
class AK107_DZ : AK_107_CP
{
displayName = $STR_DZ_WPN_AK107_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments
{
Attachment_Kobra = "AK107_Kobra_DZ";
Attachment_PSO1 = "AK107_PSO_DZ";
Attachment_GP25 = "AK107_GL_DZ";
};
class ItemActions {};
};
class AK_107_GL_CP;
class AK107_GL_DZ : AK_107_GL_CP
{
displayName = $STR_DZ_WPN_AK107_GL_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments
{
Attachment_Kobra = "AK107_GL_Kobra_DZ";
Attachment_PSO1 = "AK107_GL_PSO_DZ";
};
class ItemActions
{
class RemoveGL
{
text = $STR_DZ_ATT_GP25_RMVE;
script = "; ['Attachment_GP25',_id,'AK107_DZ'] call player_removeAttachment";
};
};
};
class AK_107_pso;
class AK107_PSO_DZ : AK_107_pso
{
displayName = $STR_DZ_WPN_AK107_PSO1_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments
{
Attachment_GP25 = "AK107_GL_PSO_DZ";
};
class ItemActions
{
class RemovePSO1
{
text = $STR_DZ_ATT_PSO1_RMVE;
script = "; ['Attachment_PSO1',_id,'AK107_DZ'] call player_removeAttachment";
};
};
};
class AK_107_GL_pso;
class AK107_GL_PSO_DZ : AK_107_GL_pso
{
displayName = $STR_DZ_WPN_AK107_GL_PSO1_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments {};
class ItemActions
{
class RemovePSO1
{
text = $STR_DZ_ATT_PSO1_RMVE;
script = "; ['Attachment_PSO1',_id,'AK107_GL_DZ'] call player_removeAttachment";
};
class RemoveGL
{
text = $STR_DZ_ATT_GP25_RMVE;
script = "; ['Attachment_GP25',_id,'AK107_PSO_DZ'] call player_removeAttachment";
};
};
};
class AK_107_GL_kobra;
class AK107_GL_Kobra_DZ : AK_107_GL_kobra
{
displayName = $STR_DZ_WPN_AK107_GL_KOBRA_NAME;
magazines[] =
{
30Rnd_545x39_AK,
30Rnd_545x39_AKSD, //Allow both SD and non-SD
75Rnd_545x39_RPK
};
class Attachments {};
class ItemActions
{
class RemoveKobra
{
text = $STR_DZ_ATT_KOBRA_RMVE;
script = "; ['Attachment_Kobra',_id,'AK107_GL_DZ'] call player_removeAttachment";
};
class RemoveGL
{
text = $STR_DZ_ATT_GP25_RMVE;
script = "; ['Attachment_GP25',_id,'AK107_Kobra_DZ'] call player_removeAttachment";
};
};
};