Coder Social home page Coder Social logo

Comments (3)

XenotropicDev avatar XenotropicDev commented on August 25, 2024 1

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.

rsek avatar rsek commented on August 25, 2024

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.

rsek avatar rsek commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.