Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make oracle prerequisites more programmatically accessible #16

Open
rsek opened this issue Apr 6, 2021 · 3 comments
Open

make oracle prerequisites more programmatically accessible #16

rsek opened this issue Apr 6, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@rsek
Copy link
Owner

rsek commented Apr 6, 2021

basically moving from a format like:

"Region": "Terminus",

to

"Requires": {
  "Property": "Region",
  "Value": "Terminus"
}
@rsek rsek added the enhancement New feature or request label Apr 6, 2021
@rsek
Copy link
Owner Author

rsek commented May 6, 2021

for the record, the final format is

"Requires": {
  "Region": "Terminus"
}

the idea being that the Requires object can then be compared to the generated game object to see if it meets the requirements. Requires keys whose value is an array must match an item in the array; all keys of Requires must be met to qualify.

@rsek rsek closed this as completed May 6, 2021
@XenotropicDev
Copy link
Contributor

XenotropicDev commented Jun 28, 2021

This is still really hard to use programmatically (at least for strongly typed languages). The first issue is that because the property name contains the requirement and property names are often changed/removed at compile time in compiled languages, or only accessible through reflective programing it makes them hard/ugly to use. The second issue is that the values are now arrays of allowed prerequisites, so doing Table.Requires == myRequirement will no longer work.

I think your initial proposed format (below) is better, and makes adding new requirements in the future easier.

"Requires": {
  "Property": "Region",
  "Value": ["Terminus"]
}

The only issue I foresee with the above format is that things with multiple different requirements would not be supported unless it's an array of requirements.

@rsek
Copy link
Owner Author

rsek commented Aug 7, 2021

yeah, there's a not-insignificant number of oracles that have multiple prerequisites, so i'll need to give that format some thought. it might make sense to have two different sets of output from the YAML master files that i generate via a script: one for strongly typed languages and another that's semantically oriented (maybe even in a non-json format, to make it more accessible to people who want to incorporate it into a wiki or other non-programmatic implementation).

i'll reopen this to keep it on my radar.

@rsek rsek reopened this Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants