List of all tokens?

I’m trying to create a mod that, among other things, grants me access to every single riftgate. I’m certain I can do this by having the hangman Jarvis give it to me the moment I initiate the quest by editing the quest file and giving the tokens to my player. Unfortunately, the only token I’m aware of is BURRWITCH_PORTAL_UNLOCKED (the last word might be different as I’m typing from memory.) What of the rest? Where do I find them?

A bunch of us spent a good deal of time on this and gave up. I am pretty sure you cannot do this in a mod.

I could do it if only I had a dump of all the tokens!

I think you are talking about Quest tokens and only the portals where there is a battle before you can use the portal have such tokens. I do not remember much about this, but I am pretty sure tokens only exist for Ikon, Burrwitch and whatever portals have a fight.

iirc, the main problem in the end was that unless your toon visits close enough to the portal to trigger the onAddToWorld() you could not get access to it from Lua.

If I am wrong, it would not be the first time, but I also cannot help you with this. All I can say it I tried, bugged a lot of modders on discord, and in the end, we through in the towel and gave up.

Has anyone ever asked the devs for help? I mean, obviously, someone must have, right?

Here’s a script (nodejs) I use to pull all the “CAPITAL_LETTERS_WITH_UNDERSCORES” out of the scripts. I’m not entirely sure if these are tokens, but they’re usually accompanied by some “Token…” function.

const { promisify } = require( 'util' );
const { readdir, readFile } = require( 'fs' );

const pReadDir = promisify( readdir );
const pReadFile = promisify( readFile );

const checkFile = async ( name ) => {
  try {
    let contents = ( await pReadFile( name ) ).toString();
    return contents.match( /"([A-Z0-9]+_[A-Z0-9]+)"/g );
  } catch( e ) {
    console.log( name, e );
    return [];
  }
};

const checkDir = async ( name ) => {
  let dirents = await pReadDir( name, { withFileTypes: 1 } );
  
  let waits = [];
  for( let i in dirents ) {
    if( dirents[i].isDirectory() ) {
      let new_waits = await checkDir( name + '/' + dirents[i].name );
      for( let j in new_waits ) {
        waits.push( new_waits[j] );
      }
    } else
      waits.push( checkFile( name + '/' + dirents[i].name ) );
  }
  
  return waits;
};

(async () => {
  let waits = await checkDir( process.argv[2] );
  let values = {};
  for( let i in waits ) {
    let result = await waits[i];
    for( let j in result )
      values[ result[j].replace( /"/g, '' ).trim() ] = 1;
  }
  
  values = Object.keys( values ).sort( ( a, b ) => ( a > b ) );
  
  for( let i in values )
    console.log( values[i] );
  
  process.exit(0);
})();

The results of

node scriptname.js “< working directory path >\resources\scripts”

EXILE_TRUST
BONUSCHEST_A01
BL_BOUNTY20
BL_BOUNTY19
BL_BOUNTY18
BL_BOUNTY17
BL_BOUNTY10
BL_BOUNTY09
BL_BOUNTY08
BLACKSMITH_FORCED
BLACKSMITH_MASTERDEAD
BLACKSMITH_SERVICEAPPRENTICE
BLACKSMITH_SERVICEMASTER
BLACKSMITH_APPRENTICE
BLACKSMITH_MASTERHOSTILE
BLACKSMITH_SPAWNED
BLACKSMITH_MASTER
AREAD_CULTISTACTIVITY
BASTIONOFCHAOS_WAVEEVENTA
AREAD_DAILASWORD
AREAC_COOKAREA
AREAD_BASE
AREAD_FINALCRYPT
AREAC_LUMBERMILLCLAIMED
AREAC_HERALDSLAIN
AREAC_CANNONSFOUND
AREAC_CANNONSCLAIMED
AREAC_HOMESTEADZEALOTVENDOR
AREAC_HOMESTEADNECROVENDOR
DUNGEONCHEST_WASPNEST
EXILE_BOUNTY15
EXILE_BOUNTY14
EXILE_BOUNTY13
EXILE_BOUNTY12
BONUSCHEST_A03
BONUSCHEST_B01
BONUSCHEST_B02
BONUSCHEST_B03
DUNGEONCHEST_LABSPIDER
DUNGEONCHEST_HALLOWEDHILL
DUNGEONCHEST_MINEROVER
DC_BOUNTY18
DC_BOUNTY17
DC_BOUNTY15
DC_BOUNTY11
DC_BOUNTY10
DC_BOUNTY09
DC_BOUNTY08
DC_BOUNTY07
DC_BOUNTY06
DUNGEONCHEST_DARIUS
DARIUS_TALK
DARIUS_HOSTILE
ELDER_FOUND
ELDER_DEAD
EDMUND_DEAD
ELSA_FOUND
ELSA_ACT3
CRONLEY_SLAIN
DUNGEONCHEST_WARDEN
EV_WARDEN
DUNGEONCHEST_SACRIFICE
EV_BURRWITCH
COOK_RESCUED
COOK_ACT3
DUNGEONCHEST_BURRWITCHVILLAGE
DUNGEONCHEST_DEPRAVEDSANCTUARY
DUNGEONCHEST_LOWERCROSSINGRATDEN
DUNGEONCHEST_BURRWITCHRATDEN
DUNGEONCHEST_CAVEFOOTHILLS
DUNGEONCHEST_RUINSBROKENHILLS
DUNGEONCHEST_RUINSFLOODEDPASSAGE
EV_SUNKENRELIQUARY
DUNGEONCHEST_JAGGEDWASTE
BONUSCHEST_A02
DUNGEONCHEST_FINALBOSS
CONFLAGRATION_BLOCKADECLEARED
CLONE_SLAIN
DUNGEONCHEST_DERMAPTERAN
DC_FOOD
DUNGEONCHEST_HOMESTEADCONFLAGRATION
DUNGEONCHEST_OBSIDIANTHRONE
DUNGEONCHEST_HIDDENWEALTH
DUNGEONCHEST_CULTISTSUMMONER
DUNGEONCHEST_BASTIONOFCHAOS
DUNGEONCHEST_NECROPOLIS
CREED_AREAD
DUNGEONCHEST_PORTVALBURY
HS_DEFECTORS
SECRETCHEST_A06
ODV_BOUNTY13
ODV_BOUNTY12
ODV_BOUNTY11
FACTION_BATTLENECRO
FACTION_BATTLEZEALOT
NECROPOLIS_BASE
SECRETCHEST_A05
SECRETCHEST_A04
SECRETCHEST_A03
SECRETCHEST_A02
SECRETCHEST_A01
ODV_BOUNTY10
FORTIKON_BLOCKADECLEARED
ODV_BOUNTY09
ODV_BOUNTY08
FINALBOSS_SLAIN
ODV_BOUNTY07
ODV_BOUNTY06
KC_BOUNTY19
KC_BOUNTY13
HIDDENWEALTH_BLOCKADECLEARED
HIDDENWEALTH_REVEALED
KC_BOUNTY11
KC_BOUNTY10
KC_BOUNTY09
LEGIONPRIORITY_BOSSKILLED
KC_BOUNTY08
MYLES_HOSTILE
MYLES_INSIDE
NECRORITUAL_WAVEEVENT
NECRO_FINALQUEST
KC_BOUNTY07
HS_BOUNTY13
HS_BOUNTY12
HS_BOUNTY11
HS_BOUNTY10
HS_BOUNTY09
RO_BOUNTY19
RO_BOUNTY12
RO_BOUNTY11
RO_BOUNTY10
PORTVALBURY_GAUNTLETEVENT
PORTVALBURY_WAVEEVENTA
JAGGEDWASTES_BLOCKADECLEARED
NECROPOLIS_WAGON01
NECROPOLIS_WAGON02
NECROPOLIS_WAGON03
EXILE_SLAIN
EXILE_HOSTILE
EXILE_TIER3
EXILE_TIER2
EXILE_HATE
MOGDROGENSHRINE_BATTLE
EXILE_RESET
NECROPOLIS_RIFTGATEWAVEEVENT
NECROPOLIS_RIFTGATEFOUND
NECROPOLIS_ENTERED
IKONCOMMANDER_SLAIN
MOGDROGENSHRINE_WAVEEVENT
FORTIKON_RIFTGATEWAVEEVENT
FORTIKON_RIFTGATEFOUND
FLOODEDPASSAGERUIN_BLOCKADECLEARED
MOGDROGENAVATAR_KILLED
LOWERCROSSING_BLOCKADECLEARED
MOGDROGENAVATAR_HOSTILE
MOGDROGENSHRINE_CLEANSED
MOGDROGENSHRINE_REPAIRED
MOGDROGENSHRINE_SPAWN
MONEYBAGS_SLAIN
FARMLANDBRIDGE_SCOUTED
HS_KEPTTALISMAN
ROVERS_BLOCKADECLEARED
OLDARKOVIA_BLOCKADECLEARED
MORNAY_TOWN
INVENTOR_SERVICE
INVENTOR_RESCUED
MERCHANT_SERVICE
MERCHANT_RESCUED
MERCHANT_EXTORT
ROVER_RESCUED
MORNAY_DEAD
SALT_NECKLACE
MORNAY_LOOTED
ISAAC_FOUND
EXTORTION_FOOLED
EXTORTION_HOSTILE
EXTORTION_SAVED
VENGEANCE_TOOKMONEY
SECRETCHEST_C03
SECRETCHEST_A08
SECRETCHEST_A09
SECRETCHEST_C02
SECRETCHEST_A10
SECRETCHEST_A11
SECRETCHEST_A12
SECRETCHEST_B01
SECRETCHEST_B02
SECRETCHEST_B03
SECRETCHEST_B04
SECRETCHEST_B05
SECRETCHEST_C01
SECRETCHEST_B21
SECRETCHEST_B06
SECRETCHEST_B07
SECRETCHEST_B08
SECRETCHEST_B20
SECRETCHEST_B09
SECRETCHEST_B10
SECRETCHEST_B11
SECRETCHEST_B12
SECRETCHEST_B19
SECRETCHEST_B18
SECRETCHEST_B13
SECRETCHEST_B14
SECRETCHEST_A07
SECRETCHEST_B15
SECRETCHEST_B16
SECRETCHEST_B17
SECRETCHEST_C08
SECRETCHEST_D19
SECRETCHEST_D18
SECRETCHEST_D17
SECRETCHEST_D16
SECRETCHEST_D15
SECRETCHEST_D14
SECRETCHEST_D13
SECRETCHEST_C12
SECRETCHEST_D12
SECRETCHEST_C13
SECRETCHEST_D01
SECRETCHEST_D02
SECRETCHEST_D03
SECRETCHEST_D04
SECRETCHEST_D05
SECRETCHEST_D11
SECRETCHEST_D10
SECRETCHEST_C04
SECRETCHEST_C05
SECRETCHEST_D09
SECRETCHEST_D08
SECRETCHEST_D07
SECRETCHEST_C06
SECRETCHEST_C07
SECRETCHEST_C09
SECRETCHEST_C10
SECRETCHEST_C11
SECRETCHEST_D06
VENGEANCE_HOMESTEADSPAWN
SILAS_CHILDRENRESCUED
SECRETCHEST_D21
SECRETCHEST_D22
SECRETCHEST_D23
SILAS_BRIBED
SECRETCHEST_D20
SECRET_OPEN
SECRET_REVEALED
WARNING_SANCTUARY
SILAS_DESTROYED
TRAPPEDANDALONE_BLOCKADECLEARED
SPIRITGUIDE_SERVICE
SMUGGLERSPASS_CROSSED
SILAS_KILLED
SILAS_HOSTILE
SILAS_FLED
SILAS_REWARD
SKINNER_RESCUED
SKINNER_HOSTILE
VENGEANCE_VENDORTRUST
VENGEANCE_DAUGHTERHOSTILE
VENGEANCE_DAUGHTERDEAD
STEPSOFTORMENT_WAVEEVENTB
STEPSOFTORMENT_WAVEEVENTA
ULGRIM_AREAD
ULGRIM_BOSS
ULGRIM_FINISHED
ULGRIM_NECROPOLIS
UNDERCITY_SHORTCUT
TROLL_SPAWNED
TROLL_DEAD
ULGRIM_HOMESTEAD
WARNING_PORTVALBURY
VILOTH_KILLED
VENGEANCE_TRUST
VENGEANCE_HOSTILE
VENGEANCE_JOSEPHINETRUST
VENGEANCE_VENDORNOTRUST
VENGEANCE_DEAD
WARDEN_SLAIN
WARNING_GUTWORM
WARNING_STEPSOFTORMENT
WIGHTMIRE_RIFTGATEFOUND
WIGHTMIRE_RIFTGATEWAVEEVENT
WITCHGODS_GUARDIANKILLED
WITCHGODS_SECRETBOSSKILLED
ZEALOT_FINALQUEST

Damn, I guess that means there aren’t tokens for all portals.

Hm, that leaves us with using lua scripts to teleport our character to co-ordinates and tying those scripts to a conversation window. Is there even a lua script like that? How does the game trigger level travel? Must be a script, yeah?

You’re hitting the exact same problem here that jiaco already described:

In order to retrieve the coordinates of the portals, you need to use one of the script triggers such as onAddToWorld(targetId) to gain the object id, so that you can build an entity / portal object in lua and retrieve it’s coordinates but unless you’re about 250 ingame measure away from each portal, those scripts won’t trigger.

There must be some way, using the merit to open a higher difficulty also opens all portals in the current difficulty… so I would try to find out how it does that