# AI Usage

AI has been used in this project in the following areas:

- C++ file to hook into the actual game (Most of levelunlock.cpp)
- C++ based Overlay for showing in game items (translated from CSS)
- Shop rules for the apworld
- Decompiling
- Refomatting mp4 file into a usm file

These have been done with heavy direction from me. While I have monitored and checked what the AI has been doing I am by no means an expert in c++, so if there is something you spot as an issue or improvement please let me know (this was intended to be a little bit of a training exercise).

# Credits
This mod uses https://github.com/N00byKing/APCpp to handle the AP interactions.

## First Setup (Host)

1. Download and install Archipelago.
2. Open Archipelago
3. Download spider_man_shattered_dimensions.apworld and click Install APWorld in Archipelago, selecting spider_man_shattered_dimensions.apworld when prompted
4. Edit spider_man_sd.yaml to change any options you may want (or use AP client's option generator)
5. Make sure you have everyone's APWorld and yaml installed and click generate.

## First Setup (Playing)

1. Place the "levelunlock_launcher.exe" , "APCpp.dll" and "levelunlock.dll" in your installation folder.
2. Place AP.usm in /videos.

## Starting a new Multi World

1. Backup your current save and replace it with the provided "Spider-Man SD Save.fpop" (checks will not trigger if you are using an existing save)
2. Make sure the levelunlock.pending and levelunlock.cur are empty or deleted
3. Start the game using "levelunlock.exe"
4. Enter Slot and Host Details
5. Enjoy

## When AP Disconnects
When AP disconnects you will see a message in the overlay, informing you of this. While checks will be queued in the pending file, shops will be set to their default. Don't buy any items in the shop while it is disconnected as this will cause issues.

## Items
- Parker Luck - Nothing (Fills remaining locations)
- Unlock <level> - Unlocks specified Level
- <ability name> e.g. Webstrike - Unlocks specified ability (some abilities may not take effect until other abilities are found e.g. web strike evade without web strike).
- Small Essence Drop - 1000 essence
- Medium Essence Drop - 5000 essence
- Large Essence Drop - 10000 essence
- Extra Large Essence Drop - 25000 essence
- Character Upgrades Slots x-y - Based on your Character Upgrade slots per item unlock. This will unlock each of these slots for purchase. The final slot may just be Character Upgrades Slots x.
- Combat Skills Slots x-y - Based on your Character Upgrade slots per item unlock. This will unlock each of these slots for purchase. The final slot may just be Combat Skills Slots x.
- Spiderbot - Mcguffin item for completing the game, serves no other purpose.

## Goal

Collect X Spiderbots and the Unlock Mysterio item. Then defeat Mysterio (you may enter and defeat Mysterio before this but, currently this will not give you anything).

## Extra Information
- The maximum total items for Small Essence Drop, Medium Essence Drop, Large Essence Drop, Extra Large Essence Drop, Character Upgrades Slots x-y, Combat Skills Slots x-y and Spiderbot is 221. It's very easy to go over this limit which will cause generation to fail so be careful when adjusting these settings.

- Having large amounts of unlocks in a single Character Upgrades Slots or Combat Skills Slots can make the logic skew heavily towards shops and will likely cause more grinding.

## Future Plans
- Deathlink
- If possible Tokensanity
- Easier setup
- Auto hint shops
- More theme controls

## How can you use the source files for this mod
Feel free to create fork of this mod or make changes to it as you see fit, just include a reference to this mod within it.