Jump to content

Writing an OMOD script - links broken


MarkInMKUK

Recommended Posts

I'm trying to find a working tutorial for OMOD scripting. All the links I can find either give you code snippets, assuming you have already worked out a simple script, or point to LHammonds tutorial pages which appear to have moved with no link updates.

 

What I am attempting to do is write an OMOD script for a BAIN-ready package (Integration - the Stranded Light - Integrated), so I need to be able to handle choices in the installation options, AND make sure the files end up in Oblivion\Data\whatever, and not Oblivion\Data\Data\whatever (which the only OMOD script for Roberts Male Body v5 does - I had to manually install it eventually). I've used BAIN installers, but have reverted to OMOD as it makes the process simple.

 

Assume I know NOTHING - dictate the process as if to a two-year-old child.

 

The folder structure I am working with is:

 

01 - Resources

 

02 - Enhanced Gameplay - Plugin here

02 - No Gameplay Changes - Alternate Plugin here

 

03 - Body Mod Support - Exnem & variants (HGEC, Growlf)

03 - Body Mod Support - Fantasy Figures

03 - Body Mod Support - Robert's female

 

04 - Body Mod Support - Robert's Male

 

05 - Daedra Seducer Wings and Animation

 

I assume that, for options 03, 04 and 05, I will also need an option to select "Vanilla" (no changes)

Edited by LHammonds
Pointed you to my site.
Link to comment
Share on other sites

I'm trying to find a working tutorial for OMOD scripting. All the links I can find either give you code snippets, assuming you have already worked out a simple script, or point to LHammond tutorial pages which appear to have moved with no link updates.

 

 

You need (obviously) to update your links. Here is LHammonds' home page.

Link to comment
Share on other sites

I was finding the links via Google - the ones from the main wiki all point to the old location too. Thanks for the updated link. Edited by MarkInMKUK
Link to comment
Share on other sites

OK - I think this makes some kinda sense - can you scripting experts give it a once-over and see whether I've made any fundamental errors, please?

 

 

;** Analyzed by http://hammondslegacy.com/obmm/tools_obmm_analyzer.asp **

If VersionLessThan 0.9.13

Message "This mod must be installed by OBMM version 0.9.13 or later to prevent script errors."

FatalError

EndIf

 

;** Requirement Check for Shivering Isles **

IfNot DataFileExists "DLCShiveringIsles.esp"

Message "Shivering Isles not detected. This mod requires Shivering Isles." "Shivering Isles Check"

FatalError

EndIf

 

;**Requirement Check for version of Oblivion **

IfNot OblivionNewerThan 1.2.415.0

Message "This mod requires Oblivion (Shivering Isles) 1.2.416 or higher. Please download and install the official patch."

FatalError

EndIf

 

;Don't do ANYTHING unless told to

DontInstallAnyPlugins

DontInstallAnyDataFiles

 

;Install Resources

CopyDataFolder "01 - Resources\\meshes" "meshes" True

CopyDataFolder "01 - Resources\\Sound" "Sound" True

CopyDataFolder "01 - Resources\\textures" "textures" True

CopyDataFile "01 - Resources\\bgIntegrationIntegratedEV - LAME Resources.bsa" "bgIntegrationIntegratedEV - LAME Resources.bsa"

CopyDataFile "01 - Resources\\bgIntegrationIntegratedEV - Telvanni Tileset.bsa" "bgIntegrationIntegratedEV - Telvanni Tileset.bsa"

CopyDataFile "01 - Resources\\bgIntegrationIntegratedEV - Unique Resources.bsa" "bgIntegrationIntegratedEV - Unique Resources.bsa"

CopyDataFile "01 - Resources\\bgIntegrationIntegratedEV.bsa" "bgIntegrationIntegratedEV.bsa"

 

;Choose Gameplay Version

Select "Choose gameplay adjustments", "|Enhanced", "Minimal"

Case Enhanced

InstallPlugin "02 - Enhanced Gameplay\\bgIntegrationIntegratedEV.esp"

Break

Case Minimal

InstallPlugin "02 - No Gameplay Changes\\bgIntegrationIntegratedEV.esp"

Break

EndSelect

 

;Choose female body type

Select "Choose female body type", "|Vanilla Oblivion", "Exnem/HGEC/Growlf", "Fantasy Figures", "Robert's Female"

Case Vanilla Oblivion

;Do nothing

Break

Case Exnem/HGEC/Growlf

CopyDataFolder "03 - Body Mod Support - Exnem & variants (HGEC, Growlf)\\meshes" "meshes" True

CopyDataFolder "03 - Body Mod Support - Exnem & variants (HGEC, Growlf)\\textures" "textures" True

Break

Case Fantasy Figures

CopyDataFolder "03 - Body Mod Support - Fantasy Figures\\meshes" "meshes" True

CopyDataFolder "03 - Body Mod Support - Fantasy Figures\\textures" "textures" True

Break

Case Robert's Female

CopyDataFolder "03 - Body Mod Support - Robert's Female\\meshes" "meshes" True

CopyDataFolder "03 - Body Mod Support - Robert's Female\\textures" "textures" True

Break

EndSelect

 

;Choose male body type

Select "Choose male body type", "|Vanilla Oblivion", "Robert's Male"

Case Vanilla Oblivion

Break

Case Robert's Male

CopyDataFolder "04 - Body Mod Support - Robert's Male\\meshes" "meshes" True

CopyDataFolder "03 - Body Mod Support - Robert's Male\\textures" "textures" True

Break

EndSelect

 

;Choose wings and animation changes

Select "Add wings to Daedra Seducers?", "No Wings", "|Wings"

Case No Wings

Break

Case Wings

CopyDataFolder "05 - Daedra Seducer Wings and Animation\\meshes" "meshes" True

CopyDataFolder "05 - Daedra Seducer Wings and Animation\\textures" "textures" True

Break

EndSelect

 

 

 

OK - why the heck can't I find a way to paste this code as INDENTED code - I tried the Code tags and got it all on one line. Rssn Frssn text editor

Edited by LHammonds
Corrected my domain URL
Link to comment
Share on other sites

@HeyYou - ok, fixed that - that's strange as I remember cut'n'pasting that chunk of code from LHammond's site and didn't even think to check it.

 

OK - tried running it, and got this:

 

Error in script

 

Invalid argument to function 'InstallPlugin'

This function cannot be used on plugins stored in subdirectories on line 34

 

<sigh> Back to the function listing I guess. :wallbash: CopyPlugin perhaps?

Edited by MarkInMKUK
Link to comment
Share on other sites

IfNot OblivionNewerThan 1.2.415.0

 

I think that should be 1.2.0415, as the latest version is 1.2. 0416.

You are correct that the latest game version is 1.2.0416.

 

I could have sworn that code worked. I'll double-check it and if my code is incorrect, I'll update my script examples...however, it is probably a bit on the late side and nobody has ever pointed this out. lol.

 

If anyone is interested in why my original domain is no longer valid, see this topic.

 

EDIT #1: Well, this is odd. I have OBMM 1.1.12 and Oblivion 1.2.0214 installed. However, I cannot make a simple OMOD fail installation with the "IfNot OblivionNewerThan 1.0"

 

EDIT #2:

Error in script

 

Invalid argument to function 'InstallPlugin'

This function cannot be used on plugins stored in subdirectories on line 34

 

<sigh> Back to the function listing I guess. :wallbash: CopyPlugin perhaps?

According to my Script History page, the "InstallPlugin" function has existed in OBMM since version 0.4.4 and was last modified in version 0.8.7. So I'd guess there is something spelled wrong or there was an error somewhere else and it is reporting that problem erroneously.

 

EDIT #3: I see what you did, you tried to use InstallPlugin incorrectly. OBMM refuses to copy/activate any plugins that are not in the root. Therefore, you must copy the plugin to the root first. You will have to experiment to see if the copy is enough to also "activate" the plugin as well.

 

LHammonds

Link to comment
Share on other sites

Hi LHammonds - thanks for taking a look

 

Once (if) I've got this darn thing to work, would you like the script as a worked example of BAIN-to-OMOD?

Link to comment
Share on other sites

Hi LHammonds - thanks for taking a look

 

Once (if) I've got this darn thing to work, would you like the script as a worked example of BAIN-to-OMOD?

Sure...but I have not used BAIN so I wouldn't have the 1st clue for any advice on it.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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