Inspiration

I wanted a better solution to resource gathering in Fortnite Save the World than manually farming, and I believe that I could share this code with others in the community to make farming less tedious for them as well. I had planned this project for a while but was too busy to start working on it. I was mainly interested in the application of AutoHotKey and its capabilities as I had started learning it this past summer. This is only my second script so it is more of a proof-of-concept than a code meant for mainstream use but my goal is to make it publically available and relatively easy to modify for each user's needs.

What it does

This script runs an endurance mission in Fortnite Save the World repeatedly until stopped by the user, farming resources during the mission and earning mission rewards. An endurance mission lasts between 2.5-3 hours (depending on luck) and is built in the zone homebase meaning that buildings and traps persit between missions. Without this persistence, it would be significantly harder to automate the mission which is why I chose to farm the endurance mission, along with it being the longest mission (less load and wait time) and having very useful rewards. The mission rewards two classes of resources, tradable and non-tradeable. The script farms approximately $24 USD of tradable resources per day. (Assuming that the script completes 5 endurances per day). It also farms non-tradable resources that would take around 4 hrs of manual playing in the hardest possible missions (assuming 100% success rate). Not only does the script automate farming, it is also more efficient than conventional methods of resource farming. The script also takes input from discord messages in order to run certain methods such as Broadcast which streams the desktop screen. There is built in crash detection to ensure than the script doesn't cause any unintended results such as opening other applications.

How we built it

I used an ahk notepad with default directives to store the code and executed it by running the script through the built-in run feature on the notepad. I also used google docs on my laptop to store code that I was modifying or debugging while the script ran on my pc. I used built in variables such as A_Min and A_Sec to time the different methods and Clipboard (also built-in) to read the Discord messages.

Challenges we ran into

Since the mission was up to 3 hrs long, I could test individual methods with relative ease but testing main took a long time, ending in what was often a minor error that would require me to restart the whole process making the coding of main extremely tedious.

Accomplishments that we're proud of

I am very proud to have a script with so many parts working in some capacity, especially with my experience. I am also proud to make something with so much potential benefit to one of my favorite communities.

What we learned

I learned soooooo many autohotkey methods and discovered many of the disadvantages and advantages to it, such as how the simple syntax can make most programming easy but in some rare cases difficult. One of these cases was when I attempted to make a conditional statement but accidentally compared a variable to a variable instead of a string because the condition is automatically considered an expression so the variables don't have to be surrounded by percentage signs in this case. To make matters worse, any word that autohotkey hasn't seen in the code previously is interpreted as a variable, even if it hasn't been declared which led to no error being produced by my mistake as the imposter variable was interpreted as an empty string.

What's next for Auto Endurance

I would like to first add another endurance method for a different endurance mission and a corresponding command that can be used through discord, allowing the player to earn a different set of non-tradable rewards and giving them more options on what to farm. I would then like to add more methods such as ones that allow the user to switch which endurance is being run remotely through discord for even more functionality.

Built With

Share this project:

Updates