Jump to content

Integrating custom ammo to leveled lists using scripts - need help


EmeraldHaze

Recommended Posts

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):

 

  Reveal hidden contents

 

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

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 by EmeraldHaze
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...