MV Looking for Calculator Plugin Mouse Click

Is there any existing on screen calculator for mv? i need the sin cos tan, add, subtract, multiply divide, functions..
1633260617999.png


EDIT:
I finally managed to code it anyway! HAHAHAHA

1730211580969.png
I dont know any plugin, but you can event it, I dont know how to do the AC,
sin, cos, tan functions though because I dont know where it is used.
the other part is easier.

but I think a plugin is smoother, depending how it used or where it is used,
to see how complex it is to be able for evented way or plugin.
i tried eventing it but it does not work, like you need a number input, or place value multiplier per digit
i tried eventing it but it does not work
Missing details, it can't be a problem in Rpg Maker, you may have something wrong when recording the variable that will make the calculation.
To make it work, the ideal is to use two variables, one for the result and one for the mathematical operation.
Try to do it like this:

Code:
◆Text:None, Window, Middle
:    :Input value:
◆Input Number:#0061, 8 digits
◆Loop
  ◆Text:None, Window, Middle
  :    :Total: \v[61]
  ◆Show Choices:+, -, *, /, Exit (Window, Middle, -, #5)
  :When +
    ◆Text:None, Window, Middle
    :    :Total: \v[61]
    ◆Input Number:#0062, 8 digits
    ◆Control Variables:#0061 += #0062
    ◆
  :When -
    ◆Text:None, Window, Middle
    :    :Total: \v[61]
    ◆Input Number:#0062, 8 digits
    ◆Control Variables:#0061 -= #0062
    ◆
  :When *
    ◆Text:None, Window, Middle
    :    :Total: \v[61]
    ◆Input Number:#0062, 8 digits
    ◆Control Variables:#0061 *= #0062
    ◆
  :When /
    ◆Text:None, Window, Middle
    :    :Total: \v[61]
    ◆Input Number:#0062, 8 digits
    ◆Control Variables:#0061 /= #0062
    ◆
  :When Exit
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above

The other operations can be done with the variable's Script field, where you can apply the Math funcion (Javascript):

Sin: Math.sin(Insert Number or Variable):
JavaScript:
Math.sin($gameVariables.value(61))

Cos: Math.cos(Insert Number or Variable):
JavaScript:
Math.cos($gameVariables.value(61))

Tan: Math.tan(Insert Number or Variable):
JavaScript:
Math.tan($gameVariables.value(61))
what i mean is i combine it with a picture button plugin. when player clicks the 1 button first, then 2 for the second, it should be 12, but i cant get the place values to work per press of digit. let's say it's a 9 digit calculator.. how do you do it such that successive press is the value added to the next place value?
Are you trying to event this? You would need 2 variables, one to hold the increasing value and one to hold the number pressed. PseudoCode

Clear the increasing value variable
Variable1 = 0
When the user presses a numerical button (0-9), that number goes into Variable2. Then Variable1 is multiplied by 10 and Variable2 is added to it.
So, first press, Variable1 = 0, Variable2 = 1, Variable1 = 0*0+Variable2=1.
Next press is 2, Variable2 = 2, Variable1 = 1*10, add Variable2, 10+2 = 12
Third press is 7, Variable2 = 7, Variable1 = 12*10 or 120, add Variable2, 120+7 = 127.
Continue until a non digit is pressed. Store Variable1 in another variable, probably an array, reset Variable1 to 0 and continue the process until the next non-numerical number is pressed.

If this were just a simple + - x / calculator, this would be easy, tedious but easy. But it looks like you want to make a scientific calculator and that could get convoluted really quickly. Do you need a full fledged scientific calculator or do you just need something that will give you the sin of a degree, which I think you'll need to convert to radians, and the cos, arc, tan and so on? Because if you need to do something like

(sin(90)/7^5*SquareRoot(62)-arc(55))/(6^3+(SquareRoot(3)*pi))=

I think every element would need to be stored as an array element, then, when finally = (or ENTER) hit, you'd extract each element as a string, concatenate that string, and use an Eval function to get the answer.

But if you just need to get one simple cos() or one simple sin(), it should be completely doable with common events.
what i mean is i combine it with a picture button plugin.
I apologize, I must have misinterpreted why you said you tried to do it for events.

You also didn't say what Button Plugin you're using.

I can give you an idea, you can map the part where buttons are NPC events with button graphics and use the methods I explained before.

But if the calculators are to appear on the characters then it gets more complicated without a window editor.

Good luck
thanks lady_jj and dev_with_coffee.. i will try improve the eventing.. im using tomoaky's variable window and button picture plugin. the event just goes to input first value, then input second value, then choose operation..

but as you said if i have to convert the strings to operation, maybe 111_inputform would be a better choice than an onscreen calculator..
I'm going to see this plugin, but referring to the String you can use this to convert:
JavaScript:
var mynumber="1234";
mynumber=Number(numberString); // 1234
so far no luck on this request. cant find the game i saw having this one
so far, eventing can be a little pain too, if you do the simple math on windows pc
calculater:

2 + 2 + 2 * 5 = output is 30 while the original correct answer would be 14.
so eventing it is also something else.

which a plugin can handle them better.
I dont know how to deal with that, same with a keypad which can have
the same logic mostly on numbers alone (so adding the logic for + - x : etc
should be added and read correctly from there as well.

good luck on it and hope someone with knowledge can build it.

but why do you want to use it inside MV as you can use a phone for calculator?
unless you make a calculator game 😛
so far, eventing can be a little pain too, if you do the simple math on windows pc
calculater:

2 + 2 + 2 * 5 = output is 30 while the original correct answer would be 14.
so eventing it is also something else.

which a plugin can handle them better.
I dont know how to deal with that, same with a keypad which can have
the same logic mostly on numbers alone (so adding the logic for + - x : etc
should be added and read correctly from there as well.

good luck on it and hope someone with knowledge can build it.

but why do you want to use it inside MV as you can use a phone for calculator?
unless you make a calculator game 😛
i'm making an educational game that require's a built in calc. simple operations are easy to make though if only 1 operation and not series.
Here's a reference if you at some point become intestered in parsing a series of math operations: https://jorendorff.github.io/calc/docs/calculator-parser.html
Coded it

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/looking-for-calculator-plugin-mouse-click.140979/