I actually used pspeed's Z-Dialogue, which is a dynamic convo system using tokens. HGLL is undergoing yet another revision on HG, this time to use a dynamic convo system written by acaos, again using tokens. Writing up a thousand feats by hand just isn't that appealing, nevermind other issues like ease of updating.
As for where I got the strings, they were originally taken from the const/name descriptions in the 2das, converted into functions by Balduvard specifically for the HGLL system. If I was doing it now, I would probably use 2da reads instead, since the caching improvement makes that feasible. The private version of HGLL on HG is currently mostly 2da-based. Here's a couple sample function conversions. If you want to see the other Get2DAString instances, though, you should probably pm me, or message on the HG forums, so as not to hijack this thread.
int GetclassLevelReqForFeat_2da(int nFeat, int nclass, object oPC) {
string s2da = Getclass2daName(nclass);
string sVal = "Nothing";
int nCount = 0, nVal, nRet;
while (sVal != "") {
sVal = Get2DAString(s2da, "FeatIndex", nCount);
nVal = StringToInt(sVal);
if (nVal == nFeat) {
nRet = StringToInt(Get2DAString(s2da, "GrantedOnLevel", nCount));
return nRet;
}
nCount++;
}
nRet = GetIsFeatExceptionFrom2da(nFeat, nclass, oPC);
return nRet;
}
int GetIsclassFeat_2da(int nFeat, int nclass, object oPC) {
int nLevel = GetclassLevelReqForFeat_2da(nFeat, nclass, oPC);
if (nLevel < -1) return FALSE;
if (GetLevelByclass(nclass, oPC) < nLevel) return FALSE;
return TRUE;
}
int GetIsGeneralFeat_2da(int nFeat) {
return StringToInt(Get2DAString("feat", "ALLclassESCANUSE", nFeat));
}
Funky
Modifié par FunkySwerve, 30 novembre 2010 - 08:07 .