Conversation
|
There's some talk with @Pepper0ni about converting logic to a DSL which we can compile to C++ (or C?) & Python to share code with Archipelago. Could also have that output a datastructure so you wouldn't need to parse C++ How does your tracker handle things it can't parse? how much is it parsing correctly? maybe we can use this to translate most of the existing logic to DSL |
This would be the most ideal, I've been trying to keep the Parsing/Evaluating separate from the tracker so that it could be swapped out when that project is ready.
I have another project I used for the parser/evaluator development and I got every location, entrance, and event access condition string parsing, but I probably need to build in a dev option to test every condition string while in SoH. At the moment failing to parse/evaluate an expression would crash the game, I still need to add some error handling for this. |
Added a few more cleanup functions.
16a530e to
c6c8720
Compare


Adds a new Logic Tracker window to help show why a Randomizer Check is available or not. It shows and evaluates the Randomizer Check condition expressions and subexpressions. It also shows and evaluates the condition expression and subexpressions of the entrances to the regions that contain the Randomizer Check.
Because the logic is written in C++ which does not have any kind of reflection, so the expressions have to represented as strings and parsed to an Abstract Syntax Tree to be evaluated at runtime. To do this without adding another dependency to the project, I wrote a custom tokenizer, parser, and evaluator. This method does require registering logic variables and functions, so it is prone to runtime errors. There is a project to move the logic to an external source for Archipelago which may replace this custom parser and evaluator when it's done.
For this to work, it needs the Locations, Entrances, and EventAccesses condition strings and enum to string mappings. As such, this touches many files and will cause merge conflicts for open PRs.
Example
Deku Tree GS Basement Vines Check
It's not available because I can't kill a Gold Skulltula with a Bomb Throw (or Boomerang, Din's Fire, Hookshot, Longshot, Bombchus, Slingshot, or Bow).

Deku Tree Lobby to Deku Tree Basement Lower Entrance
It is accessible because I can attack.

Deku Tree Entryway to Deku Tree Lobby Entrance
It is accessible because the dungeon is vanilla.

KF Outside Deku Tree to Deku Tree Entryway Entrance
It is accessible because I as a child.

Kokiri Forest to KF Outside Deku Tree Entrance
It is accessible because the Closed Forest is set to Off.

Build Artifacts