New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formula Format #506
Comments
Its not a bad idea. I think the problem I see is that the effort to abstract the equations "in JSON" would create a maintenance burden. Most (all?) of the math for combat, status effects, etc takes more than a few lines of code, so trying to express the code in JSON seems like a lot of effort. However, I do fully support a cleanup of the calculation code and consolidating it into a python module. |
Alright, so should I make a system similar to the AI system? |
Most of the formulas that you would likely be interested in are in https://github.com/Tuxemon/Tuxemon/blob/development/tuxemon/core/components/technique.py As for organization, you could start with writing out the equations in python, then wrapping them in functions. Document the functions and put them in a module. Where ever they are used, modify the existing functions to call the new functions you are writing. Then document all of them with type docstrings and a line or two about how they work. Feel free to ping me @bitcraft on the discord if you have questions. |
I think there should be a formula format so that a specific equation isn't tied to the engine. This will be useful to damage calculations, gained experience, cost at shops, etc, It will maybe be expressed in JSON, or a python function. What do people think?
The text was updated successfully, but these errors were encountered: