Jump to content

Creating a Custom Companion


EternalKnight001

Recommended Posts

Well, I don't want to make brand new abilities, just give him access to already made ones from various different places. Creating a custom class sounds like it's likely what I'll have to do. And ok, I'll make the duplicate file and drop the script into there. Should I place it into a specific slot out of the 600+ ones available, or just drop it in at the very end, or..?
Link to comment
Share on other sites

It seems to me a bit unnecessary to duplicate the module_core and have all the unused functions included in your script. I meant earlier that you should best make a new script (Right Click -> New -> Script) and then click on File -> Manage Modules -> Properties... -> Script -> Your_New_Script. Paste into Your_New_Script:

#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
   event ev   = GetCurrentEvent();
   int nEvent = GetEventType(ev);

   switch (nEvent)
   {
      case EVENT_TYPE_MODULE_GETCHARSTAGE:
      {
          SetPartyPickerStage("my_char_stage", "partypicker");
          break;
      }
   }
}

 

Of course if you still want to do it with module_core put:

       case EVENT_TYPE_MODULE_GETCHARSTAGE:
       {
           SetPartyPickerStage("char_stage", "partypicker");
           break;
       }

for instance under (the location doesn't matter as long there aren't any syntax errors):

       case EVENT_TYPE_OPTIONS_CHANGED:
       {

       }
       break;

Link to comment
Share on other sites

Ok, I made the new script with the

#include "utility_h"

#include "wrappers_h"

#include "events_h"

void main()

{

event ev = GetCurrentEvent();

int nEvent = GetEventType(ev);

 

switch (nEvent)

{

case EVENT_TYPE_MODULE_GETCHARSTAGE:

{

SetPartyPickerStage("my_char_stage", "partypicker");

break;

}

}

}

 

Should I export it and put it into the override folder? Also, since I made this in the new module instead of the Single Player module, will it still work if I do need to put it into override?

Link to comment
Share on other sites

Export it but let it remain in your add-in folder. You should maybe look at this tutorial: http://dragonagemodding.wordpress.com/2009/11/11/a-start-creating-a-module-to-give-your-player-an-item/ this will explain what modules are. I hope you did not open under manage modules single player because you've to extent Single player not override it. You should maybe then restore the database if you changed any core files in single player: http://social.bioware.com/wiki/datoolset/index.php/Database_backup_and_restore#Restoring_the_Database_if_it_failed_after_Installation

 

The most important part is to set the "Extended Module" to "Single Player", tick in the Hierarchy "Single Player" and set "script" to your one. If you did all right your add-in should be loaded and a dialog with no text should appear (this is just for debugging purposes later you can delete EVENT_TYPE_MODULE_LOAD again):

#include "utility_h"
#include "wrappers_h"
#include "events_h"

void main()
{
 event ev = GetCurrentEvent();
 int nEventType = GetEventType(ev);

 switch (nEventType)
 {
   case EVENT_TYPE_MODULE_LOAD:
   { 
//if you want text in the pop up: String Editor, new string 818120399
       ShowPopup( 818120399, 4); //you can also use PrintToLog (but don't forget to turn on logging and include log as header file) or DisplayFloatyMessage
       break;
   }
   case EVENT_TYPE_MODULE_GETCHARSTAGE:
   {
       SetPartyPickerStage("my_char_stage", "partypicker");
       break;
   }
 }
}

 

I also found an interesting comment about module_core

...you should NOT use "module_core" as the script (as found in module properties) for an add-in that extends an existing module, otherwise you will encounter issues that may include slow-downs during conversations and attribute allocation.

 

Here some more tutorials:

http://social.bioware.com/wiki/datoolset/index.php/Creating_a_module#Creating_a_new_Module

http://social.bioware.com/wiki/datoolset/index.php/Adding_a_New_Spell_Tutorial

http://www.x3dmod.com/da/da_new_class.htm (this is not for special classes like Dog, Shale)

http://social.bioware.com/wiki/datoolset/index.php/Useful_Scripts

 

Also, since I made this in the new module instead of the Single Player module, will it still work if I do need to put it into override?

It will work, even if it is not in the override folder, you only have to extent the Single Player module.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...