Author Topic: Custom Tokens  (Read 776 times)

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Custom Tokens
« on: November 06, 2010, 02:15:36 pm »


               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?
               
               

               
            

Legacy_Sharona Curves

  • Full Member
  • ***
  • Posts: 115
  • Karma: +0/-0
Custom Tokens
« Reply #1 on: November 07, 2010, 03:05:01 am »


               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.
               
               

               
            

Legacy_WoC_Builder

  • Sr. Member
  • ****
  • Posts: 425
  • Karma: +0/-0
Custom Tokens
« Reply #2 on: November 29, 2010, 04:09:37 am »


               Thanks!  I was just wondering this same thing.  A great help.
               
               

               
            

Legacy_WoC_Builder

  • Sr. Member
  • ****
  • Posts: 425
  • Karma: +0/-0
Custom Tokens
« Reply #3 on: November 29, 2010, 04:36:43 am »


               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?
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Custom Tokens
« Reply #4 on: November 29, 2010, 05:57:01 pm »


               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
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Custom Tokens
« Reply #5 on: November 30, 2010, 11:35:20 am »


               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
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Custom Tokens
« Reply #6 on: November 30, 2010, 08:04:48 pm »


               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 .