Extending core game resources

From Nexus Mods Wiki
Jump to: navigation, search


This is a quick tutorial on getting your mod to successfully extend core game resource, which makes your mod available for use with all campaigns.

When to extend core game resources

  • you need your mod to be available to more than one campaign.

When not to extend core game resources

  • you need your mod to be available to only one campaign.
  • your mod relies on module events to fully function.

Unfortunately, core game resources is not a true module. It is a group a resources shared amongst all campaigns. As far as I know, the module event script will trigger only for overridden events. This is common practice for most events. Overriding module events, however, is usually a bad idea.

Extending core game resources

  1. Select manage modules from the file menu.
  2. Select the module you wish to extend core game resources.
  3. Click the properties button.
  4. Click the field next to extended module and select core game resources from the drop-down menu.

All custom module resources should also be set as core game resources.

Creating a new pallete window resource

  1. Right-click the pallete window.
  2. Highlight new and select your desired resource.
  3. Make sure module is set to core game resources and module owner is set to "your_module_name" when creating your resource.

Editing an existing pallete window resource

  1. Make sure desired resource is checked in.
  2. Right-click on desired resource in the pallete window and select properties.
  3. Change module to core game resources and make sure module owner is still "your_module_name".
  4. Click the OK button.

Creating a new talk table string

  1. Select string editor from the tools menu.
  2. Right-click in the white area of the string editor; highlight insert; and select insert string.
  3. Make sure Table is set to core game resources talk table and owner module is set to "your_module_name" when creating your string.

Editing an existing talk table string

  1. Right-click the desired string and select edit string.
  2. Change table to core game resources talk table and make sure module owner is still "your_module_name".
  3. Click the OK button.

Finding your core game resources talk table string

  1. Make sure filter check-box in the string editor is unchecked.
  2. Click the filter button just above it and click the add filter button in the filter Options.
  3. Double-click the field under filter on and select OwnerModuleID from the drop-down menu.
  4. Double-click the field under value and select "your_module_name" from the drop-down menu.
  5. Click the OK button.

Place all GDAs and DDSs in the "your_module_name\core\override" folder. Re-compile your scripts and re-export your talk table. Everything, other than "your_module_name".cif, should now be in your "your_module_name"\core\override folder. This is the desired scope for your project.

If you have any old compiles and/or exports in "your_module_name\module\override", then be sure to delete them. If you find any of your resources still compiling and/or exporting to "your_module_name\module\override", then you didn't not set its Properties correctly.

When packaging your mod (assuming builder-to-player), select your GDAs, DDSs, talk table, and scripts to be included from "your_module_name"\core\override (the .nss files aren't needed but it's your choice). Also, select the "your_module_name".cif file to be included from "your_module_name"\module. Package your mod and enjoy it across all campaigns.

Note: I highly advise against exporting project resources to the "packages\core\override" folder. It is seldom needed (basically core script overrides and mod patches) and sometimes detrimental. I know the toolset has a nasty habit of doing this automatically. Simply delete the "toolsetexport" folder within the "packages\core\override" folder after every compile/export.