Standalone Assembly
This repository was created to distributing LLF’s assembly in a more user friendly way. I started this particular project with the SkillSystem available on August 10th, 2023, so there may be some adjustments because of this new base (for comparison, the SkillSystem LLF used was probably from around May 2020). The README in the repository has some more information on using/reading the repository.
Currently, it’s very small compared to everything that LLF has, but what it does contain should hopefully be a lot easier to use/insert into your own projects. Right now, I’ve ported over the two previously released modifications (ToggleDeploymentSwapping and UpdatedLButtonCycling) and have a new version of…
I’ll include the description below, but for a quick tl;dr, see the gif below (the Iron Sword is supposed to disappear; it’s acting as a coupon)
Example
Changes from the LLF version
- Scraiza’s shop list expansion assembly is now included. This has been modified to work with both ShoppingEdits and IconRework.
- Is now compatible with DurabilityBasedItems. Instead of reading the byte after item id as the event ID for bargains, shops that have bargains will need to be “paired” with pointers to their bargains. While this is more inconvenient, it’s now possible to set the base price of each bargain.
- Related to the above point, PriceModifiersMainLoop will now start its process by reading from PriceBaseModifierFunctions before moving onto multipliers.
- If a player unit with a full inventory and a coupon purchases something, the shopkeeper will first ask if you want the new item in the unit’s inventory before asking to send to convoy.
Description (from main file)
This changes how shops normally work in a few different ways. While several of these changes are mandatory (unless you take it upon yourself to make that not the case), there are a few optional changes that you can toggle below this large commented section.
Forced Modifications
- Adds functionality for reading price multipliers and discounts off of easily accessible lists. Also allows defining set values for variables such as price minimums and discount maximums.
- Changes the prep shop loading so that the shop list is determined by the current chapter.
- Installs a modified version of Scraiza’s ShopListExpansion asm. You can still have up to 255 items, but due to the increased complexity that ShoppingEdits brings, you may notice more lag in larger shop lists.
Optional Modifications
- Bargain functionality: By allowing an event ID to be set if the player purchases a specific item, you can have one-stock items. If you want to reuse an event ID, you will have to do that yourself in that chapter’s events. To make this limited stock effect possible, items with a price of 0 cannot be bought from the shop. This assembly was originally intended to be used with the prep shop only, but it can also be used for shops the player will access during the chapter itself. Keep in mind that events are usually included in a scope (“{#include …}”), so you will need to have the shop included outside of the scope if you want it to be on ShopBargainPairingList.
- Coupon functionality: Lower next purchase’s price by a set percentage, then disappear from the unit’s inventory. If a unit has a full inventory, but a coupon would be removed due to the purchase, the shopkeeper will ask the player if they want the purchased item with the unit before asking to send to convoy. To see the coupon functionality without having the actual item in your hack, IronSword will function as a Coupon if Coupon is not defined.
Edit: Updated ShoppingEdits.
- If ItemTable is repointed, ItemClearer should now correctly find it
- Renamed RemoveItem to RemoveItemFromUnit and added a message if RemoveItemFromUnit is already defined