vg-json-data / sm-json-data

JSON representations of Super Metroid Game Data
Other
26 stars 12 forks source link

Add collectsItems and setsFlags #1482

Closed blkerby closed 5 months ago

blkerby commented 5 months ago

This will resolve #1086.

Earlier I was resistant to add these because it requires adding extra nodes on the randomizer side to deal with them. But we're going to have to do that kind of thing anyway in order to handle door locks properly, so I no longer see a reason not to do this. Given that we have unlocksDoors on strats (and clearsObstacles, etc.), it only seems natural to have collectsItems and setsFlags. Eventually I would like if all the flags could be set using setsFlags in this way, and then we could remove flag nodes and their associated locks/yields (the way that flags are currently getting set), as part of the long-term goal of migrating strats away from being embedded inside "node" properties and into the room "strats" list instead.

kjbranch commented 5 months ago

I believe that currently going to an item node it is optional to collect the item (Even though Map Rando doesn't use that). Should collectsItems force the collection, and should we use it for that purpose?

blkerby commented 5 months ago

I believe that currently going to an item node it is optional to collect the item (Even though Map Rando doesn't use that). Should collectsItems force the collection, and should we use it for that purpose?

I think collectsItems should force collection (if not already collected), since it may need to be this way for remote acquire strats where collecting the item is also needed for overloading PLMs. And then we can also use collectsItems for other situations where collecting an item is unavoidable.