Skip to content

Conversation

@nicopop
Copy link
Contributor

@nicopop nicopop commented May 23, 2024

As asked multiple times a way to modify the options

Instead of adding the parameters everywhere its possible to create options, I regrouped those and the ability to create options in a new options.json

why a option.json?

  • Have 1 file with all the parameters of options
  • for people that dont want to touch python/hooks

What's included in options.json:

  • Creating new options
  • Modifiying their description
  • Modifiying their display name
  • Modifiying their visibility
  • Grouping them in the Option Groups

Old description bellow

Again this starts as a Draft PR so people can comment on what I've done so far.
In this pr I included a schema that use if, then, else statement. Its my first time using those and they seem to work as I want.

What this adds:

A options.json file that get converted to AP's options thats it, other feature like something to do with choice options values will need to be added later

TODO:

  • Decide what to do with existing goal option when we go and add the generated one
  • Maybe do a special goal detection in the schema so it only let creator make it a choice option
  • Move the new functions elsewere so they can be reused more easily (if appropriate)

tests:

  • json is validated by schema for every type in enum
  • Generate/webhost a game with options.json
  • Generate/webhost without options.json

@nicopop nicopop changed the title Adding option.json Adding options.json May 23, 2024
@silasary
Copy link
Collaborator

I'd prefer this be an "options" key within game.json

@FuzzyGamesOn
Copy link
Collaborator

I'd prefer this be an "options" key within game.json

This might be another good topic for a group discussion in the dev channel to see what everyone thinks.

Original intent for game.json was to have meta things for the game, and have collections of standalone things go elsewhere. Which I realize means that starting items might be in the wrong place, too. 😄Reasoning behind limiting game.json to meta things would be to limit the complexity and purpose of the file, so each JSON is mostly in charge of describing one type of thing.

@nicopop nicopop mentioned this pull request Jul 20, 2024
@nicopop nicopop marked this pull request as ready for review July 21, 2024 21:55
@nicopop nicopop requested review from FuzzyGamesOn and silasary July 21, 2024 23:16
@nicopop nicopop self-assigned this Sep 29, 2024
@FuzzyGamesOn
Copy link
Collaborator

My two main questions when looking at this PR are:

  1. What does this empower the user to do, beyond creating options and adding option descriptions for their category.json yaml_options and their goal option?
  2. How is this template syntax easier or more understandable than creating options in code? (The syntax actually just looks like a direct port of the code approach in hooks. Template syntax usually simplifies things and makes some assumptions for the user.)

Or, to put the questions more simply:
Who is this made for, and how is this easier than the hooks approach?

@nicopop
Copy link
Contributor Author

nicopop commented Nov 30, 2024

reposting this because it's in a resolved conversation

Added a thread here for discussion to cut down on comment chains while we figure stuff out: https://discord.com/channels/1097532591650910289/1311063001469812807

silasary
silasary previously approved these changes Dec 2, 2024
silasary
silasary previously approved these changes Dec 2, 2024
Copy link
Collaborator

@FuzzyGamesOn FuzzyGamesOn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most minor of changes. Rest looks great 😃

@silasary silasary merged commit 5d067ec into main Dec 5, 2024
@silasary silasary deleted the adding-Option.json branch December 5, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants