Aller au contenu

Photo

Where are ABILITY_SPELL_ and ABILITY_SKILL_ constants defined?


7 réponses à ce sujet

#1
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
Still trying to figure out how hidden abilities work , and noticed that the single player campaign uses the HasAbility command in this form

HasAbility(oTestCreator, ABILITY_SPELL_HIDDEN_BARD)

I have been looking through 2das for ABILITY_SPELL_ and can't find them anywhere although they are listed as constants. Anybody know where those are defined?

#2
jsd313

jsd313
  • Members
  • 184 messages
The spells and talents are defined in ABI_base. The only place it will refer to them as ABILITY_SPELL or ABILITY_TALENT is in the scripts. Those are defined in the constants scripts for talents and spells.

#3
Challseus

Challseus
  • Members
  • 1 032 messages
Not at home, but isn't there a file called 2da_constants_h.nss?

#4
Sunjammer

Sunjammer
  • Members
  • 925 messages
Here: Ability_constant.

#5
Challseus

Challseus
  • Members
  • 1 032 messages

Sunjammer wrote...

Here: Ability_constant.


Interesting, I went there first to do a check, but I guess I put my search terms in wrong.

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages
Not wishing to hijack the thread but on LEX you should be able to search for the common root (with an asterisk) or a human-friendly (i.e. no underscores or asterisk). Both are followed by the word "constant" (to avoid collisions since pages in the same namespace have to be unique).  The former will redirect you to the latter (usually automatically) so the OBJECT_TYPE_* constant page redirects to Object type constant page.

However the Ability constant page is unusual because there is no common root for those constants.  Many entries start with ABILITY_* or ABILITY_[SOMETHING]_*, for example, ABILITY_SKILL_*, ABILITY_SPELL_*, ABILITY_TALENT_* or ABILITY_TRAIT_* but others don't and don't even have ABILITY anywhere in their identifier.

However LEX is supposed to be about being organised and making finding things logic- rather than luck-based. Therefore if anyone encounters difficulties finding content that exists (as opposed to content I haven't uploaded yet) they should let me know what they were looking for and they searched on. If it seems like it might be a common issue I can always add an extra redirect or two.

#7
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
If you want to know where any function or constant is defined, right click on it and select go to definition. This doesn't work for engine functions and constants, but you won't be able to change them anyway. In this case, the ability constants are defined in 2da_constants_h".

Modifié par DavidSims, 29 mars 2010 - 08:19 .


#8
Rogue World

Rogue World
  • Members
  • 46 messages

DavidSims wrote...

If you want to know where any function or constant is defined, right click on it and select go to definition. This doesn't work for engine functions and constants, but you won't be able to change them anyway. In this case, the ability constants are defined in 2da_constants_h".


You just made my life much easier!!! :o:O:O