Aller au contenu

Photo

Need DEV imput please, making a new class a CORE class


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

#1
Reynen Starfyre

Reynen Starfyre
  • Members
  • 52 messages
Hello,

I've succeeded in adding a class, but I want to make it a CORE class.
So far I am having trouble finding out where these are defined at.
I see this section listed in the core_h file.


/**
*   @brief Returns a creature's core class (mage, rogue, warrior)
*
*   @author georg
**/
int GetCreatureCoreclass(object oCreature)
{
    int nCurrentclass = FloatToInt(GetCreatureProperty(oCreature, PROPERTY_SIMPLE_CURRENT_class));

    int nCoreclass = GetM2DAInt(TABLE_RULES_classES, "Baseclass", nCurrentclass);

    if(nCoreclass == 0) // the current is the core
        return nCurrentclass;
    else
        return nCoreclass;

Where is this table ruless classes, I don't see a section in the CLA_base that defines where a class would be a "CORE" class so there must be another table somewhere.

Help is greatly appreciated.

#2
Astorax

Astorax
  • Members
  • 324 messages
It may be that there isn't a place that's accessible by us. I'm not saying stop looking, but we definitely hit snags like this in NWN where we'd track something down until it disappeared into a part of the game/toolset that we didn't have access to that got hardcoded into the game.

#3
Reynen Starfyre

Reynen Starfyre
  • Members
  • 52 messages
If these core are hard coded into the game then I might as well quit right now because there is no possible way I will be able to continue.  DEV's we need a real answer please, future development hangs in the balance here.

I notice we don't have a file called 2daserver.xls.  Where is it?

Modifié par Reynen Starfyre, 21 novembre 2009 - 12:03 .


#4
Kunikos

Kunikos
  • Members
  • 97 messages
good luck :blush:

Modifié par Kunikos, 21 novembre 2009 - 12:06 .


#5
elys

elys
  • Members
  • 458 messages

Reynen Starfyre wrote...


    int nCoreclass = GetM2DAInt(TABLE_RULES_classES, "Baseclass", nCurrentclass);
.....

Where is this table ruless classes, I don't see a section in the CLA_base that defines where a class would be a "CORE" class so there must be another table somewhere.

Help is greatly appreciated.


TABLE_RULES_classES is a constant defined in 2d_constants_h.nss


//
// constants_h
// All DA 2da-related constants.
// Any constants in here should be synched with a specific 2da
// -----------------------------------------------------------------------------
// 2DA tables names - 2da_server.xls
// -----------------------------------------------------------------------------
..sniped
const int TABLE_RULES_classES            = 3;
..sniped

2da_server.xls is in reality named 2da_base.xls
If you look at 2DA_base.xls for the ID 3, you will see

ID Label Worksheet PackageIDForAI
int string string int

3 classes CLA_ ****

So basically

GetM2DAInt(TABLE_RULES_classES, "Baseclass", nCurrentclass);

will look inside all  existing CLA_  M2DA  files (including CLA_base) , looking inside  the "Baseclass" colum at Row nCurrentclass, and return the INT found there.

Modifié par elys, 21 novembre 2009 - 01:13 .