Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Scripted world info does not appear in the world info menu #5

@45adhoc

Description

@45adhoc

Now that the world info is accessible mid-adventure, I decided to look at the world info of one of my scripted adventures, only to find that it was empty. The following code demonstrates that scripted world info does exist in memory when run in an adventure:

const modifier = (text) => {
  
  if (!state.worldInfoAdded) {
    state.worldInfoAdded = true
    addWorldEntry('foo', 'bar')
    return {text: JSON.stringify(worldEntries)}
  }

return {text: text}
}

modifier(text)

However, it will not show up in the world info menu, even after setting world info to be shown in the scenario settings.

Update: It looks like the problem is a missing variable. Running the the above code in a test scenario produced the following:

[{"keys":"You","entry":"You are a cool dude.","isNotHidden":true},{"id":"0.23626612215539655","keys":"foo","entry":"bar"}]

The left entry was added through the world info menu, and the right was added through the script. It seems addWorldEntry has not been updated to use isNotHidden, which means scripted world info will never appear in the menu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions