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?
Where are ABILITY_SPELL_ and ABILITY_SKILL_ constants defined?
Débuté par
PavelNovotny
, mars 29 2010 05:42
#1
Posté 29 mars 2010 - 05:42
#2
Posté 29 mars 2010 - 05:58
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
Posté 29 mars 2010 - 06:38
Not at home, but isn't there a file called 2da_constants_h.nss?
#4
Posté 29 mars 2010 - 06:46
#5
Posté 29 mars 2010 - 07:02
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
Posté 29 mars 2010 - 07:58
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.
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
Posté 29 mars 2010 - 08:18
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
Posté 12 avril 2010 - 02:28
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!!!





Retour en haut







