Jump to content

Scripting: Check if something exists


enlo

Recommended Posts

Couldn't find any information on this so I fear the worst:

 

Is there some way that you can check ingame if a mod is installed or a specific item exists?

 

I'm currently creating a mod that could incorporate some other mods, if the user has installed it.

The only way I could think of is a menu where the user has to answer some yes/no questions about his setup.

 

Any ideas / script references that I missed?

 

 

Thanks in advance :)

Link to comment
Share on other sites

It is possible that this function can solve the OP problem. But it seems very tricky to do, and the benefit may not be worth the pain. Every usage of the objects which "may or may not be present" need to be guarded with a script. Suppose some objects from the other mod are to be present in a room, unless the mod is not available. Then all the objects need to be placed as initially disabled, and a script needs to come and enable them if the mod exists. For a small number of changes, this may be ok, but it might quickly become tedious.

 

If the items of interest are from other mods available on newvegasnexus, perhaps contacting the authors to get permission to include the items in your mod will be easier. This is not legal if the items are in some commercial product, in particular if they are in FO3 or any DLC.

 

FYI, some modders and some players don't install NVSE, so you may be limiting your audience a little by requiring it.

Link to comment
Share on other sites

The house themes of FO3 worked off being placed but disabled then linked to a parent marker which enables them if the player buys that theme.

This theme that theme the player would have to buy an then so chose which one based off if they had something installed.

As a way to avoid either having to use NVSE or forcing the player to have this or that mod installed.

 

This is kind of silly though. I think you should either make seperate versions of your mod, or require certian mods to be installed to use your mod.

Link to comment
Share on other sites

It is possible that this function can solve the OP problem. But it seems very tricky to do, and the benefit may not be worth the pain. Every usage of the objects which "may or may not be present" need to be guarded with a script. Suppose some objects from the other mod are to be present in a room, unless the mod is not available. Then all the objects need to be placed as initially disabled, and a script needs to come and enable them if the mod exists. For a small number of changes, this may be ok, but it might quickly become tedious.

 

If the items of interest are from other mods available on newvegasnexus, perhaps contacting the authors to get permission to include the items in your mod will be easier. This is not legal if the items are in some commercial product, in particular if they are in FO3 or any DLC.

 

FYI, some modders and some players don't install NVSE, so you may be limiting your audience a little by requiring it.

 

You just run it once at startup to set a variable:

 

  if (GetGameLoaded) ;runs once at startup  
  if (IsModLoaded "FO3 Wanderers Edition - Main File.esp")
   set iFWELoaded to 1
  endif
 endif

Link to comment
Share on other sites

thanks guys, I thats the function I was looking for :thumbsup:

 

I'm building a shopping mall so it would be nice to include some of the popular clothing mods (those who let me). Including those into the mod would be easier but then I would be responsible for keeping it up to date... and since I'm lazy and mod for my own pleasure that's not the best solution ;)

 

I think I'll try to give each mod an own shop so it can simply be closed (then you can't see all the exclamation marks standing around) with a door instead of enabling/disabling everything.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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