PRCSCR

From Dragon Age Toolset Wiki
Jump to: navigation, search

The PRCSCR system enables a modder to add content into existing campaign areas in a fully compatible manner.

Overview

PRCSCR (Post Release Content Script) is a sytem that executes custom scripts on entry into a game area in a manner that is fully compatible with existing campaign resources and 3rd party mods. The custom script can add the necessary hooks for new content to the existing area; placing items on vendors/in containers, adding map waypoints, spawning NPCs, adding doors/transitions to new areas, etc. This system is used by Bioware's DLC to add new content hooks, and it is the preferred option for integrating new content because it does not modify or change any existing campaign resources (e.g. it is not necessary to modify and override existing areas, which is not compatible with other mods trying to affect the same area).

PRCSCR M2DA

The system works by using an M2DA to specify a custom script to run when entering an area list (alternately, the script can be told to run on entering ANY area list). If multiple M2DAs specify a script to run for the same area list, ALL of these defined scripts will be run, preventing any compatibility issues and allowing for everyone's custom scripts to get a chance to run and do their thing.

The M2DA override for the PRCSCR system is PRCSCR.xls.

Scripts

The usefulness of PRCSCR is that it can run ANY custom script you want. Anything that you can add to the game via scripting can therefore be compatibly added to an existing area. There is a collection of PRCSCR Script Templates that provide PRCSCR scripts for several common tasks.

Note: The script will be run every time the player enters the specified area list, so plot flags or similar methods are needed in the script to ensure that changes are only made once to the area.

Note: A limitation on scripts is that you cannot add merchants or stages via scripting. To add a merchant to an area with PRCSCR, a workaround would be necessary (e.g. creating the merchant in a custom area attached to the same area list that is deployed with the mod, then moving the merchant with PRCSCR to the existing area).

Note: An area list can have several areas. You can't predict which area the player will be in when the area list loads. Fortunately, GetObjectByTag can be used to refer to any object in the current area list (even if it isn't in the current area).

Note: You can have a different script for each area list. If you prefer to have one script for all area lists, you may need to test which area list has loaded. A neat way of doing that is IsObjectValid(GetObjectByTag("area-tag")).

Usage Scenarios

Where it applies:

  • You have made a new area and need to add a door to an existing location that transitions to your new area. With PRCSCR you can spawn an entrance door in an existing area without having to modify the area resources directly.
  • You have made a new item. With PRCSCR you can add the new item to an existing vendor or an existing container without having to edit the vendor/container resource or the area that contains that resource.
  • You have made a new map pin on the world map for a new area. With PRCSCR, you can "spawn" the map pin when the player next enters the game, or in response to certain plot or area conditions, including conditions based on main campaign plot flags (e.g. only after Lothering has been destroyed).

Where it doesn't apply:

  • You have made a new interior area and are placing items or NPCs in this area. Because the new area is unique content for your mod, you do not need to use PRCSCR to modify it. However, you would still probably use PRCSCR to provide a link to your new area from an existing area/world map.


Language: English  • русский