Comments (3)
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.
from dataforged.
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.
from dataforged.
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.
from dataforged.
Related Issues (20)
- Categories objects for moves and assets HOT 1
- Ensure all items in json are sorted by page number HOT 1
- Including dataforged as node package HOT 4
- deeper asset annotation HOT 1
- automatically generated json schemas HOT 1
- GUI for building dataforged-compliant hombrew content HOT 4
- packaging for python
- packaging for C# + nuget
- offer a relational DB in sqlite
- add remaining svg icons
- Query: Is Ironsworn data going to move in here as well? HOT 5
- update licensing info
- Duplicate ID in reveal a danger alt trigger HOT 1
- add documentation on best means of traversing oracle hierarchy
- update Scene Challenge moves for most recent update
- document divergences from 'canonical' content, e.g. scene challenge move "category"
- Non unique JSON ids HOT 2
- Grappler first 'Enabled' ability should be true HOT 4
- Convert links in moves.md to internal links
- Starforged Asset Blademaster, missing checkbox in 'Name' Input on third Ability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataforged.