Jump to content

Unlock Class Specifications Help


Soli2de

Recommended Posts

Hi Guys,

 

I'm brand spanking new to figuring out how modding works, but i've been using mods for quite some time now.

 

I ran into a problem with DA:O Awakening. As i've been playing through it, i've been stopping at the vendors and purchasing the Class Specialization Manuals only to have them not do anything except sit in my inventory bag. From my understandings just purchasing the manuals will unlock the class specializations. I wasn't sure if it was a conflicting mod that might be causing me problems or what the deal is.

 

For DA:O i downloaded and used a mod PHUnlockSpecials and figured if this worked, maybe I could figure out a way to rework the mod to work with Awakening. So I figured out how to dig down into the coding and see if I couldnt figure it out.

 

Here's what I came up with so far:

 

-------------------------------------------------------------------------------------------------------------------------------------------------------

 

#include "utility_h"

#include "sys_rewards_h"

 

void main()

{

event ev = GetCurrentEvent();

int nEvent = GetEventType(ev);

 

switch (nEvent)

{

case EVENT_TYPE_MODULE_START:

{

if (!RW_HasSpecialization(SPEC_ROGUE_ASSASSIN)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_ASSASSIN);

}

if (!RW_HasSpecialization(SPEC_ROGUE_BARD)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_BARD);

}

if (!RW_HasSpecialization(SPEC_ROGUE_DUELIST)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_DUELIST);

}

if (!RW_HasSpecialization(SPEC_ROGUE_RANGER)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_RANGER);

}

if (!RW_HasSpecialization(SPEC_ROGUE_LEGIONNAIRE_SCOUT)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_LEGIONNAIRE_SCOUT);

}

if (!RW_HasSpecialization(SPEC_ROGUE_SHADOW)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_SHADOW);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_BERSERKER)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_BERSERKER);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_CHAMPION)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_CHAMPION);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_REAVER)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_REAVER);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_TEMPLAR)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_TEMPLAR);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_GUARDIAN)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_GUARDIAN);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_SPIRIT_WARRIOR)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_SPIRIT_WARRIOR);

}

if (!RW_HasSpecialization(SPEC_WIZARD_ARCANE_WARRIOR)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_ARCANE_WARRIOR);

}

if (!RW_HasSpecialization(SPEC_WIZARD_BLOOD_MAGE)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_BLOOD_MAGE);

}

if (!RW_HasSpecialization(SPEC_WIZARD_SHAPESHIFTER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_SHAPESHIFTER);

}

if (!RW_HasSpecialization(SPEC_WIZARD_SPIRITHEALER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_SPIRITHEALER);

}

if (!RW_HasSpecialization(SPEC_WIZARD_BATTLEMAGE)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_BATTLEMAGE);

}

if (!RW_HasSpecialization(SPEC_WIZARD_KEEPER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_KEEPER);

}

break;

}

case EVENT_TYPE_MODULE_LOAD:

{

if (!RW_HasSpecialization(SPEC_ROGUE_ASSASSIN)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_ASSASSIN);

}

if (!RW_HasSpecialization(SPEC_ROGUE_BARD)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_BARD);

}

if (!RW_HasSpecialization(SPEC_ROGUE_DUELIST)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_DUELIST);

}

if (!RW_HasSpecialization(SPEC_ROGUE_RANGER)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_RANGER);

}

if (!RW_HasSpecialization(SPEC_ROGUE_LEGIONNAIRE_SCOUT)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_LEGIONNAIRE_SCOUT);

}

if (!RW_HasSpecialization(SPEC_ROGUE_SCOUT)) {

RW_UnlockSpecializationTrainer(SPEC_ROGUE_SCOUT);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_BERSERKER)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_BERSERKER);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_CHAMPION)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_CHAMPION);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_REAVER)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_REAVER);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_TEMPLAR)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_TEMPLAR);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_GUARDIAN)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_GUARDIAN);

}

if (!RW_HasSpecialization(SPEC_WARRIOR_SPIRIT_WARRIOR)) {

RW_UnlockSpecializationTrainer(SPEC_WARRIOR_SPIRIT_WARRIOR);

}

if (!RW_HasSpecialization(SPEC_WIZARD_ARCANE_WARRIOR)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_ARCANE_WARRIOR);

}

if (!RW_HasSpecialization(SPEC_WIZARD_BLOOD_MAGE)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_BLOOD_MAGE);

}

if (!RW_HasSpecialization(SPEC_WIZARD_SHAPESHIFTER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_SHAPESHIFTER);

}

if (!RW_HasSpecialization(SPEC_WIZARD_SPIRITHEALER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_SPIRITHEALER);

}

if (!RW_HasSpecialization(SPEC_WIZARD_BATTLEMAGE)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_BATTLEMAGE);

}

if (!RW_HasSpecialization(SPEC_WIZARD_KEEPER)) {

RW_UnlockSpecializationTrainer(SPEC_WIZARD_KEEPER);

}

break;

}

}

}

 

-------------------------------------------------------------------------------------------------------------------------------------------------------

unlockspecs.nss --- edited with info above

unlockspecs.ncs --- left untouched

-------------------------------------------------------------------------------------------------------------------------------------------------------

 

Everything is just as the original writer had it, except for the bottom 2 sets for each class type. I added those hoping it would work. But when you go to compile the script in the toolset, it gives me errors.

 

"Variable defined without type (while compiling var_constants_h.nss)"

 

I really want to use these new specs, and am desperate to find a solution or work around. If anybody could help I'd greatly appreciate it. Even if there's a console command or something i'm unaware of... I've done a lot of searching and came up with nothing.

Link to comment
Share on other sites

I don't understand why you are using two events instead of one why don't you just put all code into EVENT_TYPE_MODULE_LOAD. Also the specs below EVENT_TYPE_MODULE_LOAD are twice there so you can remove the ones that already are there. And now to the original question it means that the variable doesn't exist, that Bioware has named the spec other than SPEC_ROGUE_LEGIONNAIRE_SCOUT (or it doesn't work because the toolset can't access awakening files). You could look in the awakening files how the spec is really called or make script and add yourself the specs via the manuals (see code).

 

Try this code, it will add all spec books to your inventory on module load (just think on either setting the script as core resource, changing in the addins.xml the extendedmodule or putting the script in the override folder.)

 

#include "utility_h"
#include "wrappers_h"

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

 switch (nEventType)
 {
   case EVENT_TYPE_MODULE_LOAD:
   { 
     UT_AddItemToInventory(R"gxa_im_manual_battlemage.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_bloodmage.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_guardian.uti", 1);      
     UT_AddItemToInventory(R"gxa_im_manual_keeper.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_legionnaire.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_reaver.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_shadow.uti", 1);
     UT_AddItemToInventory(R"gxa_im_manual_spiritwarrior.uti", 1);
   }
 }
}

Link to comment
Share on other sites

Thanks for the reply, hopefully i can figure something out.

 

And only reason I did it the way I did is because that's how the original author wrote his mod. I just figured i'd try and do it like his since it did work, figured why change things.

 

But i'll give it a shot, thanks

Link to comment
Share on other sites

  • Recently Browsing   0 members

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