Jump to content

BG2 tokens

Recommended Posts

On 5/24/2022 at 11:20 AM, Salk said:


A simple question. Is it possible to add new tokens to the classic game, just like BG:EE did? I would have liked something like <CLASS> and  <PRO_CLASS>, for instance... 

Hi! This is indeed possible, because the classic BG2 engine has actions 247 SetToken(S:Token*,I:STRREF*), and 248 SetTokenObject(S:Token*,O:Object*).

Those tokens are not saved between games though, so you'd have to run those actions in the script of a creature using them on a load. Also, the tokens don't have their values updated dynamically, just by script, so it's not exactly like <GABBER>.

Link to comment

A little extra: <GABBER> can be used outside of dialogues. It is a ready token that can take any object and will be refilled when a dialogue starts. So, for example, if you want to show a piece of text about a frightening vision that concerns a character or object, you can make a string in the script that reads something like: "A swarm of huge leering faces whips you around, and every face belongs to <GABBER>". You'll create this string with TRA reference @1 or another number, and then in the script you'll write:


And so on. This way you can get creatures to shout things like "You think you can take on <GABBER>!?", filling the token with themselves.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...