Difference between revisions of "How-tos"

From Dragon Age Toolset Wiki
Jump to: navigation, search
Line 122: Line 122:
 
Look here: [[Event override]]
 
Look here: [[Event override]]
  
== Create a lootable placeable that vanishes when looted ==
 
  
For a player-usable placeable, use the following event script to make it give its contents to the player and then vanish when clicked on.
 
 
<dascript>
 
#include "wrappers_h"
 
void main()
 
{
 
event ev = GetCurrentEvent();
 
int nEventType = GetEventType(ev);
 
    switch (nEventType)
 
    {
 
        case EVENT_TYPE_USE:
 
        {
 
        //MoveAllItems(OBJECT_SELF, GetHero());
 
        AddCreatureMoney (1000000, GetHero(), TRUE);
 
        Safe_Destroy_Object(OBJECT_SELF);
 
        }
 
    }
 
}
 
</dascript>
 
 
If you wanted to use standard resources you could achieve the same thing (though not destroying the placeable) simply by adding "_autoloot" to the end of the placeable's tag.
 
 
== Move the player to a new area after a cutscene plays ==
 
 
Stand-alone cutscenes have an "end script" parameter that sets a script to run once the cutscene ends. Use a script such as the following:
 
 
<dascript>
 
void main()
 
{
 
  DoAreaTransition("destination_area_tag", "destination_waypoint_tag");
 
}
 
</dascript>
 
 
[[category:tutorials]]
 
[[category:tutorials]]

Revision as of 08:40, 25 January 2010

Add new music

Open up FMOD

It creates a project - set the build directory to your DA override directory - with project highlighted, it is over on the top right about half way down the project settings. You can set a default resource directory but that will just set where the file browser defaults to so it is optional. I'd also define a name in those parameters while you are there.

From there, you need a new event !!(not sure whether a blank default is generated or whether you have to right click and make a default blank event)!!. After you have an event, highlight it and change to the event tab (2nd tab). Here you need to import your file to link to that event.

On that tab I think it creates a empty row for your new event - right click and add wavetable or something like that - I think I use the top option. (Again, might be wrong but the basic goal is getting a audio file in that screen that plays when you hit the play button at the top)

Browse to your wav file or whatever you have.

From there you should be able to play the sound both in the pop-up box and (once that is closed) back in the event tab. You'll see the name of the wave in that once empty row (IIRC).

If you want, you can add layers of sounds to this event using the same process over and over, but keeping it simple; we'll just move along.

Now you have a project and an event. You can set various parameters on the first tab that alter pitch etc on the first tab. (When you import the sound, you set whether it is a one shot or looping).

Once you have that done, go to the top drop down and find build. Build the files and you should see extra files in your override directory.

From there, just open up the toolset (or hit refresh from within the toolset) and your project and event sounds should show up in the listing of sounds.

You can then drag and drop them into the game or cutscene and they will play.

Adding music to cutscenes

The way we have been doing the music changes is via placed sound objects. These sound objects are generally created in FMOD, and in FMOD you can say if the music will persist after the cutscene or end when the cutscene ends.

We are just using other sounds to switch music tracks. Designers can add music switch parameter to any sound in Fmod Designer, usually this is just VO line to change music track, for example:

FMOD music switch.jpg

If there are no other sounds, designers can create empty sound event and add #music parameter there and place this sound on cutscene timeline. Music track has to be defined in the same group as music in current area in “music.fdp” to work.

FMOD music switch 2.jpg

 #music:name,1 – non looping, for stingers
 #music:name – for looping music

Another way


1. Open up FMOD (fmod comes with dragon age, do a search for fmod in dragon age directory)

2. File ---> New Project --> and call the project whatever you want and place it in whatever folder you want.

3. Double click the folder under Hierarchy (purple icon folder) and an event will appear beneath it. Name this event whatever you want. (If there is no event for some reason right click and add one).

4. Now click "Event Editor" Tab. (Make sure your event was selected before you do this).

5. Right click one of the open sound fields (find it) and click "Add Sound". (just right click all over until you see the option).

6. In this window you will see "LOOPING" and "ONE SHOT" on the right hand side. Looping will be selected by default. If you want your music to loop over & over again even after a cutscene is over leave it there. If you want your music to play ONE TIME then select "One Shot".

7. Now it's time to pick your music file by clicking "new wavetable". Browse to your music file (wav), select it and press ok.

8. VERY VERY IMPORTANT.. YOU MUST DO THIS STEP....... Right click slightly above the timeline and click "ADD PARAMETER".

9. Now right click your new blank parameter, look at the bottom and click "PARAMETER PROPERTIES". Another new window will pop up.

10. VERY IMPORTANT..... Name this parameter:

  #duck:music,1000,0,5000,-30      

Now click ok.

11. Your new parameter should read: #duck:music,1000,0,5000,-30 (Primary)

12. Now click "Build" and do "build project".

13. Note the new files in the directory where you saved the project.

14. Copy the FEV & FSB files from your FMOD project folder INTO YOUR OVERRIDE folder. I made a folder called music to be organized.

   FMODProjectFolder/whatever.fev
   FMODProjectFolder/whatever.fsb

COPY TO

   Dragon Age\modules\Single Player\override\toolsetexport\music

15. Now open up toolset and navigate to sound palette and you should see your new sound file. Type the name of your sound file in the filter to find it faster. (Do not type the folder name in the filter. The filter works by filenames and not folders).

16. Open a cutscene, then left click your new sound file in the right hand sound palette window to select and highlight it. (just a simple left click on it).

17. Now left click anywhere in your cutscene and a sound icon will be added which is your sound file.

Congrats, 17 steps and now you've added a simple music file to your project and ready for your cutscene. *Sweats*

Removing Modules

Deleting a Module from the Toolset Setup: I created a module called Meep with a unique id of rcfMeep, added in one area with a waypoint, configured the starting area/waypoint info, and exported it with dependencies. And now I want to strip it out.

Step 1: Removing it from the game

  • Navigate to My Documents\Bioware\AddIns
  • Delete the folder called rcfMeep
  • Done

Removing from the game is fairly easy. The toolset? Not so much. The reason for this is that the information is stored in the SQL Database. Now if you just want to remove the module from the Manage Modules list, that is easy.

  • Open Sql Server Management Studio Express. I'm not sure if the default installation installs this or not. If not, it can be downloaded from Microsoft.
  • Connect to the BWDATOOLSET server, assuming that you kept the default options.
  • Expand Databases
  • Expand bw_dragonage_content
  • Expand Tables
  • Right click and select open on the dbo.Modules table
  • This will bring up an excell-like window. Find your module, right-click on the row, and select delete. Say ok to the confirmation.
  • Module is now PERMANENTLY removed. Absolutely no way of recovering it.

Now depending on the size of the Module, you just orphaned a bunch of resources. Areas, placables, conversations, they all get placed into the database. And once you remove the module ID, you just lost your ability to remove these resources. Now do keep in mind that 95% of this junk is just text, so it hardly takes up any room. It's not really a major issue. However if you delete out the resources within the toolset before you remove the module reference you should avoid this.

There is a feature request regarding this functionality: Deleting a module

Override Events (e.g. those in player_core)

Look here: Event override