Package: osrsmath
The Mathematics and Optimization of OSRSThe purpose of this project is to accurately modelOld School Runescapemechanics in order to optimize or analyze game play. This game is played over long periods of time (months or years) and so players are often seeking the most optimal route to their desired accomplishments. In particular, combat is a particularly rewarding application, as very complex problems that were previously unsolved for decades can now be.If you're interested, you can join thediscordto discuss anything!There are three components to this project:1. ApplicationsThese application provide useful functionalities for end users. Once installed, they can be run using the command:python -m [Module Location].ApplicationModule LocationDescriptionOptimizeosrsmath.apps.optimize.mainWhat is the most efficient equipment to wear when fighting a given opponent?2. LibraryFor developers, they can use the basic functionalities (like modeling combat or potion boosts) to build their own applications. The code is available onPyPi, and can be installed usingpip3 install osrsmath. Within their own code the can import functionalities usingimport osrsmath.[module_of_interest]. Download the source, and check out the documentation for the modules atOSRSmath/osrsmath/docs/html/osrsmath/index.htmlto see what can be done.3. DocumentationCoherent and comprehensive documentation doesn't really exist regarding the math behind osrs. This project provides adocumentthat attempts to fill this gap. It also documents its source code, which can be viewed by downloading the source and navigating toosrsmath/docs/html/osrsmath/index.html. In future, it would be nice to host this online.InstallingUserThis application was written in the programming languagePython, which has two major version.python3is the version used here, more specifically any version greater than3.6.3should work (the latest is best).To installPythonsimply visit thedownload page.Once it is installed, open a terminal (MacOS/Linux) or command prompt (Windows).Type the commandpip3 install --upgrade pipthenpip3 install osrsmathto install this program.Then typepython3 -m osrsmath.apps.[app_name].mainto run an application. For example, replace[app_name]withoptimizeto run the optimize application.You might also consider trying the executables directly, although there are currently installation issues, particularly on MacOS so this isn't currently recommended. To do this, navigate toGitHub releasesand download the latest version (Asset) for your system. Unzip, and run!DeveloperOpen a terminal/command prompt.Make sure you havepython3.6+installed (typepython --version)Make surepip3is installed (typepip3 --version).Update pippip3 install --upgrade pipUpdate setuptoolspip3 install --upgrade setuptoolsTo install the apps, or to use as a library:pip3 install osrsmathTo develop the code:Download the github source code, unzip it and place it anywhere.Open a terminal in that directory (which contains setup.py).Runpip3 install -e .Run the desired application with:python3 -m osrsmath.apps.[app_name].main. Linux may requiresudo apt-get install python3-pyqt5These installation methods have been tested on:Ubuntu 20.04(usingwsl1on windows),MacOS(Catalina 15.15.5),
andWindows 10(v1909)DevelopingPackaging:These are instructions for creating app executables:Typepip3 install PyInstallerOn MacOS,python<=3.6.3is required since PyInstaller on macos isn't supported after that.
On Windows, the app store version of Python (3.8) doesn't work.Navigate to theApplicationfolder of the app you want to create an executable for.Typepython3 package.py.Symbolic links should then be created todist/main/main[.exe], the should be named osrsmath-[app_name].On MacOS, the application has to be signed. I don't know the Mac ecosystem very well, however these websites helped me:https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signinghttps://stackoverflow.com/questions/16845169/error-when-trying-to-obtain-a-certificate-the-specified-item-could-not-be-foundhttps://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-aGUI Development:These are instructions for creating & modifying the GUI design:UseQT designer.Create or modify a.uifile in QT designer.Runpython -m osrsmath.apps.GUI.shared.util maketo compile them.DocumentationTo compile the latex documents a latex compiler needs to be installed.MiKTeXis a good cross-platform option. Alternatively, on linux you could simply typesudo apt-get install texlive-full.The central document can be compiled withpdflatex main.tex.
The html documentation usespdoc3which can be installed withpip3 install pdoc3. Then the documentation can be compiled by naviating to the top directory (containingsetup.py) and type:pdoc --html osrsmath -o osrsmath/docs/html -c latex_math=True --force
python osrsmath/docs/compile.pyTestsTheunittestmodule is used for testing. Navigate to thetestsdirectory and run the commandpython3 -m unittestAuthorsNawar Ismail-PalforeIf you are interested in contributing, check out theissues sectionon GitHub.LicenseThis open-source project is licensed under the MIT License - see theLICENSEfile for details.AcknowledgmentsCodeosrsbox- Provides Data filesdijkstar- Implements the dijkstra AlgorithmKnowledgeOSRSBox melee dpsDPS Calculator by BitterkoekjeForum Post by BitterkoekjeOverkill by NukelaweAccuracy & Xp Rate Discussion by MachOSRSAccuracy Discussion