Aller au contenu

Photo

Custom Tokens


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

#1
TSMDude

TSMDude
  • Members
  • 865 messages
Is there a way to see what custom token numbers have been assigned besides just searching for each one in a module?

I would like to make a list of what custom tokens we already use and short of searching through cons with the search feature I cannot see anyway to do it.

Anyone have a seceret they would like to share?

#2
Sharona Curves

Sharona Curves
  • Members
  • 61 messages
The search function in the script editor will reveal all scripts in your scripts in your module. However if you have scripts in your custom haks you should use Lilac Soul's BioSearcher utility to find any CustomToken functions you may have buried in those.

#3
WoC_Builder

WoC_Builder
  • Members
  • 225 messages
Thanks! I was just wondering this same thing. A great help.

#4
WoC_Builder

WoC_Builder
  • Members
  • 225 messages
Also found that I can use the same process in conversations. The only issue i had was I cannot export to file, or copy/paste the list that was generated. Anyone know a workaround for this?

#5
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
If you mean the list in the script editor, you can indeed copy/paste it, using ctrl-c to copy (right click on highlighted items to select Copy doesn't work, though, which is what I assume you're trying).



Funky

#6
Baaleos

Baaleos
  • Members
  • 1 330 messages
Hey Funky,

Question kinda half on topic,

When you made Higher Ground Leveling System, did you use Custom Chat tokens for listing the feats etc, on the leveling up process?



I was just wondering what logic you used around the managing of custom tokens, and next and previous pages in the conversation.





Did you also get the string for the tokens from the 2da?

(Note - Im just going from a far off memory here, so for all I know, you may not have used tokens in hgll)



Im creating a leveling system of my own for my Vampire Server, and I hate having to add in the static dialog choices etc.



It would be alot easier if they were tokens, which updated on dialog refresh, to show the values associated with that page.



Also thinking aboud data driving it somehow as well, making a dialog choice appear for every feat available in the database of feats I select. etc

#7
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
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 .