Aller au contenu

Photo

Adding a specialisation class to a charater


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
FergusM

FergusM
  • Members
  • 460 messages
I'm trying to figure out how to give a party member a ceratin specialisation. Not the option of taking it, just adding it straight to them, like you've selected it.

Now, preferably I'd like a function in a script that can add it on the spot, with the character already in your party.

However, if that is not possible, I've looked at party members who start with a specialisation (like Alistair) and it appears that the specialisation is granted by the autolevel 2DAs. However, I can't see anything in them that references classes; just abilities. How do I specify a certain specialisation in the 2DAs?

#2
anakin5

anakin5
  • Members
  • 258 messages
Specialization are given to followers in player_core file, in EVENT_TYPE_PARTY_MEMBER_HIRED event.

// Find specialization
    int nSpecAbility = GetM2DAInt(TABLE_PACKAGES, "switch1_class", nPackage); // followers can have only 1 advanced class

    if(nSpecAbility > 0)
    {
        #ifdef DEBUG
            Log_Trace(LOG_CHANNEL_EVENTS, "player_core.EVENT_TYPE_PARTY_MEMBER_HIRED",
            "Adding spec ability: " + IntToString(nSpecAbility));
        #endif
        AddAbility(OBJECT_SELF, nSpecAbility);
    }

You have all informations you need here

Modifié par anakin5, 08 février 2010 - 01:11 .


#3
FergusM

FergusM
  • Members
  • 460 messages
Thanks!

#4
FergusM

FergusM
  • Members
  • 460 messages
Okay, that hasn't been enough for me to sort it out.

int nSpecAbility = GetM2DAInt(TABLE_PACKAGES, "switch1_class", nPackage);

TABLE_PACKAGES is 2DA 163, which is packages_base, in packages.xls. "switch1_class" is supposed to be the column name, but I don't see any column with that name in the sheet. Furthermore, I don't see anything that indicates class. For instance, Alistair's row (him being a Templar) has nothing that sets it apart from non-Templar party members. EDIT: Actually, the follower tactics table entry is different, but that is just for the tactics used and again has nothing to do with class.

Where is the actual class being specified?

Modifié par FergusM, 08 février 2010 - 08:40 .


#5
anakin5

anakin5
  • Members
  • 258 messages
in package.xls there is a "+" somewhere on the first line that open an hidden part an the excel file. Here is the column "switch1_class".



Alistair and other followers get their class from their respective creature model in the toolset. It is embedded in the .utc file.

#6
FergusM

FergusM
  • Members
  • 460 messages
By class, I was referring to the specialisation, which isn't anywhere in the .utc.



But yeah, it was the hidden columns. After some trial and error I figured out the code for party member Reaver, and now it's working fine in game. Thanks again.