thrandisher Posted March 8, 2018 Share Posted March 8, 2018 Ahh, i had wondered about hardcore. Im assuming the X hotkey for racking can be changed? I only ask because i just installed the survivors mod and it used that, and some other mod brings back a old mod ability to press X to drop bags really fast. The inspect gun for wear and tear and serial #'s. Is that on every gun? I saw that the other day and happy to see it. Then i installed some other mods and didnt have the option to inspect anymore, or rack or pull set the trigger. I need to track down what one of the mods i put on the other day that is causing that conflict. ALthough it will be a few days before i can. I just wondered if all guns had the inspect option or if i was only a few and i was lucky enough to actually look at that real fast, lol. while i am sad about the easy mode, its ok since i always play on normal or hardcore myself. If i want easy mode, then i useally switch to a shotgun I do wished there was a easyer way tho to load up the clip, or atleast being able to make more temporary clips so i can just eject/insert clips really fast. Im still happy with what you did tho with this. great improvements over a great mod. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 8, 2018 Author Share Posted March 8, 2018 1 minute ago, thrandisher said: Ahh, i had wondered about hardcore. Im assuming the X hotkey for racking can be changed? I only ask because i just installed the survivors mod and it used that, and some other mod brings back a old mod ability to press X to drop bags really fast. There should be a option in your pz settings to rebind it to another key, or optionally, you can change the key bindings for the survivors mod by editing media/lua/client/Settings.lua (why it defaults to the same keys that pz uses for other things is beyond me...) 4 minutes ago, thrandisher said: The inspect gun for wear and tear and serial #'s. Is that on every gun? I saw that the other day and happy to see it. Then i installed some other mods and didnt have the option to inspect anymore, or rack or pull set the trigger. I need to track down what one of the mods i put on the other day that is causing that conflict. ALthough it will be a few days before i can. I just wondered if all guns had the inspect option or if i was only a few and i was lucky enough to actually look at that real fast, lol. All ORGM guns should have the inspection option and the description/details window. One of the other mods must really be screwing with the right click context menus. 6 minutes ago, thrandisher said: I do wished there was a easyer way tho to load up the clip, or atleast being able to make more temporary clips so i can just eject/insert clips really fast. It can be annoying...I'm usually loading up 6 to 10 twenty round mags at once before going on loot runs...god help you if you have a m249 and several of those 200 round mags to load up with a low reloading skill lol. I did note your comment on the workshop page about a hotkey option, unfortunately that would be difficult, mostly due to not knowing which of the magazines in inventory the player wishes to load. Having a high reloading skill defiantly helps speed things though. 10 minutes ago, thrandisher said: Im still happy with what you did tho with this. great improvements over a great mod. Thanks, more still too come...bit of a break on the development for now though while I concentrate on some other things Link to comment Share on other sites More sharing options...
thrandisher Posted March 8, 2018 Share Posted March 8, 2018 Ya, i assumed it would be almost imposible to do the hotkey. Only thing that came to mind would be somthing like setting a favorite clip then the hotkey would reload that clip. Kindof like a few of the mdos use tags. Im mostly just brainstorming here out loud as i never have exspected it to be done, lol. Almsot like how i failed to do the quote on your post for a few things, lol. Ok, since i know each gun has the inspect now, ill try to trouble shoot things down a bit and report to you when i do. I have a few other things i have to do first tho. Tracking down a few other bugs for some other mods first. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 8, 2018 Author Share Posted March 8, 2018 3 minutes ago, thrandisher said: Ok, since i know each gun has the inspect now, ill try to trouble shoot things down a bit and report to you when i do. I forgot to mention...the inspection and other options like racking only show up when the gun is actually in hand. Perhaps that's the issue and not another mod? thrandisher 1 Link to comment Share on other sites More sharing options...
thrandisher Posted March 8, 2018 Share Posted March 8, 2018 4 minutes ago, Fenris_Wolf said: I forgot to mention...the inspection and other options like racking only show up when the gun is actually in hand. Perhaps that's the issue and not another mod? BINGO! That was it, lol. And all the other menus of it came up also. Honestly i dont think i would have thought of something so simple as actually equipping them! I useally dont use guns, just collect them in case i need em to shoot some tires. Fenris_Wolf 1 Link to comment Share on other sites More sharing options...
JackMods Posted March 8, 2018 Share Posted March 8, 2018 (edited) I don't know if anyone else would be interested, but on my server we didn't like how often weapons/gun items were spawning on corpses (Our zombie count is set to high so we go through a bunch). We didn't want to affect the spawn rate for other containers, so we decided to add a corpse rate modifier that affects the addToCorpse function. This will apply a factor to corpses before any other normal factors are applied. Server.addToCorpse = function(container) local choice = Server.selectFirearm(80, 14, 6) Server.spawnFirearm(container, choice.gun, choice.ammo, (3 * ORGM.Settings.CorpseSpawnModifier), 1, true) -- has gun Server.spawnMagazine(container, choice.gun, choice.ammo, (1 * ORGM.Settings.CorpseSpawnModifier), 3, true) -- has mags Server.spawnAmmo(container, choice.ammo, (3 * ORGM.Settings.CorpseSpawnModifier), 15) -- loose shells Server.spawnAmmoBox(container, choice.ammo, (1 * ORGM.Settings.CorpseSpawnModifier), 1) -- has box end After a bunch of experimentation we realized the spawn rate only goes so low. This is due to how the spawn chance check works. if Rnd(100) > math.ceil(spawnChance) then return false end So the spawn chance only goes down to 1/100 for anything that isn't brought to 0 by a modifier set to 0%. Since anything between 0 and 1 is set to 1 by the ciel() call. So if I set my CorpseSpawnModifier to 30%, all 4 of the items would have a 1/100 chance to spawn (since ciel(3*.3)=1 and ciel(1*.3) =1). In order to rectify this we changed our formula to: if Rnd(1000) > math.ceil(spawnChance*10) then return false end This allowed us to specify spawn rates down to 1/1000. We ended up using 20%, so our firearms & ammo were 6/1000 and mags & boxes were 2/1000. Edited March 8, 2018 by JackMods Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 8, 2018 Author Share Posted March 8, 2018 5 hours ago, JackMods said: so we decided to add a corpse rate modifier that affects the addToCorpse function. Adding individual multiplier settings for corpses and other spawn locations has been on my todo list. as well as fixing the spawn chance 1/100 problem (that one's been bugging me), though i intend to turn it into a float value using if math.random()*100 > spawnChance then return false end or something very similar. I really think a float is the way to go. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 8, 2018 Author Share Posted March 8, 2018 v3.02-stable is now up. * Fixed bug adding repair kit items to NecroForge (introduced 3.00) * Spawn rates now use a float value instead of integer, values of less then 1% are now possible * Adding spawn multiplier settings for specific containers/locations: CorpseSpawnModifier CivilianBuildingSpawnModifier PoliceStorageSpawnModifier GunStoreSpawnModifier StorageUnitSpawnModifier GarageSpawnModifier HuntingSpawnModifier * Updated Custom Server Settings patch mod example to reflect new settings credit to @JackMods for reminding me to do push these long overdue changes Link to comment Share on other sites More sharing options...
Khaos Posted March 8, 2018 Share Posted March 8, 2018 Have TIS released any information regarding stash/corpse spawning locations? While I haven't seen stashes for a while I know dead loot bodies (not killed by anyone) still have vanilla weapons. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 8, 2018 Author Share Posted March 8, 2018 1 minute ago, Khaos said: Have TIS released any information regarding stash/corpse spawning locations? While I haven't seen stashes for a while I know dead loot bodies (not killed by anyone) still have vanilla weapons. No, but i think i have a backwards solution to this problem by detecting when these items spawn and removing/replacing them. I still need to do some testing though. Link to comment Share on other sites More sharing options...
JackMods Posted March 9, 2018 Share Posted March 9, 2018 @Fenris_Wolf Have you ever considered making weapon mods break? I have been messing around with this concept using your mod and the silencer one. It has always felt a bit overpowered to me to have a silencer or scope that never breaks while the guns they are on fall to pieces. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 9, 2018 Author Share Posted March 9, 2018 4 hours ago, JackMods said: Have you ever considered making weapon mods break? I have....plans for those. Since you've been poking around the ORGM code, you may have noticed a few oddities.... I no longer refer to them as 'upgrades' anywhere in the code, but instead call them 'components'...they exist in the ORGM.ComponentTable, and shared/4DataFiles/ORGMData_Components.lua calls ORGM.registerComponent() passing it the item name and a empty table as arguments. This is initial groundwork for doing away entirely with PZ's weapon mod/upgrade limited system, and implementing my own modular system where firearms are built out of various replaceable (and breakable) components that effect the weapons stats. Components will cover receivers, frames, stocks, trigger assemblies, grips, slides, barrels, scopes, chokes and just about everything else. That's the short version anyways. Its still a ways off though before I include it, v3.00 was just laying out the groundwork to make the system feasible, I need to make sure the component system is properly implemented (it currently exists as prototype code on my laptop atm), and its going to require ALOT of new item and their icons (which is quite frankly, boring to me!). This is the main reason though I haven't added any new guns or upgrades into the mod yet, better to wait til after the new system or I'm just increasing my workload and delaying it even more. Link to comment Share on other sites More sharing options...
JackMods Posted March 9, 2018 Share Posted March 9, 2018 (edited) Yeah a completely separate system would be great. Our server has been experimenting with using the current one to break weapon parts and it is a pain to say the least. We have ours in a place where we can define the following for components: register('HomeMadeSilencer', { soundReduction=0.1, breakable=true, conditionDamageChance = .9, }) and they will break after some use. We only use it for silencers at the moment but it works on any component. -- based off your compatibility code ORGM.Client.silencerCheck = function(player, item) if item == nil then return end local itemType = item:getType() if ORGM.FirearmTable[itemType] == nil then return end -- get the scriptItem local scriptItem = item:getScriptItem() local soundVolume = scriptItem:getSoundVolume() local soundRadius = scriptItem:getSoundRadius() local swingSound = scriptItem:getSwingSound() local canon = item:getCanon() if canon and not canon:isBroken() then local name = canon:getType() local definition = ORGM.ComponentTable[name]; if definition and definition.soundReduction then local soundReduction = definition.soundReduction soundVolume = soundVolume * soundReduction soundRadius = soundRadius * soundReduction swingSound = 'ORGMSilencedShot' end end item:setSoundVolume(soundVolume) item:setSoundRadius(soundRadius) item:setSwingSound(swingSound) end -- tied too weapon swing ORGM.Client.degradeWeaponParts = function(owner, weapon) local weaponParts = { canon = weapon:getCanon(), recoilPad = weapon:getRecoilpad(), scope = weapon:getScope(), sling = weapon:getSling(), stock = weapon:getStock(), } for key, part in pairs(weaponParts) do -- Make sure part is attached if part then local name = part:getType() local definition = ORGM.ComponentTable[name]; -- Make sure the part is not already broken if not part:isBroken() then -- Make sure part is registered and breakable if definition and definition.breakable then local conditionDamageChance = definition.conditionDamageChance or 1 -- See if we need to reduce the condition if ZombRandFloat(0,100) <= (conditionDamageChance*100) then part:setCondition(part:getCondition()-1); end if part:isBroken() then owner:Say("Damn, my " .. part:getDisplayName() .. " broke!"); end end -- Weapon fired with a broken mod, drop it to the ground else weapon:detachWeaponPart(part); owner:getCurrentSquare():AddWorldInventoryItem(part, 0, 0, 0) -- If the the part type is canon, perform the silencer check if(part:getPartType() == "Canon") then ORGM.Client.silencerCheck(owner, weapon) end end end end end Edited March 9, 2018 by JackMods Fenris_Wolf 1 Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 9, 2018 Author Share Posted March 9, 2018 I must say I quite like the fact you've been customizing it and I haven't had to explain how it works...let me know the code is clear enough and the documentation is adequate...though the documentation still needs more filling out. Link to comment Share on other sites More sharing options...
JackMods Posted March 9, 2018 Share Posted March 9, 2018 9 minutes ago, Fenris_Wolf said: I must say I quite like the fact you've been customizing it and I haven't had to explain how it works...let me know the code is clear enough and the documentation is adequate...though the documentation still needs more filling out. Haha, thanks. I haven't had to much trouble poking around the code. Although it helps that I am a software developer by trade. Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 9, 2018 Author Share Posted March 9, 2018 Ya that always helps Link to comment Share on other sites More sharing options...
Arsenal26 Posted March 10, 2018 Share Posted March 10, 2018 On 3/8/2018 at 9:17 AM, Fenris_Wolf said: v3.02-stable is now up. * Fixed bug adding repair kit items to NecroForge (introduced 3.00) * Spawn rates now use a float value instead of integer, values of less then 1% are now possible * Adding spawn multiplier settings for specific containers/locations: CorpseSpawnModifier CivilianBuildingSpawnModifier PoliceStorageSpawnModifier GunStoreSpawnModifier StorageUnitSpawnModifier GarageSpawnModifier HuntingSpawnModifier * Updated Custom Server Settings patch mod example to reflect new settings credit to @JackMods for reminding me to do push these long overdue changes If I wanted to make certain weapons less rare, or appear in Police stations in my Solo playthru, how would I do that using these spawn modifiers ? I tried adding "isPolice = ORGM.COMMON, in the ORGMData_Weapons.lua, for a couple weapons and it resulted in many of the containers being empty (or just containing radios and such) Sorry, I'm not very familiar with modding, but would love to see a few things appear more often in game.... Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 10, 2018 Author Share Posted March 10, 2018 3 minutes ago, Arsenal26 said: If I wanted to make certain weapons less rare, or appear in Police stations in my Solo playthru, how would I do that using these spawn modifiers ? It shouldn't make them appear empty, though for now make sure there's at least 1 weapon that's set to isPolice = ORGM.RARE (a bug i need to fix). But just editing some of them to common really wouldn't result in nothing spawning. If your using the latest version uploaded here, (not the current steam version) you could try editing the ORGMCore.lua (or optionally using the custom server settings patch mod example, it will work in SP just fine) and change the new PoliceStorageSpawnModifier setting to a higher value, though that will effect everything spawning in the police storage. If all else fails, set the LogLevel to ORGM.DEBUG (or 3, if your directly editing the ORGMCore.lua) and check the console, it will show whats items its rolling on the the to spawn tables at the % chance its going to spawn. Link to comment Share on other sites More sharing options...
Arsenal26 Posted March 10, 2018 Share Posted March 10, 2018 20 hours ago, Fenris_Wolf said: It shouldn't make them appear empty, though for now make sure there's at least 1 weapon that's set to isPolice = ORGM.RARE (a bug i need to fix). But just editing some of them to common really wouldn't result in nothing spawning. If your using the latest version uploaded here, (not the current steam version) you could try editing the ORGMCore.lua (or optionally using the custom server settings patch mod example, it will work in SP just fine) and change the new PoliceStorageSpawnModifier setting to a higher value, though that will effect everything spawning in the police storage. If all else fails, set the LogLevel to ORGM.DEBUG (or 3, if your directly editing the ORGMCore.lua) and check the console, it will show whats items its rolling on the the to spawn tables at the % chance its going to spawn. So I tried adding : isPolice = ORGM.COMMON to the Mini14 entry in mods/ORGM/media/lua/shared/4datafiles/ORGMData_Weapons.lua And sure enough, when I get to a Police station, many of the containers have nothing but radios in them... where prior to the change, they'd be stuffed with gear... I'm just trying to allow certain things to spawn in armories that are common where I live... I also notice a red box popping up in the lower Right corner with a number in it, when attempting to play the game with any changes to the ORGMDATA_Weapons.lua file... This occurs when I look into a container or corpse ?? Secondly, I tried to adjust the CHEAT KEY patchmod example to spawn just one or two ORGM items... and I'm not having much luck there... Is it possible to adjust the CHEAT KEY example to spawn just a few things into inventory as sort of a starter kit ? Events.OnKeyPressed.Add(function(key) if key ~= 207 then return end local inventory = getPlayer():getInventory() for name, def in pairs(ORGM.FirearmTable) do inventory:AddItem(def.moduleName ..'.'.. name) end for name, def in pairs(ORGM.MagazineTable) do inventory:AddItem(def.moduleName ..'.'.. name) end for name, def in pairs(ORGM.AmmoTable) do inventory:AddItem(def.moduleName ..'.'.. name ..'_Can') end for name, def in pairs(ORGM.ComponentTable) do inventory:AddItem(def.moduleName ..'.'.. name) end for name, def in pairs(ORGM.RepairKitTable) do inventory:AddItem(def.moduleName ..'.'.. name) end end) Any help would be greatly appreciated!! Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 11, 2018 Author Share Posted March 11, 2018 (edited) 4 hours ago, Arsenal26 said: So I tried adding : isPolice = ORGM.COMMON are you making sure there's a , after that line? isPolice = ORGM.COMMON, 4 hours ago, Arsenal26 said: I also notice a red box popping up in the lower Right corner with a number in it, when attempting to play the game with any changes to the ORGMDATA_Weapons.lua file... This occurs when I look into a container or corpse ?? The red box means its throwing a error. I've have to see the error message in your console.txt to be of much help there, BUT if you've missed that , on that line above, then the whole ORGMData_Weapons.lua file will error on trying to load, which would then result in your getting a red error box looking in the containers. 4 hours ago, Arsenal26 said: Is it possible to adjust the CHEAT KEY example to spawn just a few things into inventory as sort of a starter kit ? The cheat key is a overkill method for adding starter kits...its mostly just there for debugging purposes. Try adding this into a file in media/lua/client Events.OnNewGame.Add(function(player, square) local inv = player:getInventory() inv:AddItem("ORGM.Mini14") inv:AddItems("ORGM.Mini14Mag", 2) inv:AddItems("ORGM.Ammo_556x45mm_FMJ_Box", 3) end) Just need to replace those items with the items you want for your kit. Of course, you'll have to solve the issue with the ORGMData_Weapons.lua for that to work. But it defiantly sounds like somewhere your breaking the file, causing it not to load. (like that missing , at the end of the line) You could also instead of directly editing the data file, add a file into into media/lua/shared that contains ORGM.FirearmTable["Mini14"].isPolice = ORGM.COMMON that way you don't break the whole weapons data file if you make a error Edited March 11, 2018 by Fenris_Wolf Link to comment Share on other sites More sharing options...
Arsenal26 Posted March 11, 2018 Share Posted March 11, 2018 Thanks yet again for the reply, I did have the (,) and I will try all the above... Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 11, 2018 Author Share Posted March 11, 2018 2 minutes ago, Arsenal26 said: I did have the (,) and I will try all the above... well its defiantly failing to load somewhere, but without the console.txt I can't really narrow down your problem Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 11, 2018 Author Share Posted March 11, 2018 (edited) @Arsenal26 apparently I wasn't thinking right when I wrote out that starter kit code example above (sorry I was in a hurry), and it was incorrect. It has now been fixed. Edited March 11, 2018 by Fenris_Wolf Link to comment Share on other sites More sharing options...
Arsenal26 Posted March 11, 2018 Share Posted March 11, 2018 No Worries! I plucked a few lines you wrote on the "Referencing" thread regarding professions & starting with gear... That worked perfectly! I hope to get up to speed on this soon... I really like where all this is going. Thanks again Fenris_Wolf Link to comment Share on other sites More sharing options...
Fenris_Wolf Posted March 15, 2018 Author Share Posted March 15, 2018 v3.03-stable is up * Fixed bug where firearm update function was triggered every ORGM new version, instead of new versions where that firearm had been modified. * Fixed multiplayer bug where tactical lights couldn't be properly shut off. * Fixed bug where pressing the "Equip/Turn On/Off Light Source" hotkey would try and equip a light source in the secondary hand (if the player had one) instead of activating a equipped tactical light. * Changed "Equip/Unequip Firearm" hotkey behavior. Instead of always equipping the gun with best damage regardless of if the player actually had ammo for it, the hotkey now checks a number of conditions: is it loaded, does the player have extra ammo, then by best damage. * Added 3 new hotkeys: "Equip/Unequip Pistol", "Equip/Unequip Rifle", and "Equip/Unequip Shotgun". These default to the keys 4, 5, and 6 respectively, and can be edited by going to the PZ options screen, selecting the Key Bindings tab, and are under the Hotkeys section. * Added validation checks for new spawn settings introduced in v3.02 * Added new constants to ORGMData_Weapons.lua and the 'category' key to simply detecting weapon type: ORGM.REVOLVER, ORGM.PISTOL, ORGM.SUBMACHINEGUN, ORGM.RIFLE, ORGM.SHOTGUN Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now