Mod Activating Quest Scripts

Post » Tue May 17, 2011 7:29 am

So, I tried to get some help on this over at the Nexus forums, but no such luck, so I thought I'd give it a try here.

I figured what I was trying to do was reasonably simple. I have a handful of items that I want to add to the bottom of form lists by a script so that they don't overwrite the original form lists. So, with my NVSE in hand, I made a quest and checked "game start enabled", then attached the following script.

scriptname empammoexpansionenablescriptbegin gamemode        ListAddForm AmmoList556mm Ammo556mmEMP        ListAddForm AmmoList50MG Ammo50MGEMP        ListAddForm AmmoList308 Ammo308EMP        ListAddForm AmmoListMissile AmmoEMPMissile        ListAddForm AmmoList25mmGrenade Ammo25mmGrenadeEMP        ListAddForm AmmoList40mmGrenade Ammo40mmGrenadeEMP        ListAddForm AmmoList12Ga Ammo12GaEMPSlug        ListAddForm AmmoList20Ga Ammo20GaEMPSlug        ShowMessage EMPAmmoEnabled        stopquest empammoexpansionenablerend


This script works perfectly... once. That's the problem. When the player exits and reloads the game, all the form lists seem to "reset" to their defaults. So, though it works as intended the first time the quest runs (and, subsequently, works if the quest is started by a console command every time), the changes do not seem to save along with the game save file. Removing the "stopquest" line simply causes the script to go haywire and add endless copies to the form lists. I also would prefer that the script and quest stop running as soon as they've done what they're supposed to, instead of making a pointless background loop. I also tried a "runonce" float variable without stopping the quest, but that had the same problems.

So, what I'm trying to figure out is, A) is it possible to make scripted changes permanent effects to a save file (I also tested this with the setname command, which is also wiped on game exit) and B) if it's not, is it possible to make a script or quest that runs ONCE, every time a save game is loaded?

I have several ideas for mods with high compatibility that could use this if I could figure out this method, such as "Item sorter" mods that rename items with a setname script without changing any of their other attributes. Any help would be greatly appreciated!
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Tue May 17, 2011 5:37 am

Replied at newvegasnexus. Sometimes you need to wait more than 12 hours before bumping/posting elsewhere, 24 hours is a good rule of thumb.
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am

Post » Tue May 17, 2011 1:30 am

Replied at newvegasnexus. Sometimes you need to wait more than 12 hours before bumping/posting elsewhere, 24 hours is a good rule of thumb.


Sorry, got a little desperate. Most of those 12 hours I spent doing nothing but trying to figure it out on my own, heh. Thanks again for trying to help, though! It's still an issue, and I feel like this post is based a little more on the add item issue where my nexus post was about the ammo swapping issue, but I'll try to keep my spam down while I figure this out and just make my questions over there.
User avatar
mishionary
 
Posts: 3414
Joined: Tue Feb 20, 2007 6:19 am


Return to Fallout: New Vegas