Jump to content

Quest Stage To Detect NVSE Help


XxLunaMothxX

Recommended Posts

Alright, so I've been talking with Vivanto about getting his flashlight mod to work in my Silent Hill mod, and I ran into a little smudge in one of the steps he provided me with, and he's been gone for quite a while so I'm turning to you guys for help.

 

 

Hello,

 

Basically, you need to place some dummy placeholder items (preferably an XMarker, as those are invisible) where the flashlight items would be, and replace them with the actual items if the mod is detected. No separate esp is needed.

 

Detecting a 3rd party file does require NVSE, so you'll need to load the GECK with the nvse_loader. But that doesn't make the rest of your mod need nvse, so don't need to add it as a requirement. You can first detect if nvse is present in a safe way (since it's needed by flashlights anyway), and then detect if the mod is present as well.

 

The only downside to this method is, that dynamically added objects will despawn with the cell respawn timer, but we can just make sure that they only spawn when the player enters the cell to minimize this chance.

 

You will need:
1 quest (MyQuest in the example script)
1 quest script (MyQuestSCT below)
1 XMarker for each item you'd like placed

 

First place all the XMarkers you need, and add unique reference names to them (FlashlightHandheldMarkerREF and FlashlightHarnessMarkerREF in the example).

 

For the quest, check "Startup Enabled" and "Allow Repeated Stages", and attach the MyQuestSCT, default script delay should be fine for it.

 

The script should be something like this (there are likely some errors in it, haven't compiled it myself)

Spoiler

 

We use the quest stage 1 to detect nvse. The reason for that is, that detecing nvse itself requires nvse. However this is a safe way to do it, since we separate the nvse-specific code, which - if no nvse is present - will simply stop executing, yet the main script can continue on safely. Stage 1 should look like this:

Spoiler

 

The item placement can be slightly improved by re-orienting the item afterwards like "rItemPlaced.setAngle X 55.12312", but you'll have to find out the exact rotation angles the hard way.

 

Hope this helps, shout if you're stuck. :smile:

 

//vivanto

 

Everything went well, and such except for the script for the quest stage 1. My script for it looks like this:

 

 

float fVersion
float fRevision
float fBeta



set fVersion to getNVSEVersion
set fRevision to getNVSERevision / 10
set fBeta to getNVSEBeta / 100



set SHFlashlightNVSEQuest.NVSEVersion to fVersion + fRevision + fBeta

 

 

it looked fine in Cipscis, but I keep getting an error saying NVSEVersion is not a function, and that the last line (line 13) is also missing a variable.

 

Any ideas?

 

SOLVED!

Edited by 2cooldays
Link to comment
Share on other sites

Have you launched the GECK with nvse_loader.exe?

 

Easiest way is to create a shortcut to nvse_loader.exe and add -editor to the destination.

 

Yes, or else the script I made for the quest probably wouldn't have went through.

 

Solved somehow? I restarted the GECK again in NVSE, and it worked this time? Huh.

Edited by 2cooldays
Link to comment
Share on other sites

  • Recently Browsing   0 members

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