Jump to content

Creating a script/quest that runs every time the game is loaded


Recommended Posts

Pretty much the first time I'm creating an optional NVSE version for a mod and I'm running into problems. I'm used to functions that permanently affect saves (e.g. form list and leveled list stuff) which are attached to quests. Searched for a solution but perhaps my terms weren't good. Anyway, trying to figure out if the problem is in the quest form, the script, if something else entirely needs to be done. Here's the script, for reference.

scn 0AER14SW9700GreenScript

begin GameMode
	if GetNVSEVersion > 0
		SetWeaponCritEffect LaserDisintegrationGreenFXSpell WeapLaserRifleUnique
		SetWeaponCritEffect LaserDisintegrationGreenFXSpell NVDLC05WeapGatlingLaserUnique
	else MessageBox "This version of AER14 and Sprtel-Wood 9700 Green Critical Disintegration requires NVSE."
	endif
	StopQuest 0AER14SW9700GreenQuest
end
Edited by SHAD0WC0BRA
Link to comment
Share on other sites

 

I think "GetGameLoaded" is what I need to use. I want to make sure that this will work before I release a new version, though. If I put everything under "begin GameMode" in a "if GetGameLoaded == 1" block then will that cause the quest/script to run every time the game is loaded? Or is there something more I need to do?

Link to comment
Share on other sites

The way I check if / how often a script is running is by printing a message at the top of the block, like this:

scn 0AER14SW9700GreenScript

begin GameMode

	PrintToConsole "running!";

	if GetNVSEVersion > 0
		SetWeaponCritEffect LaserDisintegrationGreenFXSpell WeapLaserRifleUnique
		SetWeaponCritEffect LaserDisintegrationGreenFXSpell NVDLC05WeapGatlingLaserUnique
	else MessageBox "This version of AER14 and Sprtel-Wood 9700 Green Critical Disintegration requires NVSE."
	endif
	StopQuest 0AER14SW9700GreenQuest
end

Then, once you're in-game, just open the dev console every once in a while and see how often the message pops up!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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