Welcome Forums Get help Tokens


Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
  • #25395

    You will not notice receiving a token. But when you test it later with a “if hero has token”, it should work.


    Thanks alot!!! Also how do you make it so that the hero must give more than one of the token to get something?


    Rather than giving a token using “hero receives token ___” if you want to give the hero more than one of the same token, you need to use “hero number of ___ increases with..”

    For example, let’s say you wanted to buy a sword for 5 gold. The screenplay would be as follows (Please count the number of spaces, as this is crucial):

    if hero number of “gold” >=5

    (4 spaces) hero receives token “sword”

    (4 spaces) hero number of “gold” decreases with 5


    (4 spaces) blacksmith says “Sorry, but you don’t have enough gold”



    chicken strips

    go into the actions part of the dialogue thing, click on the hero’s tab, scroll until you find “receives token”. It’ll ask you what token they’re going to receive. I’m not sure if you figured this out already, but if you didn’t, I hope this helps as I am new to this too πŸ™‚


    Is it somehow possible to calculate with these tokens? Are there any mathematical operators?

    For example token B is 5 * the value of token A.


    So I’ve been trying out the tokens but it seems i got a few problems with them


    Here is what I

    Test1 says “You have received Token_4”

    hero receives token “Token_4”

    if hero has token “Token_4”

    Test1Β  says “Enjoy”


    Test1 says “You have not yet received this token”

    hero loses token “Token_4”


    I know, itΒ  looks normal, but when i talk to it again it repeats the first dialogue again with the dialogue after the token was received instead of just the dialogue of receiving the token. Sorry if you don’t understand but what I’m trying to say is that: Is it possible for an NPC to just say the dialogue of after receiving the token instead of the dialogue before receiving the token and the dialogue AFTER receiving the token?

    If it isn’t possible then its okay ill try to figure something out


    The problem is you always set the token at the start of your script, and then remove it at the end of the script. So this means you will always get the same result.

    You have to make sure the hero doesn’t have the token yet when your actions are first run. And at the end you give the hero a token.
    So the second time the actions are run, the hero has the token and something else happens.

    So for example:

    if hero lacks token "talked to alice"
        hero says "I haven't met you before, how are you?"
        alice says "Fine! Nice to meet you"
        hero receives token "talked to alice"
        hero says "Nice to meet you again"

    I think that I’m also having a similar problem, just mine repeats both texts (the else and the “if hero lacks”) This is what it looks like.

    if hero lacks token “TELEPORT”
    icubeA1 says “You will find several of these across the world. They allow you to teleport from one location to another instantly. Very useful indeed…”
    hero receives token “TELEPORT”
    icubeA1 says “You need a pass to use this”

    Can somebody help me with this?


    It’s hard to say what exactly the problem is. You could ask this question on our Discord, plenty of people there to help out: https://discord.gg/tyHjdt3.

    Or you can you copy-paste your actions here, so we can see what is wrong with it.


    I’m using tokens on my games now, just as I would use variables.
    What are the ‘already included’ token other than “gold” and “health”

    Finally, how does my character change weapons “ingame”?


    There is no included amount of “gold” variable. But you can access the actor’s health values. Better let’s call the integrated stuff “properties” for now to make a difference between properties and user defined variables.

    You cannot change the appearance of your weapon for now, but you can activate or deactivate it and are able to increase or decrease its power – of course also at runtime.

    To get a hunch, which properties are available, just have a look on your actor’s properties in design mode.


    Small addition:
    If you used to other programming languages, tokens and numbers are indeed the same as booleans and decimals in other programming languages. However, I do not exactly know, if number variables in RPG Playground are actually floats or doubles, but they are able to process decimal fractions.


    Thanks, I just realised that on declaring hero gets 5 token “gold” or something similaire, I’m actually declaring a variable πŸ˜‰

    I come from the ancient world of 6502 and machine code, where one had to declare all variables at the beginning πŸ™‚


    It unfortunately is not necessary yet to declare variables in RPG Playground before you can use them. Therefore, you can easily make mistakes by using variables and then have a hard time to debug the result (without having a debugger!). I really hope deWiTTERS someday implements an option, which makes it possible to prevent the engine from using implicit variables.

Viewing 15 posts - 16 through 30 (of 30 total)
  • The forum ‘Get help’ is closed to new topics and replies.