Salk Posted May 24, 2022 Share Posted May 24, 2022 Hello! 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... Quote Link to comment
Daulmakan Posted May 24, 2022 Share Posted May 24, 2022 As I understand, they are reliant on the engine itself, so for vanilla BG2 it's probably a question for the current ToBEx maintainer... Quote Link to comment
Almateria Posted May 29, 2022 Share Posted May 29, 2022 On 5/24/2022 at 11:20 AM, Salk said: Hello! 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>. Quote Link to comment
temnix Posted May 30, 2022 Share Posted May 30, 2022 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: SetTokenObject("GABBER",LastSeenBy) DisplayString(Myself,@1) 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. Quote Link to comment
Recommended Posts
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.