Jump to content

Extra Weapons Mod


tommysticks

Recommended Posts

Re-downloaded and re-installed this mod, still having unlimited round.. Only tested with the sniper rifle..

 

Followed the installation guide as reflected:

 

Replace all Reloading folder file .lua with Steam files 

C:\Program Files\Steam\steamapps\common\ProjectZomboid\media\lua\Reloading

 

Added TommyGuns folder to the following:  

C:\Users\mypc\Zomboid\mods

Link to comment
Share on other sites

Hey

 

So i'm trying to troubleshoot any problems just by thinking through them, as I don't know your specifics.

 

Try shutting off any other mod and testing this mod out. If you have another active reloading LUA it may screw with mine.

 

Also, I don't know if I verified that the Remington 700 reloads correctly, as it is the newest addition.

 

Weapons verified as working correctly:

 

AR-15

Ruger 22

Bow

XBow

Ak-47

 

Sorry, I know I should have verified them all, but I've got a lot of shit goin on.

Link to comment
Share on other sites

YO MAN! lately this has been my favorite mod, because i like guns :ph34r: ... anyways, I'm far away from knowing how to code and shit, but i mess sometimes with the scripts and whatnot, i did mess around with your lua file about the distribution, check it out if you have some time, i tested and so far so good:

 

-made weapons on your mod pretty rare, like really hard to find which i think gives more realism to the looting activity(although i did manage to find a few in just 2 days in game[found around 3 .38 revolver{these i think should be the most commom gun so in a KY town in 'Murica a few people must have i right?} and a supressed AR15]). so not much trouble in the distro i think.

 

-all your guns had spawn places at all cabinets shelves and crates so i changed the weapons like the ar-15 and colt 45 and mp5 to high as fuck rates to spawn at the police station and almost or completely scarce at other common places,due to those being overpowered weapons among the others, the ak is the rarest though. haven't find any yet, no rounds also.

 

-resuming my simple work on this mod i just added a few spawn places for looting them, from the "AnotherNotEnoughBagsMod" since i liked where those bags spawn(even in zombies), although they spawned kinda of a lot sometimes so i messed around in your mod to make it better in my point of view.

 

-bullets are hard as hell to find, which made me sad for having an ar-15 and no ammo, but i think it's even better this way since it would be really hard to find the specific ammo for a gun in a situation like a zombie apocalypse, except for the gun store(which i didn't add because i don't know the right name for the spawn place at the gunstore like for example 'gunstore' 'shelves' or whatever...)

 

-I am in fact having trouble with the reloading of the weapons... first time i tried your mod i found a bow in a kitchen, didn't need to find arrows because it was shooting anyways and when i tried to reload it (even without arrows) it said it couldn't find the sound for it at the specific folder or whatever and it did "reload"(had infinite shots) anyways... so i messed around with the files, put them in the user/zomboid/mods like you seggested above but couldn't even load any of my mods that way :huh:  so i put them back in the game files as it has always worked before for me. this maybe has something to do with me playing on compatibility mode, because if i press only play game it doesn't even run on my pc :(

 

so i messed with the ISReloadUtil.lua file(since i was having trouble reloading my weapons) and created one for your weapons alone to put in the mod folder based on the game's ISReloadUtil lua file, didn't have succes though since it still did not show the reload option in the menu when i clicked on the items. even though i didn't have bullets on me... the game's pistol(the regular one) showed me the reload option even without bullets on me too, so i got to that conclusion. it is not working for me so far.

 

here are the files i messed up with :wacko:  btw this is how I'm using them in my game, I even changed some of the guns bullets capacity that's because i'm that weird, so this is just so you can get an idea of what i've done with the distro actually, this reloading lua file is just to see if i'm messing with something usefull/helpfull or not, since I couldn't reload in my game.(I used to have bolts and arrows but killed infinite zombies because the weapons didn't actually used the ammo i had anyways.) none of my guns reloaded so i crawled into the insides of the reloading lua files and tried this mess:

 

(i took some of the magazines off of the reloading process for the crossbow and the .38 since those actually don't use magazines, and made them to reload as shotguns, that is, one by one[bullets or bolts])

 

require "ISBaseObject"
require "Reloading/ISReloadableMagazine"
require "Reloading/ISSemiAutoWeapon"
require "Reloading/ISShotgunWeapon"

ISReloadUtil = ISBaseObject:derive("ISReloadUtil");

--************************************************************************--
--** ISReloadUtil:initialise
--**
--************************************************************************--
function ISReloadUtil:initialise()

end

--************************************************************************--
--** ISReloadUtil:new
--**
--************************************************************************--
--************************************************************************--
--** ISReloadUtil:new
--**
--************************************************************************--
function ISReloadUtil:new()
local o = {}
setmetatable(o, self)
self.__index = self
o.wep38 = { name = getItemText("S&W .38 Special"),
reloadClass = 'ISShotgunWeapon',
ammoType = '38',
rackSound = 'stormyRevolverInsertRound',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
insertSound = 'stormyRevolverInsertRound',
maxCapacity = 6,
reloadTime = 15,
rackTime = 10);

o.magColt = { name = getItemText("Colt Magazine"),
reloadClass = 'ISReloadableMagazine',
clipType = 'ColtClip',
shotStyle = 'single',
reloadStyle = 'round',
ammoType = '45',
shootSound = 'none',
clickSound = nil,
ejectSound = 'none',
insertSound = 'stormyRevolverInsertRound',
rackSound = 'stormyRevolverInsertRound',
containsClip = 0,
maxCapacity = 10,
reloadTime = 30,
rackTime = 10};

o.wepColt = { name = getItemText("Colt 1911"),
ammoType = 'ColtClip',
reloadClass = 'ISSemiAutoWeapon',
clipName = 'Colt Magazine',
clipIcon = 'BerettaClip',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
maxCapacity = 10,
reloadTime = 10,
rackTime = 10,
clipData = o.magColt };

o.magAR = { name = getItemText("30 Round Magazine"),
reloadClass = 'ISReloadableMagazine',
clipType = 'ARmag',
shotStyle = 'single',
reloadStyle = 'round',
ammoType = '556',
shootSound = 'none',
clickSound = nil,
ejectSound = 'none',
insertSound = 'stormyRevolverInsertRound',
rackSound = 'stormyRevolverInsertRound',
containsClip = 0,
maxCapacity = 30,
reloadTime = 15,
rackTime = 10};

o.wepAR = { name = getItemText("AR-15"),
reloadClass = 'ISSemiAutoWeapon',
ammoType = 'ARmag',
clipName = '30 Round Magazine',
clipIcon = 'BerettaClip',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
maxCapacity = 30,
reloadTime = 15,
rackTime = 10,
clipData = o.magAR };

o.magAK = { name = getItemText("30 Round AK Magazine"),
reloadClass = 'ISReloadableMagazine',
clipType = 'AKmag',
shotStyle = 'single',
reloadStyle = 'round',
ammoType = '762',
shootSound = 'none',
clickSound = nil,
ejectSound = 'none',
insertSound = 'stormyRevolverInsertRound',
rackSound = 'stormyRevolverInsertRound',
containsClip = 0,
maxCapacity = 30,
reloadTime = 15,
rackTime = 10};

o.wepAK = { name = getItemText("AK-47"),
reloadClass = 'ISSemiAutoWeapon',
ammoType = 'AKmag',
clipName = '30 Round AK Magazine',
clipIcon = 'BerettaClip',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
maxCapacity = 30,
reloadTime = 15,
rackTime = 10,
clipData = o.magAK };

o.wepXbow = { name = getItemText("Crossbow"),
reloadClass = 'ISShotgunWeapon',
ammoType = 'Bolts',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormyRevolverInsertRound',
rackSound = 'stormyRevolverInsertRound',
containsClip = 0,
maxCapacity = 1,
reloadTime = 25,
rackTime = 10 };

o.magMp5 = { name = getItemText("MP5 Clip"),
reloadClass = 'ISReloadableMagazine',
clipType = 'MP5Clip',
shotStyle = 'single',
reloadStyle = 'round',
ammoType = 'Bullets9mm',
shootSound = 'none',
clickSound = nil,
ejectSound = 'none',
insertSound = 'stormyRevolverInsertRound',
rackSound = 'stormyRevolverInsertRound',
containsClip = 0,
maxCapacity = 30,
reloadTime = 25,
rackTime = 10};

o.wepMp5 = { name = getItemText("MP5 SMG"),
reloadClass = 'ISSemiAutoWeapon',
ammoType = 'MP5Clip',
clipName = 'MP5 Clip',
clipIcon = 'BerettaClip',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
maxCapacity = 30,
reloadTime = 25,
rackTime = 10,
clipData = o.magMp5 };

o.wepARQD = { name = getItemText("AR-15 Suppressed"),
reloadClass = 'ISSemiAutoWeapon',
ammoType = 'ARmag',
clipName = '30 Round Magazine',
clipIcon = 'BerettaClip',
shootSound = 'stormy9mmFire',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
maxCapacity = 30,
reloadTime = 15,
rackTime = 10,
clipData = o.magAR };

o.SemiAutoWeapon = ISSemiAutoWeapon:new();
o.Shotgun = ISShotgunWeapon:new();
o.Magazine = ISReloadableMagazine:new();



-- If you've created an item above you must add
-- it to the relevant list here
o.weaponsList = {o.pistol, o.shotgun, o.sawnoff, o.wep38, o.wepColt, o.wepAR, o.wepAK, o.wepXbow, o.wepMp5, o.wepARQD};
o.clipList = {o.pistolClip, o.magColt, o.magAR, o.magAK, o.magMp5};
return o;
end


--************************************************************************--
--** ISReloadUtil:setUpGun
--**
--** The role of the setupGun is two-fold. First it checks whether the
--** object passed to it has already been set up returning true if it does
--**
--** If this fails, it Loops through the weaponsList and checks whether
--** there is a corresponding table for the weapon passed to it
--**
--** If there is, adds the appropriate ISReloadableWeapon to the weapon's
--** mod data and returns true.
--**
--** If both checks fail. It returns false
--**
--** New ISReloadable implementations must have conditions added to this
--** method
--**
--************************************************************************--
function ISReloadUtil:setUpGun(weapon)
if(weapon == nil) then
return false;
end
local itemdata = weapon:getModData();
if(itemdata.reloadClass ~= nil) then
return true;
end
for i,v in ipairs(self.weaponsList) do
if(v.name == weapon:getName()
and itemdata.reloadClass == nil) then
if(v.reloadClass == 'ISSemiAutoWeapon') then
self.SemiAutoWeapon:setupSemiAutoWeapon(weapon, v);
return true;
elseif(v.reloadClass == 'ISShotgunWeapon') then
self.Shotgun:setupShotgunWeapon(weapon, v);
return true;
end
end
end
return false;
end

--************************************************************************--
--** ISReloadUtil:setUpMagazine
--**
--** The role of the setUpMagazine is two-fold. First it checks whether
--** the object passed to it has already been set up returning true if it
--** has
--**
--** If this fails, it Loops through the weaponsList and checks whether
--** there is a corresponding table for the weapon passed to it
--**
--** If there is, it adds the appropriate ISReloadableWeapon to the
--** weapon's mod data and returns true.
--**
--** If both checks fail. It returns false
--**
--** New ISReloadable implementations must have conditions added to this
--** method
--**
--** @param clipList - uses the clipList passed to it to setup the
--** magazine. If no clipList is passed to it, the ISReloadUtil searches
--** for one
--**
--************************************************************************--
function ISReloadUtil:setupMagazine(magazine, clipList)
if(magazine == nil) then
return false;
end
local list = clipList;
if(list == nil) then
list = self.clipList;
end
local itemdata = magazine:getModData();
for i,v in ipairs(list) do
if(v.clipType == magazine:getType()
and itemdata.reloadClass == nil) then
self.Magazine:setupReloadableMagazine(magazine, v);
return true;
end
end
return false;
end

--************************************************************************--
--** ISReloadUtil:getReloadableWeapon
--**
--** Returns the ISReloadable attached to this weapon
--**
--************************************************************************--
function ISReloadUtil:getReloadableWeapon(weapon, player)
local savedDifficulty = player:getModData().reloadDifficulty;
if (savedDifficulty == nil) then
player:getModData().reloadDifficulty = ReloadManager[1]:getDifficulty();
else
ReloadManager[1]:setDifficulty(savedDifficulty);
end
return self:syncItemToReloadable(weapon);
end

--************************************************************************--
--** ISReloadUtil:isReloadable
--**
--** Returns true if the item is reloadable. This performs a setup if
--** necessary and also checks the player's inventory for the items
--** required to reload.
--**
--************************************************************************--
function ISReloadUtil:isReloadable(item, player)
local isReloadable = false;
if(self:getReloadableWeapon(item, player) ~= nil) then
isReloadable = true;
print("reloadable");
elseif (self:setUpGun(item)) then
isReloadable = true;
elseif(self:setupMagazine(item, nil)) then
isReloadable = true;
end
if(isReloadable == true) then
local reloadable = self:getReloadableWeapon(item, player);
return reloadable:canReload(player);
end
return false;
end

--************************************************************************--
--** ISReloadUtil:getReloadText
--**
--** Returns ui reload text
--**
--************************************************************************--
function ISReloadUtil:getReloadText(item, player)
return self:getReloadableWeapon(item, player):getReloadText();
end

--************************************************************************--
--** ISReloadUtil:canReload
--**
--** Returns true if the items canReload conditions are met
--**
--************************************************************************--
function ISReloadUtil:canReload(item)
return item:getModData().reloadableWeapon:canReload(ReloadManager[1].difficulty);
end

--************************************************************************--
--** ISReloadUtil:syncItemToReloadable
--**
--** Sets the information on the appropriate ISReloadable with the values
--** found on the corresponding item.
--**
--** If a new ISReloadable is implemented, a condition must be added to
--** this method
--**
--************************************************************************--
function ISReloadUtil:syncItemToReloadable(item)
local modData = item:getModData();
local isReloadable = false;
if (self:setUpGun(item)) then
isReloadable = true;
elseif(self:setupMagazine(item, nil)) then
isReloadable = true;
end
if(isReloadable == true) then
if(modData.reloadClass == 'ISSemiAutoWeapon') then
self.SemiAutoWeapon:syncItemToSemiAutoWeapon(item);
return self.SemiAutoWeapon;
elseif(modData.reloadClass == 'ISShotgunWeapon') then
self.Shotgun:syncItemToShotgun(item);
return self.Shotgun;
elseif(modData.reloadClass == 'ISReloadableMagazine') then
self.Magazine:syncItemToReloadableMagazine(item);
return self.Magazine;
end
end
return nil;
end

function ISReloadUtil:getClipData()
return self.pistolClip;
end

 

this is a picture i took of me while messing with this lua file above b7e.jpg

( :P i do look good in a tie...)

 

and this is the distro i messed around if you'd like to check out:

 

--Weapons

--MP5
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.005);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.MP5");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 7);

--38Spec
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.7);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.7);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.05);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38Spec");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 2.7);

--AR-15
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.01);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 2.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.AR15");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.005);

--ARQD
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.ARQD");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.01);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.ARQD");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.01);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.ARQD");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 0.9);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.ARQD");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 2.7);
table.insert(SuburbsDistributions["policestorage"]["wardrobe"].items, "tommyguns.ARQD");
table.insert(SuburbsDistributions["policestorage"]["wardrobe"].items, 7);

--AK-47
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.01);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.005);
table.insert(SuburbsDistributions["fossoil"]["counter"].items, "tommyguns.AK47");
table.insert(SuburbsDistributions["fossoil"]["counter"].items, 0.7);



--SurvivalAxe
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.survivalAxe");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.7);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.survivalAxe");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.survivalAxe");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.survivalAxe");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.005);

--samuraiSword
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.samuraiSword");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.9);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.samuraiSword");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.samuraiSword");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.7);

--Machete
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.machete");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.machete");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.machete");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.7);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.machete");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.machete");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.005);

--combatKnife
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["all"]["counter"].items, 1);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.combatKnife");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.7);

--Colt45
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.05);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["all"]["crate"].items, 0.01);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.05);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 2.7);
table.insert(SuburbsDistributions["policestorage"]["wardrobe"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["policestorage"]["wardrobe"].items, 7);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.7);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.1);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.colt45");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.05);

--Xbow
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.bow0");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.7);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.bow0");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.bow0");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 0.7);

--Ammo

--Bolts
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.Bolts");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 3);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.Bolts");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);
table.insert(SuburbsDistributions["all"]["shelves"].items, "tommyguns.Bolts");
table.insert(SuburbsDistributions["all"]["shelves"].items, 4);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "tommyguns.Bolts");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "tommyguns.Bolts");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.01)

--556
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.556");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 2);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.556");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.556");
table.insert(SuburbsDistributions["all"]["counter"].items, 1);
table.insert(SuburbsDistributions["all"]["shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["all"]["shelves"].items, 2);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.556");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);


--762

table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.762");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.762");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);

--45
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.45");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.7);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.45");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.45");
table.insert(SuburbsDistributions["all"]["counter"].items, 2);
table.insert(SuburbsDistributions["all"]["sidetable"].items, "tommyguns.45");
table.insert(SuburbsDistributions["all"]["sidetable"].items, 1);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.45");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 7);

--38
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.38");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 3);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.38");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.38");
table.insert(SuburbsDistributions["all"]["counter"].items, 5);
table.insert(SuburbsDistributions["all"]["sidetable"].items, "tommyguns.38");
table.insert(SuburbsDistributions["all"]["sidetable"].items, 4);
table.insert(SuburbsDistributions["all"]["shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["all"]["shelves"].items, 4);
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, "tommyguns.38");
table.insert(SuburbsDistributions["motelbedroom"]["wardrobe"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, "tommyguns.38");
table.insert(SuburbsDistributions["policestorage"]["metal_shelves"].items, 1.7);


--Bags

--Ruck

table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.Rucksack");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.Rucksack");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.Rucksack");
table.insert(SuburbsDistributions["all"]["counter"].items, 1);

--Prepper
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.prepperBag");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.prepperBag");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.prepperBag");
table.insert(SuburbsDistributions["all"]["counter"].items, 1);

--Food

--MRE_Chicken
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.MRE_Chicken");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.MRE_Chicken");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.1);

--MRE_Omelete
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.MRE_Omelete");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.MRE_Omelete");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.1);

--MRE_Vegetarian
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.MRE_Vegetarian");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.MRE_Vegetarian");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.1);

--MRE_Beef
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.MRE_Beef");
table.insert(SuburbsDistributions["all"]["crate"].items, 1);
table.insert(SuburbsDistributions["all"]["counter"].items, "tommyguns.MRE_Beef");
table.insert(SuburbsDistributions["all"]["counter"].items, 0.1);

--Misc

--ARSupp
table.insert(SuburbsDistributions["all"]["wardrobe"].items, "tommyguns.ARSupp");
table.insert(SuburbsDistributions["all"]["wardrobe"].items, 0.1);
table.insert(SuburbsDistributions["all"]["crate"].items, "tommyguns.ARSupp");
table.insert(SuburbsDistributions["all"]["crate"].items, 2);

 

i took some items like the gameboy off because i was focusing only on the guns and even took some of them off since i was having difficulties with them and wanted to test with only a few since i don't know what i'm doing actually :ph34r: , just trying to help if possible anyways... :D

 

GREAT MOD!!!, I'll keep trying to make the reloading work but I'm just like that dog up there everytime :unsure: ... I'll try though.

Link to comment
Share on other sites

Hey man,

 

The thing about the Bow making the game say that it can't find the sound was an old update. I just figured out how to implement sounds so when I get back home (I'm away for the Thanksgiving) I am going to start working on those.

 

I'll have to check out your distribution Lua. I originally intended on having everything pretty rare, but I kept screwing up the Lua and it wouldn't work. So I just made every item spawn the same, basically, and that seemed to work. I now have a pretty good idea of how it works and will be updating it again.

 

There is a reason for having magazines for things like the bow and the .38, they will not reload properly if they don't have a place holder as a magazine. The way the game works is that it first checks what magazine the weapon uses, then checks the difficulty of reload you have it set to, then either makes you reload the bullets directly into the weapon (on easy) or makes you reload a magazine into the weapon (on hard or hardcore). This is how has to be until they implement the boltAction and revolver reloading scripts, then I will have to learn how to use them.

 

The gameboy I was just going to get around to making reduce boredom.

 

Have you downloaded the latest version yet? I fixed the sound thing on the bow and added a taclight for the AR.

Link to comment
Share on other sites

Hey man,

 

The thing about the Bow making the game say that it can't find the sound was an old update. I just figured out how to implement sounds so when I get back home (I'm away for the Thanksgiving) I am going to start working on those.

 

I'll have to check out your distribution Lua. I originally intended on having everything pretty rare, but I kept screwing up the Lua and it wouldn't work. So I just made every item spawn the same, basically, and that seemed to work. I now have a pretty good idea of how it works and will be updating it again.

 

There is a reason for having magazines for things like the bow and the .38, they will not reload properly if they don't have a place holder as a magazine. The way the game works is that it first checks what magazine the weapon uses, then checks the difficulty of reload you have it set to, then either makes you reload the bullets directly into the weapon (on easy) or makes you reload a magazine into the weapon (on hard or hardcore). This is how has to be until they implement the boltAction and revolver reloading scripts, then I will have to learn how to use them.

 

The gameboy I was just going to get around to making reduce boredom.

 

Have you downloaded the latest version yet? I fixed the sound thing on the bow and added a taclight for the AR.

downloaded it yesterday! didn't fix the folder yet though... i'm about to do that right now and thanks for the quick response man! I understand the reloading machanism now thanks! I've looked over all the reloading lua files 'the whole night lol I see that you are saying now, I going to install everything like you suggested and try to make it work this time with the new update, THANKS MAN!

 

a question, do you know if there are any issues with loading the mod while on compatibility mode?

 

oh and about the distro, i just added a few spawn places nothing i presume you don't already know but what i'd like to show you are the numbers(which i don't exactly now what they mean actually :ph34r:  lol). The guns seemed to spawn a lot before and when i changed to those numbers they were rare to find but if i look at the right places I would be almost sure to find them(since i'm know where they are most likely to spawn because i wrote it). like for example there is a chance to find some pistol or knife at zombies, since some might be survivors who didn't do so well but were armed when they died, although it is (what i think is) a very tiny possibility to spawn, i does happen, it happen with me so maybe it's not that tiny as i though lol

Link to comment
Share on other sites

Hi there Tommy, first of all, thank you for your mod, it's nice. I haven't read all the people's suggestions but here's some of mine.

First of all I had a crash with the crossbow, I shot for the 4th time and it was the second time it shot multiple bolts, I guess it is because it has multiple bolts in it's clip and doesn't have to reload, while it's supposed to only have 1. I believe you can see what the problems are.

 

The second thing is that I find that these items are way too easy to find. Especially because of the wide range of weapons there is now. (When I play on loot rarity "normal" I often leave a house with an additional 150 bullets or so)

 

I hope you can use this to make it even better. gl & hf!

Link to comment
Share on other sites

Thanks for the feedback, elvendertig!

I realize the weapons are extremely easy to find. This is in part because I royally fu*ked the distribution script up when I first put it together, and also in part because I figured people would like playing with the new weapons so didn't want to make them too scarce.

I will adjust the distro script next update along with implementing the M107.

Link to comment
Share on other sites

ok this mod is not working for me. my folders look like yours and i know i installed everything correctly. when i start a new game and press L+f8 it gives me 10 9mm rounds. the only other mod i have installed is Zspawn. Please help. Also im on game version 2.9.9.17

Link to comment
Share on other sites

Update posted!

 

 

ok this mod is not working for me. my folders look like yours and i know i installed everything correctly. when i start a new game and press L+f8 it gives me 10 9mm rounds. the only other mod i have installed is Zspawn. Please help. Also im on game version 2.9.9.17

 

I'm going to try to make a tutorial to make sure everyone has this installed correctly.

Link to comment
Share on other sites

Great mod. The only issue I am having is the icons. All of them are the question mark instead. I have placed the textures everywhere, in the mods folder, base folder, several folders in the game folder itself. Nothing, and my research has pulled up no solutions. Otherwise thank you for your work, good sir.

Link to comment
Share on other sites

Great mod. The only issue I am having is the icons. All of them are the question mark instead. I have placed the textures everywhere, in the mods folder, base folder, several folders in the game folder itself. Nothing, and my research has pulled up no solutions. Otherwise thank you for your work, good sir.

Oh man, that's annoying. That's what sets the mod apart, dammit!

 

Do you have the latest update for the mod? What version of PZ are you using?

 

You may need to set the folders up as outlined in this thread.

Ex: Tommyguns/media/lua/Mods/Tommyguns

 

I have them installed exactly as they are extracted and it works fine for me. Please let me know if you figure it out.

Link to comment
Share on other sites

I am on steam, 2.9.9.17 (00128). I setup the folders exactly like that, and the mod did not show up in the mod loader. I removed, downloaded the current one you have up, and tried it that way too, still nothing. 

 

Additionally, I did not notice before, but I apparently have infinite ammo and no need for reloading. I saw others with this issue before, but nothing works on that either.

Link to comment
Share on other sites

I am on steam, 2.9.9.17 (00128). I setup the folders exactly like that, and the mod did not show up in the mod loader. I removed, downloaded the current one you have up, and tried it that way too, still nothing. 

 

Additionally, I did not notice before, but I apparently have infinite ammo and no need for reloading. I saw others with this issue before, but nothing works on that either.

Usually when the mod isn't showing up in the loader it is because you have put it in the incorrect mod folder.

 

There are two different mod folders, one where the game was installed and one under your username.

Here are the two directories:

 

C:\SteamApps\common\ProjectZomboid\mods - This is the incorrect folder to place your mods

 

C:\Users\Tom\Zomboid\mods - This is the correct folder to place your mods (where Tom would be replaced with your username)

 

Also, the Reloading folder that is provided in my mod needs to replace the Reloading folder where the game is installed located here:

 

C:\SteamApps\common\ProjectZomboid\media\lua

Link to comment
Share on other sites

C:\Users\Tom\Zomboid\mods - This is the correct folder to place your mods (where Tom would be replaced with your username)

This is where it is, and has been, installed.

 

 

 

Also, the Reloading folder that is provided in my mod needs to replace the Reloading folder where the game is installed located here:

 

C:\SteamApps\common\ProjectZomboid\media\lua

And this was done. Does in-game settings for reloading difficulty matter? I currently have it on normal.

I just merged the original and new reloading folders, should the original be removed and replaced with the new instead?

Link to comment
Share on other sites

 

C:\Users\Tom\Zomboid\mods - This is the correct folder to place your mods (where Tom would be replaced with your username)

This is where it is, and has been, installed.

 

 

 

Also, the Reloading folder that is provided in my mod needs to replace the Reloading folder where the game is installed located here:

 

C:\SteamApps\common\ProjectZomboid\media\lua

And this was done. Does in-game settings for reloading difficulty matter? I currently have it on normal.

I just merged the original and new reloading folders, should the original be removed and replaced with the new instead?

 

 

I designed this mod around the easy reloading setting, and actually I haven't even tested it on any other difficulty.

Try deleting the reloading folder and pasting the one provided.

 

You had it working earlier?

Link to comment
Share on other sites

Well, originally it was on easy. I figured that was the problem, so I switched to normal. Nothing. Everything else works in the mod, always has. The icons and infinite ammo is the only issues, that I have had since the beginning.

 

Originally I thought you had not gotten around to the icons, and it was an unfinished mod. After poking about in the mod files I saw all the icons there, and thats when I decided to post.

 

All I did was download, copy the mod to the mod folder, and merged the reloading files. Thats it, nothing else.

 

I have experience with modding and file structures, just not with lua. I have not taken the time to really look at anything. Not even sure I could do anything.

 

I suppose a possibly helpful piece of info might be that I am using a Mac, even though the file structure is the same. I do not have much experience with a Mac, I hate Mac, it is just for school. My PC is down since my daughter eviscerated my video card with the motherboard as collateral damage, otherwise I would test it.

Link to comment
Share on other sites

Oh, maybe the problem is with it being a mac?

 

I noticed earlier you said you are playing on version 2.9.9.17 (00128), when I look at my version it says 2.9.9.17 (0012a)

 

I don't know what the difference is. It seems like there are a lot of ways installing mods can go wrong with all the different versions.

 

​The icons are definitely supposed to be showing up and the weapons are not supposed to have infinite ammo. With the update I just put out today I am having no issues with any aspect of the mod. I intend to put up a video tutorial.

 

It seems lua is pretty clunky. I will put a script together and the game won't work, I will retype the script exactly  the way I just had it and it will work. I suppose it could be something I'm overlooking, but it is pretty frustrating.

 

Sorry it's not working for you.

Link to comment
Share on other sites

No problem, Like I said, I mod a lot. It happens. I find a lot of modders do not help as much as you have, so you sir, are a gentleman and have my respect.

 

And you are correct sir. My version is 0012a. Hard to read in windowed more. Mac does not have a way to alt-tab from full screen, so a hard boot is required if the game hangs up.

 

I will try completely uninstalling EVERYTHING to do with PZ tomorrow after work, and completely reinstall with a fresh download of PZ and the mod. I will inform you of the results.  ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...