tewtal / SMZ3Randomizer

Super Metroid & A Link to the Past Crossover Item Randomizer V11
https://samus.link/
MIT License
75 stars 32 forks source link

API support for starting items #211

Closed tewtal closed 1 year ago

tewtal commented 1 year ago

Initial API support for setting starting items for both ALTTP and SM. Starting items are set by setting the config flag initialitems in the API call.

The format is a comma separated list of items, with optional quantity using a colon and a number.

Example below that starts with Gravity, Morph, 4 E-Tanks, Master Sword and Pegasus boots: "initialitems": "Boots, ProgressiveSword:2, Gravity, Morph, ETank:4"

The item identifier are the same as the "ItemType" enum here: https://github.com/tewtal/SMZ3Randomizer/blob/9026bd2b4b0683441b1d3ef486a1bf4555356f14/Randomizer.SMZ3/Item.cs#L12

It's possible to set any item, but only progression items, SM energy, SM ammo, ALTTP bombs and ALTTP arrows will work well. For setting things like rupees, set one of the rupee items with a quantity and it will be added up, same with energy and other "additive" items. The same goes for the progressive items, just set the count for how many "upgrades" to give.