Skip to content

Instantly share code, notes, and snippets.

@The-Fireplace
Last active January 20, 2023 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save The-Fireplace/2b6e21b1892bc5eafc4c70ab49ed3505 to your computer and use it in GitHub Desktop.
Save The-Fireplace/2b6e21b1892bc5eafc4c70ab49ed3505 to your computer and use it in GitHub Desktop.
A quick guide to formulas in the config for the Clans Minecraft mod.
Supports operators + - * / ^ as well as parenthesis ()
m gets replaced with the clan's current raid reward multiplier, or 1 if increasing rewards are disabled.
c gets replaced with the clan's current claim count.
f gets replaced with the clan's economy account balance.
p gets replaced with the clan's member count.
d gets replaced with the number of defenders the raid had, if applicable, or the number of online clan members in survival mode otherwise.
w gets replaced with the average Win-Loss Ratio of the raiding party, if applicable, or 1 otherwise.
If you just want a constant value, that works too! Just put the number you want to set it to as the formula.
A few examples:
50+2*c
25+2*d/3+p/4
f/100
(30+d)/(30+p)
420
@Temtatork
Copy link

Temtatork commented Apr 8, 2020

As a non coder i cant understand

@The-Fireplace
Copy link
Author

As a non coder i cant understand

It's less of a coding thing and more of a math thing. Let me explain a few examples and see if that helps.
If the formula is 300, the value will always be 300, no matter what. Now the next level of complexity, using operators. If we make the formula 10*10, that gives us 100 every time. Now let's introduce variables. c*10 will multiply the clan's number of claims by 10. So if the clan has 2 claims, it would give us 20. If the clan has 30 claims, it would give us 300. Does that help clear things up?

@TheLiveWolf
Copy link

It's less of a coding thing and more of a math thing.

You don't know how much that helped me...
Thank you alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment