Feature Request: Arithmetic Operations with Variables

Discussion in 'Site Feedback' started by VT6, Jun 26, 2026.

  1. VT6

    VT6 Virgin

    I wish we can use +, - ,* ,/ ,//,%,(),^ for numeric variables and being able to use other variables to assign their values to other variables using these arithmetic operations
    Eg. Debt = Wealth - Income

    This will help in making better games with more complex world mechanics.
     
    Friedman and Lilyflier like this.
  2. Lilyflier

    Lilyflier Virgin

    I was about to write the same thing. There are so many things I've wanted to do but couldn't (realistically), due to not being able to directly set variables based on other variables. This is the feature I most want to see right now, by far.
     
    Friedman likes this.
  3. gene.sis

    gene.sis CHYOA Guru

    I would like to have the ability to do calculations with more than one variable as well, though I think that won't be enough.

    To be able to implement complex game mechanics, things like conditionals, logical operators, min/max, and rounding (some calculations might result in floating point numbers) might be necessary as well.
     
    Lilyflier and Friedman like this.
  4. Lilyflier

    Lilyflier Virgin

    Hmm I wonder how far Friedman (I assume it's Friedman?) is aiming to take this new game mode.

    Depending on how much he's planning to add, it might be most efficient (albeit still a ton of work) to lean in on the user-generated aspect of the site, implement some fundamentals (loops, functions, setting variables based on other variables, etc.) and then some kinda system to allow users to create and share functions. With that:
    • We could build up from even just bitwise operations to typical arithmetic operations, common rpg systems, various specialty functions like pseudorandom number generators, etc., saving Friedman from having to do any of the work for that stuff himself.
    • Users who have no experience with coding/etc. could easily use many of the useful but complicated systems that other users create.
    • Friedman could just make a few of the very generally useful functions public and referenced in the documentation, for people who don't want to go browsing to add user-made functions that allow them to easily do fundamentals like foo = bar1 × bar2 via something like foo = multiply(bar1, bar2).

    But honestly I'm just happy game mode got any updates, I wasn't expecting it and it's already much better than it was.