Difference between revisions of "PRCSCR"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(PRCSCR in detail)
(Scripts)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
PRCSCR enables a Modder to add any content into the existing Campaign with a custom Addin Module.
+
The PRCSCR system enables a modder to add content into existing campaign areas in a fully compatible manner.
  
 
== Overview ==
 
== Overview ==
  
PRCSCR (Post Release Content Script) actually is the name of a M2DA. However its sole purpose is to give an entry point into the main campaign and run a single associated script, which in turn starts to "inject" content into the campaign. This whole process is used by Bioware in all of their DLC content and is of high value to any modder.
+
PRCSCR (Post Release Content Script) is a sytem that executes custom scripts on entry into a game area in a manner that is fully [[Compatibility|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).
  
This process naturally involves Scripts as the name already reveals, however for small mods this can be a one time situation. This section contains some templates for scripts, for anyone not too familar.
+
== PRCSCR M2DA ==
  
== PRCSCR in detail ==
+
The system works by using an [[2DA#Extending_the_game_via_M2DAs|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.
  
One may ask, why this process is so important, while it was not needed for them. The task here is to "inject" content, without touching a single Resource from the Main campaign. This option still remains ,but is not needed. If it worked before, it was due altered Resources which in most situation is easier but can interact badly with other Modules and causes serious trouble once custom resources are removed, unless it is treated with absolute care. <small>(be warned)</small>
+
The M2DA override for the PRCSCR system is [[PRCSCR.xls]].
  
Ironically, this method while being a high hurdle to take for starters, is the most easy to grasp once taken.
+
== Scripts ==
  
The Idea is, that you provide a custom PRCSCR M2DA, with Information on which custom Script to run once the player enters a specific Area. The Game will read the M2DA all by itself. The Script creates new waypoints, quests, NPC's etc. Basically what Bioware does with its DLC's ,that as soon the player enters any Area ,instantly the "Lucky Ring" for instance spawns into the players inventory. The new Resources can then spawn further things on their own ,and the purpose of PRCSCR ends here.
+
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.
  
== PRCSCR M2DA ==
+
'''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.
  
This [[2DA|M2DA]] is the file you create for your module, which tell what script to run, at which point in the game. It is made from normal Excel files.
+
'''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).
  
:''See Article: [[PRCSCR.xls]]''
+
'''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). 
  
== Scripts ==
+
'''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")).
 
+
This is, by any means, not an easy task for many people. This should not be the main portal of everything evolving around [[Scripts]]. However a collection of ready to use Scripts to use for various cases one may need.
+
 
+
:''See Article: [[PRCSCR Script Templates]]''
+
 
+
'''Note''': The script will be run every time the player enters the specified area, so you'll want to have an associated plot flag to ensure that the changes are only made once.
+
  
 
== Usage Scenarios ==
 
== Usage Scenarios ==
Line 33: Line 27:
 
'''Where it applies:'''
 
'''Where it applies:'''
  
*You have made a new Area, an interior of a House in Denerim. But no Entrance Door exists ,unless you edit the stock Denerim Area. With PRCSCR you can spawn an Entrance.
+
*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 Item. But there is no shop selling your item, unless you edit one. With PRCSCR you can spawn the Item in a Shop or your Inventory, or anywhere else. You can even spawn your own Shopkeeper into a existing Area ,which holds your Item without editting it.
+
 
+
*You have made a new Map Pin on the map leading to your Area. However that Pin can only be active all the time. With PRCSCR, you can "spawn" this Map Pin after certain triggers which exist in the Main campaign without editting those. For example you may want that Pin only active once you have been greeted by the Dalish.
+
 
+
'''Where it doesnt need to apply:'''
+
 
+
*You have made a new House interior for Denerim but no entrance exists. However you already used PRCSCR to activate a Map Pin leading into a custom Area. In the custom Area you added a quest for instance, which upon activation can spawn that entrance on its own.  
+
  
*You have made an Item, but nobody can receive it. However you already used PRCSCR to spawn a door into your custom House, in which a custom NPC resides who has that Item for instance.
+
*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 map, but you would need PRCSCR to activate it. However you already used PRCSCR to add an Item into the World, which can lead to activate the Map Pin on its own.
+
*You have made a new [[Map_tutorial#Activating_and_deactivating_map_pins|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:'''
  
As you can see, you only need to use PRCSCR in at least one case. Anything further can be based on it.
+
*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.
 +
{{Languages}}

Latest revision as of 08:43, 30 March 2011

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  • русский