|
| 1 | +//This is being used as a tutorial piece for how to convert guns to modguns, hence the extremely gratutious comments |
| 2 | +//comments can be removed later/when it's merged |
| 3 | + |
| 4 | +/obj/item/gun/projectile/automatic/modular/drozd // Frame |
| 5 | + //only put the base name of the gun here. Other info will be filled in by parts. |
| 6 | + name = "\"Drozd\"" |
| 7 | + //remove any information about the specific caliber of the gun. Stat qualities (like dmg, recoil mod) are fine. |
| 8 | + desc = "An excellent fully automatic Heavy SMG. Rifled to take a larger caliber than a typical submachine gun, but unlike \ |
| 9 | + other heavy SMGs makes use of increased caliber to achieve excellent damage capabilities. \ |
| 10 | + Suffers a bit less from poor recoil control and ineffective armor penetration." |
| 11 | + //new .dmi location, inside the projectile/modular file. |
| 12 | + icon = 'icons/obj/guns/projectile/modular/drozd.dmi' |
| 13 | + |
| 14 | + //copy these stats from base gun |
| 15 | + w_class = ITEM_SIZE_NORMAL |
| 16 | + force = WEAPON_FORCE_PAINFUL |
| 17 | + |
| 18 | + slot_flags = SLOT_BELT |
| 19 | + load_method = MAGAZINE |
| 20 | + |
| 21 | + magazine_type = /obj/item/ammo_magazine/msmg |
| 22 | + gun_tags = list(GUN_SILENCABLE) |
| 23 | + |
| 24 | + serial_type = "Excelsior" |
| 25 | + |
| 26 | + //need this if the og gun has it, in this case, do not add. |
| 27 | + //auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg' |
| 28 | + //auto_eject = TRUE |
| 29 | + |
| 30 | + // Spawns in gun part loot |
| 31 | + spawn_blacklisted = FALSE |
| 32 | + spawn_tags = SPAWN_TAG_GUN_PART |
| 33 | + |
| 34 | + //nerf from base gun. Since this is only a frame. |
| 35 | + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 1) |
| 36 | + matter = list(MATERIAL_PLASTEEL = 5) |
| 37 | + price_tag = 1200 |
| 38 | + |
| 39 | + //take from gun type. Though, since this is a high caliber smg, it could also use heavier ones. |
| 40 | + //somewhat up to your discretion imo |
| 41 | + fire_sound = 'sound/weapons/guns/fire/smg_fire.ogg' |
| 42 | + unload_sound = 'sound/weapons/guns/interact/smg_magout.ogg' |
| 43 | + reload_sound = 'sound/weapons/guns/interact/smg_magin.ogg' |
| 44 | + cocked_sound = 'sound/weapons/guns/interact/smg_cock.ogg' |
| 45 | + |
| 46 | + //these vars contains information about the gun's sprite |
| 47 | + spriteTags = PARTMOD_SLIDE //this gun has a slide, meaning that sprites have a "-e" variant with the slide pulled back |
| 48 | + spriteTagBans = PARTMOD_FOLDING_STOCK // Folding stock does not modify handheld sprite |
| 49 | + |
| 50 | + //special stats associated with the gun. copy from base firearm, within reason |
| 51 | + //also see the parts of the gun |
| 52 | + init_recoil = SMG_RECOIL(0.7) |
| 53 | + |
| 54 | + //The required parts of a firearm are as follows: |
| 55 | + |
| 56 | + //ESSENTIAL PARTS: All guns MUST have these |
| 57 | + //-Grip: determines the base skin of the firearm, and its name. Largely cosmetic. |
| 58 | + //-Mechanism: Determines which calibers a gun can fire. often effects stats. |
| 59 | + //-Barrel: Determines which specific caliber this gun can -currently- fire. sometimes effects stats. |
| 60 | + |
| 61 | + //OPTIONAL PARTS: Guns MAY support these depending on type/size (eventually, most guns larger than a pistol should support them) |
| 62 | + //-Stock: When extended, increases the stability/handling of the gun when two-handed. |
| 63 | + //-Sights: Allows the gun to scope in. |
| 64 | + //-Bayonet: Increases the melee damage guns do. |
| 65 | + required_parts = list(/obj/item/part/gun/modular/mechanism/smg/highcaliber = 0, /obj/item/part/gun/modular/barrel/magnum = 0, /obj/item/part/gun/modular/grip/excel = 0) |
| 66 | + |
| 67 | + |
| 68 | +//Each gun will eventually need grip sprite variants (changes overall gun skin) For EACH grip type. |
| 69 | +//This is not currently your problem, unless you want it to be... |
| 70 | +//Just pick the 'default' correct grip for that weapon in required_parts (in this case, the excel version) |
| 71 | + |
| 72 | +//for each new name, try to follow the theme of the existing gun name. |
| 73 | +//the Drozd is named after a russian songbird. (and an anti-missile armor system, but let's not mix metaphors) |
| 74 | +/obj/item/gun/projectile/automatic/modular/drozd/get_initial_name() |
| 75 | + if(grip_type) |
| 76 | + switch(grip_type) |
| 77 | + if("wood") |
| 78 | + return "Excelsior SMG [caliber] \"Robin\"" |
| 79 | + if("black") |
| 80 | + return "BM SMG [caliber] \"Sokol\"" |
| 81 | + if("rubber") |
| 82 | + return "FS SMG [caliber] \"Sparrow\"" |
| 83 | + if("excelsior") |
| 84 | + return "Excelsior SMG [caliber] \"Drozd\"" |
| 85 | + if("serbian") |
| 86 | + return "SA SMG [caliber] \"Sova\"" |
| 87 | + if("makeshift") |
| 88 | + return "MS SMG [caliber] \"Cage\"" |
| 89 | + else |
| 90 | + //for unfinished weapon. Up to your interpretation, should be simpler than normal |
| 91 | + return "SMG [caliber] \"Droz\"" |
| 92 | + |
| 93 | +//This is the finished version of your gun, with all modifications installed. |
| 94 | + |
| 95 | +//for any parts which are generic in the main required_parts definiton, you must instead put a specific one here |
| 96 | +//the number beside each gun part is that part's default quality. |
| 97 | +//This can be used as an additional layer of gun balancing |
| 98 | +//(though I wouldn't reccomend messing with it too much for 1-1 conversions) |
| 99 | +/obj/item/gun/projectile/automatic/modular/drozd/finished |
| 100 | + gun_parts = list(/obj/item/part/gun/modular/mechanism/smg/highcaliber = 0, /obj/item/part/gun/modular/barrel/magnum = 0, /obj/item/part/gun/modular/grip/excel = 0) |
| 101 | + magazine_type = /obj/item/ammo_magazine/msmg // For the rare case the blacklist is ignored |
| 102 | + spawn_tags = SPAWN_TAG_GUN_PROJECTILE //remember to change from frame |
0 commit comments