76DPSCalculator is a prototype damage per second calculator for the game Fallout 76.
git clone https://github.com/Teekiz/76DPSCalculator.git
Ensure that src/main/resources/application.properties
is properly configured:
spring.application.name=76DPSCalculator
spring.session.store.type=redis
spring.data.redis.host=redis
spring.data.redis.port=6379
files.path.properties=/app/config/filepaths.properties
storage.path.properties=/app/config/storagepath.properties
file.paths.modifierExpression=/app/config/expressions/modifierExpressions.json
file.paths.methodScript=/app/config/scripts/methodScript.groovy
Run the following command to build the JAR file:
./gradlew build
docker-compose up -d --build
This will:
- Build and start the Spring Boot application (
spring-boot-app
) - Start a Redis container (
redis
)
To check if Redis is running:
docker logs redis
To check if the application is running:
docker logs spring-boot-app
The application should be accessible at:
http://localhost:8080
For more information see usage.
Below are some example curl
requests to interact with the API.
//Creating a new loadout with ID of 1
curl -X GET "http://localhost:8080/api/loadouts/getLoadout?loadoutID=1"
//Setting loadout 1's weapon to 10MM Pistol
curl -X POST "http://localhost:8080/api/loadouts/setWeapon?loadoutID=1&weaponID=WEAPONS2"
//Adding Perk "Gunslinger"
curl -X POST "http://localhost:8080/api/loadouts/addPerk?loadoutID=1&perkID=PERKS1"
//Changing Gunslingers Rank to 2
curl -X POST "http://localhost:8080/api/loadouts/changePerkRank?loadoutID=1&perkID=PERKS1&perkRank=2"
//Getting the DPS of loadout 1
curl -X GET "http://localhost:8080/api/services/getLoadoutDPS?loadoutID=1"
//Creating a new loadout with ID of 2
curl -X GET "http://localhost:8080/api/loadouts/getLoadout?loadoutID=2"
//Setting loadout 2's weapon to Assaultron Blade
curl -X POST "http://localhost:8080/api/loadouts/setWeapon?loadoutID=2&weaponID=WEAPONS1"
//Setting loadout 2's player to strength level 5
curl -X POST "http://localhost:8080/api/loadouts/changeSpecial?loadoutID=2&special=STRENGTH&value=5"
//Adding adrenal reaction
curl -X POST "http://localhost:8080/api/loadouts/addMutation?loadoutID=2&mutationID=MUTATIONS1"
//Adding Fury
curl -X POST "http://localhost:8080/api/loadouts/addConsumable?loadoutID=1&consumableID=CONSUMABLES3"
//Getting the DPS for both loadouts
curl -X GET "http://localhost:8080/api/services/getAllLoadoutsDPS"