This mod turns your in-game chat console into a powerful, instant scientific calculator. Simply press ` (tilde) or Enter to open the chat console, type your mathematical expression, and press Enter to see the result.
🔄 NEW: Space Age Quality & Recycling Loop Analytics
Stop guessing your raw material requirements when hunting for Legendary tier items! The calculator now fully evaluates closed-circuit recycling loops.
When a factory setup recycles crafting failures, the recovered materials feedback chain scales geometrically based on your assembling machine's productivity. Your calculator solves this instantly using a native geometric series model.
-
How to use: Simply type
loop(your_productivity_modifier)directly into game chat or write/calc loop(your_productivity_modifier). -
Inputs supported: Both whole percentages or raw fractions are recognized. For example,
loop(40)andloop(0.40)yield the exact same accurate output. -
Diagnostic Output Display:
Recycling Loop Analytics [Productivity: +40%]:
* Yield Multiplier: 1.538x total crafts per initial raw batch.
* Resource Cost Reduction: Total raw item costs reduced by 35.0%.
1. Basic Operators & Syntax
These standard arithmetic operators follow standard algebraic order of operations (PEMDAS / BODMAS).
- Addition (
+) - Example:
15 + 5 - Output:
15 + 5 = 20 - Subtraction / Negation (
-) - Example:
20 - 5or-5 - Output:
20 - 5 = 15 - Multiplication (
*) - Example:
4 * 5 - Output:
4 * 5 = 20 - Division (
/) - Example:
20 / 4 - Output:
20 / 4 = 5 - Modulo / Remainder (
%) - Example:
10 % 3 - Output:
10 % 3 = 1 - Exponentiation / Power (
^) - Example:
2 ^ 3 - Output:
2 ^ 3 = 8 - Parentheses / Grouping (
()) - Example:
(2 + 3) * 4 - Output:
(2 + 3) * 4 = 20
2. Smart Percentage Logic
The mod mimics a standard pocket calculator when evaluating percentages, dynamically adapting based on the preceding operator.
- Contextual Add / Subtract: Automatically applies the percentage to the base number.
- Input:
100 - 10%⇒ Evaluates as:100 - (100 * 0.10)⇒ Result:90 - Input:
50 + 20%⇒ Evaluates as:50 + (50 * 0.20)⇒ Result:60 - Standalone / Multiplier: Automatically converts the percentage into a raw fraction.
- Input:
200 * 10%⇒ Evaluates as:200 * 0.10⇒ Result:20
3. Supported Mathematical Functions
You can invoke any native Lua mathematical function directly by formatting it as function_name(expression). They can be freely combined with normal operators.
Core Arithmetic & Advanced Properties
abs(x)— Absolute value (converts negatives to positives). Example:abs(-25) = 25sqrt(x)— Square root. Example:sqrt(144) = 12floor(x)— Rounds down to the nearest whole integer. Example:floor(5.99) = 5ceil(x)— Rounds up to the nearest whole integer. Example:ceil(5.01) = 6modf(x)— Breaks a number into its integer and fractional components. Example: `modf(7.25) = 7 and 0.25
Exponential & Logarithmic
log(x)— Calculates the natural logarithm (base e).log10(x)— Calculates the base-10 logarithm.exp(x)— Calculates $e^x$ (exponential function).
Trigonometry (Angles utilize Radians)
sin(x)— Sine of an angle.cos(x)— Cosine of an angle.tan(x)— Tangent of an angle.asin(x)— Arcsine (inverse sine), returns radians.acos(x)— Arccosine (inverse cosine), returns radians.atan(x)— Arctangent (inverse tangent), returns radians.rad(x)— Utility to convert degrees into radians. Example:sin(rad(90)) = 1deg(x)— Utility to convert radians into degrees.
4. Base Conversions
Quickly convert integers between binary, hexadecimal, and decimal formats using explicit wrapping functions:
bin(x)— Converts an input number to its binary (0b...) string format.- Example:
bin(10)⇒ Result:0b1010 hex(x)— Converts an input number to its hexadecimal (0x...) format.- Example:
hex(255)⇒ Result:0xff dec(x)— Parses a binary or hex prefix string back into a base-10 layout.- Example:
dec(0xff)⇒ Result:255
❤️ If My Prompt Calculator helps with your calculations and you want to support my work, consider buying me a coffee!
