Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Inspector Math Expressions : edit formulas directly in the Inspector

Discussion in 'Assets and Asset Store' started by Inspector-Math-Expressions, Nov 29, 2015.

  1. Inspector-Math-Expressions

    Inspector-Math-Expressions

    Joined:
    Nov 29, 2015
    Posts:
    5
    Inspector Math Expressions is a tiny Editor extension, which allows you to edit formulas directly in Inspector without recompilation code!

    Why is the best approach?
    Good game balance is an important part of the game.
    Formulas are one of main part, which is constantly being edited. Every time recompile the project - is a terrible idea!
    Especially if you have a game designer in a team, he could easily edit balance formulas directly in the game without modifying the code.
    If your game has already been published, and you want to upgrade the game balance - it is not a problem. Simply update asset bundles with formulas - and you have a new game balance. Especially it is important for iOS, which updated version of the application can take up to 10 days.

    With Inspector Math Expressions you will:
    - Math expressions as fields of class
    - Math expressions as ScriptableObject
    - Editing math expressions inside Inspector window
    - Easy creation of new math expressions templates Basic set of mathematical functions for use inside the formula (+,-,/,*,^, (), sqrt, abs, ln, floor, ceil, round, sin, cos, tan, asin, acos, atan, atan2, min, max, rnd, clamp, E, PI)
    - Extension capabilities with own math functions.

    Supports all platforms.
     
  2. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Would be great if it dealt with parsing dice roll strings and assisted in some way with regular expressions...
     
  3. Inspector-Math-Expressions

    Inspector-Math-Expressions

    Joined:
    Nov 29, 2015
    Posts:
    5
    Thank you for your suggestion!
    In current version you can add your own function for dice like d(A,X) which means AdX. For example 4d5-10 will be d(4,5)-10.
    In the next update I will add a binary operator "d" for dice algebra.
     
  4. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Excellent! . Will look for that and think it will make this asset more broadly attractive... although I can already see the use of complex formulae for rpg abilities, skills progression etc...
     
  5. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
  6. Inspector-Math-Expressions

    Inspector-Math-Expressions

    Joined:
    Nov 29, 2015
    Posts:
    5
    I've added new documentation section Dice notation:

    Expressions supports dice notation, but ‘@’ is used instead of ‘d’ and ‘#’ is used instead of z. For example 2d6 will be in “Expression” field 2@6. There are few examples: 2z8+5 : 2#8+5, 4d4-4 : 4@4-4, d100 : 1@100, etc. In any time you can change @ and # to d and z in Utils.cs file but it can lead to unreadable expressions with some arguments, for example expression chargeCount@chargeForce will be chargeCountdchargeForce.
     
  7. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
  8. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @ Inspector Maths Expressions,

    I've just purchased!
     
  9. Inspector-Math-Expressions

    Inspector-Math-Expressions

    Joined:
    Nov 29, 2015
    Posts:
    5
    Thank you for purchase! I will be appreciated if you rate Inspector Math Expressions in Asset Store and leave a comment. Also if you have any question feel free to ask me.
     
  10. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Will do. Have you included a dice notation?
     
  11. Inspector-Math-Expressions

    Inspector-Math-Expressions

    Joined:
    Nov 29, 2015
    Posts:
    5
    Thank you! Yes, dice notation was included to asset. You can see examples in folder Examples/DiceNotation.
     
  12. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215