Extending core game resources
Contents
Overview
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
- Select manage modules from the file menu.
- Select the module you wish to extend core game resources.
- Click the properties button.
- 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
- Right-click the pallete window.
- Highlight new and select your desired resource.
- 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
- Make sure desired resource is checked in.
- Right-click on desired resource in the pallete window and select properties.
- Change module to core game resources and make sure module owner is still "your_module_name".
- Click the OK button.
Creating a new talk table string
- Select string editor from the tools menu.
- Right-click in the white area of the string editor; highlight insert; and select insert string.
- 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
- Right-click the desired string and select edit string.
- Change table to core game resources talk table and make sure module owner is still "your_module_name".
- Click the OK button.
Finding your core game resources talk table string
- Make sure filter check-box in the string editor is unchecked.
- Click the filter button just above it and click the add filter button in the filter Options.
- Double-click the field under filter on and select OwnerModuleID from the drop-down menu.
- Double-click the field under value and select "your_module_name" from the drop-down menu.
- 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.