Skip to content

nwn2dev/nwnx4-plugin-tlk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NWNX4 TLK plugin

Load TLK files by file path, and resolve localized strings

// Load a TLK file for resolving strrefs lower than 16_777_216
TLKLoadResolver("german", "${NWN2HOME}/tlk/german/dialog.tlk");

// Load a set of TLK files for resolving any strref
TLKLoadResolver("french",
	"${NWN2HOME}/tlk/french/dialog.tlk",  // Base TLK
	"${NWN2HOME}/tlk/french/dialogF.tlk", // Base female TLK (can be "" for none)
	"${NWN2HOME}/tlk/french/custom.tlk"   // Custom tlk for strrefs higher than 16_777_216
);


// Similar to GetStringByStrRef
string sText = TLKGetStringByStrRef("french", 1337);

// Similar to GetStrRefSound
string sSoundFile = TLKGetStrRefSound("french", 1337);

// Similar to GetStrRefSoundDuration
float fSoundDur = TLKGetStrRefSoundDuration("french", 1337);

Installing

  1. Go to the release page and download the latest nwnx4-plugin-tlk.zip
  2. Extract files inside the plugins folder into the nwnx4 plugins folder
  3. Extract files inside the nwscript folder into the your module folder

About

Read additional TLK files and resolve strrefs

Resources

License

Stars

Watchers

Forks