EmeraldHaze Posted September 30, 2016 Share Posted September 30, 2016 Greetings fellow mod-makers. I'm currently working on a mod that will add a new type of custom ammo to the game. While crafting and form lists are done with, I've hit a bump with leveled lists and can't progress forward. My goal is to add new ammo to leveled lists (so they would appear for sale and as loot) using a quest script for maximum compatibility (an in-development version of the script is presented below): scn NLASCPTListsModificationBegin GameModeIf GetGameRestartedLeveledListAddForm Ammo10mm75 NLAAMMONL10mm 1 1 0.0LeveledListAddForm Ammo10mmRounds50 NLAAMMONL10mm 1 3 0.0LeveledListAddForm Ammo10mmRounds50 NLAAMMONL10mm 1 5 0.0LeveledListAddForm Ammo10mmScrounger NLAAMMONL10mm 1 1 0.0LeveledListAddForm Ammo127mm75 NLAAMMONL127mm 1 1 0.0LeveledListAddForm Ammo127mmScrounger NLAAMMONL127mm 1 1 0.0LeveledListAddForm Ammo12ga75 NLAAMMONL12Ga 1 1 0.0LeveledListAddForm Ammo12GaScrounger NLAAMMONL12Ga 1 1 0.0LeveledListAddForm Ammo20ga75 NLAAMMONL20Ga 1 1 0.0LeveledListAddForm Ammo20GaScrounger NLAAMMONL20Ga 1 1 0.0LeveledListAddForm Ammo22375 NLAAMMONL223 1 1 0.0LeveledListAddForm Ammo22LR75 NLAAMMONL22LR 1 1 0.0LeveledListAddForm Ammo22LRScrounger NLAAMMONL22LR 1 1 0.0LeveledListAddForm Ammo25mmGrenade75 NLAAMMONL25mmGrenade 1 1 0.0LeveledListAddForm Ammo25mmGrenade100 NLAAMMONL25mmGrenade 1 1 0.0LeveledListAddForm Ammo25mmGrenadeScrounger NLAAMMONL25mmGrenade 1 1 0.0LeveledListAddForm Ammo357magnum75 NLAAMMONL357 1 1 0.0LeveledListAddForm Ammo357magnumScrounger NLAAMMONL357 1 1 0.0LeveledListAddForm Ammo38special75 NLAAMMONL357 1 1 0.0LeveledListAddForm Ammo40mmGrenade75 NLAAMMONL40mmGrenade 1 1 0.0LeveledListAddForm Ammo40mmGrenade100 NLAAMMONL40mmGrenade 1 1 0.0LeveledListAddForm Ammo40mmGrenadeScrounger NLAAMMONL40mmGrenade 1 1 0.0LeveledListAddForm Ammo44magnum75 NLAAMMONL44 1 1 0.0LeveledListAddForm Ammo44magnumScrounger NLAAMMONL44 1 1 0.0LeveledListAddForm Ammo44special25 NLAAMMONL44 1 1 0.0LeveledListAddForm Ammo44special75 NLAAMMONL44 1 1 0.0LeveledListAddForm Ammo457075 NLAAMMONL4570 1 1 0.0LeveledListAddForm Ammo4570Scrounger NLAAMMONL4570 1 1 0.0LeveledListAddForm Ammo556mm75 NLAAMMONL223 1 1 0.0LeveledListAddForm Ammo556mmScrounger NLAAMMONL223 1 1 0.0LeveledListAddForm Ammo9mm75 NLAAMMONL9mm 1 1 0.0LeveledListAddForm Ammo9mmScrounger NLAAMMONL9mm 1 1 0.0LeveledListAddForm AmmoElectronChargePack75 NLAAMMONLECP 1 1 0.0LeveledListAddForm AmmoElectronChargePackScrounger NLAAMMONLECP 1 1 0.0LeveledListAddForm AmmoMicroFusionCell75 NLAAMMONLMFC 1 1 0.0LeveledListAddForm AmmoMicroFusionCellScrounger NLAAMMONLMFC 1 1 0.0LeveledListAddForm AmmoSmallEnergyCell75 NLAAMMONLSEC 1 1 0.0LeveledListAddForm AmmoSmallEnergyCellScrounger NLAAMMONLSEC 1 1 0.0LeveledListAddForm VendorAmmo9mm NLAAMMONL9mm 1 1 0.0LeveledListAddForm VendorAmmo10mm NLAAMMONL10mm 1 1 0.0LeveledListAddForm VendorAmmo127mm NLAAMMONL127mm 1 1 0.0LeveledListAddForm VendorAmmo12Ga NLAAMMONL12Ga 1 1 0.0LeveledListAddForm VendorAmmo20Ga NLAAMMONL20Ga 1 1 0.0LeveledListAddForm VendorAmmo22LR NLAAMMONL22LR 1 1 0.0LeveledListAddForm VendorAmmo25mmGrenade NLAAMMONL25mmGrenade 1 1 0.0LeveledListAddForm VendorAmmo40mmGrenade NLAAMMONL40mmGrenade 1 1 0.0LeveledListAddForm VendorAmmo357magnum NLAAMMONL357 1 1 0.0LeveledListAddForm VendorAmmo44magnum NLAAMMONL44 1 1 0.0LeveledListAddForm VendorAmmo556mm NLAAMMONL223 1 1 0.0LeveledListAddForm VendorAmmo4570 NLAAMMONL4570 1 1 0.0LeveledListAddForm VendorAmmoElectronChargePack NLAAMMONLECP 1 1 0.0LeveledListAddForm VendorAmmoMicroFusionCell NLAAMMONLMFC 1 1 0.0LeveledListAddForm VendorAmmoSmallEnergyCell NLAAMMONLSEC 1 1 0.0LeveledListAddForm LootAmmo9mm NLAAMMONL9mm 1 1 0.0LeveledListAddForm LootAmmo10mm NLAAMMONL10mm 1 1 0.0LeveledListAddForm LootAmmo127mm NLAAMMONL127mm 1 1 0.0LeveledListAddForm LootAmmo12Ga NLAAMMONL12Ga 1 1 0.0LeveledListAddForm LootAmmo20Ga NLAAMMONL20Ga 1 1 0.0LeveledListAddForm LootAmmo22LR NLAAMMONL22LR 1 1 0.0LeveledListAddForm LootAmmo25mmGrenade NLAAMMONL25mmGrenade 1 1 0.0LeveledListAddForm LootAmmo40mmGrenade NLAAMMONL40mmGrenade 1 1 0.0LeveledListAddForm LootAmmo357magnum NLAAMMONL357 1 1 0.0LeveledListAddForm LootAmmo44magnum NLAAMMONL44 1 1 0.0LeveledListAddForm LootAmmo556mm NLAAMMONL223 1 1 0.0LeveledListAddForm LootAmmo4570 NLAAMMONL4570 1 1 0.0LeveledListAddForm LootAmmoElectronChargePack NLAAMMONLECP 1 1 0.0LeveledListAddForm LootAmmoMicroFusionCell NLAAMMONLMFC 1 1 0.0LeveledListAddForm LootAmmoSmallEnergyCell NLAAMMONLSEC 1 1 0.0LeveledListAddForm NVDLC02Ammo45Auto75 NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 2 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 3 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 4 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 5 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 6 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 7 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 8 0.0LeveledListAddForm NVDLC02Ammo45Auto100 NLAAMMONL45 1 9 0.0LeveledListAddForm NVDLC02Ammo45AutoScrounger NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02VendorAmmo45Auto NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02VendorAmmo45Auto50 NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02VendorAmmo45AutoHigh NLAAMMONL45 1 1 0.0LeveledListAddForm NVDLC02VendorAmmo45AutoHigh50 NLAAMMONL45 1 1 0.0EndifEnd When I check a leveled list with dumplevlist it indicates that my ammo was added to the list and appears alongside standard ammo in the same quantities in the dump. The ammo is for sale from 2 separate vendors, but the problem is, when I try to buy some of my custom ammo from a vendor, the game puts less ammo in my inventory than it should. Example - I'm buying 25 custom rounds, all 25 rounds are gone from merchant's inventory, but only 8 spawned in my inventory. I guess I'm not seeing the whole picture here as I'm not very experienced and could not find any info on this. I would be very grateful if someone could chime in with a suggestion as to what may be my oversight in this case. Link to comment Share on other sites More sharing options...
RoyBatterian Posted October 1, 2016 Share Posted October 1, 2016 Change all the 0.0 to 1 and see how it behaves. Also check in your custom lists and make sure the rounds are at 100% health. Link to comment Share on other sites More sharing options...
EmeraldHaze Posted October 1, 2016 Author Share Posted October 1, 2016 (edited) Thanks for your input. Unfortunately, changing item health value didn't help. In fact, I'm trying to inject my custom ammo into vanilla existing leveled lists, and all the vanilla ammo inside them has 0% health too. What I'm currently doing is just adding my custom ammo inside vanilla lists in the same amount as vanilla ammo that is already added there. Still, when I buy 20 Custom Energy Cells I get 3 in my inventory, when I buy 20 Custom .223 rounds - I get 11, so no consistency there. I've seen ammo added into lists with fancy NVSE functions, but that just simplifies scripts and makes them less laborous to edit, so my approach should work the same way, yet it doesn't. Oh well, just going to try to make my script to work as intended for a while longer before resorting to other methods. Well, no matter what I tried, my custom ammo would not integrate properly into vanilla leveled lists through scripts. Maybe there is a way using NVSE functions, but I don't have the time or motivation to figure it out. Instead i decided to use ammo boxes, wich I integrated into vanilla lists without any problems. When a player buys one - a bunch of ammo gets added to his inventory. Clean and simple, case closed. Edited October 1, 2016 by EmeraldHaze Link to comment Share on other sites More sharing options...
RoyBatterian Posted October 1, 2016 Share Posted October 1, 2016 That's a weird issue that I've never seen before. Perhaps some other mod is causing it. Link to comment Share on other sites More sharing options...
EmeraldHaze Posted October 2, 2016 Author Share Posted October 2, 2016 Yeah, very well may be. I use a heavy enough load order of about 90 plugins. Granted, most of them are bug-fixes and ease of life stuff plus scripted to boot, but conflicts creep in with scripted mods too. Or maybe it's just our old "pal" Gamebryo being a "solid" engine that it is =) Link to comment Share on other sites More sharing options...
Recommended Posts