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

Schema refactor #458

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Schema refactor #458

wants to merge 4 commits into from

Conversation

dyceron
Copy link
Collaborator

@dyceron dyceron commented Aug 18, 2024

This changes the schema so it breaks compatibility with older versions, so a major version bump is necessary.

  • camera_names_dict has been moved out of cosmetic options and is now called collision_camera_attributes.
    • A new field has been added to support adding in custom environmental sources, such as new heat rooms or submerged rooms. (NYI)
    • I removed the manual cc naming since that will be handled by RDV
    • More fields can be added to this making it flexible and compatible going forward
  • reveal_map_on_start has been moved to cosmetic patches, though this one is still not very relevant currently

I'm leaving this PR as a draft in case we decide on making other big changes to the schema, or if we possibly do keep compatibility with older versions. I'm open to ideas.

@dyceron dyceron requested a review from ThanatosGit August 18, 2024 23:03
@dyceron dyceron marked this pull request as draft August 19, 2024 02:01
Copy link
Collaborator

@ThanatosGit ThanatosGit left a comment

Choose a reason for hiding this comment

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

The schema is not fully validating what it should.

src/open_samus_returns_rando/files/schema.json Outdated Show resolved Hide resolved
src/open_samus_returns_rando/files/schema.json Outdated Show resolved Hide resolved
@dyceron
Copy link
Collaborator Author

dyceron commented Sep 4, 2024

Wondering if it's worth the effort to refactor the pickups and doors as well and move them into the cc section, so then we could have something like:

    "scenario_data": {
        "s000_surface": {
            "collision_camera_000": {
                "room_name": "Landing Site",
                "pickups": [
                    {
                        "pickup_type": "actor",
                        "caption": "Nothing acquired.",
                        "resources": [
                            [
                                {
                                    "item_id": "ITEM_NONE",
                                    "quantity": 1
                                }
                            ]
                        ],
                        "actor": "LE_Item_005",
                        "model": [
                            "itemsphere"
                        ]
                    }
                ],
                "doors": [    
                    {
                        "actor": "Door012",
                        "door_type": "power_beam"
                    },
                    {
                        "actor": "Door011",
                        "door_type": "power_beam"
                    },
                    {
                        "actor": "Door014",
                        "door_type": "power_bomb"
                    }
                ],
                "custom_env_source": "lava"
            }
        }
    }

Could also be good for plandos.

@ThanatosGit
Copy link
Collaborator

I like it. It makes it easier to understand and navigate through a patcher file.

It goes hand in hand with some code refactoring. E.g. atm patching pickups is just going through a giant list of pickups, which won't exist anymore. Probably should iterate through each scenario, through each collision camera and then call the appropriate patch functions for all the elements.

I guess the pdf in RDV will be more like a rewrite of some parts.

But I can't answer if it's worth the/your effort. There was some work done in RDV for doing plandos from the rdvgame.
I kinda assume that people like to use RDV for a plando much more compared to doing it via the patcher directly. Tbh I think it's much better to use a patcher directly for plandos but it has a much bigger hurdle to install and use it.

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.

2 participants