Saturday 16 January 2010

Tutorial: Customizing the PocketPlane - Part 1


This information applies to Innodil's Pocket Plane version 2.0 or higher only!
In this tutorial you'll learn how to customize Pocket Plane to your needs and preferences. You do not need the toolset for this and no modding skills are required. Simply edit a 2DA file, dump it in the override folder and it's done! You can customize which containers and NPCs are in the plane, where they are located and how they are called.  Interested in a Pocket Plane completely tailored to your own needs and personal preferences? Read on!


IMPORTANT NOTE: You should do customizations before using the pocketplane to store items. As soon as container contain items and you remove or place them somewhere else, all your items will be lost when you reload the area layout. You can however still add new/additional NPCs and container after you start using the pocket plane. If you want a custom layout, I advise you to create it before really starting to play!

Getting Started

This tutorial involves editing (M)2DA files. There are 2 ways to edit those files:
  1. If you have the toolset installed and know how to use ExcelProcessor.exe: Download the 2DA Sources and edit them as usual. Note: in the remaining tutorial screenshots of GDApp are used. The tutorial also applies to using Excel to edit the 2DA sources of course.
  2. If you don't have the toolset. Please download GDApp and extract it somewhere. Next, Download the GDA files and also extract them somewhere.
For those using the 2DA Sources, all the 2DA files are in 1 excel file for easy editing: inno_pp_custom_2da.xls


An important note about the "mod's install dir"
You will have to copy files to the mod's core/override folder. In all tutorials, I will use my own paths on a Windows 7 machine. If you use another OS like Windows Vista or Windows XP, the first part of the folder might differ. It is always in your User Folder under My Documents or Documents on some operating systems. If you really don't know where this folder is, do a search on your C:\ drive for the folder called inno_pp. This folder is the mod's install folder and I will always refer to a folder inside this install path.
In all tutorials I will refer to this folder as  [My Documents]\BioWare\Dragon Age\AddIns\inno_pp. 

Understanding the layout M2DA files

First of all, inno_pp_layout.gda is actually and M2DA file. This means you can have multiple gda file that will be merged into 1 file when the game reads them. Merging is done based on the ID column. If 2 files have the same ID, the last one loaded will "win". This being said, this tutorial will be based on editing the original layout M2DA, obviously, you can create a new file or edit another "layout M2DA" in exactly the same way, just make sure your ID are unique if you don't want to override things! For more information about M2DA files, please refer to the DA:O Toolset wiki.

Start op GDApp. Use File -> Open and open the GDA file "inno_pp_layout.gda".
You should see the following:

Note: some values may be different. You can ignore this.


Since the columns names can not always be read in GDApp, I'll list them here for reference:
  1. ID: the ID of the row, they must be in ascending order, but there can be gaps
  2. Resource: the resource to place (must be a placeable *.utp or creature *.utc resource, everything else will simply silently fail and not be added)
  3. ResourceType: the type of resource: 1 = placeable (*.utp), 2 = creature (*.utc)
  4. Tag: The tag to give the the resource, read below about tags and their importance!
  5. Name: the name to give the resource in the game (also what you see when holding TAB)
  6. PosX: The X coordinate to place the resource at
  7. PosY: The Y coordinate to place the resource at
  8. PosZ: The Z coordinate to place the resource at
  9. PosAngle: The angle/orientation of the resource (i.e. which direction is the front facing at)
There are a few things I need to explain about the tags first:
  1. They are very important. The area loading is based on these tags. Basically what happens when you reload the Pocket Plane the script will search if there is already something with that tag, and in that case just move and rename the object instead of creating it. If it can not be found, the object will be created. So if you for example, on ID 3 would put inno_pp_weaponstand_2.utp instead of inno_pp_weaponstand.utp and you would not change the tag, the object wouldn't change, because the script will only move and rename it. 
  2. All tags in the 2DA file must be unique, the reason is explained above, multiple objects with the same tag will just cause the first one created with that tag to be moved. Don't try it :)
  3. There are 4 exceptions to the tags, these 4 are marked in the image above in red. This is because they are either merchant NPCs or magical storages, both which use a merchant store. To use a merchant store in the Pocket Plane the object must have one of those tags (and some scripting or dialogue, but that will be covered in another tutorial). The 4 lines with those tags will always be created again, you will not lose any items because of this, because your items are in the merchant store not in the inventory of the NPC or chest offering access to them. Anyway, don't worry too much about this now as this will be explained in further details in a separate tutorial. For now you just need to remember to use these tags for the merchants and magical chest.
So basically, you just tell the mod what (resource, resource type, name) should be placed where (pos x, y, z, angle). Of course you might be wondering how to get all those numbers, I'll get back to that later on.
For now let us focus on changing the rest of the file, but reusing the existing coordinates.

Editing the layout M2DA files

So now that we understand how these M2DA files work, let's play with them a little bit. First of all, in this tutorial, we will reuse the available coordinates, simply because I think it warrants a separate tutorial on how to get these things in a doable way.
First of all, these coordinates don't tell you much, you should load the game and check where each container or NPC is to get an idea where each coordinate actually refers too. To help you out with this, I created the below "layout map" for easy reference. The numbers on the map correspond with the ID in the M2DA file, so if you want a certain container on a certain location, just lookup the ID on the map below, and enter your information on that row in the M2DA file.


Pocket Plane locations


So let's create a custom layout with following items in it:

The 2DA file after our changes

I marked some interesting changes I made in red and numbered them. So let's take a look at them.

  1. First of all have a look at the ID column. As you can see there are gaps, because I removed a few rows because I don't want anything in those locations. These gaps are fine, but be careful: the ID values must be sorted from low to high!
  2. I changed a bunch of names to things more to my liking. No need to change tags if you only touch the name or location...
  3. This is somewhat more complex: I basically removed a merchant NPC and replaced him by a chest. Note that the chest will now "sell" what the NPC sold before. I'll get back on how to influence that again another tutorial (yes, lots to go :-) ). Some important things here: I changed the ResourceType to 1 because the Resource is now a placeable (*.utp), and secondly, I did not change the Tag
  4. Here I changed some resources, you can use anything available in the layout 2DA file. It is also possible to add custom containers or NPCs but I will get back to that in a separate tutorial. But note that I changed the tags for these lines!

Making it happen


OK, so when you are done editing, choose File -> Save. Next copy the "inno_pp_layout.gda" you just saved to [My Documents]\BioWare\Dragon Age\AddIns\inno_pp\core\override. Now you can fire up the game, teleport to the plane. If this was the first time you entered the plane, your changes will immediately visible, if not, you need to refresh the layout.
To do this, talk to The Keeper, choose "Can you do something for me?", next "Reload the area layout."   Note that the merchants NPC and magical chest disappear after the conversation is over, this is OK, you will not lose any items. Just leave the Pocket Plane and when you return they will be back with their original contents. So leave and come back to see your custom layout in all it's glory :)

Note: if you don't see the dialogue option, but only "Uhmm, Pocket Plane?", just follow that dialogue first. After that, the other options will be available.


This is the most basic adjusting you can do and it should suffice for most users. I will add other tutorials later on that explain how to add custom containers and NPCs in the pocket plane.
But first you can expect tutorials on how to customize those merchants! Keep checking back for more...

2 comments:

  1. Looks nice, waiting for the release of 2.0 :)

    ReplyDelete
  2. Not sure what I'm doing wrong. I had to create the override folder, as there wasn't one already there. Saved the GDA to the override folder. Told the Keeper to update the plane, and...nothing. I left, came back, and the storage units that I changed the name on were exactly the same. Any suggestions?

    ReplyDelete

Please note that I will only provide limited support in the comments section. If you need help, please check the "discussions" tab on the Project site.